diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b976a33..e481637 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,20 @@ -ARG VARIANT="24" +ARG VARIANT="24-bookworm" -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} +FROM node:24.22.1-bookworm-slim@sha256:55fb5f5a527ea2c5c4a95f963e48ef90aa38c7b346054fdc8ee9957a2b55d205 AS patched-node + +FROM mcr.microsoft.com/devcontainers/javascript-node:5-${VARIANT} + +# Patch the system binary and every inherited nvm copy used by interactive shells. +COPY --from=patched-node /usr/local/bin/node /tmp/patched-node +RUN install -m 0755 /tmp/patched-node /usr/local/bin/node \ + && if [ -d /usr/local/share/nvm/versions/node ]; then \ + find /usr/local/share/nvm/versions/node -type f -path "*/bin/node" \ + -exec install -m 0755 /tmp/patched-node {} \; ; \ + fi \ + && rm /tmp/patched-node \ + && test "$(node --version)" = "v24.22.1" \ + && test "$(/usr/local/bin/node --version)" = "v24.22.1" +ENV NODE_VERSION=24.22.1 USER node WORKDIR /home/node diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5193173..36809a9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "24" + "VARIANT": "24-bookworm" } }, "extensions": [ diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fb7b25d..c91225c 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -6,7 +6,7 @@ inputs: node_version: description: The Node.js version. required: false - default: '24' + default: '24.22.1' registry_url: description: The Node.js package registry URL. required: false diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index e93d4d7..24cf98a 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -8,7 +8,7 @@ on: description: The Node.js version. type: string required: false - default: '24' + default: '24.22.1' outputs: artifact_name: description: The artifact name. diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8606ae7..1a340e2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,13 +25,17 @@ jobs: include: - os: ubuntu-latest os_name: Linux + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Checkout uses: actions/checkout@v7 - name: Setup uses: ./.github/actions/setup with: - node_version: ${{ matrix.node }} + node_version: ${{ matrix.node_version }} - name: Test run: npm test lint: @@ -44,13 +48,18 @@ jobs: node: - '22' - '24' + include: + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Checkout uses: actions/checkout@v7 - name: Setup uses: ./.github/actions/setup with: - node_version: ${{ matrix.node }} + node_version: ${{ matrix.node_version }} - name: Lint run: npm run lint build: @@ -72,11 +81,15 @@ jobs: include: - os: ubuntu-latest os_name: Linux + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Setup Node.js uses: actions/setup-node@v7 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node_version }} - name: Download artifact uses: actions/download-artifact@v8 with: @@ -115,13 +128,18 @@ jobs: node: - '22' - '24' + include: + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Checkout uses: actions/checkout@v7 - name: Setup uses: ./.github/actions/setup with: - node_version: ${{ matrix.node }} + node_version: ${{ matrix.node_version }} - name: Typecheck run: npm run typecheck docs: diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..ce62013 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.22.1 diff --git a/package.json b/package.json index 41354a4..7242ae3 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "devEngines": { "runtime": { "name": "node", - "version": "^24.11.0 || ^22.12.0" + "version": "^24.22.1 || ^22.23.4" }, "packageManager": { "name": "npm",