Skip to content

Commit 1d353e7

Browse files
authored
release: Amplify JS release (aws-amplify#13569)
2 parents 8cc3fd5 + 0a07393 commit 1d353e7

File tree

18 files changed

+337
-39
lines changed

18 files changed

+337
-39
lines changed

.eslintrc.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,13 @@ module.exports = {
3535
'setupTests.ts',
3636
'jest.setup.*',
3737
'jest.config.*',
38-
// 'packages/adapter-nextjs/__tests__',
39-
// 'packages/analytics/__tests__',
4038
'packages/api/__tests__',
4139
'packages/api-graphql/__tests__',
42-
// 'packages/api-rest/__tests__',
43-
// 'packages/auth/__tests__',
44-
// 'packages/aws-amplify/__tests__',
45-
// 'packages/core/__tests__',
4640
'packages/datastore/__tests__',
4741
'packages/datastore-storage-adapter/__tests__',
48-
// 'packages/geo/__tests__',
4942
'packages/interactions/__tests__',
50-
// 'packages/notifications/__tests__',
5143
'packages/predictions/__tests__',
5244
'packages/pubsub/__tests__',
53-
'packages/react-native/__tests__',
54-
'packages/rtn-push-notification/__tests__',
55-
'packages/rtn-web-browser/__tests__',
56-
// 'packages/storage/__tests__',
5745
],
5846
rules: {
5947
camelcase: [

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@ the requirements below.
2424

2525
- [ ] PR description included
2626
- [ ] `yarn test` passes
27-
- [ ] Tests are [changed or added](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#steps-towards-contributions)
27+
- [ ] Unit Tests are [changed or added](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#steps-towards-contributions)
2828
- [ ] Relevant documentation is changed or added (and PR referenced)
29+
30+
31+
32+
#### Checklist for repo maintainers
33+
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
34+
35+
- [ ] Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
2936
- [ ] New source file paths included in this PR have been added to CODEOWNERS, if appropriate
30-
37+
3138
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/integ-config/integ-all.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,14 @@ tests:
822822
sample_name: [storage-gen2]
823823
spec: storage-gen2
824824
browser: *minimal_browser_list
825-
825+
- test_name: storage-guest-access
826+
desc: 'Next Storage guest access'
827+
framework: next
828+
category: storage
829+
sample_name: [guest-access]
830+
spec: storage-client-server
831+
browser: *minimal_browser_list
832+
826833
# INAPPMESSAGING
827834
- test_name: integ_in_app_messaging
828835
desc: 'React InApp Messaging'

.github/workflows/callable-npm-publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
run: |
6060
yarn run docs
6161
git add ./docs/api/
62-
git commit -m "chore(release): update API docs [skip release]"
62+
git commit -m "chore(release): Update API docs [skip release]"
6363
6464
- name: Push post release changes to the release branch
6565
working-directory: ./amplify-js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"publish:release": "yarn generate-metadata && lerna publish --conventional-commits --message 'chore(release): Publish [skip release]' --yes",
3232
"publish:v5-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-5 --message 'chore(release): Publish [ci skip]' --no-verify-access",
3333
"publish:verdaccio": "lerna publish --canary --force-publish --no-push --dist-tag=unstable --preid=unstable --yes",
34-
"generate-metadata": "git rev-parse --short HEAD > packages/core/metadata && git commit -am 'chore: set core metadata [skip release]'",
34+
"generate-metadata": "git rev-parse --short HEAD > packages/core/metadata && git commit -am 'chore(release): Set core metadata [skip release]'",
3535
"ts-coverage": "lerna run ts-coverage",
3636
"prepare": "husky && ./scripts/set-preid-versions.sh"
3737
},

packages/aws-amplify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@
485485
"name": "[Storage] list (S3)",
486486
"path": "./dist/esm/storage/index.mjs",
487487
"import": "{ list }",
488-
"limit": "14.94 kB"
488+
"limit": "15.04 kB"
489489
},
490490
{
491491
"name": "[Storage] remove (S3)",

packages/datastore/__tests__/subscription.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,34 @@ describe('sync engine subscription module', () => {
126126
),
127127
).toEqual(authInfo);
128128
});
129+
test('owner authorization with no token(expired)', () => {
130+
const authRules = [
131+
{
132+
provider: 'userPools',
133+
ownerField: 'owner',
134+
allow: 'owner',
135+
identityClaim: 'cognito:username',
136+
operations: ['create', 'update', 'delete'],
137+
},
138+
];
139+
const model = generateModelWithAuth(authRules);
140+
141+
const authInfo = {
142+
authMode: 'userPool',
143+
isOwner: false,
144+
};
145+
146+
expect(
147+
// @ts-ignore
148+
SubscriptionProcessor.prototype.getAuthorizationInfo(
149+
model,
150+
USER_CREDENTIALS.auth,
151+
'userPool',
152+
undefined,
153+
'userPool',
154+
),
155+
).toEqual(authInfo);
156+
});
129157
test('owner authorization with public subscription', () => {
130158
const authRules = [
131159
{

packages/datastore/src/sync/processors/subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class SubscriptionProcessor {
205205
: [];
206206

207207
oidcOwnerAuthRules.forEach(ownerAuthRule => {
208-
const ownerValue = oidcTokenPayload[ownerAuthRule.identityClaim];
208+
const ownerValue = oidcTokenPayload?.[ownerAuthRule.identityClaim];
209209
const singleOwner =
210210
model.fields[ownerAuthRule.ownerField]?.isArray !== true;
211211
const isOwnerArgRequired =

packages/rtn-push-notification/__tests__/apis/getPermissionStatus.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('getPermissionStatus', () => {
2323
beforeAll(() => {
2424
mockGetPermissionStatusNative.mockResolvedValue(status);
2525
mockNormalizeNativePermissionStatus.mockImplementation(
26-
status => `normalized-${status}`,
26+
statusParam => `normalized-${statusParam}`,
2727
);
2828
});
2929

packages/rtn-push-notification/__tests__/apis/registerHeadlessTask.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { AppRegistry } from 'react-native';
5+
56
import { getConstants } from '../../src/apis/getConstants';
67
import { registerHeadlessTask } from '../../src/apis/registerHeadlessTask';
78
import { normalizeNativeMessage } from '../../src/utils';

0 commit comments

Comments
 (0)