Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
Closes #956
Closes #955
Closes #954
  • Loading branch information
coderbyheart committed Jan 25, 2021
1 parent 5ba980e commit 5904c16
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 52 deletions.
22 changes: 16 additions & 6 deletions cdk/prepare-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,27 @@ export const prepareCDKLambdas = async ({
} catch (_) {
await fs.mkdir(cloudFormationLayerDir)
}
const { devDependencies, dependencies } = JSON.parse(
const { dependencies } = JSON.parse(
await fs.readFile(path.resolve(rootDir, 'package.json'), 'utf-8'),
)
const cdkLambdaDeps = {
'@aws-sdk/client-iot': dependencies['@aws-sdk/client-iot'],
'@bifravst/cloudformation-helpers':
dependencies['@bifravst/cloudformation-helpers'],
}
if (
Object.values(cdkLambdaDeps).find((v) => v === undefined) !== undefined
) {
throw new Error(
`Could not resolve all dependencies in "${JSON.stringify(
cdkLambdaDeps,
)}"`!,
)
}
await fs.writeFile(
path.join(cloudFormationLayerDir, 'package.json'),
JSON.stringify({
dependencies: {
'@aws-sdk/client-iot': dependencies['@aws-sdk/client-iot'],
'@bifravst/cloudformation-helpers':
devDependencies['@bifravst/cloudformation-helpers'],
},
dependencies: cdkLambdaDeps,
}),
'utf-8',
)
Expand Down
85 changes: 42 additions & 43 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@aws-sdk/types": "3.1.0",
"@bifravst/cell-geolocation-helpers": "1.3.29",
"@bifravst/cloudformation-helpers": "5.0.2",
"@bifravst/e2e-bdd-test-runner": "5.0.19",
"@bifravst/e2e-bdd-test-runner": "5.0.20",
"@bifravst/random-words": "4.2.1",
"@bifravst/timestream-helpers": "2.2.0",
"ajv": "7.0.3",
Expand All @@ -67,9 +67,9 @@
"@bifravst/code-style": "8.0.134",
"@bifravst/device-ui-server": "2.0.2",
"@bifravst/eslint-config-typescript": "5.0.89",
"@bifravst/firmware-ci": "5.0.1",
"@bifravst/firmware-ci": "5.0.2",
"@bifravst/object-to-env": "1.0.1",
"@bifravst/package-layered-lambdas": "4.0.12",
"@bifravst/package-layered-lambdas": "4.0.13",
"@commitlint/cli": "11.0.0",
"@commitlint/config-angular": "11.0.0",
"@octokit/rest": "18.0.14",
Expand Down

0 comments on commit 5904c16

Please sign in to comment.