diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3777f5be5..320ece885 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,20 @@ -ARG VARIANT="20" +ARG VARIANT="22-bookworm" -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} +FROM node:22.23.4-bookworm-slim@sha256:de170b39439eb0e5a3444ad7d60b015614a381e10fecae2e30ec9e735122f38d AS patched-node + +FROM mcr.microsoft.com/devcontainers/javascript-node:1-${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)" = "v22.23.4" \ + && test "$(/usr/local/bin/node --version)" = "v22.23.4" +ENV NODE_VERSION=22.23.4 USER node WORKDIR /home/node diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 28b9ad608..b6f6c789c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "20" + "VARIANT": "22-bookworm" } }, "hostRequirements": { diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index c7705998b..a20c32058 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: '20' + default: '22.23.4' registry_url: description: The Node.js package registry URL. required: false diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index 92a145054..4445252ee 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: '20' + default: '22.23.4' outputs: artifact_name: description: The artifact name. diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 669c995a3..327e71288 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -28,7 +28,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node_version: '24' + node_version: '24.22.1' install_dependencies: 'false' - name: Download artifact uses: actions/download-artifact@v6 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 96fd5787f..4c32498fe 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -20,18 +20,22 @@ jobs: os: - ubuntu-latest node: - - '18' - - '20' + - '22' + - '24' 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@v4 - name: Setup uses: ./.github/actions/setup with: - node_version: ${{ matrix.node }} + node_version: ${{ matrix.node_version }} - name: Test run: npm test lint: @@ -42,15 +46,20 @@ jobs: fail-fast: false matrix: node: - - '18' - - '20' + - '22' + - '24' + include: + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Checkout uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup with: - node_version: ${{ matrix.node }} + node_version: ${{ matrix.node_version }} - name: Lint run: npm run lint build: @@ -67,16 +76,20 @@ jobs: os: - ubuntu-latest node: - - '18' - - '20' + - '22' + - '24' 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@v4 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node_version }} - name: Download artifact uses: actions/download-artifact@v4 with: @@ -113,15 +126,20 @@ jobs: fail-fast: false matrix: node: - - '18' - - '20' + - '22' + - '24' + include: + - node: '22' + node_version: '22.23.4' + - node: '24' + node_version: '24.22.1' steps: - name: Checkout uses: actions/checkout@v4 - 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 index 209e3ef4b..b8b23ca93 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +22.23.4