Skip to content

Commit 3c9512b

Browse files
authored
2 parents b0947e4 + b36b81b commit 3c9512b

File tree

83 files changed

+15404
-3263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+15404
-3263
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ updates:
5151
ignore:
5252
- dependency-name: "setuptools"
5353

54-
- package-ecosystem: gomod
55-
directory: '/packages/@jsii/go-runtime'
56-
schedule:
57-
interval: daily
58-
labels:
59-
- dependencies
60-
- language/go
61-
6254
- package-ecosystem: gomod
6355
directory: '/packages/@jsii/go-runtime/jsii-runtime-go'
6456
schedule:

.github/workflows/main.yml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
uses: actions/setup-dotnet@v2
3333
with:
3434
dotnet-version: '6.0.x'
35-
- name: Set up Go 1.16
35+
- name: Set up Go 1.18
3636
uses: actions/setup-go@v3
3737
with:
38-
go-version: '1.16'
38+
go-version: '1.18'
3939
- name: Set up Java 8
4040
uses: actions/setup-java@v3
4141
with:
@@ -126,10 +126,10 @@ jobs:
126126
uses: actions/setup-dotnet@v2
127127
with:
128128
dotnet-version: '6.0.x'
129-
- name: Set up Go 1.16
129+
- name: Set up Go 1.18
130130
uses: actions/setup-go@v3
131131
with:
132-
go-version: '1.16'
132+
go-version: '1.18'
133133
- name: Set up Java 8
134134
uses: actions/setup-java@v3
135135
with:
@@ -207,14 +207,14 @@ jobs:
207207
test:
208208
permissions:
209209
contents: none
210-
name: Test (${{ matrix.os }} / dotnet ${{ matrix.dotnet }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }})
210+
name: Test (${{ matrix.os }} / dotnet ${{ matrix.dotnet }} / go ${{ matrix.go }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }})
211211
needs: build
212212
strategy:
213213
fail-fast: false
214214
matrix:
215215
# All currently supported node versions (Maintenance LTS, Active LTS, Current)
216216
dotnet: ['3.1.x']
217-
go: ['1.16']
217+
go: ['1.18']
218218
java: ['8']
219219
node:
220220
- '14' # EOL 2023-04-30
@@ -227,47 +227,66 @@ jobs:
227227
# Test using Windows
228228
- os: windows-latest
229229
dotnet: '3.1.x'
230-
go: '1.16'
230+
go: '1.18'
231231
java: '8'
232232
node: '14'
233233
python: '3.7'
234234
# Test using macOS
235235
- os: macos-latest
236236
dotnet: '3.1.x'
237-
go: '1.16'
237+
go: '1.18'
238238
java: '8'
239239
node: '14'
240240
python: '3.7'
241241
# Test alternate .NETs
242242
- java: '8'
243243
dotnet: '6.0.x'
244-
go: '1.16'
244+
go: '1.18'
245+
node: '14'
246+
os: ubuntu-latest
247+
python: '3.7'
248+
# Test alternate Gos
249+
- java: '8'
250+
dotnet: '3.1.x'
251+
go: '1.16' # EOL since March 15, 2022 (in grace period until end of september 2022)
252+
node: '14'
253+
os: ubuntu-latest
254+
python: '3.7'
255+
- java: '8'
256+
dotnet: '3.1.x'
257+
go: '1.17' # EOL since August 02, 2022 (in grace period until end of september 2022)
258+
node: '14'
259+
os: ubuntu-latest
260+
python: '3.7'
261+
- java: '8'
262+
dotnet: '3.1.x'
263+
go: '1.19'
245264
node: '14'
246265
os: ubuntu-latest
247266
python: '3.7'
248267
# Test alternate Javas
249268
- java: '11'
250269
dotnet: '3.1.x'
251-
go: '1.16'
270+
go: '1.18'
252271
node: '14'
253272
os: ubuntu-latest
254273
python: '3.7'
255274
# Test alternate Pythons
256275
- python: '3.8'
257276
dotnet: '3.1.x'
258-
go: '1.16'
277+
go: '1.18'
259278
java: '8'
260279
node: '14'
261280
os: ubuntu-latest
262281
- python: '3.9'
263282
dotnet: '3.1.x'
264-
go: '1.16'
283+
go: '1.18'
265284
java: '8'
266285
node: '14'
267286
os: ubuntu-latest
268287
- python: '3.10'
269288
dotnet: '3.1.x'
270-
go: '1.16'
289+
go: '1.18'
271290
java: '8'
272291
node: '14'
273292
os: ubuntu-latest

