Skip to content

Commit f58f80f

Browse files
authored
chore: upgrade jsii-pacmak and other jsii tools to 1.106.0 (#33057)
After the version upgrade of `@aws-cdk/cloud-assembly-schema` to `^39.2.0` in #32998 our cli integration and init tests started failing with the following error in all .NET projects: ``` /tmp/CdkInteg0Rk0Rq9U2Tk.csproj : error NU1605: Warning As Error: Detected package downgrade: Amazon.JSII.Runtime from 1.106.0 to 1.104.0. Reference the package directly from the project to select a different version. /tmp/CdkInteg0Rk0Rq9U2Tk.csproj : error NU1605: CdkInteg0Rk0Rq9U2Tk -> Amazon.CDK.Lib 2.177.0-rc.0 -> Amazon.CDK.CloudAssembly.Schema 39.2.0 -> Amazon.JSII.Runtime (>= 1.106.0 && < 2.0.0) /tmp//CdkInteg0Rk0Rq9U2Tk.csproj : error NU1605: CdkInteg0Rk0Rq9U2Tk -> Amazon.CDK.Lib 2.177.0-rc.0 -> Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0) ``` ### Reason for this change This error is documented in the NuGet docs as [Example 1](https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1605#example-1). The .NET CDK project that is created in these tests declares a dependency on depending on `Amazon.CDK.Lib`. `Amazon.CDK.Lib` declares a direct dependency on `Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0)`. But it also declares an indirect dependency on `Amazon.JSII.Runtime (>= 1.106.0 && < 2.0.0)` through the `Amazon.CDK.CloudAssembly.Schema` package: ``` TestProject -> Amazon.CDK.Lib 2.177.0-rc.0 -> Amazon.CDK.CloudAssembly.Schema 39.2.0 -> Amazon.JSII.Runtime (>= 1.106.0 && < 2.0.0) TestProject -> Amazon.CDK.Lib 2.177.0-rc.0 -> Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0) ``` Because of the [direct-dependency-wins](https://learn.microsoft.com/en-us/nuget/concepts/dependency-resolution#direct-dependency-wins) rule `Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0)` would be selected. It overrules the distant package and thus causes the package downgrade, which is an error. #### Why does the issue surface now? The previous (released) version of `Amazon.CDK.Lib` declares these dependencies ([Source](https://www.nuget.org/packages/Amazon.CDK.Lib/2.176.0#dependencies-body-tab)): ``` Amazon.CDK.CloudAssembly.Schema (>= 39.0.1 && < 40.0.0) Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0) ``` And `Amazon.CDK.CloudAssembly.Schema` v39.0.1 declares this dependency ([Source](https://www.nuget.org/packages/Amazon.CDK.CloudAssembly.Schema/39.0.1#dependencies-body-tab)): ``` Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0) ``` As you can see, both versions of `Amazon.JSII.Runtime` are the same. The pre-released package of `Amazon.CDK.Lib` however has updated its dependency on `Amazon.CDK.CloudAssembly.Schema` to `(>= 39.2.0 && < 40.0.0)`. And if we check the distant dependencies for the newer version of `Amazon.CDK.CloudAssembly.Schema`, we get this ([Source](https://www.nuget.org/packages/Amazon.CDK.CloudAssembly.Schema/39.2.0#dependencies-body-tab)): ``` Amazon.JSII.Runtime (>= 1.106.0 && < 2.0.0) ``` **This is where the problem stems from.** #### Root cause The dependency constraint for `Amazon.JSII.Runtime` is determined by the used version of `jsii-pacmak` in each package. The root cause is that the tested versions of `aws-cdk-lib` and `@aws-cdk/cloud-assembly-schema` are build with a different version of `jsii-pacmak`. ### Description of changes Update the version of `jsii-pacmak` in all monorepo packages to be the latest version and the same as in `@aws-cdk/cloud-assembly-schema`. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Run through the integration 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*
1 parent 6677b33 commit f58f80f

File tree

7 files changed

+50
-40
lines changed

7 files changed

+50
-40
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"fs-extra": "^9.1.0",
2626
"graceful-fs": "^4.2.11",
2727
"jest-junit": "^13.2.0",
28-
"jsii-diff": "1.104.0",
29-
"jsii-pacmak": "1.104.0",
30-
"jsii-reflect": "1.104.0",
28+
"jsii-diff": "1.106.0",
29+
"jsii-pacmak": "1.106.0",
30+
"jsii-reflect": "1.106.0",
3131
"lerna": "^8.1.8",
3232
"nx": "^19.8.6",
3333
"semver": "^7.6.3",

packages/@aws-cdk/toolkit/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@aws-sdk/credential-providers": "3.699.0",
8282
"@aws-sdk/ec2-metadata-service": "3.699.0",
8383
"@aws-sdk/lib-storage": "3.699.0",
84-
"@jsii/check-node": "1.104.0",
84+
"@jsii/check-node": "1.106.0",
8585
"@smithy/middleware-endpoint": "3.1.4",
8686
"@smithy/node-http-handler": "3.2.4",
8787
"@smithy/property-provider": "3.1.10",

packages/aws-cdk/THIRD_PARTY_LICENSES

+1-1
Original file line numberDiff line numberDiff line change
@@ -10707,7 +10707,7 @@ Apache License
1070710707

1070810708
----------------
1070910709

10710-
** @jsii/check-node@1.104.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.104.0 | Apache-2.0
10710+
** @jsii/check-node@1.106.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.106.0 | Apache-2.0
1071110711
jsii
1071210712
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1071310713

packages/aws-cdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"@aws-sdk/credential-providers": "^3.699.0",
165165
"@aws-sdk/ec2-metadata-service": "^3.699.0",
166166
"@aws-sdk/lib-storage": "^3.699.0",
167-
"@jsii/check-node": "1.104.0",
167+
"@jsii/check-node": "1.106.0",
168168
"@smithy/middleware-endpoint": "^4",
169169
"@smithy/node-http-handler": "^3.2.4",
170170
"@smithy/property-provider": "^3.1.10",

packages/awslint/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"awslint": "bin/awslint"
1919
},
2020
"dependencies": {
21-
"@jsii/spec": "1.104.0",
21+
"@jsii/spec": "1.106.0",
2222
"chalk": "^4",
2323
"fs-extra": "^9.1.0",
24-
"jsii-reflect": "1.104.0",
24+
"jsii-reflect": "1.106.0",
2525
"change-case": "^4.1.2",
2626
"yargs": "^16.2.0"
2727
},

