Skip to content

Commit fa9e360

Browse files
authored
Merge pull request ravendb#569 from M4xymm/RDBC-1095
RDBC-1095 Update Undici to 7.x, add Node 26.x to CI matrix
2 parents f70ef00 + 66451b9 commit fa9e360

5 files changed

Lines changed: 108 additions & 26 deletions

File tree

.github/workflows/Cloudflare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
# Node 22+ : the Vite 6 example config loader needs node:module.registerHooks
2626
# (absent in Node 20), and GitHub is deprecating Node 20 on runners.
27-
node-version: [22.x, 24.x]
27+
node-version: [22.x, 24.x, 26.x]
2828
dir:
2929
- test/cloudflare-worker # wrangler / esbuild
3030
- test/cloudflare-vite # Vite / Rollup

.github/workflows/NodeLatest.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: tests/node-latest
2+
3+
# Early-warning canary for new Node.js releases.
4+
#
5+
# Node.js ships a new major every 6 months (April/October) and minor/patch
6+
# releases of the current line roughly every 2-4 weeks, so a weekly run is
7+
# enough to catch a breaking release within days. The regular test matrix
8+
# (RavenClient.yml) pins concrete lines; this workflow always resolves the
9+
# newest available versions instead.
10+
11+
permissions:
12+
contents: read
13+
14+
on:
15+
schedule:
16+
- cron: '0 10 * * 1' # Mondays 10:00 UTC
17+
workflow_dispatch:
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
# `nightly` is allowed to fail: it exists to spot upstream breaks early
24+
# (like the undici dispatch handler protocol changes), not to gate anything.
25+
continue-on-error: ${{ matrix.node-version == 'nightly' }}
26+
27+
env:
28+
RAVENDB_TEST_SERVER_PATH: ./RavenDB/Server/Raven.Server
29+
RAVENDB_TEST_SERVER_CERTIFICATE_PATH: ./certs/server.pfx
30+
RAVENDB_TEST_CLIENT_CERT_PASSPHRASE: client11
31+
RAVENDB_TEST_CLIENT_CERT_PATH: ./certs/nodejs.pem
32+
RAVENDB_TEST_CA_PATH: /usr/local/share/ca-certificates/ca.crt
33+
RAVENDB_TEST_HTTPS_SERVER_URL: https://localhost:8989
34+
RAVENDB_BUILD_TYPE: nightly
35+
RAVEN_License: ${{ secrets.RAVEN_LICENSE }}
36+
RAVENDB_SERVER_VERSION: ${{ matrix.serverVersion }}
37+
38+
strategy:
39+
matrix:
40+
# `latest` = newest stable release (any line), `nightly` = tip of main.
41+
node-version: [latest, nightly]
42+
serverVersion: ["7.2"]
43+
fail-fast: false
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Use Node.js ${{ matrix.node-version }}
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: ${{ matrix.node-version }}
52+
check-latest: true
53+
54+
- name: Print resolved Node.js version
55+
run: node --version
56+
57+
- name: Download RavenDB Server
58+
run: wget -O RavenDB.tar.bz2 "https://hibernatingrhinos.com/downloads/RavenDB%20for%20Linux%20x64/latest?buildType=${{ env.RAVENDB_BUILD_TYPE }}&version=${{ matrix.serverVersion }}"
59+
60+
- run: mkdir certs
61+
- run: openssl genrsa -out certs/ca.key 2048
62+
- run: openssl req -new -x509 -key certs/ca.key -out certs/ca.crt -subj "/C=US/ST=Arizona/L=Nevada/O=RavenDB Test CA/OU=RavenDB test CA/CN=localhost/emailAddress=ravendbca@example.com"
63+
- run: openssl genrsa -traditional -out certs/localhost.key 2048
64+
- run: openssl req -new -key certs/localhost.key -out certs/localhost.csr -subj "/C=US/ST=Arizona/L=Nevada/O=RavenDB Test/OU=RavenDB test/CN=localhost/emailAddress=ravendb@example.com" -addext "subjectAltName = DNS:localhost"
65+
- run: openssl x509 -req -extensions ext -extfile test/Assets/test_cert.conf -in certs/localhost.csr -CA certs/ca.crt -CAkey certs/ca.key -CAcreateserial -out certs/localhost.crt
66+
- run: cat certs/localhost.key certs/localhost.crt > certs/nodejs.pem
67+
- run: openssl pkcs12 -passout pass:"" -export -out certs/server.pfx -inkey certs/localhost.key -in certs/localhost.crt
68+
- run: sudo cp certs/ca.crt /usr/local/share/ca-certificates/ca.crt
69+
- run: sudo update-ca-certificates
70+
71+
- name: Extract RavenDB Server
72+
run: tar xjf RavenDB.tar.bz2
73+
74+
- run: npm ci
75+
76+
- name: Run Tests
77+
run: npm run test
78+
79+
- name: Build
80+
run: npm pack
81+
82+
- name: Check imports CommonJS
83+
run: node scripts/checkImports.cjs
84+
85+
- name: Check imports ESM
86+
run: node scripts/checkImports.mjs
87+
88+
- name: Check imports
89+
run: npm run check-imports

.github/workflows/RavenClient.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
strategy:
3636
matrix:
37-
node-version: [22.x, 24.x]
37+
node-version: [22.x, 24.x, 26.x]
3838
serverVersion: ["6.2", "7.1", "7.2"]
3939
fail-fast: false
4040

package-lock.json

Lines changed: 14 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hibernating Rhinos"
5252
],
5353
"engines": {
54-
"node": ">=20.0.0"
54+
"node": ">=22.0.0"
5555
},
5656
"keywords": [
5757
"ravendb",
@@ -87,10 +87,10 @@
8787
"unzipper": "^0.12.3"
8888
},
8989
"dependencies": {
90-
"@types/node": "^20.14.14",
90+
"@types/node": "^22.0.0",
9191
"@types/ws": "^8.5.12",
9292
"date-fns": "^3.6.0",
93-
"undici": "^6.19.5",
93+
"undici": "^7.16.0",
9494
"ws": "^8.18.0"
9595
},
9696
"optionalDependencies": {

0 commit comments

Comments
 (0)