.github/workflows/yarn-upgrade.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ jobs:
141141
body: |-
142142
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
143143
labels: contribution/core,dependencies,auto-approve
144-
team-reviewers: aws-cdk-team
145144
# Privileged token so automated PR validation happens
146145
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
147146

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
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.
44

5+
## [1.66.0](https://github.com/aws/jsii/compare/v1.65.1...v1.66.0) (2022-08-29)
6+
7+
8+
### Features
9+
10+
* **go:** emit deprecation warning when using go1.16 and go1.17 ([#3718](https://github.com/aws/jsii/issues/3718)) ([3cf5c28](https://github.com/aws/jsii/commit/3cf5c28b26e189db1a05f9543a5f6f38583e8868))
11+
* **go:** runtime type check type unions ([#3712](https://github.com/aws/jsii/issues/3712)) ([c73c2ee](https://github.com/aws/jsii/commit/c73c2ee6d973ea8ff14b320a5f97ae017107ebab))
12+
13+
14+
### Bug Fixes
15+
16+
* **.net:** missing dynamic type checking for collection-nested unions ([#3720](https://github.com/aws/jsii/issues/3720)) ([362326e](https://github.com/aws/jsii/commit/362326e989e1d9f2a032d4c15c34f3d60e712051))
17+
* **rosetta:** rosetta reader expects default tablet file to be uncompressed ([#3723](https://github.com/aws/jsii/issues/3723)) ([9768e2a](https://github.com/aws/jsii/commit/9768e2a7f2eb8847d8d06e3f40deeedac0c7dec4))
18+
* type unions in variadic position leads to invalid code-gen ([#3722](https://github.com/aws/jsii/issues/3722)) ([93aec85](https://github.com/aws/jsii/commit/93aec85ada9fd9e505591766b8e87ee53c0bde6b))
19+
520
## [1.65.1](https://github.com/aws/jsii/compare/v1.65.0...v1.65.1) (2022-08-29)
621

722

gh-pages/content/user-guides/lib-author/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ to produce releasable artifacts.
1717
| Language/Platform | SDK Requirement |
1818
| ----------------- | ---------------------------- |
1919
| .NET | .NET Core ≥ 3.1 / .NET ≥ 5.0 |
20-
| Go | Go ≥ 1.16 |
20+
| Go | Go ≥ 1.18 |
2121
| Java | JDK ≥ 8 *and* Maven ≥ 3.6 |
2222
| Python | Python ≥ 3.7 |
2323

gh-pages/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mkdocs~=1.3.1
22
mkdocs-awesome-pages-plugin~=2.8.0
3-
mkdocs-material~=8.4.0
3+
mkdocs-material~=8.4.1
44
mkdocs-git-revision-date-plugin~=0.3.2

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"rejectCycles": true
1111
}
1212
},
13-
"version": "1.65.1"
13+
"version": "1.66.0"
1414
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
},
1717
"devDependencies": {
1818
"@jest/types": "^28.1.3",
19-
"@types/jest": "^28.1.6",
20-
"@types/node": "^14.18.23",
21-
"@typescript-eslint/eslint-plugin": "^5.33.0",
22-
"@typescript-eslint/parser": "^5.33.0",
19+
"@types/jest": "^28.1.7",
20+
"@types/node": "^14.18.24",
21+
"@typescript-eslint/eslint-plugin": "^5.33.1",
22+
"@typescript-eslint/parser": "^5.33.1",
2323
"all-contributors-cli": "^6.20.0",
24-
"eslint": "^8.21.0",
24+
"eslint": "^8.22.0",
2525
"eslint-config-prettier": "^8.5.0",
2626
"eslint-import-resolver-node": "^0.3.6",
27-
"eslint-import-resolver-typescript": "^3.4.0",
27+
"eslint-import-resolver-typescript": "^3.4.1",
2828
"eslint-plugin-import": "^2.26.0",
2929
"eslint-plugin-prettier": "^4.2.1",
3030
"jest": "^28.1.3",
3131
"jest-circus": "^28.1.3",
3232
"jest-config": "^28.1.3",
3333
"jest-expect-message": "^1.0.2",
34-
"lerna": "^5.4.0",
34+
"lerna": "^5.4.3",
3535
"prettier": "^2.7.1",
3636
"standard-version": "^9.5.0",
3737
"ts-node": "^10.9.1",

packages/@jsii/benchmarks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"fs-extra": "^10.1.0",
99
"jsii": "^0.0.0",
10-
"npm": "^8.16.0",
10+
"npm": "^8.17.0",
1111
"tar": "^6.1.11",
1212
"typescript": "~3.9.10",
1313
"yargs": "^16.2.0"

packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/TypeCheckingTests.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,42 @@ public void AnonymousObjectIsValid()
7373
Assert.IsType<AnonymousObject>(anonymousObject);
7474
Assert.Equal("A", UseOptions.Consume(anonymousObject));
7575
}
76+
77+
[Fact(DisplayName = Prefix + nameof(NestedUnion))]
78+
public void NestedUnion()
79+
{
80+
var exception1 = Assert.Throws<System.ArgumentException>(() =>
81+
new ClassWithNestedUnion(new object[] { 1337.42 }));
82+
Assert.Equal("Expected argument unionProperty[0] to be one of: System.Collections.Generic.IDictionary<string, object>, object[]; received System.Double (Parameter 'unionProperty')", exception1.Message);
83+
84+
var exception2 = Assert.Throws<System.ArgumentException>(() =>
85+
new ClassWithNestedUnion(new object[]
86+
{ new object[] { new StructA { RequiredString = "present" }, 1337 } }));
87+
Assert.Equal("Expected argument unionProperty[0][1] to be one of: Amazon.JSII.Tests.CalculatorNamespace.IStructA, Amazon.JSII.Tests.CalculatorNamespace.IStructB; received System.Int32 (Parameter 'unionProperty')", exception2.Message);
88+
89+
var exception3 = Assert.Throws<System.ArgumentException>(() =>
90+
new ClassWithNestedUnion(new object[]
91+
{
92+
new Dictionary<string, object>
93+
{
94+
{ "good", new StructA { RequiredString = "present" } },
95+
{ "bad", "Not a StructA or StructB" }
96+
}
97+
}));
98+
Assert.Equal("Expected argument unionProperty[0][\"bad\"] to be one of: Amazon.JSII.Tests.CalculatorNamespace.IStructA, Amazon.JSII.Tests.CalculatorNamespace.IStructB; received System.String (Parameter 'unionProperty')", exception3.Message);
99+
}
100+
101+
[Fact(DisplayName = Prefix + nameof(Variadic))]
102+
public void Variadic()
103+
{
104+
var exception1 = Assert.Throws<System.ArgumentException>(() =>
105+
new VariadicTypeUnion(
106+
new StructA{RequiredString = "present"},
107+
1337.42
108+
));
109+
Assert.Equal("Expected argument union[1] to be one of: Amazon.JSII.Tests.CalculatorNamespace.IStructA, Amazon.JSII.Tests.CalculatorNamespace.IStructB; received System.Double (Parameter 'union')", exception1.Message);
110+
111+
Assert.NotNull(new VariadicTypeUnion());
112+
}
76113
}
77114
}

0 commit comments

Comments
 (0)