Skip to content

Commit de91c0b

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/sinon-21.0.0
2 parents ce70721 + d744a8e commit de91c0b

32 files changed

+1282
-584
lines changed

.eslintrc.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"es6": true
1414
},
1515
"parserOptions": {
16-
"ecmaVersion": 2019
16+
"ecmaVersion": 2023
1717
},
1818
"plugins": [
1919
"@typescript-eslint",
@@ -38,6 +38,15 @@
3838
"prettier/prettier": "error",
3939
"no-console": "error",
4040
"valid-typeof": "error",
41+
"@typescript-eslint/no-unused-vars": [
42+
"error",
43+
{
44+
"argsIgnorePattern": "^_",
45+
"caughtErrorsIgnorePattern": "^_",
46+
"destructuredArrayIgnorePattern": "^_",
47+
"varsIgnorePattern": "^_"
48+
}
49+
],
4150
"eqeqeq": [
4251
"error",
4352
"always",
@@ -82,4 +91,4 @@
8291
}
8392
}
8493
]
85-
}
94+
}

.github/dependabot.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ updates:
2020
# sinon-chai 4.x+ supports chai 5.x+.
2121
- dependency-name: "sinon-chai"
2222
versions: [">=4.0.0"]
23-
# nyc is Node18+ only starting on nyc@16.x.
24-
- dependency-name: "nyc"
25-
versions: [">=16.0.0"]
2623
# we ignore TS as a part of quarterly dependency updates.
2724
- dependency-name: "typescript"
2825
# node-gyp now depends on python 3.10, we install 3.6 in our dockerfile

.github/docker/Dockerfile.glibc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
ARG UBUNTU_VERSION=bionic
2-
FROM ubuntu:${UBUNTU_VERSION} AS build
1+
FROM redhat/ubi8 AS build
32

4-
ARG NODE_VERSION=16.20.1
3+
ARG NODE_VERSION=20.19.0
54
# Possible values: s390x, arm64, x64
65
ARG NODE_ARCH
76
ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.gz /
@@ -11,7 +10,7 @@ ENV PATH=$PATH:/nodejs/bin
1110
WORKDIR /mongodb-client-encryption
1211
COPY . .
1312

14-
RUN apt-get -qq update && apt-get -qq install -y python3 build-essential git && ldd --version
13+
RUN yum install -y python39 git make gcc-c++
1514

1615
RUN npm run install:libmongocrypt
1716

.github/docker/Dockerfile.musl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG PLATFORM=arm64
2-
ARG NODE_VERSION=16.20.1
2+
ARG NODE_VERSION=20.19.0
33

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

.github/pull_request_template.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,44 @@
11
### Description
22

3-
#### What is changing?
3+
#### Summary of Changes
44

5-
##### Is there new documentation needed for these changes?
5+
<!-- Please describe the changes in this PR in a high-level overview. -->
66

7-
#### What is the motivation for this change?
7+
##### Notes for Reviewers
8+
9+
<!--
10+
If there is any additional context on the changes in the PR that reviewers might find helpful, feel free to make notes in this section.
811
9-
<!-- If this is a bug, it helps to describe the current behavior and a clear outline of the expected behavior -->
10-
<!-- If this is a feature, it helps to describe the new use case enabled by this change -->
12+
Otherwise, feel free to remove this section.
13+
-->
14+
15+
#### What is the motivation for this change?
1116

1217
<!--
13-
Contributors!
14-
First of all, thank you so much!!
15-
If you haven't already, it would greatly help the team review this work in a timely manner if you create a JIRA ticket to track this PR.
16-
You can do that here: https://jira.mongodb.org/projects/NODE
18+
Remove this section if there is an associated Jira ticket explaining the motiviation for this change. If there is not, please fill this section out with
19+
information explaining why this change is valuable.
1720
-->
1821

1922
### Release Highlight
2023

24+
<!--
25+
Contributors: please leave the release notes section for the Node driver team to fill in. The following instructions are for maintainers.
26+
27+
For user facing changes: please provide release notes. Feel free to browse previous releases for example release highlights.
28+
29+
If there are no user-facing changes in this PR, please delete the release highlight section from the PR description.
30+
-->
31+
2132
<!-- RELEASE_HIGHLIGHT_START -->
2233

23-
### Fill in title or leave empty for no highlight
34+
<!-- ### Release notes highlight ->
35+
<!-- LEAVE EMPTY: we do not write release highlights for mongodb-client-encryption -->
2436

2537
<!-- RELEASE_HIGHLIGHT_END -->
2638

2739
### Double check the following
2840