tools/@aws-cdk/cdk-build-tools/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"jest-junit": "^13.2.0",
6464
"jsii": "~5.7.0",
6565
"jsii-rosetta": "~5.4.36",
66-
"jsii-pacmak": "1.104.0",
67-
"jsii-reflect": "1.104.0",
66+
"jsii-pacmak": "1.106.0",
67+
"jsii-reflect": "1.106.0",
6868
"markdownlint-cli": "^0.42.0",
6969
"nyc": "^15.1.0",
7070
"semver": "^7.6.3",

yarn.lock

+40-30
Original file line numberDiff line numberDiff line change
@@ -7104,14 +7104,7 @@
71047104
chalk "^4.1.2"
71057105
semver "^7.6.3"
71067106

7107-
7108-
version "1.104.0"
7109-
resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.104.0.tgz#9f1206b3712808ad7cbbdbf6cf333a77a8f3df8c"
7110-
integrity sha512-7jxU8iRowA3O7Dpn8XAsX8o4Y8Fy8plbEVg0CnjvIQsJh3puI3KFHspXur70OOccfGkoL1TWnXBZ+BwCcvhu1g==
7111-
dependencies:
7112-
ajv "^8.17.1"
7113-
7114-
"@jsii/spec@^1.103.1", "@jsii/spec@^1.104.0", "@jsii/spec@^1.106.0":
7107+
"@jsii/[email protected]", "@jsii/spec@^1.103.1", "@jsii/spec@^1.104.0", "@jsii/spec@^1.106.0":
71157108
version "1.106.0"
71167109
resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.106.0.tgz#f40010ec8cde14b7a003dd5b6a46480d9d7e222f"
71177110
integrity sha512-pAIvqEGf0YLmtzFtUKWNEGkCmXMHENy7k+rzCD147wnM4jHhvEL1mEvxi99aA2VcmvLYaAYNOs/XozT+s+kLqQ==
@@ -11946,10 +11939,10 @@ code-block-writer@^13.0.3:
1194611939
resolved "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz#90f8a84763a5012da7af61319dd638655ae90b5b"
1194711940
integrity sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==
1194811941

