From bbb228c132419b0e7b1de6d1f4a721f16ed2289f Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 22 Sep 2023 17:11:39 -0700 Subject: [PATCH 1/5] support jest cjs loading of packages --- packages/backend-output-schemas/package.json | 1 + packages/backend-output-storage/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/backend-output-schemas/package.json b/packages/backend-output-schemas/package.json index 5d8a1c85ac..dff375371f 100644 --- a/packages/backend-output-schemas/package.json +++ b/packages/backend-output-schemas/package.json @@ -32,6 +32,7 @@ "require": "./lib/storage/index.js" } }, + "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { "update:api": "api-extractor run --local" diff --git a/packages/backend-output-storage/package.json b/packages/backend-output-storage/package.json index 3759246b6e..b59001c5b4 100644 --- a/packages/backend-output-storage/package.json +++ b/packages/backend-output-storage/package.json @@ -12,6 +12,7 @@ "require": "./lib/index.js" } }, + "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { "update:api": "api-extractor run --local" From 62c5783ec7670b79feca4d4842dffa0d516195c1 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 22 Sep 2023 17:15:11 -0700 Subject: [PATCH 2/5] add changeset --- .changeset/chilly-tables-pump.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/chilly-tables-pump.md diff --git a/.changeset/chilly-tables-pump.md b/.changeset/chilly-tables-pump.md new file mode 100644 index 0000000000..9b5aa7eb68 --- /dev/null +++ b/.changeset/chilly-tables-pump.md @@ -0,0 +1,6 @@ +--- +'@aws-amplify/backend-output-schemas': patch +'@aws-amplify/backend-output-storage': patch +--- + +Add "main" field to package.json to support CJS loaders From 1e9cf71d9e4470bbc1b3e44ab788c9664c6aa694 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 22 Sep 2023 17:40:02 -0700 Subject: [PATCH 3/5] fix linting --- packages/backend-auth/package.json | 1 + packages/backend-function/package.json | 1 + packages/backend-graphql/package.json | 1 + packages/backend-output-storage/package.json | 3 +++ packages/deployed-backend-client/package.json | 1 + 5 files changed, 7 insertions(+) diff --git a/packages/backend-auth/package.json b/packages/backend-auth/package.json index 51c742f402..fae345911b 100644 --- a/packages/backend-auth/package.json +++ b/packages/backend-auth/package.json @@ -17,6 +17,7 @@ "update:api": "api-extractor run --local" }, "dependencies": { + "@aws-amplify/backend-output-storage": "0.1.0", "@aws-amplify/auth-construct-alpha": "^0.2.0-alpha.5" }, "devDependencies": { diff --git a/packages/backend-function/package.json b/packages/backend-function/package.json index 569c3e02cf..7ceeeb60c3 100644 --- a/packages/backend-function/package.json +++ b/packages/backend-function/package.json @@ -17,6 +17,7 @@ "update:api": "api-extractor run --local" }, "dependencies": { + "@aws-amplify/backend-output-storage": "0.1.0", "@aws-amplify/function-construct-alpha": "^0.1.1-alpha.1", "execa": "^7.1.1" }, diff --git a/packages/backend-graphql/package.json b/packages/backend-graphql/package.json index 818b82379f..f0858cdd2e 100644 --- a/packages/backend-graphql/package.json +++ b/packages/backend-graphql/package.json @@ -25,6 +25,7 @@ "constructs": "^10.0.0" }, "dependencies": { + "@aws-amplify/backend-output-storage": "0.1.0", "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2", "@aws-amplify/graphql-construct-alpha": "^0.6.2" } diff --git a/packages/backend-output-storage/package.json b/packages/backend-output-storage/package.json index b59001c5b4..09620b5b0c 100644 --- a/packages/backend-output-storage/package.json +++ b/packages/backend-output-storage/package.json @@ -17,6 +17,9 @@ "scripts": { "update:api": "api-extractor run --local" }, + "dependencies": { + "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2" + }, "peerDependencies": { "aws-cdk-lib": "^2.80.0" } diff --git a/packages/deployed-backend-client/package.json b/packages/deployed-backend-client/package.json index 432ded1484..f1bba4c96a 100644 --- a/packages/deployed-backend-client/package.json +++ b/packages/deployed-backend-client/package.json @@ -17,6 +17,7 @@ "update:api": "api-extractor run --local" }, "dependencies": { + "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2", "@aws-sdk/client-amplify": "^3.414.0", "@aws-sdk/client-cloudformation": "^3.414.0", "@aws-sdk/types": "^3.413.0", From 37d5e5189e0ccf6564ffdb801d58a338a65eb15f Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Fri, 22 Sep 2023 17:40:11 -0700 Subject: [PATCH 4/5] fix linting --- packages/backend-auth/tsconfig.json | 1 + packages/backend-function/tsconfig.json | 1 + packages/backend-graphql/tsconfig.json | 1 + packages/backend-output-storage/tsconfig.json | 2 +- packages/deployed-backend-client/tsconfig.json | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/backend-auth/tsconfig.json b/packages/backend-auth/tsconfig.json index 9ab4233701..1e1671a76a 100644 --- a/packages/backend-auth/tsconfig.json +++ b/packages/backend-auth/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", "outDir": "lib" }, "references": [ + { "path": "../backend-output-storage" }, { "path": "../auth-construct" }, { "path": "../backend" }, { "path": "../plugin-types" } diff --git a/packages/backend-function/tsconfig.json b/packages/backend-function/tsconfig.json index de2d2feb46..2ef8022434 100644 --- a/packages/backend-function/tsconfig.json +++ b/packages/backend-function/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", "outDir": "lib" }, "references": [ + { "path": "../backend-output-storage" }, { "path": "../function-construct" }, { "path": "../backend" }, { "path": "../plugin-types" } diff --git a/packages/backend-graphql/tsconfig.json b/packages/backend-graphql/tsconfig.json index 9f7cf85f69..f4c38c765f 100644 --- a/packages/backend-graphql/tsconfig.json +++ b/packages/backend-graphql/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", "outDir": "lib" }, "references": [ + { "path": "../backend-output-storage" }, { "path": "../backend-output-schemas" }, { "path": "../backend" }, { "path": "../plugin-types" } diff --git a/packages/backend-output-storage/tsconfig.json b/packages/backend-output-storage/tsconfig.json index 2aab102e9b..c8abe72848 100644 --- a/packages/backend-output-storage/tsconfig.json +++ b/packages/backend-output-storage/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", "outDir": "lib" }, - "references": [] + "references": [{ "path": "../backend-output-schemas" }] } diff --git a/packages/deployed-backend-client/tsconfig.json b/packages/deployed-backend-client/tsconfig.json index 2aab102e9b..c8abe72848 100644 --- a/packages/deployed-backend-client/tsconfig.json +++ b/packages/deployed-backend-client/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { "rootDir": "src", "outDir": "lib" }, - "references": [] + "references": [{ "path": "../backend-output-schemas" }] } From 49b6d812e23b352a04800b4465ed17211735d229 Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Mon, 25 Sep 2023 12:58:42 -0700 Subject: [PATCH 5/5] update package lock --- package-lock.json | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 49a00bf1f5..7672cf31a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18396,7 +18396,8 @@ "name": "@aws-amplify/backend-auth", "version": "0.2.0-alpha.3", "dependencies": { - "@aws-amplify/auth-construct-alpha": "^0.2.0-alpha.5" + "@aws-amplify/auth-construct-alpha": "^0.2.0-alpha.5", + "@aws-amplify/backend-output-storage": "0.1.0" }, "devDependencies": { "@aws-amplify/backend": "^0.1.1-alpha.2" @@ -18423,6 +18424,7 @@ "name": "@aws-amplify/backend-function", "version": "0.1.1-alpha.2", "dependencies": { + "@aws-amplify/backend-output-storage": "0.1.0", "@aws-amplify/function-construct-alpha": "^0.1.1-alpha.1", "execa": "^7.1.1" }, @@ -18440,6 +18442,7 @@ "version": "0.1.1-alpha.3", "dependencies": { "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2", + "@aws-amplify/backend-output-storage": "0.1.0", "@aws-amplify/graphql-construct-alpha": "^0.6.2" }, "devDependencies": { @@ -18464,6 +18467,9 @@ "packages/backend-output-storage": { "name": "@aws-amplify/backend-output-storage", "version": "0.1.0", + "dependencies": { + "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2" + }, "peerDependencies": { "aws-cdk-lib": "^2.80.0" } @@ -18500,10 +18506,12 @@ }, "packages/cli": { "name": "@aws-amplify/backend-cli", - "version": "1.0.0-alpha.5", + "version": "0.2.0-alpha.3", "license": "Apache-2.0", "dependencies": { + "@aws-amplify/client-config": "^0.2.0-alpha.5", "@aws-amplify/deployed-backend-client": "^0.1.0", + "@aws-amplify/sandbox": "^0.1.1-alpha.5", "@aws-sdk/credential-providers": "^3.360.0", "@inquirer/prompts": "^3.0.0", "execa": "^7.2.0", @@ -18521,8 +18529,6 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@aws-amplify/client-config": "^0.2.0-alpha.5", - "@aws-amplify/sandbox": "^0.1.1-alpha.5", "@aws-sdk/types": "^3.347.0" } }, @@ -18668,6 +18674,7 @@ "name": "@aws-amplify/deployed-backend-client", "version": "0.1.0", "dependencies": { + "@aws-amplify/backend-output-schemas": "^0.2.0-alpha.2", "@aws-sdk/client-amplify": "^3.414.0", "@aws-sdk/client-cloudformation": "^3.414.0", "@aws-sdk/types": "^3.413.0",