Skip to content

Commit

Permalink
chore(release): 1.103.0 (#4620)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 27, 2024
2 parents e354887 + bc35933 commit 3b9adc4
Show file tree
Hide file tree
Showing 51 changed files with 2,835 additions and 1,393 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ jobs:
- 5.2.x
- 5.3.x
- 5.4.x
- 5.5.x
steps:
# Check out the code
- name: Download Artifact
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.103.0](https://github.com/aws/jsii/compare/v1.102.0...v1.103.0) (2024-08-27)


### Features

* **pacmak:** allow `typeguard==3.x` and `typeguard==4.x` ([#4611](https://github.com/aws/jsii/issues/4611)) ([32ae5b0](https://github.com/aws/jsii/commit/32ae5b017e8c4a889ff64b68dc5809e856d98b34))


### Bug Fixes

* **pacmak:** support jsii-rosetta 5.5 ([#4619](https://github.com/aws/jsii/issues/4619)) ([9ecea56](https://github.com/aws/jsii/commit/9ecea560bef8e0196c9a4874110c19e946f3b3ea))

## [1.102.0](https://github.com/aws/jsii/compare/v1.101.0...v1.102.0) (2024-08-02)

## [1.101.0](https://github.com/aws/jsii/compare/v1.100.0...v1.101.0) (2024-06-26)
Expand Down
53 changes: 35 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Contributing to jsii

Thanks for your interest in contributing to AWS JSII! :heart:

This document describes how to set up a development environment and submit your
contributions. Please read it carefully and let us know if it's not up-to date
(or even better, submit a pull request with your corrections! :wink:).

## Pre-requisites

### Setup Docker image

Due to the polyglot nature of `jsii`, the toolchain requirements are somewhat
more complicated than for most projects. In order to locally develop `jsii`, you
will need a number of tools.
Expand All @@ -19,37 +22,38 @@ our own CI/CD: the ["superchain" image][superchain] from.
The image can be built for local usage, too:

```console
$ IMAGE=superchain
$ docker build -t ${IMAGE} -f superchain/Dockerfile .
IMAGE=superchain
docker build -t ${IMAGE} -f superchain/Dockerfile .
```

In order to get an interactive shell within a Docker container using the
*superchain* image you just built:

```console
$ cd jsii # go to the root of the jsii repo
$ docker run --rm --net=host -it -v $PWD:$PWD -w $PWD ${IMAGE}
cd jsii # go to the root of the jsii repo
docker run --rm --net=host -it -v $PWD:$PWD -w $PWD ${IMAGE}
```

In the shell that pops up, the `npm run` commands in the following sections must
be executed.

### Alternative: Manually install the toolchain

The following tools need to be installed to develop on JSII locally. We recommend
using the docker image from the above section, but if you wish to, you can install
in your development environment.

- [Node `18.0.0`] or later
- [Yarn `1.19.1`] or later
- An OpenJDK-8 distribution (e.g: [Oracle's OpenJDK8], [Amazon Corretto 8])
+ [`maven >= 3.0.5`](https://maven.apache.org)
- [`maven >= 3.0.5`](https://maven.apache.org)
- [.NET `6.0`] or later
+ *Recommended:* [`mono >= 6`](https://www.mono-project.com)
- *Recommended:* [`mono >= 6`](https://www.mono-project.com)
- [Python `3.8.10`] or later
+ [`pip`](https://pip.pypa.io/en/stable/installing/)
+ [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
+ [`wheel`](https://pypi.org/project/wheel/)
+ *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [`pip`](https://pip.pypa.io/en/stable/installing/)
- [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
- [`wheel`](https://pypi.org/project/wheel/)
- *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [Go] `1.18` or newer

[Node `18.0.0`]: https://nodejs.org/download/release/latest-v18.x/
Expand All @@ -61,6 +65,7 @@ in your development environment.
[Go]: https://go.dev/dl/

## Getting Started

### Bootstrapping

The project is managed as a [monorepo] using [lerna].
Expand Down Expand Up @@ -98,7 +103,7 @@ The `jsii-calc` and `@scope/*` packages are used to test expected brhavior from
the compiler (note that the [aws/jsii-compiler](github.com/aws/jsii-compiler)
repository as a separate copy of these under the `fixtures` directory), as well
as downstream tooling (`jsii-pacmak`, `jsii-rosetta`, etc...). Each language
runtime has its own test suite, within which is a _compliance_ suite that tests
runtime has its own test suite, within which is a *compliance* suite that tests
the same behaviors in all languages, and which should contain tests related to
behavior that isn't strictly specific to the given language.

Expand Down Expand Up @@ -138,8 +143,8 @@ better:
to wait for a debugger to attach before proceeding. This is useful to attach
Node dev tools to the runtime as it starts in order to use its debugger.

The [Visual Studio Code](https://code.visualstudio.com) _JavaScript Debug
Terminal_ feature can be particularly useful paired with appropriate
The [Visual Studio Code](https://code.visualstudio.com) *JavaScript Debug
Terminal* feature can be particularly useful paired with appropriate
`JSII_RUNTIME` setting to run arbitrary jsii programs, automatically attaching
the VSCode debugger at startup. These terminals inject a specially crafted
`NODE_OPTIONS` variable that allows the VSCode debugger to consistently attach
Expand Down Expand Up @@ -205,10 +210,10 @@ The runtime client library should be implemented as a module under

The jsii runtime client library usually includes the following components:

- Child process manager: responsible to start/stop the **@jsii/runtime** child
- Child process manager: responsible to start/stop the __@jsii/runtime__ child
process.
- Protocol layer: implements the STDIN/STDOUT protocol that interacts with the
**@jsii/runtime**.
__@jsii/runtime__.
- Proxy layer: includes base classes and serialization utilities to implement
the generated proxy classes.

Expand Down Expand Up @@ -244,8 +249,8 @@ on [ECR Public Gallery](https://gallery.ecr.aws/jsii/superchain)
## Support for new Node Major versions

When a new major version of node is released, we need to update the `@jsii/check-node` package.
This package is responsible for identifiying which node version is being used by the current process,
whether or not it is supported and tested, and produces appropriate warnings in case it isnt.
This package is responsible for identifying which node version is being used by the current process,
whether or not it is supported and tested, and produces appropriate warnings in case it isn't.

> Note that `jsii` will execute on every node version, so "adding support" here only means supressing or showing
> warnings that inform the user on the level of support it has.
Expand All @@ -258,4 +263,16 @@ whether or not it is supported and tested, and produces appropriate warnings in
### Useful Resources

- [https://endoflife.date/nodejs](https://endoflife.date/nodejs)
- [Adding support for node 22 PR](https://github.com/aws/jsii/pull/4489)
- [Adding support for node 22 PR](https://github.com/aws/jsii/pull/4489)

## Support for new `jsii-rosetta` versions

When a new minor version of `jsii-rosetta` (modern) is released, we need to update the `jsii-pacmak` package.
`jsii-pacmak` uses `jsii-rosetta` to transpile examples in documentation.
Because every package can use its own version of jsii, TypeScript and jsii-rosetta, it is declared as a peer dependency.
To ensure compatibility, we also have integration tests.

### Adding a new `jsii-rosetta` version

1. Add the new version to the `jsii-rosetta` peer dependency in [package.json](./packages/jsii-pacmak/package.json)
2. Add the new version to the `pacmak-integration-test` matrix in the main build workflow in [main.yml](.github/workflows/main.yml)
6 changes: 2 additions & 4 deletions gh-pages/content/overview/toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
| [jsii-rosetta1] | `1.x` | [Maintenance] | Transpile code snippets (in docs) from TypeScript to jsii languages |
| [jsii-rosetta] | `5.x` | GA | Transpile code snippets (in docs) from TypeScript to jsii languages |
| [jsii-config] | `1.x` | Experimental | Interactive tool for generating jsii configuration |
| [jsii-release] | `1.x` | Community | Publishes jsii modules to all supported package managers |
| [jsii-srcmak] | `1.x` | Community | Generates relocatable source code in jsii languages from typescript |
| [jsii-docgen] | *any* | Community | Generates markdown API documentation for jsii modules |

Expand All @@ -41,6 +40,5 @@
[jsii-diff]: https://github.com/aws/jsii/tree/main/packages/jsii-diff
[jsii-rosetta1]: https://github.com/aws/jsii/tree/main/packages/jsii-rosetta
[jsii-rosetta]: https://github.com/aws/jsii-rosetta#readme
[jsii-release]: https://github.com/eladb/jsii-release
[jsii-srcmak]: https://github.com/eladb/jsii-srcmak
[jsii-docgen]: https://github.com/eladb/jsii-docgen
[jsii-srcmak]: https://github.com/cdklabs/jsii-srcmak
[jsii-docgen]: https://github.com/cdklabs/jsii-docgen
6 changes: 1 addition & 5 deletions gh-pages/content/user-guides/language-support/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ possible to publish artifacts even when tests in the suite are failing. As soon
contribute to this process by documenting a general architecture that should be implementable in any programming
languages (and thus, abstracting away language specificities).

## Building & Packaging
## Building and Packaging

The necessary toolchains should be added to he [`public.ecr.aws/jsii/superchain`] Docker image, so that the
[`jsii-pacmak`] generation can be changed to support building ready to publish artifacts instead of just code.
Expand All @@ -115,10 +115,6 @@ PyPI, and **NuGet** packages were published with a pre-release version such as `
Additionally, [`aws-delivlib`] needs to be augmented to support publishing artifacts to the language's package
repository.

!!! bug "Unimplemented"
The package publishing is being extracted from [`aws-delivlib`] into a standalone library, currently hosted at
[`eladb/jsii-release`](https://github.com/eladb/jsii-release).

## Documentation

Before releasing the new language support to _Developer Preview_, basic documentation needs to be produced to explain
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.6.0
mkdocs-awesome-pages-plugin~=2.9.3
mkdocs-material~=9.5.30
mkdocs-material~=9.5.33
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 @@ -12,6 +12,6 @@
"rejectCycles": true
}
},
"version": "1.102.0",
"version": "1.103.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"compliance": "(cd tools/jsii-compliance && yarn report)"
},
"devDependencies": {
"@jest/types": "^28.1.3",
"@jest/types": "^29.6.3",
"@types/jest": "^29.5.12",
"@types/node": "^14.18.63",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"all-contributors-cli": "^6.26.1",
"eslint": "^9.8.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.1",
Expand All @@ -31,7 +31,7 @@
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.1.3",
"lerna": "^8.1.7",
"lerna": "^8.1.8",
"prettier": "^3.3.3",
"standard-version": "^9.5.0",
"ts-node": "^10.9.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<PackageReference Update="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="8.0.0" />

<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.2" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Update="NSubstitute" Version="5.1.0" />
<PackageReference Update="xunit" Version="2.9.0" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2" />
Expand Down
2 changes: 2 additions & 0 deletions packages/@jsii/benchmarks/lib/suite/aws-cdk-lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export async function buildWithTsc({ workingDir }: Context): Promise<void> {
.once('close', ko)
.once('message', (result: { success: any } | { error: unknown }) => {
if ('error' in result) {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
ko(result.error);
} else {
ok(result.success);
Expand All @@ -79,6 +80,7 @@ export async function buildWithJsii({ workingDir }: Context): Promise<void> {
.once('close', ko)
.once('message', (result: { success: any } | { error: unknown }) => {
if ('error' in result) {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
ko(result.error);
} else {
ok(result.success);
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/scripts/snapshot-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function snapshotAwsCdk(tag: string, file: string) {
'@types/punycode': '^2.1.0',
'@types/semver': '^7.3.9',
'aws-sdk': '^2.596.0',
'typescript-json-schema': '^0.53.1',
'typescript-json-schema': '0.64.0',
// For good measure, the typescript compiler
typescript: `~${ts.version}`,
} as Record<string, string>,
Expand Down
8 changes: 4 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.9.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.23.0
golang.org/x/tools v0.24.0
)

require (
Expand All @@ -21,9 +21,9 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
16 changes: 8 additions & 8 deletions packages/@jsii/go-runtime-test/project/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ 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.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.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.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
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.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.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.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
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
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime/build-tools/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ rm -fr dist
mkdir -p dist/go
rsync -av jsii-runtime-go/* dist/go/

# create a "version" file which is needed by jsii-release
# create a "version" file which is needed by publib
version=$(node -p "require('./package.json').version")
echo ${version} > dist/go/version
8 changes: 4 additions & 4 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/stretchr/testify v1.9.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.23.0
golang.org/x/tools v0.24.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
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.19.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading

0 comments on commit 3b9adc4

Please sign in to comment.