11949-
codemaker@^1.104.0:
11950-
version "1.104.0"
11951-
resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.104.0.tgz#e310320177d774e3c62e80e862802c3688b63a4d"
11952-
integrity sha512-BC95gULaPN4MMeWxeLXHGatkac6LOArHMAkPkl3wQdcVa7MO4OzST6e8tY71iqA3KrgamfP0vQ34N9rDkfDyGg==
11942+
codemaker@^1.106.0:
11943+
version "1.106.0"
11944+
resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.106.0.tgz#c696de48847e7758731b72d89264e972eaceb4d0"
11945+
integrity sha512-1aLNQCF/3DVxXol6eRqoLZnYulAwWPGq8BMF8pMZu+CaNkR7c0T5otMcbAXcskRLChiFt+BjVWS3JPVeBOHD4w==
1195311946
dependencies:
1195411947
camelcase "^6.3.0"
1195511948
decamelize "^5.0.1"
@@ -12073,7 +12066,7 @@ commondir@^1.0.1:
1207312066
resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
1207412067
integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==
1207512068

12076-
commonmark@^0.31.1:
12069+
commonmark@^0.31.1, commonmark@^0.31.2:
1207712070
version "0.31.2"
1207812071
resolved "https://registry.npmjs.org/commonmark/-/commonmark-0.31.2.tgz#9d8d5439c82c9a235154d858a53e1a7965d573a5"
1207912072
integrity sha512-2fRLTyb9r/2835k5cwcAwOj0DEc44FARnMp5veGsJ+mEAZdi52sNopLu07ZyElQUz058H43whzlERDIaaSw4rg==
@@ -15810,37 +15803,49 @@ jsesc@^3.0.2:
1581015803
resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e"
1581115804
integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==
1581215805

15813-
jsii-diff@1.104.0:
15814-
version "1.104.0"
15815-
resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.104.0.tgz#8e3e8e8a0a6b0e30944ccc0d60e15f91290ae052"
15816-
integrity sha512-QIuHZVbrqRedZVoUQhoz/Qa93EnW0oSV5lviXPPA2/I6etEXy0+KnLS68nsGCL9/koSNK9vGl8X2Qo46MpKuBw==
15806+
jsii-diff@1.106.0:
15807+
version "1.106.0"
15808+
resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.106.0.tgz#5619755f62f7c65b3f35f688639cf7f82e7443a0"
15809+
integrity sha512-1UMvocIJCsUzb0IG/fcOANsm2qVN8lcWG5AD98bljlkJenO33i+YzIChIZc/JqKY0cQFRc7OIEcExt3GtqRzNQ==
1581715810
dependencies:
15818-
"@jsii/check-node" "1.104.0"
15819-
"@jsii/spec" "^1.104.0"
15811+
"@jsii/check-node" "1.106.0"
15812+
"@jsii/spec" "^1.106.0"
1582015813
fs-extra "^10.1.0"
15821-
jsii-reflect "^1.104.0"
15814+
jsii-reflect "^1.106.0"
1582215815
log4js "^6.9.1"
1582315816
yargs "^16.2.0"
1582415817

