Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"es6": true
},
"parserOptions": {
"ecmaVersion": 2019
"ecmaVersion": 2023
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
Expand Down
6 changes: 2 additions & 4 deletions .github/docker/Dockerfile.glibc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ARG UBUNTU_VERSION=bionic
FROM ubuntu:${UBUNTU_VERSION} AS build

ARG NODE_VERSION=16.20.1
FROM ubuntu:noble AS build
ARG NODE_VERSION=20.19.3
# 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 /
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.musl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ARG PLATFORM=arm64
ARG NODE_VERSION=16.20.1
ARG NODE_VERSION=20.19.0

FROM ${PLATFORM}/node:${NODE_VERSION}-alpine AS build

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 16.20.1
node-version: 20.x
cache: "npm"
registry-url: "https://registry.npmjs.org"

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
docker buildx build \
--platform linux/${{ matrix.linux_arch }} \
--build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \
--build-arg="NODE_VERSION=16.20.1" \
--build-arg="NODE_VERSION=20.19.0" \
--output type=local,dest=./prebuilds,platform-split=false \
-f ./.github/docker/Dockerfile.glibc \
.
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
docker --debug buildx build --progress=plain --no-cache \
--platform linux/${{ matrix.linux_arch }} \
--build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \
--build-arg="NODE_VERSION=16.20.1" \
--build-arg="NODE_VERSION=20.19.0" \
--output type=local,dest=./prebuilds,platform-split=false \
-f ./.github/docker/Dockerfile.musl \
.
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-2022, macos-13]
node: [16.20.1, 18.x, 20.x, 22.x]
node: [20.19.0, 22.x, 24.x]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
strategy:
matrix:
linux_arch: [s390x, arm64, amd64]
node: [16.x, 18.x, 20.x, 22.x]
node: [20.19.0, 22.x, 24.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -55,7 +55,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
Expand All @@ -70,7 +69,6 @@ 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 \
Expand All @@ -81,7 +79,7 @@ jobs:
strategy:
matrix:
linux_arch: [amd64, arm64]
node: [16.20.1, 18.x, 20.x, 22.x]
node: [20.19.0, 22.x, 24.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Only the following version combinations with the [MongoDB Node.js Driver](https:
Below are the platforms that are available as prebuilds on each github release.
`prebuild-install` downloads these automatically depending on the platform you are running npm install on.

- Linux GLIBC 2.23 or later
- Linux GLIBC 2.28 or later
- s390x
- arm64
- x64
Expand Down
6 changes: 1 addition & 5 deletions etc/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
# amd64 or arm64v8 for alpine
LINUX_ARCH=arm64

# 16.20.1+, default 16.20.1
NODE_VERSION=18.0.0
NODE_VERSION=20.19.0

SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0})
PROJECT_DIR=$SCRIPT_DIR/..
Expand All @@ -28,14 +27,11 @@ build_and_test_musl() {
build_and_test_glibc() {
docker buildx create --name builder --bootstrap --use

UBUNTU_VERSION=ubuntu_version=$(node --print '(process.argv[1].slice(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 \
Expand Down
Loading