diff --git a/.all-contributorsrc b/.all-contributorsrc
index fa42641973..ec91a7dec9 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1066,6 +1066,33 @@
"contributions": [
"doc"
]
+ },
+ {
+ "login": "donicek",
+ "name": "Petr Kacer",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8548012?v=4",
+ "profile": "https://github.com/donicek",
+ "contributions": [
+ "bug"
+ ]
+ },
+ {
+ "login": "ArmaanT",
+ "name": "Armaan Tobaccowalla",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13340433?v=4",
+ "profile": "https://armaan.tobaccowalla.com",
+ "contributions": [
+ "bug"
+ ]
+ },
+ {
+ "login": "ChristopheVico",
+ "name": "Christophe Vico",
+ "avatar_url": "https://avatars.githubusercontent.com/u/56592817?v=4",
+ "profile": "https://github.com/ChristopheVico",
+ "contributions": [
+ "bug"
+ ]
}
],
"repoType": "github",
diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml
index 9ce8ce0469..693fbe5473 100644
--- a/.github/workflows/docker-images.yml
+++ b/.github/workflows/docker-images.yml
@@ -11,6 +11,12 @@ jobs:
superchain:
name: jsii/superchain
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node: ['10', '14']
+ env:
+ # Node version whose images will be aliased to 'nightly' and 'latest'
+ DEFAULT_NODE_MAJOR_VERSION: 10
steps:
- name: Check out
uses: actions/checkout@v2
@@ -53,31 +59,45 @@ jobs:
- name: Build Image
if: steps.should-run.outputs.result == 'true'
run: |-
- docker build \
- --pull \
- --build-arg BUILD_TIMESTAMP="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
- --build-arg COMMIT_ID='${{ github.sha }}' \
- --tag 'jsii/superchain:nightly' \
+ docker build \
+ --pull \
+ --build-arg BUILD_TIMESTAMP="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
+ --build-arg COMMIT_ID='${{ github.sha }}' \
+ --build-arg NODE_MAJOR_VERSION=${{ matrix.node }} \
+ --tag "jsii/superchain:node${{ matrix.node }}-nightly" \
./superchain
- name: Test Image
if: steps.should-run.outputs.result == 'true'
run: |-
- docker run \
- --rm \
- --tty \
- --network=host \
- -v${{ github.workspace }}:${{ github.workspace }} \
- -w${{ github.workspace }} \
- 'jsii/superchain:nightly' \
+ docker run \
+ --rm \
+ --tty \
+ --network=host \
+ -v${{ github.workspace }}:${{ github.workspace }} \
+ -w${{ github.workspace }} \
+ "jsii/superchain:node${{ matrix.node }}-nightly" \
bash -c "yarn install --frozen-lockfile && yarn build && yarn test"
# Only when puhsing to main/release from now on
- name: Publish (nightly)
if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref != 'refs/heads/release'
run: |-
- docker push jsii/superchain:nightly
+ docker push jsii/superchain:node${{ matrix.node }}-nightly
+
+ # If the current version is the default version, also tag this with the unqualified ':nightly' label
+ if [[ "${{ matrix.node }}" == "$DEFAULT_NODE_MAJOR_VERSION" ]]; then
+ docker tag jsii/superchain:node${{ matrix.node }}-nightly jsii/superchain:nightly
+ docker push jsii/superchain:nightly
+ fi
- name: Publish (latest)
if: steps.should-run.outputs.result == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/release'
run: |-
- docker tag jsii/superchain:nightly jsii/superchain:latest
- docker push jsii/superchain:latest
+ # Alias 'nodeX-nightly's to 'nodeX', then push
+ docker tag jsii/superchain:node${{ matrix.node }}-nightly jsii/superchain:node${{ matrix.node }}
+ docker push jsii/superchain:node${{ matrix.node }}
+
+ # If the current version is the default version, also tag this with the unqualified ':latest' label
+ if [[ "${{ matrix.node }}" == "$DEFAULT_NODE_MAJOR_VERSION" ]]; then
+ docker tag jsii/superchain:node${{ matrix.node }} jsii/superchain:latest
+ docker push jsii/superchain:latest
+ fi
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index d2dc0074ed..df2cee60e0 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -7,6 +7,7 @@ on:
push:
branches: [main]
paths: [gh-pages/**]
+ workflow_dispatch:
jobs:
build:
@@ -49,7 +50,7 @@ jobs:
publish:
name: Publish
needs: build
- if: github.event_name == 'push'
+ if: github.event_name == 'push' ||Β github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Check out
diff --git a/.mergify/config.yml b/.mergify/config.yml
index 2f0cecc5a0..cab6bd1a58 100644
--- a/.mergify/config.yml
+++ b/.mergify/config.yml
@@ -30,7 +30,7 @@ pull_request_rules:
- '#changes-requested-reviews-by=0'
- status-success=Semantic Pull Request
# Docker image validation
- - status-success=jsii/superchain
+ - status-success~=^jsii/superchain
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
@@ -79,7 +79,7 @@ pull_request_rules:
- '#changes-requested-reviews-by=0'
- status-success=Semantic Pull Request
# Docker image validation
- - status-success=jsii/superchain
+ - status-success~=^jsii/superchain
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
@@ -128,7 +128,7 @@ pull_request_rules:
- '#changes-requested-reviews-by=0'
- status-success=Semantic Pull Request
# Docker image validation
- - status-success=jsii/superchain
+ - status-success~=^jsii/superchain
# One test for each OS
- status-success~=^Test \(ubuntu-.*$
- status-success~=^Test \(macos-.*$
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f781507fff..689d2353e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,26 @@
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.27.0](https://github.com/aws/jsii/compare/v1.26.0...v1.27.0) (2021-04-02)
+
+
+### Features
+
+* **go:** variadic type helpers to build slices ([#2755](https://github.com/aws/jsii/issues/2755)) ([16b6546](https://github.com/aws/jsii/commit/16b65468c27bf6569a35042279fadb2d5cc4c715))
+* **superchain:** also build a superchain image with Node 14 ([#2741](https://github.com/aws/jsii/issues/2741)) ([6364d51](https://github.com/aws/jsii/commit/6364d514edc1904aab5e0e9037a6025c9b335043))
+
+
+### Bug Fixes
+
+* **go:** dates are mistreated as strings ([#2730](https://github.com/aws/jsii/issues/2730)) ([2ba2ec4](https://github.com/aws/jsii/commit/2ba2ec47af1b3007844c00bd44aa81ccc7729040)), closes [#2659](https://github.com/aws/jsii/issues/2659)
+* **go:** missing setter for R/W interface properties ([#2731](https://github.com/aws/jsii/issues/2731)) ([74d0d99](https://github.com/aws/jsii/commit/74d0d9999d6381ef8bec36a45141380f190e26b9)), closes [#2665](https://github.com/aws/jsii/issues/2665)
+* **go:** protected property accessors missing ([#2738](https://github.com/aws/jsii/issues/2738)) ([94c799a](https://github.com/aws/jsii/commit/94c799a93ebedb12f1b7c9ae475eeac98d13a755))
+* **go:** unable to set an array of interfaces/enums ([#2754](https://github.com/aws/jsii/issues/2754)) ([0cd514e](https://github.com/aws/jsii/commit/0cd514e6e61d47116e9dc693916325fefb90c45d)), closes [#2686](https://github.com/aws/jsii/issues/2686)
+* **python:** accept Sequence[T] for array parameters ([#2606](https://github.com/aws/jsii/issues/2606)) ([b09d578](https://github.com/aws/jsii/commit/b09d578464f1b408607bbb9645c65fbb5db318fa)), closes [aws/aws-cdk#13203](https://github.com/aws/aws-cdk/issues/13203)
+* **python:** module import fails with: KeyError: '__all__' ([#2757](https://github.com/aws/jsii/issues/2757)) ([c32a889](https://github.com/aws/jsii/commit/c32a8895bdd7c84bd289ca053d15b97086bb5511)), closes [#2750](https://github.com/aws/jsii/issues/2750)
+* **rosetta:** 'extract' does not translate samples in submodule READMEs ([#2744](https://github.com/aws/jsii/issues/2744)) ([0a3f01f](https://github.com/aws/jsii/commit/0a3f01fa73e94aea4c86adb64450f45340360b92))
+* **superchain:** use entrypoint to set up nvm ([#2736](https://github.com/aws/jsii/issues/2736)) ([0e247b6](https://github.com/aws/jsii/commit/0e247b6d9f432512559fb4642eebce0b1a854859))
+
## [1.26.0](https://github.com/aws/jsii/compare/v1.24.0...v1.26.0) (2021-03-22)
diff --git a/README.md b/README.md
index 59de047abd..96c6fd00df 100644
--- a/README.md
+++ b/README.md
@@ -65,131 +65,134 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Ari Palo π€ |
+ Armaan Tobaccowalla π |
BartΕomiej Jurek π |
Ben Bridts π |
Ben Farr π |
Ben Walters π€ |
Benjamin Macher π |
- Benjamin Maizels π» π |
+ Benjamin Maizels π» π |
Bill Cauchois π€ |
Brecht Verhoeve π€ |
Breland Miley π» |
CaerusKaru π» π§ |
Camilo BermΓΊdez π |
Campion Fellin π» |
- Carter Van Deuren π |
+ Carter Van Deuren π |
+ Christophe Vico π |
Christopher Currie π» π€ |
Christopher Rybicki π |
CyrusNajmabadi π π€ |
Daniel Dinu π π» |
Daniel Schroeder π π» π π€ π§ |
- Dave Slotnick π |
- Donald Stufft π π» π€ π |
+ Dave Slotnick π |
+ Donald Stufft π π» π€ π |
Dongie Agnir π» π |
Eduardo Sena S. Rosa π |
Elad Ben-Israel π π» π€ π§ π π’ |
Eli Polonsky π π» π€ π§ π |
Eric Z. Beard π |
- Erik Karlsson π |
- Eugene Kozlov π» |
+ Erik Karlsson π |
+ Eugene Kozlov π» |
Fabio Gentile π |
Florian Eitel π€ |
Graham Lea π€ π |
Hamza Assyad π π» π€ π |
Hari Pachuveetil π π |
- Hsing-Hui Hsu π» π π€ π |
- James Kelley π |
+ Hsing-Hui Hsu π» π π€ π |
+ James Kelley π |
James Mead π» |
James Siri π» π§ |
Jason Del Ponte π€ π |
Jason Fulghum π€ π π |
Jerry Kindall π π€ |
- Jimmy Gaussen π€ |
- Jon Steinich π π€ π» |
+ Jimmy Gaussen π€ |
+ Jon Steinich π π€ π» |
Joseph Lawson π |
Joseph Martin π |
Junix π |
Justin Taylor π |
Kyle Thomson π» π |
- Leandro Padua π |
- Maja S Bratseth π |
+ Leandro Padua π |
+ Maja S Bratseth π |
Marcos Diez π |
Matthew Bonig π π |
Matthew Pirocchi π» π€ π |
Mike Lane π |
Mitch Garnaat π π» π€ π |
- Mitchell Valine π π» π€ π§ π |
- Mohamad Soufan π |
+ Mitchell Valine π π» π€ π§ π |
+ Mohamad Soufan π |
Neta Nir π» π€ π§ π |
Nick Lynch π π» π§ π |
Niranjan Jayakar π π» π€ π§ π |
Noah Litov π» π§ π |
PIDZ - Bart π€ |
- Petra Barus π» |
- Philip Cali π€ |
+ Petr Kacer π |
+ Petra Barus π» |
+ Philip Cali π€ |
Quentin Loos π€ |
Raphael π |
Richard H Boyd π |
Rico Huijbers π π» π€ π§ π |
+
+
Romain Marcadier π π» π¨ π€ π§ π π |
SADIK KUZU π |
SK π€ |
-
-
Sam Fink π» π |
Sam Goodwin π |
Sebastian Korfmann π π» π€ |
Shane Witbeck π€ |
+
+
Shiv Lakshminarayan π» π§ π |
Somaya π» π€ π§ π |
The Gitter Badger π» π§ |
-
-
Thomas Poignant π |
Thomas Steinbach π |
Thorsten Hoeger π» |
Tim Wagner π π€ |
+
+
Tobias Lidskog π» |
Ty Coghlan π |
Tyler van Hensbergen π€ |
-
-
Vlad Hrybok π |
Vladimir Shchur π |
Yan Zhulanow π» |
ajnarang π€ |
+
+
aniljava π» |
deccy-mcc π |
dependabot-preview[bot] π π§ |
-
-
dependabot[bot] π§ |
dheffx π |
gregswdl π |
mattBrzezinski π |
+
+
mergify[bot] π§ |
seiyashima42 π π» π |
sullis π» |
-
-
vaneek π |
diff --git a/gh-pages/content/specification/6-compliance-report.md b/gh-pages/content/specification/6-compliance-report.md
index 9014b55c41..786904f37d 100644
--- a/gh-pages/content/specification/6-compliance-report.md
+++ b/gh-pages/content/specification/6-compliance-report.md
@@ -5,12 +5,12 @@
This section details the current state of each language binding with respect to our standard compliance suite.
-| number | test | java (100.00%) | golang (67.52%) | Dotnet | Python |
+| number | test | java (100.00%) | golang (77.78%) | Dotnet | Python |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------------------------------------------- | ------ | ------ |
| 1 | asyncOverrides_overrideCallsSuper | π’ | [π΄](https://github.com/aws/jsii/issues/2670) | β | β |
| 2 | [arrayReturnedByMethodCanBeRead]("Array created in the kernel can be queried for its elements") | π’ | π’ | β | β |
| 3 | [unionProperties]("Kernal values that accept a union type can be set, and are returned with the concrete type") | π’ | π’ | β | β |
-| 4 | syncOverrides | π’ | [π΄](https://github.com/aws/jsii/issues/2670) | β | β |
+| 4 | syncOverrides | π’ | π’ | β | β |
| 5 | [useEnumFromScopedModule]("Property that accepts an enum type from a third-party package can be set, and read") | π’ | π’ | β | β |
| 6 | [createObjectAndCtorOverloads]("Class can be instantiated with empty and non empty constructor") | π’ | βͺ | β | β |
| 7 | fail_syncOverrides_callsDoubleAsync_method | π’ | π’ | β | β |
@@ -21,19 +21,19 @@ This section details the current state of each language binding with respect to
| 12 | [classesCanSelfReferenceDuringClassInitialization]("Classes can reference other classes during initialization") | π’ | π’ | β | β |
| 13 | [canObtainStructReferenceWithOverloadedSetter]("A class with a settable property of a union type can be returned from the kernel") | π’ | π’ | β | β |
| 14 | [callbacksCorrectlyDeserializeArguments]("Runtime properly deserializes callback arguments from the kernel") | π’ | π’ | β | β |
-| 15 | [canUseInterfaceSetters]("Read-write properties generate the corresponding setters in the target language") | π’ | [π΄](https://github.com/aws/jsii/issues/2665) | β | β |
-| 16 | [propertyOverrides_interfaces]("Target language can override properties of host interfaces") | π’ | [π΄](https://github.com/aws/jsii/issues/2665) | β | β |
+| 15 | [canUseInterfaceSetters]("Read-write properties generate the corresponding setters in the target language") | π’ | π’ | β | β |
+| 16 | [propertyOverrides_interfaces]("Target language can override properties of host interfaces") | π’ | π’ | β | β |
| 17 | syncOverrides_callsSuper | π’ | π’ | β | β |
| 18 | [testJsiiAgent]("Asserts the correct value of the JSII_AGENT env variable for the kernel process") | π’ | π’ | β | β |
| 19 | [doNotOverridePrivates_method_private]("Non public methods on the guest class do not override methods in the host class") | π’ | π’ | β | β |
| 20 | [pureInterfacesCanBeUsedTransparently]("Guest implementation of a pure host interface can be used by host consumers accepting that interface") | π’ | π’ | β | β |
| 21 | [nullShouldBeTreatedAsUndefined]("Null value of target language is treated as undefined by the host") | π’ | π’ | β | β |
-| 22 | [primitiveTypes]("All Primitive types are set and read with their respective types") | π’ | [π΄](https://github.com/aws/jsii/issues/2659) | β | β |
+| 22 | [primitiveTypes]("All Primitive types are set and read with their respective types") | π’ | π’ | β | β |
| 23 | [reservedKeywordsAreSlugifiedInClassProperties]("TS code that uses reserved words as class property names get slugified so it is usable in the target language") | π’ | βͺ | β | β |
| 24 | [objectIdDoesNotGetReallocatedWhenTheConstructorPassesThisOut]("Ensure the JSII kernel can pass 'this' out to JSII remotes from within the constructor") | π’ | π’ | β | β |
-| 25 | [interfaceBuilder]("Seems to be a duplicate of 'propertyOverrides_interfaces'?") | π’ | [π΄](https://github.com/aws/jsii/issues/2665) | β | β |
-| 26 | unionTypes | π’ | [π΄](https://github.com/aws/jsii/issues/2686) | β | β |
-| 27 | arrays | π’ | [π΄](https://github.com/aws/jsii/issues/2686) | β | β |
+| 25 | [interfaceBuilder]("Seems to be a duplicate of 'propertyOverrides_interfaces'?") | π’ | π’ | β | β |
+| 26 | unionTypes | π’ | π’ | β | β |
+| 27 | arrays | π’ | π’ | β | β |
| 28 | staticMapInClassCannotBeModified | π’ | βͺ | β | β |
| 29 | consts | π’ | π’ | β | β |
| 30 | pureInterfacesCanBeUsedTransparently_WhenTransitivelyImplementing | π’ | π’ | β | β |
@@ -52,10 +52,10 @@ This section details the current state of each language binding with respect to
| 43 | doNotOverridePrivates_property_getter_public | π’ | π’ | β | β |
| 44 | equalsIsResistantToPropertyShadowingResultVariable | π’ | π’ | β | β |
| 45 | listInClassCanBeReadCorrectly | π’ | π’ | β | β |
-| 46 | useNestedStruct | π’ | [π΄](https://github.com/aws/jsii/pull/2650) | β | β |
+| 46 | useNestedStruct | π’ | π’ | β | β |
| 47 | testFluentApiWithDerivedClasses | π’ | π’ | β | β |
| 48 | interfacesCanBeUsedTransparently_WhenAddedToJsiiType | π’ | π’ | β | β |
-| 49 | canOverrideProtectedGetter | π’ | [π΄](https://github.com/aws/jsii/issues/2673) | β | β |
+| 49 | canOverrideProtectedGetter | π’ | π’ | β | β |
| 50 | getAndSetEnumValues | π’ | π’ | β | β |
| 51 | structs_nonOptionalequals | π’ | π’ | β | β |
| 52 | testInterfaceParameter | π’ | π’ | β | β |
@@ -66,10 +66,10 @@ This section details the current state of each language binding with respect to
| 57 | eraseUnsetDataValues | π’ | π’ | β | β |
| 58 | maps | π’ | π’ | β | β |
| 59 | structs_containsNullChecks | π’ | [π΄](https://github.com/aws/jsii/issues/2672) | β | β |
-| 60 | canOverrideProtectedSetter | π’ | [π΄](https://github.com/aws/jsii/issues/2673) | β | β |
+| 60 | canOverrideProtectedSetter | π’ | π’ | β | β |
| 61 | asyncOverrides_callAsyncMethod | π’ | [π΄](https://github.com/aws/jsii/issues/2670) | β | β |
| 62 | nodeStandardLibrary | π’ | [π΄](https://github.com/aws/jsii/issues/2670) | β | β |
-| 63 | dates | π’ | [π΄](https://github.com/aws/jsii/issues/2659) | β | β |
+| 63 | dates | π’ | π’ | β | β |
| 64 | collectionOfInterfaces_ListOfStructs | π’ | π’ | β | β |
| 65 | objRefsAreLabelledUsingWithTheMostCorrectType | π’ | π΄ | β | β |
| 66 | unionPropertiesWithBuilder | π’ | π’ | β | β |
@@ -86,7 +86,7 @@ This section details the current state of each language binding with respect to
| 77 | asyncOverrides_overrideThrows | π’ | [π΄](https://github.com/aws/jsii/issues/2670) | β | β |
| 78 | callMethods | π’ | π’ | β | β |
| 79 | returnAbstract | π’ | π’ | β | β |
-| 80 | dynamicTypes | π’ | [π΄](https://github.com/aws/jsii/issues/2659) | β | β |
+| 80 | dynamicTypes | π’ | π’ | β | β |
| 81 | hashCodeIsResistantToPropertyShadowingResultVariable | π’ | βͺ | β | β |
| 82 | returnSubclassThatImplementsInterface976 | π’ | π’ | β | β |
| 83 | structs_optionalEquals | π’ | βͺ | β | β |
diff --git a/gh-pages/content/user-guides/lib-author/toolchain/jsii.md b/gh-pages/content/user-guides/lib-author/toolchain/jsii.md
index 9836f17b1b..7ee1a3bd74 100644
--- a/gh-pages/content/user-guides/lib-author/toolchain/jsii.md
+++ b/gh-pages/content/user-guides/lib-author/toolchain/jsii.md
@@ -59,9 +59,9 @@ reserved words in an identifier.
[report bugs]: https://github.com/aws/jsii/issues/new/choose
-#### `--strip-dependencies`
+#### `--strip-deprecated`
-The `--strip-dependencies` option modifies the compilation flow such that all
+The `--strip-deprecated` option modifies the compilation flow such that all
declarations (types, members) documented with the `@deprecated` tag will be
erased from the visible API of the module:
diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt
index 9ccd37c9a9..b70d221646 100644
--- a/gh-pages/requirements-dev.txt
+++ b/gh-pages/requirements-dev.txt
@@ -1,4 +1,4 @@
mkdocs~=1.1.2
mkdocs-awesome-pages-plugin~=2.5.0
-mkdocs-material~=7.0.6
+mkdocs-material~=7.0.7
mkdocs-git-revision-date-plugin~=0.3.1
diff --git a/lerna.json b/lerna.json
index ff883ea7ac..e76080e488 100644
--- a/lerna.json
+++ b/lerna.json
@@ -10,5 +10,5 @@
"rejectCycles": true
}
},
- "version": "1.26.0"
+ "version": "1.27.0"
}
diff --git a/package.json b/package.json
index f1fe2eebe2..fc23b75147 100644
--- a/package.json
+++ b/package.json
@@ -16,10 +16,10 @@
},
"devDependencies": {
"@jest/types": "^26.6.2",
- "@typescript-eslint/eslint-plugin": "^4.18.0",
- "@typescript-eslint/parser": "^4.18.0",
+ "@typescript-eslint/eslint-plugin": "^4.20.0",
+ "@typescript-eslint/parser": "^4.20.0",
"all-contributors-cli": "^6.20.0",
- "eslint": "^7.22.0",
+ "eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.4.0",
diff --git a/packages/@jsii/Directory.Build.targets b/packages/@jsii/Directory.Build.targets
index b2dbd0f68f..3cf4d06899 100644
--- a/packages/@jsii/Directory.Build.targets
+++ b/packages/@jsii/Directory.Build.targets
@@ -16,6 +16,6 @@
-
+
diff --git a/packages/@jsii/dotnet-runtime-test/package.json b/packages/@jsii/dotnet-runtime-test/package.json
index 91b995b3b8..3a39a01677 100644
--- a/packages/@jsii/dotnet-runtime-test/package.json
+++ b/packages/@jsii/dotnet-runtime-test/package.json
@@ -31,7 +31,7 @@
},
"devDependencies": {
"@jsii/dotnet-runtime": "^0.0.0",
- "@types/node": "^10.17.55",
+ "@types/node": "^10.17.56",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
"typescript": "~3.9.9"
diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json
index 30e7c22155..30b6814209 100644
--- a/packages/@jsii/dotnet-runtime/package.json
+++ b/packages/@jsii/dotnet-runtime/package.json
@@ -39,10 +39,10 @@
},
"devDependencies": {
"@jsii/runtime": "^0.0.0",
- "@types/node": "^10.17.55",
+ "@types/node": "^10.17.56",
"@types/semver": "^7.3.4",
"jsii-build-tools": "^0.0.0",
- "semver": "^7.3.4",
+ "semver": "^7.3.5",
"typescript": "~3.9.9"
}
}
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/AssemblyTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/AssemblyTests.cs
index d088abb2c6..75425a8687 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/AssemblyTests.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/AssemblyTests.cs
@@ -370,7 +370,7 @@ public void ShouldDeserializeAllMembers()
""docs"": { ""summary"": ""hello"" }
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal("jsii/0.9.0", actual.Schema, ignoreLineEndingDifferences: true);
Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true);
@@ -406,7 +406,7 @@ public void ShouldDeserializeAllMembersWithNoTypes()
""docs"": {""summary"": ""hello""}
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal("jsii/0.9.0", actual.Schema, ignoreLineEndingDifferences: true);
Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true);
@@ -454,7 +454,7 @@ public void ShouldDeserializeAllMembersWithDotNetTarget()
""docs"": {""summary"": ""hello""}
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal("jsii/0.9.0", actual.Schema, ignoreLineEndingDifferences: true);
Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true);
@@ -599,7 +599,7 @@ public void ShouldNotDeserializeMissingDependencies()
""docs"": {}
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Dependencies);
}
@@ -633,7 +633,7 @@ public void ShouldNotDeserializeMissingBundled()
""docs"": {}
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Bundled);
}
@@ -667,7 +667,7 @@ public void ShouldNotDeserializeMissingDocs()
""bundled"": {}
}";
- Assembly actual = JsonConvert.DeserializeObject(json);
+ Assembly actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Docs);
}
}
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/ClassTypeTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/ClassTypeTests.cs
index dcff399c28..d958bfe999 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/ClassTypeTests.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/ClassTypeTests.cs
@@ -381,7 +381,7 @@ public void ShouldDeserializeAllMembers()
""docs"": { ""summary"": ""hello"" }
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.True(actual.IsAbstract);
Assert.Empty(actual.Properties);
@@ -474,7 +474,7 @@ public void ShouldNotDeserializeMissingNamespace()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Namespace);
}
@@ -495,7 +495,7 @@ public void ShouldNotDeserializeMissingDocs()
""kind"": ""class""
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Docs);
}
@@ -517,7 +517,7 @@ public void ShouldNotDeserializeMissingProperties()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Properties);
}
@@ -539,7 +539,7 @@ public void ShouldNotDeserializeMissingMethods()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Methods);
}
@@ -561,7 +561,7 @@ public void ShouldNotDeserializeMissingBase()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Base);
}
@@ -583,7 +583,7 @@ public void ShouldNotDeserializeMissingInitializer()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Initializer);
}
@@ -605,7 +605,7 @@ public void ShouldNotDeserializeMissingInterfaces()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Interfaces);
}
@@ -627,7 +627,7 @@ public void DeserializesAsyncMethod()
""docs"": {}
}";
- ClassType actual = JsonConvert.DeserializeObject(json);
+ ClassType actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal(1, actual.Methods?.Length);
Assert.True(actual.Methods?[0]?.IsAsync);
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/CollectionTypeReferenceTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/CollectionTypeReferenceTests.cs
index 6f848f5a50..0c9854e197 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/CollectionTypeReferenceTests.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/CollectionTypeReferenceTests.cs
@@ -58,10 +58,10 @@ public void ShouldDeserializeAllMembers()
}
}";
- CollectionTypeReference actual = JsonConvert.DeserializeObject(json);
+ CollectionTypeReference actual = JsonConvert.DeserializeObject(json)!;
- Assert.Equal(CollectionKind.Array, actual.Kind);
- Assert.NotNull(actual.ElementType);
+ Assert.Equal(CollectionKind.Array, actual?.Kind);
+ Assert.NotNull(actual?.ElementType);
}
[Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingElementType))]
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/DocsTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/DocsTests.cs
index 9a2759728e..61d34a2b96 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/DocsTests.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/DocsTests.cs
@@ -50,7 +50,7 @@ public void ShouldDeserializeAllMembers()
""custom"": { ""custtag"": ""custval"" }
}";
- Docs actual = JsonConvert.DeserializeObject(json);
+ Docs actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal("summary", actual.Summary);
Assert.Equal("remarks", actual.Remarks);
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/EnumMemberTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/EnumMemberTests.cs
index 0e5e2e0690..67a0650bc5 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/EnumMemberTests.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/JsonModel/EnumMemberTests.cs
@@ -61,7 +61,7 @@ public void ShouldDeserializeAllMembers()
""docs"": { ""summary"": ""hello"" }
}";
- EnumMember actual = JsonConvert.DeserializeObject(json);
+ EnumMember actual = JsonConvert.DeserializeObject(json)!;
Assert.Equal("myName", actual?.Name, ignoreLineEndingDifferences: true);
Assert.Equal("hello", actual?.Docs?.Summary);
@@ -84,7 +84,7 @@ public void ShouldNotDeserializeMissingDocs()
""name"": ""myName""
}";
- EnumMember actual = JsonConvert.DeserializeObject(json);
+ EnumMember actual = JsonConvert.DeserializeObject(json)!;
Assert.Null(actual.Docs);
}
diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs
index cf53e98200..561afea55b 100644
--- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs
+++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs
@@ -16,7 +16,8 @@ namespace Amazon.JSII.Runtime
{
internal static class CallbackExtensions
{
- public static object? InvokeCallback(this Callback callback, IReferenceMap referenceMap, IFrameworkToJsiiConverter converter, out string? error)
+ public static object? InvokeCallback(this Callback callback, IReferenceMap referenceMap,
+ IFrameworkToJsiiConverter converter, out string? error)
{
try
{
@@ -76,20 +77,22 @@ out object? result
if (methodInfo == null)
{
- throw new InvalidOperationException($"Received callback for {deputy.GetType().Name}.{request.Method} method, but this method does not exist");
+ throw new InvalidOperationException(
+ $"Received callback for {deputy.GetType().Name}.{request.Method} method, but this method does not exist");
}
var attribute = methodInfo.GetAttribute()!;
var parameters = methodInfo.GetParameters();
-
+
var converter = ServiceContainer.ServiceProvider.GetRequiredService();
-
+
var rehydratedArgs = Enumerable.Range(0, request.Arguments?.Length ?? 0)
.Select(n =>
{
var paramIndex = n >= parameters.Length ? parameters.Length - 1 : n;
var requiredType = parameters[paramIndex].ParameterType;
- if (!converter.TryConvert(attribute.Parameters[paramIndex], requiredType, referenceMap, request.Arguments![n], out var value))
+ if (!converter.TryConvert(attribute.Parameters[paramIndex], requiredType, referenceMap,
+ request.Arguments![n], out var value))
{
throw new JsiiException($"Unable to convert {request.Arguments![n]} to {requiredType.Name}");
}
@@ -100,7 +103,7 @@ out object? result
array.SetValue(value, 0);
value = array;
}
-
+
if (!requiredType.IsInstanceOfType(value) && value is IConvertible)
{
value = Convert.ChangeType(value, requiredType, CultureInfo.InvariantCulture);
@@ -120,7 +123,8 @@ out object? result
if (n == parameters.Length - 1 && rehydratedArgs.Length > parameters.Length)
{
var allArgs = rehydratedArgs.TakeLast(rehydratedArgs.Length - parameters.Length + 1);
- var array = Array.CreateInstance(parameters[parameters.Length - 1].ParameterType.GetElementType()!,
+ var array = Array.CreateInstance(
+ parameters[parameters.Length - 1].ParameterType.GetElementType()!,
allArgs.Select(list => (list as Array)!.Length).Sum());
var idx = 0;
foreach (var list in allArgs)
@@ -150,7 +154,8 @@ private static CallbackResult InvokeGetter(GetRequest request, IReferenceMap ref
var propertyInfo = ReflectionUtils.GetNativeProperty(deputy.GetType(), request.Property);
if (propertyInfo == null)
{
- throw new InvalidOperationException($"Received callback for {deputy.GetType().Name}.{request.Property} getter, but this property does not exist");
+ throw new InvalidOperationException(
+ $"Received callback for {deputy.GetType().Name}.{request.Property} getter, but this property does not exist");
}
var attribute = propertyInfo.GetAttribute()!;
@@ -158,7 +163,8 @@ private static CallbackResult InvokeGetter(GetRequest request, IReferenceMap ref
var methodInfo = propertyInfo.GetMethod;
if (methodInfo == null)
{
- throw new InvalidOperationException($"Received callback for {deputy.GetType().Name}.{request.Property} getter, but this property does not have a getter");
+ throw new InvalidOperationException(
+ $"Received callback for {deputy.GetType().Name}.{request.Property} getter, but this property does not have a getter");
}
return new CallbackResult(attribute, methodInfo.Invoke(deputy, Array.Empty