15825-
jsii-pacmak@1.104.0:
15826-
version "1.104.0"
15827-
resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.104.0.tgz#994d52e0e063f78f23c8502e826606e0552c1fa6"
15828-
integrity sha512-KxdYOzpBSnixZ5VjKsWvVIaRAwW4L5JJS3GE0yn5pj6Antx2sjaMvy6XsbjI1MPiOe/W8xNlRDW/XgNE+Bzt6g==
15818+
jsii-pacmak@1.106.0:
15819+
version "1.106.0"
15820+
resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.106.0.tgz#0622a5770585a35b84abff964cb58aaa38f12779"
15821+
integrity sha512-cNSzPszHaFg5AYwOQhp+eM/KpOJupdeyyycrzR6AtxwSmRN6x4K7YybZY/Rk0zfqGds9ukOYv0euGLZuXzXt1w==
1582915822
dependencies:
15830-
"@jsii/check-node" "1.104.0"
15831-
"@jsii/spec" "^1.104.0"
15823+
"@jsii/check-node" "1.106.0"
15824+
"@jsii/spec" "^1.106.0"
1583215825
clone "^2.1.2"
15833-
codemaker "^1.104.0"
15834-
commonmark "^0.31.1"
15826+
codemaker "^1.106.0"
15827+
commonmark "^0.31.2"
1583515828
escape-string-regexp "^4.0.0"
1583615829
fs-extra "^10.1.0"
15837-
jsii-reflect "^1.104.0"
15830+
jsii-reflect "^1.106.0"
1583815831
semver "^7.6.3"
1583915832
spdx-license-list "^6.9.0"
1584015833
xmlbuilder "^15.1.1"
1584115834
yargs "^16.2.0"
1584215835

15843-
[email protected], jsii-reflect@^1.104.0:
15836+
[email protected], jsii-reflect@^1.106.0:
15837+
version "1.106.0"
15838+
resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.106.0.tgz#8d9bfa7cd22e677fbcc433781b919df3b41d8b2d"
15839+
integrity sha512-3t+a8kT4G5fYnQAM7eS8bgUpK+Vj1sFgABqLIC2Oae+8rUb6J+v7xTSvqWEOlO0FI608/BwalWsXsvW+Mtogmw==
15840+
dependencies:
15841+
"@jsii/check-node" "1.106.0"
15842+
"@jsii/spec" "^1.106.0"
15843+
chalk "^4"
15844+
fs-extra "^10.1.0"
15845+
oo-ascii-tree "^1.106.0"
15846+
yargs "^16.2.0"
15847+
15848+
jsii-reflect@^1.104.0:
1584415849
version "1.104.0"
1584515850
resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.104.0.tgz#5ac03b8e895c4b248743969252fab699ef2df5a5"
1584615851
integrity sha512-tBdJvLPdfrlAI7ijKmuUv48Nkk0aC26VC/wtNjVqtJmpKsDOOG1JXKiIny690FnifhgpdoHnrVE12asSpFdPfA==
@@ -17974,6 +17979,11 @@ oo-ascii-tree@^1.104.0:
1797417979
resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.104.0.tgz#f17857f84f25b0b9d0879bbea2f04caf15a72384"
1797517980
integrity sha512-2cScXtwxt5WVIi3+vdkbKoHSeRepRcibnFhdV2ojGxVvj1KU0m0EHfBCsal6XEg1vBkMgTIxnxVd+E/l/Fam3w==
1797617981

17982+
oo-ascii-tree@^1.106.0:
17983+
version "1.106.0"
17984+
resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.106.0.tgz#58a017dd63f93dc912c9037080967ed7b7afa997"
17985+
integrity sha512-0PZkjIiJUW3jEx7durxcri7JciR8VbJpf2K3qiVbGG4x0MTq6Xm/H84GjBI6tamSx/DV1PMFDfwMs3hm8zfOCw==
17986+
1797717987
open@^8.4.0:
1797817988
version "8.4.2"
1797917989
resolved "https://registry.npmjs.org/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"

0 commit comments

Comments
 (0)