Skip to content

Commit

Permalink
support jest 26 cjs loading of packages (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle authored Sep 25, 2023
1 parent 6ec93ae commit ac3df08
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/chilly-tables-pump.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/backend-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions packages/backend-auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
1 change: 1 addition & 0 deletions packages/backend-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
1 change: 1 addition & 0 deletions packages/backend-function/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
1 change: 1 addition & 0 deletions packages/backend-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 1 addition & 0 deletions packages/backend-graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
1 change: 1 addition & 0 deletions packages/backend-output-schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions packages/backend-output-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
"require": "./lib/index.js"
}
},
"main": "lib/index.js",
"types": "lib/index.d.ts",
"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"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-output-storage/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": { "rootDir": "src", "outDir": "lib" },
"references": []
"references": [{ "path": "../backend-output-schemas" }]
}
1 change: 1 addition & 0 deletions packages/deployed-backend-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/deployed-backend-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": { "rootDir": "src", "outDir": "lib" },
"references": []
"references": [{ "path": "../backend-output-schemas" }]
}

0 comments on commit ac3df08

Please sign in to comment.