Skip to content

Commit

Permalink
feat: node22 support (#4489)
Browse files Browse the repository at this point in the history
https://nodejs.org/en/blog/announcements/v22-release-announce

superchain: Changes how node is installed from [nodesource](https://github.com/nodesource/distributions), due to the following change. This also required updating the nodesource repo key.

>Package Changes: DEB and RPM packages are now available under the nodistro codename. We no longer package the installer coupled to specific versions. This means you can install Node.js on almost any distro that meets the minimum requirements.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
mrgrain committed Apr 25, 2024
1 parent 3fee431 commit 699366d
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
debian:
- 'bullseye' # 11
- 'bookworm' # 12
node: ['18', '20']
node: ['18', '20', '22']
exclude:
# We publish bullseye only with Node >= 20
- debian: 'bullseye'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ jobs:
node: '20' # EOL 2026-04-30
os: ubuntu-latest
python: '3.8'
- title: 'Node 22'
java: '8'
dotnet: '6.0.x'
go: '1.18'
node: '22' # EOL 2027-04-30
os: ubuntu-latest
python: '3.8'
# Test alternate .NETs
- title: '.NET 7.0'
java: '8'
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The following tools need to be installed to develop on JSII locally. We recommen
using the docker image from the above section, but if you wish to, you can install
in your development environment.

- [Node `14.6.0`] or later
- [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)
Expand All @@ -52,7 +52,7 @@ in your development environment.
+ *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [Go] `1.18` or newer

[Node `14.6.0`]: https://nodejs.org/download/release/v14.6.0/
[Node `18.0.0`]: https://nodejs.org/download/release/latest-v18.x/
[Yarn `1.19.1`]: https://yarnpkg.com/en/docs/install
[Oracle's OpenJDK8]: http://openjdk.java.net/install/
[Amazon Corretto 8]: https://aws.amazon.com/corretto/
Expand Down
4 changes: 2 additions & 2 deletions gh-pages/partials/node-support-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

| Release | Status | End-of-Life |
| --------- | ---------------------------- | ------------ |
| `^14.6.0` | :white_check_mark: Supported | `2023-04-30` |
| `^16.3.0` | :white_check_mark: Supported | `2024-09-11` |
| `^18.0.0` | :white_check_mark: Supported | `2025-04-30` |
| `^20.0.0` | :white_check_mark: Supported | `2026-04-30` |
| `^22.0.0` | :white_check_mark: Supported | `2027-04-30` |

??? question "Status Definitions"
- **:white_check_mark: Supported**: Long Term Support (LTS) releases (those with an even major version) are
Expand Down
1 change: 1 addition & 0 deletions packages/@jsii/check-node/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class NodeRelease {
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'), untested: true }),
new NodeRelease(22, { endOfLife: new Date('2027-04-30') }),

// Future (planned releases)
];
Expand Down
10 changes: 5 additions & 5 deletions superchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ ARG NODE_MAJOR_VERSION="18"
COPY superchain/gpg/nodesource.asc /tmp/nodesource.asc
COPY superchain/gpg/yarn.asc /tmp/yarn.asc
RUN apt-key add /tmp/nodesource.asc && rm /tmp/nodesource.asc \
&& echo "deb https://deb.nodesource.com/node_${NODE_MAJOR_VERSION}.x ${DEBIAN_VERSION} main" \
> /etc/apt/sources.list.d/nodesource.list \
# Reduce priority of the "standard" nodejs package, so that the one from nodesource is always preferred...
&& echo "deb https://deb.nodesource.com/node_${NODE_MAJOR_VERSION}.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list \
# Increase priority of the nodesource package
&& echo "Package: nodejs" > /etc/apt/preferences.d/nodejs \
&& echo 'Pin: origin "deb.debian.org"' >> /etc/apt/preferences.d/nodejs \
&& echo "Pin-Priority: 50" >> /etc/apt/preferences.d/nodejs \
&& echo 'Pin: origin deb.nodesource.com"' >> /etc/apt/preferences.d/nodejs \
&& echo "Pin-Priority: 600" >> /etc/apt/preferences.d/nodejs \
&& apt-key add /tmp/yarn.asc && rm /tmp/yarn.asc \
&& echo "deb https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarnpkg.list \
&& apt-get update \
Expand Down
45 changes: 23 additions & 22 deletions superchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public.ecr.aws/jsii/superchain:1-bullseye-slim

## Included Language SDKs

| SDK | Version |
| ------------ | ---------------------------------------- |
| `OpenJDK 20` | Amazon Corretto `>= 20.0.2` |
| `.NET SDK` | `>= 6.0.14` |
| `mono` | `>= 6.12.0.200` |
| `Javascript` | see [NodeJS and NPM](#nodejs-and-npm) |
| `PowerShell` | `pwsh >= 7.2.16` |
| `Python 3` | see [Python'](#python) |
| `Go` | `go >= 1.18` |
| SDK | Version |
| ------------ | ------------------------------------- |
| `OpenJDK 20` | Amazon Corretto `>= 20.0.2` |
| `.NET SDK` | `>= 6.0.14` |
| `mono` | `>= 6.12.0.200` |
| `Javascript` | see [NodeJS and NPM](#nodejs-and-npm) |
| `PowerShell` | `pwsh >= 7.2.16` |
| `Python 3` | see [Python'](#python) |
| `Go` | `go >= 1.18` |

## Image tags

Expand All @@ -39,9 +39,10 @@ public.ecr.aws/jsii/superchain:<JSII-MAJOR>-<BASE>(-node<NODE-MAJOR>)(-nightly)
- `<BASE>` is the base image tag, currently supported base images are
- `bookworm-slim`
- `bullseye-slim`
- `<NODE-MAJOR>` is the major version of node contained in the image
- `18` corresponds to node 18.x, this is the default
- `20` corresponds to node 20.x
- `<NODE-MAJOR>` is the major version of Node.js contained in the image
- `18` corresponds to Node.js 18.x, this is the default
- `20` corresponds to Node.js 20.x
- `22` corresponds to Node.js 22.x
- `-nightly` images are released from the `HEAD` of the [`aws/jsii`][jsii]
repository and should typically not be used for production workloads

Expand Down Expand Up @@ -82,11 +83,11 @@ public.ecr.aws/jsii/superchain:1-bullseye-slim-node20

We will stop publishing images for Node versions that are EOL.

| Debian | Node versions |
| ----------------------------| -----------------|
| `bookworm-slim` | `20` |
| `bullseye-slim` | `20`, `18` |
| `buster-slim` (deprecated) | `18`, `16`, `14` |
| Debian | Node versions |
| -------------------------- | ---------------- |
| `bookworm-slim` | `20` |
| `bullseye-slim` | `20`, `18` |
| `buster-slim` (deprecated) | `18`, `16`, `14` |

If you are building this image from source, you can control the Node version with the
`NODE_MAJOR_VERSION` build argument:
Expand All @@ -100,11 +101,11 @@ jsii$ docker build [...] --build-arg NODE_MAJOR_VERSION=16
The image includes the most recent Python version available for the respecitve Debian distribution.
A complete list can be viewed on the [Debian website](https://wiki.debian.org/Python#Supported_Python_Versions).

| Debian | Python version |
| ----------------------------| ---------------|
| `bookworm-slim` | `3.11` |
| `bullseye-slim` | `3.9` |
| `buster-slim` (deprecated) | `3.7` |
| Debian | Python version |
| -------------------------- | -------------- |
| `bookworm-slim` | `3.11` |
| `bullseye-slim` | `3.9` |
| `buster-slim` (deprecated) | `3.7` |


## Included Tools & Utilities
Expand Down
75 changes: 26 additions & 49 deletions superchain/gpg/nodesource.asc
Original file line number Diff line number Diff line change
@@ -1,52 +1,29 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
Comment: GPGTools - https://gpgtools.org

mQINBFObJLYBEADkFW8HMjsoYRJQ4nCYC/6Eh0yLWHWfCh+/9ZSIj4w/pOe2V6V+
W6DHY3kK3a+2bxrax9EqKe7uxkSKf95gfns+I9+R+RJfRpb1qvljURr54y35IZgs
fMG22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