Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(amplify-util-uibuilder): support StorageField #12386

Merged
merged 8 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ jobs:
- run: yarn lint-check
- run: yarn lint-check-package-json
- run: yarn prettier-check
environment:
NODE_OPTIONS: --max-old-space-size=5120

verify-api-extract:
<<: *linux-e2e-executor-xlarge
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
"typescript": "^4.9.4"
},
"resolutions": {
"**/aws-sdk": "^2.1350.0",
"**/cross-fetch": "^2.2.6",
"**/glob-parent": "^6.0.2",
"**/got": "^11.8.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-appsync-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@graphql-tools/schema": "^8.3.1",
"@graphql-tools/utils": "^8.5.1",
"amplify-velocity-template": "1.4.9",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"cors": "^2.8.5",
"dataloader": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"amplify-headless-interface": "1.17.1",
"amplify-util-headless-input": "1.9.10",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"axios": "^0.26.0",
"chalk": "^4.1.1",
"change-case": "^4.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"express": "^4.17.1"
},
"devDependencies": {
"aws-sdk": "^2.1113.0"
"aws-sdk": "^2.1350.0"
}
}
2 changes: 1 addition & 1 deletion packages/amplify-category-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@aws-amplify/amplify-function-plugin-interface": "1.10.0",
"@aws-amplify/amplify-prompts": "2.6.6",
"archiver": "^5.3.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"cloudform-types": "^4.2.0",
"enquirer": "^2.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-geo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"amplify-headless-interface": "1.17.1",
"amplify-util-headless-input": "1.9.10",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"constructs": "^10.0.5",
"fs-extra": "^8.1.0",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-predictions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@aws-amplify/amplify-cli-core": "4.0.1",
"@aws-amplify/amplify-prompts": "2.6.6",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"fs-extra": "^8.1.0",
"uuid": "^8.3.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"amplify-headless-interface": "1.17.1",
"amplify-util-headless-input": "1.9.10",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"constructs": "^10.0.5",
"enquirer": "^2.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"amplify-nodejs-function-runtime-provider": "2.3.14",
"amplify-python-function-runtime-provider": "2.4.14",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"ci-info": "^2.0.0",
"cli-table3": "^0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-console-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@aws-amplify/amplify-e2e-core": "4.8.1",
"@types/ini": "^1.3.30",
"amplify-cli-core": "4.0.1",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"dotenv": "^8.2.0",
"fs-extra": "^8.1.0",
"ini": "^1.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-dynamodb-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"amplify-cli-core": "4.0.1",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"detect-port": "^1.3.0",
"execa": "^5.1.1",
"fs-extra": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-e2e-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"amplify-cli-core": "4.0.1",
"amplify-headless-interface": "1.17.1",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"chalk": "^4.1.1",
"dotenv": "^8.2.0",
"execa": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"aws-amplify": "^4.2.8",
"aws-appsync": "^4.1.1",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"axios": "^0.26.0",
"circleci-api": "^4.1.4",
"constructs": "^10.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-environment-parameters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"lodash": "^4.17.21"
},
"devDependencies": {
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"mkdirp": "^1.0.4",
"ts-json-schema-generator": "~1.1.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-opensearch-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@aws-amplify/amplify-cli-core": "4.0.1",
"@aws-amplify/amplify-prompts": "2.6.6",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"detect-port": "^1.3.0",
"execa": "^5.1.1",
"fs-extra": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-provider-awscloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"amplify-codegen": "^3.4.1",
"archiver": "^5.3.0",
"aws-cdk-lib": "~2.68.0",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"bottleneck": "2.19.5",
"chalk": "^4.1.1",
"cloudform-types": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-storage-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
"@types/serve-static": "^1.13.3",
"@types/uuid": "^8.3.1",
"@types/xml": "^1.0.4",
"aws-sdk": "^2.1233.0"
"aws-sdk": "^2.1350.0"
}
}
2 changes: 1 addition & 1 deletion packages/amplify-util-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "Amazon Web Services",
"license": "Apache-2.0",
"dependencies": {
"aws-sdk": "^2.1233.0"
"aws-sdk": "^2.1350.0"
},
"devDependencies": {
"@types/node": "^12.12.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-util-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@types/which": "^1.3.2",
"amplify-nodejs-function-runtime-provider": "2.3.14",
"aws-appsync": "^4.1.4",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
"aws-sdk-mock": "^5.8.0",
"axios": "^0.26.0",
"graphql": "^15.5.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/amplify-util-uibuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"dependencies": {
"@aws-amplify/amplify-cli-core": "4.0.1",
"@aws-amplify/amplify-prompts": "2.6.6",
"@aws-amplify/codegen-ui": "2.11.1",
"@aws-amplify/codegen-ui-react": "2.11.1",
"@aws-amplify/codegen-ui": "2.12.1",
"@aws-amplify/codegen-ui-react": "2.12.1",
"amplify-codegen": "^3.4.1",
"aws-sdk": "^2.1233.0",
"aws-sdk": "^2.1350.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to bump aws-sdk?
if we want to do this we should make sure all packages in cli resolve same version.

Copy link
Contributor Author

@hein-j hein-j Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to bump aws-sdk?

We need to bump the version to take advantage of the StorageField configurations we just added to the SDK.

if we want to do this we should make sure all packages in cli resolve same version.

I am seeing that the last time our team updated the SDK version, we did this by updating all the versions in the monorepo. I will rev with that change now.

"fs-extra": "^8.1.0",
"ora": "^4.0.3",
"tiny-async-pool": "^2.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ describe('should notify when packages are missing', () => {
},
};
notifyMissingPackages(context as unknown as $TSContext);
expect(printerDependency.printer.warn).toBeCalledTimes(2);
expect(printerDependency.printer.warn).toBeCalledTimes(3);
});

