Skip to content

Commit 247d0f3

Browse files
authored
fix(cli): typescript init templates fails with error in build step (#23125)
Fixes the compile error when running `cdk init app --language typescript && npm run build`. Fixes: #23126 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 437c21f commit 247d0f3

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

.github/workflows/yarn-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
6666
# Upgrade package.jsons in init templates
6767
for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do
68-
(cd $(dirname $pj) && ncu --upgrade --reject='@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}')
68+
(cd $(dirname $pj) && ncu --upgrade --reject='@types/babel__traverse,@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}')
6969
done
7070
# Upgrade dependencies at an aws-eks integ test docker image
7171
cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject='@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}'

packages/aws-cdk/lib/init-templates/app/typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"cdk": "cdk"
1212
},
1313
"devDependencies": {
14+
"@types/babel__traverse": "7.18.2",
1415
"@types/jest": "^27.5.2",
1516
"@types/node": "10.17.27",
1617
"@types/prettier": "2.6.0",

packages/aws-cdk/lib/init-templates/lib/typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"test": "jest"
1010
},
1111
"devDependencies": {
12+
"@types/babel__traverse": "7.18.2",
1213
"@types/jest": "^27.5.2",
1314
"@types/node": "10.17.27",
1415
"@types/prettier": "2.6.0",

packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
},
1313
"devDependencies": {
1414
"aws-cdk": "%cdk-version%",
15+
"@types/babel__traverse": "7.18.2",
1516
"@types/jest": "^27.5.2",
1617
"@types/node": "10.17.27",
1718
"@types/prettier": "2.6.0",

0 commit comments

Comments
 (0)