diff --git a/.eslintrc.json b/.eslintrc.json index 82313db..0910afd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,7 @@ "es6": true }, "parserOptions": { - "ecmaVersion": 2019 + "ecmaVersion": 2023 }, "plugins": [ "@typescript-eslint", @@ -82,4 +82,4 @@ } } ] -} +} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b79eca1..6e72cb5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -20,9 +20,6 @@ updates: # sinon-chai 4.x+ supports chai 5.x+. - dependency-name: "sinon-chai" versions: [">=4.0.0"] - # nyc is Node18+ only starting on nyc@16.x. - - dependency-name: "nyc" - versions: [">=16.0.0"] # we ignore TS as a part of quarterly dependency updates. - dependency-name: "typescript" # node-gyp now depends on python 3.10, we install 3.6 in our dockerfile diff --git a/.github/docker/Dockerfile.glibc b/.github/docker/Dockerfile.glibc index cfd02fc..2dc4991 100644 --- a/.github/docker/Dockerfile.glibc +++ b/.github/docker/Dockerfile.glibc @@ -1,7 +1,6 @@ -ARG UBUNTU_VERSION=bionic -FROM ubuntu:${UBUNTU_VERSION} AS build +FROM ubuntu:noble AS build -ARG NODE_VERSION=16.20.1 +ARG NODE_VERSION=20.19.0 # Possible values: s390x, arm64, x64 ARG NODE_ARCH ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.gz / diff --git a/.github/docker/Dockerfile.musl b/.github/docker/Dockerfile.musl index 6bee364..22b757d 100644 --- a/.github/docker/Dockerfile.musl +++ b/.github/docker/Dockerfile.musl @@ -1,5 +1,5 @@ ARG PLATFORM=arm64 -ARG NODE_VERSION=16.20.1 +ARG NODE_VERSION=20.19.0 FROM ${PLATFORM}/node:${NODE_VERSION}-alpine AS build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb41996..3f545dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,12 +79,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Get Full Node.js Version - id: get_nodejs_version - shell: bash - run: | - echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b021bbf..cee7ae0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [macos-latest, windows-2022] - node: [16.x, 18.x, 20.x, 22.x] + node: [20.19.0, 22.x] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -37,7 +37,7 @@ jobs: strategy: matrix: linux_arch: [s390x, arm64, amd64] - node: [16.x, 18.x, 20.x, 22.x] + node: [20.19.0, 22.x] fail-fast: false steps: - uses: actions/checkout@v4 @@ -51,7 +51,6 @@ jobs: shell: bash run: | echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT" - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -66,19 +65,17 @@ jobs: --platform linux/${{ matrix.linux_arch }} \ --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ - --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \ --build-arg="RUN_TEST=true" \ --output type=local,dest=./prebuilds,platform-split=false \ -f ./.github/docker/Dockerfile.glibc \ . - container_tests_musl: runs-on: ubuntu-latest strategy: matrix: linux_arch: [amd64, arm64] - node: [16.20.1, 18.x, 20.x, 22.x] + node: [20.19.0, 22.x] fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/etc/docker.sh b/etc/docker.sh index 880ee72..3093516 100644 --- a/etc/docker.sh +++ b/etc/docker.sh @@ -7,8 +7,8 @@ # amd64 or arm64v8 for alpine LINUX_ARCH=amd64 -# 16.20.1+, default 16.20.1 -NODE_VERSION=20.0.0 +# 20.19.0+, default 20.19.0 +NODE_VERSION=20.19.0 SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) PROJECT_DIR=$SCRIPT_DIR/.. @@ -28,14 +28,11 @@ build_and_test_musl() { build_and_test_glibc() { docker buildx create --name builder --bootstrap --use - UBUNTU_VERSION=$(node --print 'Number(process.argv[1].split(`.`).at(0)) > 16 ? `noble` : `bionic`' $NODE_VERSION) NODE_ARCH=$(node -p 'process.argv[1] === `amd64` && `x64` || process.argv[1]' $LINUX_ARCH) - echo $UBUNTU_VERSION docker buildx build --progress=plain --no-cache \ --platform linux/$LINUX_ARCH \ --build-arg="NODE_ARCH=$NODE_ARCH" \ --build-arg="NODE_VERSION=$NODE_VERSION" \ - --build-arg="UBUNTU_VERSION=$UBUNTU_VERSION" \ --build-arg="RUN_TEST=true" \ --output type=local,dest=./prebuilds,platform-split=false \ -f ./.github/docker/Dockerfile.glibc \ diff --git a/package-lock.json b/package-lock.json index 5e78668..1c861b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "typescript-cached-transpile": "^0.0.6" }, "engines": { - "node": ">=16.20.1" + "node": ">=20.19.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index fe1afcf..ffe6f47 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ } }, "engines": { - "node": ">=16.20.1" + "node": ">=20.19.0" }, "binary": { "napi_versions": [ diff --git a/tsconfig.json b/tsconfig.json index ac8280d..ea62b74 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,13 +4,13 @@ "checkJs": false, "strict": true, "alwaysStrict": true, - "target": "ES2020", + "target": "ES2023", "module": "commonJS", "moduleResolution": "node", "skipLibCheck": true, "erasableSyntaxOnly": true, "lib": [ - "es2020", "es2021.WeakRef" + "es2023" ], // We don't make use of tslib helpers, all syntax used is supported by target engine "importHelpers": false, @@ -43,4 +43,4 @@ "include": [ "src/**/*" ] -} +} \ No newline at end of file