diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml
index f9e43c322a..c501477973 100644
--- a/.github/workflows/docker-images.yml
+++ b/.github/workflows/docker-images.yml
@@ -22,8 +22,8 @@ jobs:
fail-fast: false
matrix:
debian:
- - 'buster' # 10
- node: ['16', '18', '20']
+ - 'buster' # 10
+ node: ['18', '20']
include:
- debian: 'bullseye' # 11
node: '20'
@@ -31,10 +31,10 @@ jobs:
node: '20'
env:
# Node version whose images will be aliased without the -nodeXX segment
- DEFAULT_NODE_MAJOR_VERSION: 16
+ DEFAULT_NODE_MAJOR_VERSION: 18
steps:
- name: Check out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Reclaim disk space by clearing out cached Docker images...
- name: Remove cached Docker images
@@ -88,7 +88,7 @@ jobs:
# Federate into the PR Validation AWS Account
- name: Federate into AWS
if: steps.should-run.outputs.result == 'true' && steps.federate_to_aws.outputs.enabled == 'true'
- uses: aws-actions/configure-aws-credentials@v2
+ uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
@@ -113,14 +113,14 @@ jobs:
shell: bash
- name: Set up QEMU
- uses: docker/setup-qemu-action@v2
+ uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up docker buildx
id: buildx
if: steps.should-run.outputs.result == 'true'
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
with:
# Disable parallelism because IO contention makes it too slow on GitHub
# workers...
@@ -173,14 +173,14 @@ jobs:
# Re-authenticate to ECR Public, this time with image-push permissions
- name: Federate with AWS role for ECR Public push
if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/main')
- uses: aws-actions/configure-aws-credentials@v2
+ uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_FOR_ECR_PUBLIC_PUSH }}
role-session-name: GHA_aws-jsii_docker-images-PUSH
- name: Authenticate with ECR Public for Push
if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/main')
- uses: aws-actions/amazon-ecr-login@v1
+ uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index e66971fccc..c6fce8593b 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
@@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: gh-pages
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e65b35ca77..799e338529 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,7 +27,7 @@ jobs:
steps:
# Check out the code
- name: Check out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Set up all of our standard runtimes
- name: Set up .NET 6
uses: actions/setup-dotnet@v3
@@ -42,11 +42,11 @@ jobs:
with:
distribution: 'zulu'
java-version: '8'
- - name: Set up Node 16
- uses: actions/setup-node@v3
+ - name: Set up Node 18
+ uses: actions/setup-node@v4
with:
cache: yarn
- node-version: '16'
+ node-version: '18'
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
@@ -110,7 +110,7 @@ jobs:
steps:
# Check out the code
- name: Check out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Set up all of our standard runtimes
- name: Set up .NET 6
uses: actions/setup-dotnet@v3
@@ -125,11 +125,11 @@ jobs:
with:
distribution: 'zulu'
java-version: '8'
- - name: Set up Node 16
- uses: actions/setup-node@v3
+ - name: Set up Node 18
+ uses: actions/setup-node@v4
with:
cache: yarn
- node-version: '16'
+ node-version: '18'
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
@@ -195,10 +195,10 @@ jobs:
dotnet: ['6.0.x']
go: ['1.18']
java: ['8']
- node: ['16'] # EOL 2023-09-11
+ node: ['18'] # EOL 2025-04-30
os: [ubuntu-latest]
python: ['3.7']
- # Add specific combinations to be tested against "node 14" (to restrict cardinality)
+ # Add specific combinations to be tested against (to restrict cardinality)
include:
# Test using Windows
- title: 'Windows'
@@ -206,7 +206,7 @@ jobs:
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
python: '3.7'
# Test using macOS
- title: 'macOS'
@@ -214,16 +214,9 @@ jobs:
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
python: '3.7'
# Test alternate Nodes
- - title: 'Node 16'
- java: '8'
- dotnet: '6.0.x'
- go: '1.18'
- node: '16' # EOL 2023-09-11
- os: ubuntu-latest
- python: '3.7'
- title: 'Node 18'
java: '8'
dotnet: '6.0.x'
@@ -243,7 +236,7 @@ jobs:
java: '8'
dotnet: '7.0.x'
go: '1.18'
- node: '16'
+ node: '18'
os: ubuntu-latest
python: '3.7'
# Test alternate Gos
@@ -251,7 +244,7 @@ jobs:
java: '8'
dotnet: '6.0.x'
go: '1.19'
- node: '16'
+ node: '18'
os: ubuntu-latest
python: '3.7'
# Test alternate Javas
@@ -259,7 +252,7 @@ jobs:
java: '11'
dotnet: '6.0.x'
go: '1.18'
- node: '16'
+ node: '18'
os: ubuntu-latest
python: '3.7'
# Test alternate Pythons
@@ -268,28 +261,28 @@ jobs:
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
os: ubuntu-latest
- title: 'Python 3.9'
python: '3.9'
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
os: ubuntu-latest
- title: 'Python 3.10'
python: '3.10'
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
os: ubuntu-latest
- title: 'Python 3.11'
python: '3.11'
dotnet: '6.0.x'
go: '1.18'
java: '8'
- node: '16'
+ node: '18'
os: ubuntu-latest
runs-on: ${{ matrix.os }}
@@ -322,7 +315,7 @@ jobs:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Set up Node ${{ matrix.node }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{ matrix.node }}
@@ -397,7 +390,7 @@ jobs:
rm built-tree.tgz
- name: Set up Node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
cache: yarn
node-version: '18'
@@ -452,7 +445,7 @@ jobs:
distribution: 'corretto'
java-version: '20'
- name: Set up Node 20
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Python 3.11
@@ -479,4 +472,3 @@ jobs:
with:
name: integtest_aws-cdk-lib
path: ./node_modules/aws-cdk-lib/dist/
-
diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml
index 77f50884b0..04456ae054 100644
--- a/.github/workflows/yarn-upgrade.yml
+++ b/.github/workflows/yarn-upgrade.yml
@@ -15,10 +15,10 @@ jobs:
steps:
- name: Check Out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up Node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
cache: yarn
node-version: 16
@@ -118,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check Out
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Download patch
uses: actions/download-artifact@v3
diff --git a/.mergify/config.yml b/.mergify/config.yml
index e63f65dee0..1fb8434fc7 100644
--- a/.mergify/config.yml
+++ b/.mergify/config.yml
@@ -11,7 +11,7 @@ pull_request_rules:
label:
add: [contribution/core]
conditions:
- - author~=^(RomainMuller|rix0rrr|MrArnoldPalmer|iliapolo|madeline-k|comcalvi|kaizencc|corymhall|otaviomacedo|TheRealAmazonKendra|vinayak-kukreja|mrgrain|colifran)$
+ - author~=^(RomainMuller|rix0rrr|MrArnoldPalmer|iliapolo|madeline-k|comcalvi|kaizencc|corymhall|otaviomacedo|TheRealAmazonKendra|vinayak-kukreja|mrgrain|colifran|mikewrighton)$
- -label~="contribution/core"
- name: Tell them we're good now
actions:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 96c5c1bc8f..930fc7c2bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,12 +2,31 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [1.91.0](https://github.com/aws/jsii/compare/v1.90.0...v1.91.0) (2023-10-24)
+
+## [1.90.0](https://github.com/aws/jsii/compare/v1.89.0...v1.90.0) (2023-10-06)
+
+## [1.89.0](https://github.com/aws/jsii/compare/v1.88.0...v1.89.0) (2023-09-20)
+
+## [1.88.0](https://github.com/aws/jsii/compare/v1.87.0...v1.88.0) (2023-08-24)
+
+## [1.87.0](https://github.com/aws/jsii/compare/v1.86.1...v1.87.0) (2023-08-11)
+
+
+### Bug Fixes
+
+* **kernel:** fast module loading fails on Windows (EPERM) ([#4212](https://github.com/aws/jsii/issues/4212)) ([fac6cbb](https://github.com/aws/jsii/commit/fac6cbbeb5d9bcbbac8f9dff58001afb701a4065)), closes [#4208](https://github.com/aws/jsii/issues/4208)
+* **kernel:** package cache fails under parallelism ([#4215](https://github.com/aws/jsii/issues/4215)) ([b739ef6](https://github.com/aws/jsii/commit/b739ef68d4d92d7af78b2a91b8581e9f3077df96)), closes [#4181](https://github.com/aws/jsii/issues/4181) [#4207](https://github.com/aws/jsii/issues/4207)
+* pip, black, setuptools, twine, wheel, and aws-sam-cli incorrectly installed in superchain ([#4201](https://github.com/aws/jsii/issues/4201)) ([851415c](https://github.com/aws/jsii/commit/851415c44864c0fb0b4b2d5ee4535f0b33f89a48))
+* **python:** type object 'InterfaceDynamicProxy' has no attribute '__jsii_type__' ([#4209](https://github.com/aws/jsii/issues/4209)) ([057b267](https://github.com/aws/jsii/commit/057b267809a05135d6d22227318ae55100aad272))
+* **superchain:** add openssh-client back ([#4224](https://github.com/aws/jsii/issues/4224)) ([8390ca1](https://github.com/aws/jsii/commit/8390ca1615769846f92c42ef35ac590b4673efbb))
+
## [1.86.1](https://github.com/aws/jsii/compare/v1.86.0...v1.86.1) (2023-08-02)
### Bug Fixes
-* **kernel:** incorrectly scoped FQN resolutions ([#4204](https://github.com/aws/jsii/pull/4204)) ([ed667c7](https://github.com/aws/jsii/commit/ed667c76be73c43f969a1b7acc0b4b93a7a00889))
+* **kernel:** incorrectly scoped FQN resolutions ([#4204](https://github.com/aws/jsii/issues/4204)) ([ed667c7](https://github.com/aws/jsii/commit/ed667c76be73c43f969a1b7acc0b4b93a7a00889)), closes [aws/aws-cdk#26604](https://github.com/aws/aws-cdk/issues/26604) [#4202](https://github.com/aws/jsii/issues/4202) [#4203](https://github.com/aws/jsii/issues/4203)
## [1.86.0](https://github.com/aws/jsii/compare/v1.85.0...v1.86.0) (2023-08-01)
diff --git a/gh-pages/mkdocs.yml b/gh-pages/mkdocs.yml
index 03aaf9d83e..4ea220165e 100644
--- a/gh-pages/mkdocs.yml
+++ b/gh-pages/mkdocs.yml
@@ -58,8 +58,8 @@ markdown_extensions:
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.emoji:
- emoji_index: !!python/name:materialx.emoji.twemoji
- emoji_generator: !!python/name:materialx.emoji.to_svg
+ emoji_index: !!python/name:material.extensions.emoji.twemoji
+ emoji_generator: !!python/name:material.extensions.emoji.to_svg
plugins:
- awesome-pages:
diff --git a/gh-pages/partials/node-support-table.md b/gh-pages/partials/node-support-table.md
index 4b9b8b9037..6a34ef6184 100644
--- a/gh-pages/partials/node-support-table.md
+++ b/gh-pages/partials/node-support-table.md
@@ -3,7 +3,7 @@
| Release | Status | End-of-Life |
| --------- | ---------------------------- | ------------ |
| `^14.6.0` | :white_check_mark: Supported | `2023-04-30` |
- | `^16.3.0` | :white_check_mark: Supported | `2024-04-30` |
+ | `^16.3.0` | :white_check_mark: Supported | `2024-09-11` |
| `^18.0.0` | :white_check_mark: Supported | `2025-04-30` |
??? question "Status Definitions"
diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt
index 597380702c..3b3f489d37 100644
--- a/gh-pages/requirements-dev.txt
+++ b/gh-pages/requirements-dev.txt
@@ -1,4 +1,4 @@
-mkdocs~=1.4.3
-mkdocs-awesome-pages-plugin~=2.9.1
-mkdocs-material~=9.1.19
+mkdocs~=1.5.3
+mkdocs-awesome-pages-plugin~=2.9.2
+mkdocs-material~=9.4.8
mkdocs-git-revision-date-plugin~=0.3.2
diff --git a/lerna.json b/lerna.json
index 408b85c8d2..aa79516c86 100644
--- a/lerna.json
+++ b/lerna.json
@@ -12,6 +12,6 @@
"rejectCycles": true
}
},
- "version": "1.86.1",
+ "version": "1.91.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
diff --git a/package.json b/package.json
index 1f4d795c18..9221ef7228 100644
--- a/package.json
+++ b/package.json
@@ -16,23 +16,23 @@
},
"devDependencies": {
"@jest/types": "^28.1.3",
- "@types/jest": "^29.5.3",
- "@types/node": "^14.18.54",
- "@typescript-eslint/eslint-plugin": "^6.3.0",
- "@typescript-eslint/parser": "^6.3.0",
+ "@types/jest": "^29.5.6",
+ "@types/node": "^14.18.63",
+ "@typescript-eslint/eslint-plugin": "^6.8.0",
+ "@typescript-eslint/parser": "^6.8.0",
"all-contributors-cli": "^6.26.1",
- "eslint": "^8.46.0",
+ "eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-node": "^0.3.9",
- "eslint-import-resolver-typescript": "^3.5.5",
+ "eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.26.0",
- "eslint-plugin-prettier": "^5.0.0",
- "jest": "^29.6.2",
+ "eslint-plugin-prettier": "^5.0.1",
+ "jest": "^29.7.0",
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.1.3",
- "lerna": "^7.1.4",
- "prettier": "^3.0.1",
+ "lerna": "^7.4.1",
+ "prettier": "^3.0.3",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
"typescript": "~4.7.4"
diff --git a/packages/@jsii/Directory.Build.targets b/packages/@jsii/Directory.Build.targets
index cd1364cd38..2b77132144 100644
--- a/packages/@jsii/Directory.Build.targets
+++ b/packages/@jsii/Directory.Build.targets
@@ -3,18 +3,18 @@
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
diff --git a/packages/@jsii/benchmarks/package.json b/packages/@jsii/benchmarks/package.json
index 19b9482710..41279b909a 100644
--- a/packages/@jsii/benchmarks/package.json
+++ b/packages/@jsii/benchmarks/package.json
@@ -8,13 +8,13 @@
"fs-extra": "^10.1.0",
"jsii": "^0.0.0",
"npm": "^8.19.4",
- "tar": "^6.1.15",
+ "tar": "^6.2.0",
"typescript": "~3.9.10",
"yargs": "^16.2.0"
},
"devDependencies": {
"@types/glob": "^8.1.0",
- "glob": "^10.3.3"
+ "glob": "^10.3.10"
},
"scripts": {
"build": "yarn --silent tsc --build && npm run lint",
diff --git a/packages/@jsii/check-node/src/constants.ts b/packages/@jsii/check-node/src/constants.ts
index a267bc0b20..def0d5f8eb 100644
--- a/packages/@jsii/check-node/src/constants.ts
+++ b/packages/@jsii/check-node/src/constants.ts
@@ -35,9 +35,6 @@ export class NodeRelease {
endOfLife: new Date('2022-04-30'),
supportedRange: '^12.7.0',
}),
- new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
-
- // Currently active releases (as of last edit to this file...)
new NodeRelease(16, {
endOfLife: new Date('2023-09-11'),
supportedRange: '^16.3.0',
@@ -46,8 +43,12 @@ export class NodeRelease {
endOfLife: new Date('2022-06-01'),
supportedRange: '^17.3.0',
}),
+ new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
+
+ // Currently active releases (as of last edit to this file...)
new NodeRelease(18, { endOfLife: new Date('2025-04-30') }),
new NodeRelease(20, { endOfLife: new Date('2026-04-30') }),
+ new NodeRelease(21, { endOfLife: new Date('2024-06-01') }),
// Future (planned releases)
];
diff --git a/packages/@jsii/check-node/src/index.test.ts b/packages/@jsii/check-node/src/index.test.ts
index 47f5cb8973..b7b5126e19 100644
--- a/packages/@jsii/check-node/src/index.test.ts
+++ b/packages/@jsii/check-node/src/index.test.ts
@@ -11,7 +11,7 @@ test('tested node releases are correctly registered & supported', () => {
// This test is there to ensure house-keeping happens when it should. If we are
// testing a given node release, it must not have been EOL for over 60 days.
-test(`tested node release (${process.version}) has not ben EOL for more than 60 days`, () => {
+test(`tested node release (${process.version}) has not been EOL for more than 60 days`, () => {
const { nodeRelease } = NodeRelease.forThisRuntime();
expect(nodeRelease?.endOfLifeDate?.getTime()).toBeGreaterThan(
Date.now() - 60 * 86_400_000,
diff --git a/packages/@jsii/check-node/src/index.ts b/packages/@jsii/check-node/src/index.ts
index 4c9fdbb5f3..aacd28441d 100644
--- a/packages/@jsii/check-node/src/index.ts
+++ b/packages/@jsii/check-node/src/index.ts
@@ -22,12 +22,13 @@ export function checkNode(envPrefix = 'JSII'): void {
if (nodeRelease?.endOfLife) {
const silenceVariable = `${envPrefix}_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION`;
- const acknowledgeNodeEol =
- 'Node14 is now end of life (EOL) as of April 30, 2023. Support of EOL runtimes are only guaranteed for 30 days after EOL. By silencing this warning you acknowledge that you are using an EOL version of Node and will upgrade to a supported version as soon as possible.';
+ const silencedVersions = (process.env[silenceVariable] ?? '')
+ .split(',')
+ .map((v) => v.trim());
const qualifier = nodeRelease.endOfLifeDate
? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}`
: '';
- if (!(process.env[silenceVariable] === acknowledgeNodeEol))
+ if (!silencedVersions.includes(nodeRelease.majorVersion.toString()))
veryVisibleMessage(
bgRed.white.bold,
`Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`,
diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json
index 853730195f..0a1ae2b8b1 100644
--- a/packages/@jsii/dotnet-runtime/package.json
+++ b/packages/@jsii/dotnet-runtime/package.json
@@ -39,7 +39,7 @@
},
"devDependencies": {
"@jsii/runtime": "^0.0.0",
- "@types/semver": "^7.5.0",
+ "@types/semver": "^7.5.3",
"jsii-build-tools": "^0.0.0",
"semver": "^7.5.4"
}
diff --git a/packages/@jsii/go-runtime-test/project/go.mod b/packages/@jsii/go-runtime-test/project/go.mod
index 6ef67899d1..63f2d81cff 100644
--- a/packages/@jsii/go-runtime-test/project/go.mod
+++ b/packages/@jsii/go-runtime-test/project/go.mod
@@ -9,7 +9,7 @@ require (
github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview
github.com/stretchr/testify v1.8.4
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
- golang.org/x/tools v0.12.0
+ golang.org/x/tools v0.15.0
)
require (
@@ -21,8 +21,8 @@ require (
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
- golang.org/x/mod v0.12.0 // indirect
- golang.org/x/sys v0.11.0 // indirect
+ golang.org/x/mod v0.14.0 // indirect
+ golang.org/x/sys v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/packages/@jsii/go-runtime-test/project/go.sum b/packages/@jsii/go-runtime-test/project/go.sum
index ac8586a412..51e269bb6a 100644
--- a/packages/@jsii/go-runtime-test/project/go.sum
+++ b/packages/@jsii/go-runtime-test/project/go.sum
@@ -26,11 +26,17 @@ golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
+golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
+golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
+golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
+golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -43,6 +49,12 @@ golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
+golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
+golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
@@ -53,6 +65,12 @@ golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8=
golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8=
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
+golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
+golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
+golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
+golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
+golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
+golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/go.mod b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod
index 0b21ed7feb..d4f6e6965b 100644
--- a/packages/@jsii/go-runtime/jsii-runtime-go/go.mod
+++ b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod
@@ -8,7 +8,7 @@ require (
github.com/mattn/go-isatty v0.0.19
github.com/stretchr/testify v1.8.4
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
- golang.org/x/tools v0.12.0
+ golang.org/x/tools v0.14.0
)
require (
@@ -16,8 +16,8 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
- golang.org/x/mod v0.12.0 // indirect
- golang.org/x/sys v0.11.0 // indirect
+ golang.org/x/mod v0.13.0 // indirect
+ golang.org/x/sys v0.13.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/go.sum b/packages/@jsii/go-runtime/jsii-runtime-go/go.sum
index a5152e70bc..c85b2a3e19 100644
--- a/packages/@jsii/go-runtime/jsii-runtime-go/go.sum
+++ b/packages/@jsii/go-runtime/jsii-runtime-go/go.sum
@@ -20,22 +20,22 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
-golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
+golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
+golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
-golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
-golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
+golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
+golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/packages/@jsii/integ-test/package.json b/packages/@jsii/integ-test/package.json
index 4c74da7799..0489a201a6 100644
--- a/packages/@jsii/integ-test/package.json
+++ b/packages/@jsii/integ-test/package.json
@@ -23,10 +23,10 @@
"jsii": "^0.0.0",
"jsii-pacmak": "^0.0.0",
"jsii-rosetta": "^0.0.0",
- "tar": "^6.1.15"
+ "tar": "^6.2.0"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
- "@types/tar": "^6.1.5"
+ "@types/tar": "^6.1.6"
}
}
diff --git a/packages/@jsii/kernel/package.json b/packages/@jsii/kernel/package.json
index 8cec5a1a23..5717acd74a 100644
--- a/packages/@jsii/kernel/package.json
+++ b/packages/@jsii/kernel/package.json
@@ -34,14 +34,14 @@
"@jsii/spec": "^0.0.0",
"fs-extra": "^10.1.0",
"lockfile": "^1.0.4",
- "tar": "^6.1.15"
+ "tar": "^6.2.0"
},
"devDependencies": {
"@scope/jsii-calc-base": "^0.0.0",
"@scope/jsii-calc-lib": "^0.0.0",
"@types/fs-extra": "^9.0.13",
- "@types/lockfile": "^1.0.2",
- "@types/tar": "^6.1.5",
+ "@types/lockfile": "^1.0.3",
+ "@types/tar": "^6.1.6",
"jest-expect-message": "^1.1.3",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120"
diff --git a/packages/@jsii/kernel/src/kernel.ts b/packages/@jsii/kernel/src/kernel.ts
index 7acf8a37c1..5b310ec9a5 100644
--- a/packages/@jsii/kernel/src/kernel.ts
+++ b/packages/@jsii/kernel/src/kernel.ts
@@ -1371,13 +1371,20 @@ export class Kernel {
throw new JsiiFault(`Script with name ${req.script} was not defined.`);
}
+ // Make sure the current NODE_OPTIONS are honored if we shell out to node
+ const nodeOptions = [...process.execArgv];
+
+ // When we are using the symlinked version of the cache, we need to preserve both symlink settings for binaries
+ if (nodeOptions.includes('--preserve-symlinks')) {
+ nodeOptions.push('--preserve-symlinks-main');
+ }
+
return {
command: path.join(packageDir, scriptPath),
args: req.args ?? [],
env: {
...process.env,
- // Make sure the current NODE_OPTIONS are honored if we shell out to node
- NODE_OPTIONS: process.execArgv.join(' '),
+ NODE_OPTIONS: nodeOptions.join(' '),
// Make sure "this" node is ahead of $PATH just in case
PATH: `${path.dirname(process.execPath)}:${process.env.PATH}`,
},
diff --git a/packages/@jsii/kernel/src/tar-cache/index.ts b/packages/@jsii/kernel/src/tar-cache/index.ts
index 1bc67cdfa9..7d7fbc0358 100644
--- a/packages/@jsii/kernel/src/tar-cache/index.ts
+++ b/packages/@jsii/kernel/src/tar-cache/index.ts
@@ -15,7 +15,7 @@ export interface ExtractResult {
* When `'hit'`, the data was already present in cache and was returned from
* cache.
*
- * When `'miss'`, the data was extracted into the caache and returned from
+ * When `'miss'`, the data was extracted into the cache and returned from
* cache.
*
* When `undefined`, the cache is not enabled.
diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json
index 9295d6c5cb..7d50a067e0 100644
--- a/packages/@jsii/python-runtime/package.json
+++ b/packages/@jsii/python-runtime/package.json
@@ -42,6 +42,6 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
- "pyright": "^1.1.321"
+ "pyright": "^1.1.332"
}
}
diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt
index 30c7baf122..ce4cb80211 100644
--- a/packages/@jsii/python-runtime/requirements.txt
+++ b/packages/@jsii/python-runtime/requirements.txt
@@ -1,9 +1,9 @@
black~=23.3
mypy==1.4.1
-pip~=23.2
+pip~=23.3
pytest~=7.4
pytest-mypy~=0.10
-setuptools~=67.3.2
+setuptools~=68.0.0
types-python-dateutil~=2.8
wheel~=0.41
diff --git a/packages/@jsii/python-runtime/tests/test_invoke_bin.py b/packages/@jsii/python-runtime/tests/test_invoke_bin.py
index 8ff6a94271..f4e91fbee5 100644
--- a/packages/@jsii/python-runtime/tests/test_invoke_bin.py
+++ b/packages/@jsii/python-runtime/tests/test_invoke_bin.py
@@ -23,8 +23,10 @@ def silence_node_deprecation_warnings():
for var in variables:
environ[var] = "1"
- nodeEolAcknowledgement = "Node14 is now end of life (EOL) as of April 30, 2023. Support of EOL runtimes are only guaranteed for 30 days after EOL. By silencing this warning you acknowledge that you are using an EOL version of Node and will upgrade to a supported version as soon as possible."
- environ["JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"] = nodeEolAcknowledgement
+ # silence this for the next decades
+ environ[
+ "JSII_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION"
+ ] = "14,16,18,20,22,24,26,28,30,32,34"
# Execute the test
yield
diff --git a/packages/@jsii/runtime/package.json b/packages/@jsii/runtime/package.json
index 1a0bf2dbd5..61011746d7 100644
--- a/packages/@jsii/runtime/package.json
+++ b/packages/@jsii/runtime/package.json
@@ -44,7 +44,7 @@
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
"source-map-loader": "^4.0.1",
- "webpack": "^5.88.2",
+ "webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}
diff --git a/packages/@jsii/spec/package.json b/packages/@jsii/spec/package.json
index 6b6e34925f..542d755151 100644
--- a/packages/@jsii/spec/package.json
+++ b/packages/@jsii/spec/package.json
@@ -36,6 +36,6 @@
"devDependencies": {
"fs-extra": "^10.1.0",
"jsii-build-tools": "^0.0.0",
- "typescript-json-schema": "^0.59.0"
+ "typescript-json-schema": "^0.62.0"
}
}
diff --git a/packages/jsii-calc/bin/run.ts b/packages/jsii-calc/bin/run.ts
index bfa844c8e6..647ffebc53 100755
--- a/packages/jsii-calc/bin/run.ts
+++ b/packages/jsii-calc/bin/run.ts
@@ -2,11 +2,16 @@
/* eslint-disable no-console */
+import * as calcLib from '@scope/jsii-calc-lib';
+
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
const runCommand = async () => {
console.info('Hello World!');
+ // Make sure this binary depends on an external package to test dependencies with invokeBinScript
+ new calcLib.Number(1);
+
const args = process.argv.slice(2);
if (args.length > 0) {
console.info(` arguments: ${args.join(', ')}`);
diff --git a/packages/jsii-diff/BREAKING_CHANGES.md b/packages/jsii-diff/BREAKING_CHANGES.md
new file mode 100644
index 0000000000..7613609e2c
--- /dev/null
+++ b/packages/jsii-diff/BREAKING_CHANGES.md
@@ -0,0 +1,158 @@
+# Changes jsii-diff considers breaking
+
+jsii-diff considers a change breaking if there exists a program that would
+successfully compile against a previous version of the library, but would fail
+to compile against the new proposed version of the library.
+
+Some rules are specific to one of TypeScript, Java, C#, Python and Go, but as a
+jsii user you have to take all of these into account.
+
+This document will go over the most common changes you want to make that jsii-diff
+will consider breaking, why that is, and what to do about it.
+
+## Making properties optional
+
+By far the most commonly asked question is: *Why am I not allowed to turn this required property into an optional property?*
+
+The answer is:
+
+> [!IMPORTANT]
+> You are allowed to make *inputs* optional, but you are not allowed to make *outputs* optional.
+
+This often manifests itself as a class that takes a struct, and then copies some of the values onto itself as properties. For example:
+
+```ts
+interface DogOptions {
+ readonly name: string; // This 'name: string' is an INPUT
+}
+
+class Dog {
+ public readonly name: string; // This 'name: string' is an OUTPUT
+
+ constructor(options: DogOptions) {
+ this.name = options.name;
+ }
+}
+```
+
+You *are* allowed to make `DogOptions.name` optional! Someone could have written the program:
+
+```ts
+// Still valid. 'name' takes either 'string' or 'undefined', and we are giving it a 'string'
+new Dog({ name: 'Fido' });
+```
+
+You are *not* allowed to make `Dog.name` optional though. Someone could have written the program:
+
+```ts
+const d = new Dog({ name: 'Fido' });
+console.log(d.name.toLowerCase());
+
+// Not valid anymore after the type of `d.name` has changed into `string | undefined`.
+// 'd.name' can be undefined, and we have to account for that with an `if`!
+```
+
+### Optional properties: how to solve
+
+You'll have to make the input optional without making the output optional. That raises
+the question, what do we do when we have to produce an output value that we don't have?
+The simplest solution is to throw an exception:
+
+```ts
+interface DogOptions {
+ readonly name?: string;
+}
+
+class Dog {
+ private readonly _name?: string;
+
+ constructor(options: DogOptions) {
+ this._name = options.name;
+ }
+
+ public get name(): string {
+ if (!this._name) {
+ throw new Error('Dog does not have a name');
+ }
+ return this._name;
+ }
+}
+```
+
+This doesn't break any existing users: all their Dogs will have names, so they will not hit the exception path.
+
+For new users that fail to give their Dog a name, presumably they will be aware that their Dog doesn't have a name, so they can avoid trying to read it. If you want to give them a way to avoid the exception, add a `public get hasName(): boolean` field so they can test for the existence of the name before accessing it.
+
+## Changing types to superclass/subclass
+
+When changing types involved in an operation, you run into a similar issue as with changing the optionality of a property:
+
+> [!IMPORTANT]
+> You are allowed to make *inputs* accept a supertype, but you are only allowed to make *outputs* return a subtype.
+
+This manifests when you want to introduce a new common supertype from two or more existing types. For example,
+let's say we have Dogs and Cats, and some operations that only work on some of them:
+
+```ts
+class Dog { }
+class Cat { }
+
+function feed(animal: Cat): void;
+function pet(animal: Dog): void;
+function getFromKennel(name: string): Dog;
+```
+
+We would like to clean up this code and introduce a new class, `Animal`, that will be a new supertype to both Dog and Cat:
+
+```ts
+class Animal { }
+class Dog extends Animal { }
+class Cat extends Animal { }
+```
+
+Now, what can we do with our operations? Can we make `feed` and `pet` accept an `Animal`?
+
+```ts
+function feed(animal: Animal): void;
+function pet(animal: Animal): void;
+
+// Yes! Code from before still works:
+feed(new Cat());
+feed(new Dog());
+```
+
+Can we make `getFromKennel()` return an `Animal`?
+
+```ts
+function getFromKennel(name: string): Animal;
+
+// NO! Someone could have written this, and this no longer compiles without an 'instanceof' check!
+const d: Dog = getFromKennel('Fido');
+```
+
+> [!WARNING]
+> Depending on your definitions of `Dog`, `Cat` and `Animal`, the above code might actually compile just
+> fine in TypeScript. That is because of TypeScript's [structural typing](https://www.typescriptlang.org/docs/handbook/type-compatibility.html),
+> which doesn't (always) look at the name of the type, but just at the fields on it. If the fields are the
+> same, TypeScript may consider the types "close enough" and allow the assignment. The above TypeScript
+> behavior may make it possible to accidentally build APIs that can never be used in nominally typed
+> languages like Java or C#. jsii-diff will do nominal checks on function signatures, but it cannot
+> do nominal checks on function implementations.
+
+### Extracting a supertype: how to solve
+
+`getFromKennel()` must keep returning a `Dog`, so we have to make an alternative function for the generic case and forward the implementation:
+
+```ts
+function getAnimalFromKennel(name: string): Animal {
+ return /* ... */;
+}
+
+function getFromKennel(name: string): Dog {
+ const x = getAnimalFromKennel(name);
+ if (!(x instanceof Dog)) {
+ throw new Error(`I expected ${name} to be a Dog`);
+ }
+ return x;
+}
+```
diff --git a/packages/jsii-diff/README.md b/packages/jsii-diff/README.md
index 66536f9d6b..f1417856c8 100644
--- a/packages/jsii-diff/README.md
+++ b/packages/jsii-diff/README.md
@@ -126,6 +126,10 @@ abstract members yet.
for subclassing, but treating them as such would limit the evolvability of
libraries too much.
+## Help! jsii-diff is marking my changes as breaking
+
+See [BREAKING_CHANGES.md](./BREAKING_CHANGES.md) for more information.
+
## License
__jsii-diff__ is distributed under the
diff --git a/packages/jsii-diff/package.json b/packages/jsii-diff/package.json
index 56ad7d202d..4148bb05ba 100644
--- a/packages/jsii-diff/package.json
+++ b/packages/jsii-diff/package.json
@@ -42,7 +42,7 @@
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
- "@types/tar-fs": "^2.0.1",
+ "@types/tar-fs": "^2.0.2",
"jest-expect-message": "^1.1.3",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0"
diff --git a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt
index 302879d0ab..2d9112e712 100644
--- a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt
+++ b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt
@@ -4,6 +4,6 @@
# package (wheel, sdist), but not declared as build-system dependencies.
setuptools~=67.3.2 # build-system
-wheel~=0.40 # build-system
+wheel~=0.41 # build-system
twine~=4.0.2
diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json
index 335beb0437..61a1cea805 100644
--- a/packages/jsii-pacmak/package.json
+++ b/packages/jsii-pacmak/package.json
@@ -47,7 +47,7 @@
"jsii-reflect": "^0.0.0",
"jsii-rosetta": "^0.0.0",
"semver": "^7.5.4",
- "spdx-license-list": "^6.6.0",
+ "spdx-license-list": "^6.7.0",
"xmlbuilder": "^15.1.1",
"yargs": "^16.2.0"
},
@@ -56,16 +56,16 @@
"@jsii/java-runtime": "^0.0.0",
"@jsii/go-runtime": "^0.0.0",
"@scope/jsii-calc-lib": "^0.0.0",
- "@types/clone": "^2.1.1",
- "@types/diff": "^5.0.3",
- "@types/commonmark": "^0.27.6",
+ "@types/clone": "^2.1.3",
+ "@types/diff": "^5.0.7",
+ "@types/commonmark": "^0.27.8",
"@types/fs-extra": "^9.0.13",
- "@types/semver": "^7.5.0",
+ "@types/semver": "^7.5.3",
"diff": "^5.1.0",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^3.20.120",
- "pyright": "^1.1.321"
+ "pyright": "^1.1.332"
},
"keywords": [
"jsii",
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
index aa10fa299c..72c40a5489 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
@@ -1220,7 +1220,7 @@ testpkg.FooBar=example.test.demo.FooBar
exports[`diamond-struct-parameter.ts: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -2642,7 +2642,7 @@ testpkg.Namespace2.Foo.Final=example.test.demo.Namespace2$Foo.Final
exports[`nested-types.ts: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap
index 2d907b07b4..4482893e5c 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap
@@ -412,7 +412,7 @@ foo
exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -927,7 +927,7 @@ foo
exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -1422,7 +1422,7 @@ foo
exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -1914,7 +1914,7 @@ foo
exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap
index 8212909acf..e5db3283dd 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap
@@ -243,7 +243,7 @@ scope.jsii-calc-base
exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -798,7 +798,7 @@ scope.jsii-calc-base-of-base
exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -1326,7 +1326,7 @@ scope.jsii-calc-lib
exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
@@ -2987,7 +2987,7 @@ foo = "bar"
exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = `
[build-system]
-requires = ["setuptools~=67.3.2", "wheel~=0.40"]
+requires = ["setuptools~=67.3.2", "wheel~=0.41"]
build-backend = "setuptools.build_meta"
[tool.pyright]
diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt
index d5c8e2d17c..04ac2a2a1e 100644
--- a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt
+++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt
@@ -1,2 +1,2 @@
mypy==1.4.1
-pip==23.2.1 # required to use --config-settings
+pip==23.3 # required to use --config-settings
diff --git a/packages/jsii-reflect/lib/_memoized.ts b/packages/jsii-reflect/lib/_memoized.ts
index 3cc46383ed..9bce919802 100644
--- a/packages/jsii-reflect/lib/_memoized.ts
+++ b/packages/jsii-reflect/lib/_memoized.ts
@@ -1,7 +1,30 @@
-/* eslint-disable @typescript-eslint/ban-types -- WeakMap demands T extends object */
+import { TypeSystem } from './type-system';
+/* eslint-disable @typescript-eslint/ban-types -- WeakMap demands T extends object */
const CACHE = new WeakMap