Skip to content

Commit

Permalink
chore(release): 1.78.0 (#4010)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 16, 2023
2 parents 3e5fa88 + 32e0615 commit 1041b18
Show file tree
Hide file tree
Showing 18 changed files with 85 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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@v1
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

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.78.0](https://github.com/aws/jsii/compare/v1.77.0...v1.78.0) (2023-03-15)


### Features

* jsii-reflect now renders union candidates sorted ([#4005](https://github.com/aws/jsii/issues/4005)) ([1fd6cde](https://github.com/aws/jsii/commit/1fd6cde89794dd329049d13008f6f2453663f251))


### Bug Fixes

* **kernel:** json deserialization fails on `null` value ([#4000](https://github.com/aws/jsii/issues/4000)) ([884b0ff](https://github.com/aws/jsii/commit/884b0ffc9993bd3b8a0f9a8b40ecab116ff34872)), closes [aws/aws-cdk#14639](https://github.com/aws/aws-cdk/issues/14639)

## [1.77.0](https://github.com/aws/jsii/compare/v1.76.0...v1.77.0) (2023-03-06)


Expand Down
2 changes: 1 addition & 1 deletion gh-pages/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs~=1.4.2
mkdocs-awesome-pages-plugin~=2.8.0
mkdocs-material~=9.0.15
mkdocs-material~=9.1.1
mkdocs-git-revision-date-plugin~=0.3.2
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"rejectCycles": true
}
},
"version": "1.77.0"
"version": "1.78.0"
}
7 changes: 3 additions & 4 deletions packages/@jsii/go-runtime-test/project/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview
github.com/stretchr/testify v1.8.2
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.6.0
golang.org/x/tools v0.7.0
)

require (
Expand All @@ -18,10 +18,9 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
9 changes: 6 additions & 3 deletions packages/@jsii/go-runtime-test/project/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
Expand All @@ -26,6 +23,8 @@ golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPI
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
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=
Expand All @@ -35,10 +34,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
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=
Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ require (
github.com/mattn/go-isatty v0.0.17
github.com/stretchr/testify v1.8.1
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.6.0
golang.org/x/tools v0.7.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
12 changes: 6 additions & 6 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ 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.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
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.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
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=
Expand Down
26 changes: 18 additions & 8 deletions packages/@jsii/kernel/src/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ interface Serializer {
value: unknown,
type: OptionalValueOrVoid,
host: SerializerHost,
options?: { allowNullishMapValue?: boolean },
): any;
}

Expand Down Expand Up @@ -236,7 +237,6 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
return SERIALIZERS[SerializationClass.Map].deserialize(
value,
{
optional: false,
type: {
collection: {
kind: spec.CollectionKind.Map,
Expand All @@ -245,6 +245,7 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
},
},
host,
{ allowNullishMapValue: true },
);
}

Expand All @@ -266,9 +267,7 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
host,
'deserialize',
toMap,
{
type: { primitive: spec.PrimitiveType.Json },
},
{ type: { primitive: spec.PrimitiveType.Json } },
typeof key === 'string' ? `key ${inspect(key)}` : `index ${key}`,
);
}
Expand Down Expand Up @@ -387,7 +386,12 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
),
};
},
deserialize(value, optionalValue, host) {
deserialize(
value,
optionalValue,
host,
{ allowNullishMapValue = false } = {},
) {
if (nullAndOk(value, optionalValue)) {
return undefined;
}
Expand All @@ -401,7 +405,10 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
host,
'deserialize',
v,
{ type: mapType.collection.elementtype },
{
optional: allowNullishMapValue,
type: mapType.collection.elementtype,
},
`key ${inspect(key)}`,
),
);
Expand All @@ -411,7 +418,10 @@ export const SERIALIZERS: { [k: string]: Serializer } = {
host,
'deserialize',
v,
{ type: mapType.collection.elementtype },
{
optional: allowNullishMapValue,
type: mapType.collection.elementtype,
},
`key ${inspect(key)}`,
),
);
Expand Down Expand Up @@ -1112,7 +1122,7 @@ export function process(
context: string,
) {
const wireTypes = serializationType(type, host.lookupType);
host.debug(serde, value, wireTypes);
host.debug(serde, value, ...wireTypes);

const errors = new Array<any>();
for (const { serializationClass, typeRef } of wireTypes) {
Expand Down
6 changes: 3 additions & 3 deletions packages/jsii-diff/test/classes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ test.each([
{
oldDecl: 'name: string',
newDecl: 'name: string | number',
error: /string \| number is not assignable to string/,
error: /number \| string is not assignable to string/,
},
{
oldDecl: 'name: string | number',
Expand Down Expand Up @@ -413,12 +413,12 @@ test.each([
{
oldDecl: 'name: string',
newDecl: 'name: string | number',
error: /changed to string \| number \(formerly string\)/,
error: /changed to number \| string \(formerly string\)/,
},
{
oldDecl: 'name: string | number',
newDecl: 'name: string',
error: /changed to string \(formerly string \| number\)/,
error: /changed to string \(formerly number \| string\)/,
},
])(
'cannot change a mutable class property type: %p to %p',
Expand Down
4 changes: 2 additions & 2 deletions packages/jsii-diff/test/type-unions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('type unions in return structs can be narrowed', () =>

test('type unions in return structs can not be widened', () =>
expectError(
/some of string \| number \| boolean are not assignable to string \| number/,
/some of boolean \| number \| string are not assignable to number \| string/,
`
export interface Henk {
readonly henk: string | number;
Expand Down Expand Up @@ -112,7 +112,7 @@ test('type unions in input structs can be widened', () =>

test('type unions in input structs can not be narrowed', () =>
expectError(
/string \| number is not assignable to string/,
/number \| string is not assignable to string/,
`
export interface Henk {
readonly henk: string | number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mypy==1.0.1
mypy==1.1.1
pip==23.0.1 # required to use --config-settings
4 changes: 3 additions & 1 deletion packages/jsii-reflect/lib/type-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export class TypeReference {
return `Map<string => ${this.mapOfType.toString()}>`;
}
if (this.unionOfTypes) {
return this.unionOfTypes.map((x) => x.toString()).join(' | ');
const union = this.unionOfTypes.map((x) => x.toString());
union.sort();
return union.join(' | ');
}

throw new Error('Invalid type reference');
Expand Down
18 changes: 9 additions & 9 deletions packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap

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

Loading

0 comments on commit 1041b18

Please sign in to comment.