it('notifies for partial missing dependencies', async () => {
JSONUtilitiesDependency.JSONUtilities.readJson = jest.fn().mockImplementation(() => ({
projectPath: __dirname,
dependencies: { '@aws-amplify/ui-react': '4.4.2' },
dependencies: { '@aws-amplify/ui-react': '4.6.0' },
}));
const context = {
input: {
Expand All @@ -69,6 +69,6 @@ describe('should notify when packages are missing', () => {
},
};
notifyMissingPackages(context as unknown as $TSContext);
expect(printerDependency.printer.warn).toBeCalledTimes(1);
expect(printerDependency.printer.warn).toBeCalledTimes(2);
});
});
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,21 @@
dependencies:
"@aws-amplify/core" "4.3.11"

"@aws-amplify/codegen-ui-react@2.11.1":
version "2.11.1"
resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui-react/-/codegen-ui-react-2.11.1.tgz#e4149c0b8dfedc023ad266dd8bcdae885b971153"
integrity sha512-/CJCZknUOuTPzk03ZOe5PDHh35WboHHbBYAZ5ot9YkMqs5+oJEBeEElm0hiFK1f7amo1nswjxR82kBJH9eSRrw==
"@aws-amplify/codegen-ui-react@2.12.1":
version "2.12.1"
resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui-react/-/codegen-ui-react-2.12.1.tgz#7fe833c0845462072a29612cff5aebb0a9e42b71"
integrity sha512-gmAVSxt9EPkqW7Ti1zFPIMUqFWQSbrBrRU04fKBp5vpnRTlS2G9su1+lKxmja33CCk8mSUPVpd35nI/GF2iKeA==
dependencies:
"@aws-amplify/codegen-ui" "2.11.1"
"@aws-amplify/codegen-ui" "2.12.1"
"@typescript/vfs" "~1.3.5"
typescript "<=4.5.0"
optionalDependencies:
prettier "2.3.2"

"@aws-amplify/codegen-ui@2.11.1":
version "2.11.1"
resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui/-/codegen-ui-2.11.1.tgz#bf60e85e2d91eb38c7f447d99a922d0121c1ffe3"
integrity sha512-szFkOR7u/x/xfx2ny2tu90sl8fmcnuO6olm+Nx5iJcsDCsUvMYe9t6rZlxlcSRBiXHe7puR9jVCuDs0CHZS4JQ==
"@aws-amplify/codegen-ui@2.12.1":
version "2.12.1"
resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui/-/codegen-ui-2.12.1.tgz#d6a991e3db6883e14f835af4f88b1bcfe5af2072"
integrity sha512-4uqzNA2xyaKjzMFfntzvwZEmJzKAumqVnXV0S+XPsrqreDfnzfxldYv/v3JQsQE4e5NjK/08BsWxm0jCkifAHw==
dependencies:
change-case "^4.1.2"
yup "^0.32.11"
Expand Down Expand Up @@ -9727,10 +9727,10 @@ aws-sdk-mock@^5.8.0:
sinon "^14.0.1"
traverse "^0.6.6"

aws-sdk@^2.1231.0, aws-sdk@^2.1233.0:
version "2.1233.0"
resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1233.0.tgz#3386515966ca8a5baac048d986ad0977119c0765"
integrity sha512-e1GbVltsoQpWvx0gxQlEtKOdOrNWyjhD8bjFIMx/3Nwwzw4ac2KOy7CyC5I+lBj8el4AB0399umLHJZmL5WcVg==
aws-sdk@^2.1231.0, aws-sdk@^2.1350.0:
version "2.1350.0"
resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1350.0.tgz#e538768b842a345db63f2cd0dfa8c7c60e0d8e78"
integrity sha512-b0BHug2iCtIsKgstj3FEyZYZCv8RZnie5vUQzkw0rr581Z6DOcJof7gGn19E6mPQp1l4j0d274SjvdFQS4JCMw==
dependencies:
buffer "4.9.2"
events "1.1.1"
Expand Down