chore: bump to node 20 (#13801)

This commit is contained in:
Tony
2023-11-15 13:33:21 +00:00
committed by GitHub
parent 6bd2444526
commit 78d9027c2f
5 changed files with 18 additions and 17 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/devcontainers/images/blob/v0.2.24/src/javascript-node/.devcontainer/devcontainer.json
// https://github.com/devcontainers/images/blob/v0.3.24/src/javascript-node/.devcontainer/devcontainer.json
{
"name": "Node.js",
"image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20-bookworm",
// Configure tool-specific properties.
"customizations": {
+1
View File
@@ -30,6 +30,7 @@ jobs:
version: 8
- uses: actions/setup-node@v4
with:
# pinned to 18 until https://github.com/compulim/version-from-git/issues/16 is fixed
node-version: 18
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
+7 -7
View File
@@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
node-version: [ 18, 20, 21 ]
name: Jest on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
@@ -51,7 +51,7 @@ jobs:
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- name: Upload coverage to Codecov
if: ${{ matrix.node-version == '18' }}
if: ${{ matrix.node-version == '20' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken
@@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
node-version: [ 18, 20, 21 ]
chromium:
- name: bundled Chromium
dependency: ''
@@ -91,7 +91,7 @@ jobs:
if: ${{ matrix.chromium.dependency != '' }}
# 'chromium-browser' from Ubuntu APT repo is a dummy package. Its version (85.0.4183.83) means
# nothing since it calls Snap (disgusting!) to install Chromium, which should be up-to-date.
# That's not really a problem since the Chromium-bundled Docker image is based on Debian bullseye,
# That's not really a problem since the Chromium-bundled Docker image is based on Debian bookworm,
# which provides up-to-date native packages.
run: |
set -ex
@@ -111,7 +111,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
node-version: [ 18, 20, 21 ]
defaults:
run:
working-directory: website
@@ -137,7 +137,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
node-version: [ 18, 20, 21 ]
name: Build radar and maintainer on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
@@ -153,7 +153,7 @@ jobs:
run: npm run build:all
automerge:
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request'
needs: [ jest, puppeteer, docs, all ]
runs-on: ubuntu-latest
permissions:
+1 -1
View File
@@ -1 +1 @@
lts/hydrogen
lts/iron
+7 -7
View File
@@ -1,4 +1,4 @@
FROM node:18-bullseye AS dep-builder
FROM node:20-bookworm AS dep-builder
# Here we use the non-slim image to provide build-time deps (compilers and python), thus no need to install later.
# This effectively speeds up qemu-based cross-build.
@@ -28,11 +28,11 @@ RUN \
# ---------------------------------------------------------------------------------------------------------------------
FROM debian:bullseye-slim AS dep-version-parser
FROM debian:bookworm-slim AS dep-version-parser
# This stage is necessary to limit the cache miss scope.
# With this stage, any modification to package.json won't break the build cache of the next two stages as long as the
# version unchanged.
# node:18-bullseye-slim is based on debian:bullseye-slim so this stage would not cause any additional download.
# node:20-bookworm-slim is based on debian:bookworm-slim so this stage would not cause any additional download.
WORKDIR /ver
COPY ./package.json /app/
@@ -44,7 +44,7 @@ RUN \
# ---------------------------------------------------------------------------------------------------------------------
FROM node:18-bullseye-slim AS docker-minifier
FROM node:20-bookworm-slim AS docker-minifier
# The stage is used to further reduce the image size by removing unused files.
WORKDIR /minifier
@@ -77,7 +77,7 @@ RUN \
# ---------------------------------------------------------------------------------------------------------------------
FROM node:18-bullseye-slim AS chromium-downloader
FROM node:20-bookworm-slim AS chromium-downloader
# This stage is necessary to improve build concurrency and minimize the image size.
# Yeah, downloading Chromium never needs those dependencies below.
@@ -109,7 +109,7 @@ RUN \
# ---------------------------------------------------------------------------------------------------------------------
FROM node:18-bullseye-slim AS app
FROM node:20-bookworm-slim AS app
LABEL org.opencontainers.image.authors="https://github.com/DIYgod/RSSHub"
@@ -123,7 +123,7 @@ ARG TARGETPLATFORM
ARG PUPPETEER_SKIP_DOWNLOAD=1
# https://pptr.dev/troubleshooting#chrome-headless-doesnt-launch-on-unix
# https://github.com/puppeteer/puppeteer/issues/7822
# https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#noteworthy-obsolete-packages
# https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#noteworthy-obsolete-packages
# The official recommended way to use Puppeteer on arm/arm64 is to install Chromium from the distribution repositories:
# https://github.com/puppeteer/puppeteer/blob/07391bbf5feaf85c191e1aa8aa78138dce84008d/packages/puppeteer-core/src/node/BrowserFetcher.ts#L128-L131
RUN \