29-
- [ ] Ran `npm run check:lint` script
41+
- [ ] Lint is passing (`npm run check:lint`)
3042
- [ ] Self-review completed using the [steps outlined here](https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTING.md#reviewer-guidelines)
3143
- [ ] PR title follows the [correct format](https://www.conventionalcommits.org/en/v1.0.0/): `type(NODE-xxxx)[!]: description`
3244
- Example: `feat(NODE-1234)!: rewriting everything in coffeescript`

.github/scripts/libmongocrypt.mjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import util from 'node:util';
44
import process from 'node:process';
5-
import fs from 'node:fs/promises';
5+
import fs, { readFile } from 'node:fs/promises';
66
import child_process from 'node:child_process';
77
import events from 'node:events';
88
import path from 'node:path';
@@ -189,9 +189,17 @@ async function buildBindings(args, pkg) {
189189
await run('npm', ['run', 'prepare']);
190190

191191
if (process.platform === 'darwin' && process.arch === 'arm64') {
192+
// @ts-ignore
193+
const {
194+
binary: {
195+
napi_versions: [
196+
napiVersion
197+
]
198+
}
199+
} = JSON.parse(await readFile(resolveRoot('package.json'), 'utf-8'));
192200
// The "arm64" build is actually a universal binary
193-
const armTar = `mongodb-client-encryption-v${pkg.version}-napi-v4-darwin-arm64.tar.gz`;
194-
const x64Tar = `mongodb-client-encryption-v${pkg.version}-napi-v4-darwin-x64.tar.gz`;
201+
const armTar = `mongodb-client-encryption-v${pkg.version}-napi-v${napiVersion}-darwin-arm64.tar.gz`;
202+
const x64Tar = `mongodb-client-encryption-v${pkg.version}-napi-v${napiVersion}-darwin-x64.tar.gz`;
195203
await fs.copyFile(resolveRoot('prebuilds', armTar), resolveRoot('prebuilds', x64Tar));
196204
}
197205
}

.github/workflows/build.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
os: [macos-latest, windows-2022]
1919
runs-on: ${{ matrix.os }}
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222

2323
- name: Build ${{ matrix.os }} Prebuild
2424
run: node .github/scripts/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
@@ -42,7 +42,7 @@ jobs:
4242
matrix:
4343
linux_arch: [s390x, arm64, amd64]
4444
steps:
45-
- uses: actions/checkout@v4
45+
- uses: actions/checkout@v5
4646

4747
- name: Set up QEMU
4848
uses: docker/setup-qemu-action@v3
@@ -77,13 +77,7 @@ jobs:
7777
linux_arch: [amd64, arm64]
7878
fail-fast: false
7979
steps:
80-
- uses: actions/checkout@v4
81-
82-
- name: Get Full Node.js Version
83-
id: get_nodejs_version
84-
shell: bash
85-
run: |
86-
echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT"
80+
- uses: actions/checkout@v5
8781

8882
- name: Set up QEMU
8983
uses: docker/setup-qemu-action@v3

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
sourceDirectory: "./src"
3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v5
3838

3939
# Initializes the CodeQL tools for scanning.
4040
- name: Initialize CodeQL

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
lint-target: ["c++", "typescript"]
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020

2121
- name: Use Node.js LTS
22-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@v5
2323
with:
2424
node-version: 'lts/*'
2525
cache: 'npm'

.github/workflows/release_6.1.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ jobs:
3636
environment: release
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040

4141
- name: Install Node and dependencies
42-
uses: mongodb-labs/drivers-github-tools/node/setup@v2
42+
uses: mongodb-labs/drivers-github-tools/node/setup@v3
4343
with:
4444
ignore_install_scripts: true
4545

4646
- name: Load version and package info
47-
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v2
47+
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v3
4848
with:
4949
npm_package_name: mongodb-client-encryption
5050

5151
- name: actions/compress_sign_and_upload
52-
uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v2
52+
uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v3
5353
with:
5454
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
5555
aws_region_name: us-east-1
@@ -66,13 +66,13 @@ jobs:
6666
# only used for mongodb-client-encryption
6767
- name: Augment SBOM and copy to release assets
6868
if: ${{ 'mongodb-client-encryption-6.1' != '' }}
69-
uses: mongodb-labs/drivers-github-tools/sbom@v2
69+
uses: mongodb-labs/drivers-github-tools/sbom@v3
7070
with:
7171
silk_asset_group: 'mongodb-client-encryption-6.1'
7272
sbom_file_name: sbom.json
7373

7474
- name: Generate authorized pub report
75-
uses: mongodb-labs/drivers-github-tools/full-report@v2
75+
uses: mongodb-labs/drivers-github-tools/full-report@v3
7676
with:
7777
release_version: ${{ env.package_version }}
7878
product_name: mongodb-client-encryption
@@ -82,7 +82,7 @@ jobs:
8282
token: ${{ github.token }}
8383
sbom_file_name: sbom.json
8484

85-
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
85+
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v3
8686
with:
8787
version: ${{ env.package_version }}
8888
product_name: mongodb-client-encryption
@@ -93,14 +93,14 @@ jobs:
9393
environment: release
9494
runs-on: ubuntu-latest
9595
steps:
96-
- uses: actions/checkout@v4
96+
- uses: actions/checkout@v5
9797

9898
- name: Install Node and dependencies
99-
uses: mongodb-labs/drivers-github-tools/node/setup@v2
99+
uses: mongodb-labs/drivers-github-tools/node/setup@v3
100100
with:
101101
ignore_install_scripts: true
102102

103-
- run: npm publish --provenance
103+
- run: npm publish --provenance --tag alpha
104104
if: ${{ needs.release_please.outputs.release_created }}
105105
env:
106106
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)