Skip to content

Commit

Permalink
chore: align all versions of typescript, jsii & jsii-rosetta to 5.4 (#…
Browse files Browse the repository at this point in the history
…29974)

### Reason for this change

There were a number of inconsistencies with the versions used for typescript, jsii & jsii-rosetta in this repository. 
Also the automated updater was incorrectly updating jsii minor versions.

I did some digging and turns out because `jsii` was at `5.4.x` already, we are already using TypeScript 5.4 for most critical paths. So I went ahead and aligned all TS version on that.

### Description of changes

Manually align all versions of typescript, jsii & jsii-rosetta.
Fixed the update workflow to only update patch version for these three packages.

Includes changes from #29978 until that is merged, and this PR is rebased.

### Description of how you validated changes

Run through the test pipeline.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mrgrain committed Apr 26, 2024
1 parent bebb7e4 commit 28052aa
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 71 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:

- name: Check Out
uses: actions/checkout@v4

Expand Down Expand Up @@ -53,16 +52,17 @@ jobs:
# Upgrade special cases:
# - Various `@types/*` packages need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266
# - `typescript` is not semantically versioned, so we only upgrade the patch version
# - `jsii`, `jsii-rosetta` is not semantically versioned and needs to be upgrades alongside typescript
# - `constructs` because we need to stay in control of the minimum compatible version
# - `aws-sdk-mock` because of breaking changes in type exports https://github.com/dwyl/aws-sdk-mock/pull/260. We are not respecting `@ts-ignore`.
# - `@aws-cdk/aws-service-spec` and `@aws-cdk/service-spec-types` have their own update workflow
run: |-
# Upgrade dependencies at repository root
ncu --upgrade --filter=typescript --target=patch
ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript --target=minor
ncu --upgrade --filter=jsii,jsii-rosetta,typescript --target=patch
ncu --upgrade --reject=@types/node,@types/prettier,constructs,jsii,jsii-rosetta,typescript --target=minor
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,@aws-sdk/*,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --parallel ncu -- --upgrade --filter=jsii,jsii-rosetta,typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,jsii,jsii-rosetta,typescript,aws-sdk-mock,@aws-sdk/*,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
# Upgrade package.json files in init templates
for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do
(cd $(dirname $pj) && ncu --upgrade --reject='constructs,${{ steps.list-packages.outputs.list }}')
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,22 @@
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
"aws-sdk-js-codemod": "^0.28.2",
"cdk-generate-synthetic-examples": "^0.1.309",
"cdk-generate-synthetic-examples": "^0.2.0",
"conventional-changelog-cli": "^2.2.2",
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.11",
"jest-junit": "^13.2.0",
"jsii-diff": "1.97.0",
"jsii-pacmak": "1.97.0",
"jsii-reflect": "1.97.0",
"jsii-rosetta": "~5.4.2",
"lerna": "^8.1.2",
"nx": "^18.3.1",
"patch-package": "^6.5.1",
"semver": "^7.6.0",
"standard-version": "^9.5.0",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"resolutions": {
"colors": "1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"sinon": "^9.2.4",
"ts-mock-imports": "^1.3.8",
"ts-node": "^10.9.2",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"typescript-json-schema": "^0.63.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/awslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^24.7.0",
"jest": "^29.7.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"repository": {
"type": "git",
Expand Down
5 changes: 3 additions & 2 deletions tools/@aws-cdk/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@
"glob": "^7.2.3",
"jest": "^29.7.0",
"jest-junit": "^13.2.0",
"jsii": "~5.4.3",
"jsii": "~5.4.6",
"jsii-rosetta": "~5.4.6",
"jsii-pacmak": "1.97.0",
"jsii-reflect": "1.97.0",
"markdownlint-cli": "^0.39.0",
"nyc": "^15.1.0",
"semver": "^7.6.0",
"ts-jest": "^29.1.2",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"yargs": "^16.2.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/jest": "^29.5.12",
"@types/estree": "*",
"jest": "^29.7.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"dependencies": {
"@typescript-eslint/parser": "^6.21.0",
Expand Down
4 changes: 2 additions & 2 deletions tools/@aws-cdk/lazify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"jest": "^29",
"ts-jest": "^29",
"typescript": "^4.5.5",
"typescript": "~5.4.5",
"cjs-module-lexer": "^1.2.3"
},
"dependencies": {
Expand All @@ -30,4 +30,4 @@
},
"main": "lib/index.js",
"license": "Apache-2.0"
}
}
4 changes: 2 additions & 2 deletions tools/@aws-cdk/node-bundle/package.json

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

2 changes: 1 addition & 1 deletion tools/@aws-cdk/pkglint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^24.7.0",
"jest": "^29.7.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"nozem": {
"ostools": [
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/jest": "^29.5.12",
"jest": "^29.7.0",
"make-runnable": "^1.4.1",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"eslint": "^7.32.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^2.7.1",
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/yarn-cling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/semver": "^7.5.8",
"@types/yarnpkg__lockfile": "^1.1.9",
"jest": "^29.7.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"dependencies": {
"@yarnpkg/lockfile": "^1.1.0",
Expand Down
69 changes: 18 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6882,16 +6882,13 @@ cdk-from-cfn@^0.156.0:
resolved "https://registry.npmjs.org/cdk-from-cfn/-/cdk-from-cfn-0.156.0.tgz#921134095983db664bd68556463dcde115d73cdb"
integrity sha512-nYK6SCC4yOPPxkPbrg23d6wTiu6Mtms5dWPI9kymwblpcXfIr+YaoiVlvlT9CFyyddGugG7AaTA6UN7U9LUOAg==

cdk-generate-synthetic-examples@^0.1.309:
version "0.1.309"
resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.309.tgz#16b3520f43b7853ccb96eddad5efda7e87a405dd"
integrity sha512-QoBhKAvIBCbH9+Z8zRLleR4+m/8+mwTYju1nZ5jZ8AOaNxO1XHNXDtU7GnNGce8oGwqo+hyoFVpEKSDdd5AqJg==
cdk-generate-synthetic-examples@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.2.0.tgz#019d4a2a9fa0fdab0b8d48b0426c0fa0ea8b5183"
integrity sha512-FaVV/TkTwIz9PUkG1+aT1DB13877jreoGbaud1W9bYY4F6u52DT7LqjLkvgETP8OKYTKqqUP+OikxmLt/OQ3aw==
dependencies:
"@jsii/spec" "^1.97.0"
fs-extra "^10.1.0"
jsii "^1.97.0"
jsii-reflect "^1.97.0"
jsii-rosetta "^1.97.0"
yargs "^17.7.2"

cdk8s-plus-27@2.7.88:
Expand Down Expand Up @@ -10895,10 +10892,10 @@ jsii-rosetta@^1.97.0:
workerpool "^6.5.1"
yargs "^16.2.0"

jsii-rosetta@~5.4.2:
version "5.4.2"
resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-5.4.2.tgz#ba51a331f4a5c42892d3b6d5766f7e4b83afd282"
integrity sha512-Bo+8lLuRQ0YiXiNImJ6XLrmAY/GzildnYd1B5MLlc+IpjbgFbynhFIyGjYAVf4+/VLFJRoOCJtZ40sM+ua8Ecw==
jsii-rosetta@~5.4.6:
version "5.4.6"
resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-5.4.6.tgz#ada3dd6218acb0e5960dbfc15e8b1f67e045ede8"
integrity sha512-RyTtc3hJmmrpbiWCLVvgHfy0Is4PWIYDy+Al6/d1xwZDq64DHJU6yU+H99SgL7LRLLwDyCod2QqRmZ1VIywwcQ==
dependencies:
"@jsii/check-node" "1.97.0"
"@jsii/spec" "^1.97.0"
Expand All @@ -10914,7 +10911,7 @@ jsii-rosetta@~5.4.2:
workerpool "^6.5.1"
yargs "^17.7.2"

jsii@1.97.0, jsii@^1.97.0:
jsii@1.97.0:
version "1.97.0"
resolved "https://registry.npmjs.org/jsii/-/jsii-1.97.0.tgz#5ceee9f1b4715b82e37ec5a24b509336d8ebef83"
integrity sha512-C3GA2Q50DkHnFozg7HKel7ZaBMCUKb/dzgH2ykfrbuJ/C/KebkPkqY/XRf95zGB42mzagPfawSLDFQiGGueQ9w==
Expand All @@ -10933,10 +10930,10 @@ jsii@1.97.0, jsii@^1.97.0:
typescript "~3.9.10"
yargs "^16.2.0"

jsii@~5.4.0, jsii@~5.4.3:
version "5.4.3"
resolved "https://registry.npmjs.org/jsii/-/jsii-5.4.3.tgz#dedac3cc9f1d209193f1388dcf9e55c142ff4a8d"
integrity sha512-+alxW2wfBQBCjesy2kvMl6yML8m7hD/buIkVVQNSGt0R0ObhsLvlanS2lRWpNkdfVtDnNk/ke5UFmMSfJ/vy0Q==
jsii@~5.4.0, jsii@~5.4.6:
version "5.4.6"
resolved "https://registry.npmjs.org/jsii/-/jsii-5.4.6.tgz#5389695696d7d8fc8e34942c6efef97ef0236fe0"
integrity sha512-Ohqz39ecBfmL/Pd5nnkERnikyOoZmNdqoSqedl+yXATM+js7XLlUGgQ+BdBXaO0rzQU2AEQ40C0COtF0jFXw4A==
dependencies:
"@jsii/check-node" "1.97.0"
"@jsii/spec" "^1.97.0"
Expand Down Expand Up @@ -14805,16 +14802,7 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3, string-width@^5.0.1, string-width@^5.1.2:
"string-width-cjs@npm:string-width@^4.2.0", string-width@*, string-width@^1.0.1, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3, string-width@^5.0.1, string-width@^5.1.2:
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -14892,7 +14880,7 @@ stringify-package@^1.0.1:
resolved "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85"
integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -14906,13 +14894,6 @@ strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1, strip-ansi@^7.1.0:
version "7.1.0"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -15468,7 +15449,7 @@ typescript-json-schema@^0.63.0:
typescript "~5.1.0"
yargs "^17.1.1"

"typescript@>=3 < 6", typescript@~5.4:
"typescript@>=3 < 6", typescript@~5.4, typescript@~5.4.5:
version "5.4.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
Expand All @@ -15478,17 +15459,12 @@ typescript@^3.9.10, typescript@^3.9.5, typescript@^3.9.7, typescript@~3.9.10:
resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==

typescript@^4.5.5:
version "4.9.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

typescript@next:
version "5.5.0-dev.20240417"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.0-dev.20240417.tgz#2558a2442be5b8541ce8168c53fb5ef4ee3c4995"
integrity sha512-BjMYWxzDLRaNlnnMC/NHf0uUIZEnw5VLe7q0h7hEi5Q4H1XoIDdjBjk6stBS2nj6R/HrsdEqhWdPz6+DLx+sRw==

typescript@~5.1.0, typescript@~5.1.6:
typescript@~5.1.0:
version "5.1.6"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274"
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
Expand Down Expand Up @@ -15898,7 +15874,7 @@ workerpool@^6.5.1:
resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -15916,15 +15892,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 28052aa

Please sign in to comment.