Skip to content

Commit 3e1f5df

Browse files
BridgeARUgaitz UrienIlyasShabi
committed
feat: add Node.js 26 support (#8429)
Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: ishabi <ilyasshabi94@gmail.com>
1 parent 790d54d commit 3e1f5df

10 files changed

Lines changed: 50 additions & 41 deletions

File tree

.github/actions/node/setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ runs:
2929
eol) version=16 ;;
3030
oldest) version=$(node_version 18) ;;
3131
maintenance) version=$(node_version 20) ;;
32-
active) version=$(node_version 22) ;;
33-
latest) version=${LATEST_VERSION:-$(node_version 24)} ;;
32+
active) version=$(node_version 24) ;;
33+
latest) version=${LATEST_VERSION:-$(node_version 26)} ;;
3434
*) version=$VERSION ;;
3535
esac
3636
echo "version=$version" >> "$GITHUB_OUTPUT"

.github/workflows/apm-integrations.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,10 +1288,8 @@ jobs:
12881288
- uses: ./.github/actions/dd-sts-api-key
12891289
id: dd-sts
12901290
- uses: ./.github/actions/testagent/start
1291-
- uses: ./.github/actions/node/active-lts
1292-
- uses: ./.github/actions/install
1293-
- run: yarn test:plugins:ci
12941291
- uses: ./.github/actions/node/oldest-maintenance-lts
1292+
- uses: ./.github/actions/install
12951293
- run: yarn test:plugins:ci
12961294
- uses: ./.github/actions/coverage
12971295
with:

benchmark/sirun/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN mkdir /opt/insecure-bank-js
4040
RUN git clone --depth 1 https://github.com/hdiv/insecure-bank-js.git /opt/insecure-bank-js
4141

4242
WORKDIR /opt/insecure-bank-js
43-
RUN git checkout 2003d9085a6e9a679e31fd88719e4de030d6855f
43+
RUN git checkout 5755d091e6a5dc965a8e7c6d4fb79b2f0ea06d9a
4444
RUN . $NVM_DIR/nvm.sh \
4545
&& npm ci \
4646
&& npm cache clean --force

integration-tests/debugger/template.spec.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,20 @@ describe('Dynamic Instrumentation', function () {
4949
assert.strictEqual(messages.shift(), '[ [Object], 2, 3, ... 2 more items ]')
5050
assert.strictEqual(messages.shift(), '{}')
5151
const obj = messages.shift()
52-
assert.strictEqual(
53-
obj,
54-
'{ ' +
55-
'foo: [Object], ' +
56-
'bar: true, ' +
57-
'baz: [Getter], ' +
58-
(NODE_MAJOR >= 24
59-
? 'Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] '
60-
: '[Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]] ') +
61-
'}'
62-
)
63-
assert.strictEqual(messages.shift(), obj) // a proxy should just be stringified to the wrapped object
52+
let expectedObjectShape = '{ ' +
53+
'foo: [Object], ' +
54+
'bar: true, ' +
55+
'baz: [Getter], ' +
56+
(NODE_MAJOR >= 24
57+
? 'Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] '
58+
: '[Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]] ') +
59+
'}'
60+
assert.strictEqual(obj, expectedObjectShape)
61+
if (NODE_MAJOR >= 26) {
62+
// A proxy should be stringified to the wrapped object plus the proxy type in newer Node.js versions
63+
expectedObjectShape = `Proxy(${expectedObjectShape})`
64+
}
65+
assert.strictEqual(messages.shift(), expectedObjectShape)
6466
assert.strictEqual(messages.shift(), '<ref *1> { circular: [Circular *1] }')
6567
assert.strictEqual(messages.shift(), '[class CustomClass]')
6668
// Notice execution of `Symbol.toStringTag` getter (`foo`). There's nothing we can do about it when using

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
},
130130
"homepage": "https://github.com/DataDog/dd-trace-js#readme",
131131
"engines": {
132-
"node": ">=18 <26"
132+
"node": ">=18 <27"
133133
},
134134
"files": [
135135
"/package.json",

packages/dd-trace/test/appsec/extended-data-collection.next.plugin.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ describe('extended data collection', () => {
2222
return
2323
}
2424

25+
if (satisfies(realVersion, '>=12 <13') && NODE_MAJOR >= 26) {
26+
return // next 12.x fails to build on Node.js 26
27+
}
28+
2529
if (satisfies(realVersion, '>=16') && NODE_MAJOR < 20) {
2630
return
2731
}

packages/dd-trace/test/appsec/index.next.plugin.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ describe('test suite', () => {
1717
return // next 12.x fails on node 24.0.0, but 24.0.1 works
1818
}
1919

20+
if (satisfies(realVersion, '>=12 <13') && NODE_MAJOR >= 26) {
21+
return // next 12.x fails to build on Node.js 26
22+
}
23+
2024
if (satisfies(realVersion, '>=16') && NODE_MAJOR < 20) {
2125
return
2226
}

packages/dd-trace/test/plugins/versions/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
"node-20": "npm:node@20.20.2",
172172
"node-22": "npm:node@22.22.3",
173173
"node-24": "npm:node@24.16.0",
174+
"node-26": "npm:node@26.2.0",
174175
"node-serialize": "0.0.4",
175176
"npm": "11.14.1",
176177
"nyc": "18.0.0",

supported_versions_output.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
"dependency": "child_process",
284284
"integration": "child_process",
285285
"minimum_tracer_supported": "18.0.0",
286-
"max_tracer_supported": "25.9.0",
286+
"max_tracer_supported": "26.2.0",
287287
"auto-instrumented": "True"
288288
},
289289
{
@@ -311,7 +311,7 @@
311311
"dependency": "dns",
312312
"integration": "dns",
313313
"minimum_tracer_supported": "18.0.0",
314-
"max_tracer_supported": "25.9.0",
314+
"max_tracer_supported": "26.2.0",
315315
"auto-instrumented": "True"
316316
},
317317
{
@@ -381,21 +381,21 @@
381381
"dependency": "http",
382382
"integration": "http",
383383
"minimum_tracer_supported": "18.0.0",
384-
"max_tracer_supported": "25.9.0",
384+
"max_tracer_supported": "26.2.0",
385385
"auto-instrumented": "True"
386386
},
387387
{
388388
"dependency": "http2",
389389
"integration": "http2",
390390
"minimum_tracer_supported": "18.0.0",
391-
"max_tracer_supported": "25.9.0",
391+
"max_tracer_supported": "26.2.0",
392392
"auto-instrumented": "True"
393393
},
394394
{
395395
"dependency": "https",
396396
"integration": "http",
397397
"minimum_tracer_supported": "18.0.0",
398-
"max_tracer_supported": "25.9.0",
398+
"max_tracer_supported": "26.2.0",
399399
"auto-instrumented": "True"
400400
},
401401
{
@@ -556,7 +556,7 @@
556556
"dependency": "net",
557557
"integration": "net",
558558
"minimum_tracer_supported": "18.0.0",
559-
"max_tracer_supported": "25.9.0",
559+
"max_tracer_supported": "26.2.0",
560560
"auto-instrumented": "True"
561561
},
562562
{
@@ -570,35 +570,35 @@
570570
"dependency": "node:dns",
571571
"integration": "dns",
572572
"minimum_tracer_supported": "18.0.0",
573-
"max_tracer_supported": "25.9.0",
573+
"max_tracer_supported": "26.2.0",
574574
"auto-instrumented": "True"
575575
},
576576
{
577577
"dependency": "node:http",
578578
"integration": "http",
579579
"minimum_tracer_supported": "18.0.0",
580-
"max_tracer_supported": "25.9.0",
580+
"max_tracer_supported": "26.2.0",
581581
"auto-instrumented": "True"
582582
},
583583
{
584584
"dependency": "node:http2",
585585
"integration": "http2",
586586
"minimum_tracer_supported": "18.0.0",
587-
"max_tracer_supported": "25.9.0",
587+
"max_tracer_supported": "26.2.0",
588588
"auto-instrumented": "True"
589589
},
590590
{
591591
"dependency": "node:https",
592592
"integration": "http",
593593
"minimum_tracer_supported": "18.0.0",
594-
"max_tracer_supported": "25.9.0",
594+
"max_tracer_supported": "26.2.0",
595595
"auto-instrumented": "True"
596596
},
597597
{
598598
"dependency": "node:net",
599599
"integration": "net",
600600
"minimum_tracer_supported": "18.0.0",
601-
"max_tracer_supported": "25.9.0",
601+
"max_tracer_supported": "26.2.0",
602602
"auto-instrumented": "True"
603603
},
604604
{

supported_versions_table.csv

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ aws-sdk,aws-sdk,2.1.35,2.1693.0,True
3939
bullmq,bullmq,5.66.0,5.76.10,True
4040
bunyan,bunyan,1.0.0,2.0.5,True
4141
cassandra-driver,cassandra-driver,3.0.0,4.9.0,True
42-
child_process,child_process,18.0.0,25.9.0,True
42+
child_process,child_process,18.0.0,26.2.0,True
4343
connect,connect,2.2.2,3.7.0,True
4444
couchbase,couchbase,3.0.7,4.7.0,True
4545
cypress,cypress,12.0.0,15.15.0,True
46-
dns,dns,18.0.0,25.9.0,True
46+
dns,dns,18.0.0,26.2.0,True
4747
durable-functions,azure-durable-functions,3.0.0,3.3.1,True
4848
elasticsearch,elasticsearch,10.0.0,16.7.3,True
4949
electron,electron,37.0.0,42.1.0,True
@@ -53,9 +53,9 @@ find-my-way,find-my-way,1.0.0,9.6.0,True
5353
graphql,graphql,0.10.0,16.14.0,True
5454
hapi,hapi,16.0.0,18.1.0,True
5555
hono,hono,4.0.0,4.12.19,True
56-
http,http,18.0.0,25.9.0,True
57-
http2,http2,18.0.0,25.9.0,True
58-
https,http,18.0.0,25.9.0,True
56+
http,http,18.0.0,26.2.0,True
57+
http2,http2,18.0.0,26.2.0,True
58+
https,http,18.0.0,26.2.0,True
5959
ioredis,ioredis,2.0.0,5.10.1,True
6060
iovalkey,iovalkey,0.0.1,0.3.3,True
6161
jest-circus,jest,28.0.0,30.4.2,True
@@ -78,13 +78,13 @@ mongodb-core,mongodb-core,2.0.0,3.2.7,True
7878
mongoose,mongoose,4.6.4,9.6.2,True
7979
mysql,mysql,2.0.0,2.18.1,True
8080
mysql2,mysql2,1.0.0,3.22.3,True
81-
net,net,18.0.0,25.9.0,True
81+
net,net,18.0.0,26.2.0,True
8282
next,next,10.2.0,16.2.6,True
83-
node:dns,dns,18.0.0,25.9.0,True
84-
node:http,http,18.0.0,25.9.0,True
85-
node:http2,http2,18.0.0,25.9.0,True
86-
node:https,http,18.0.0,25.9.0,True
87-
node:net,net,18.0.0,25.9.0,True
83+
node:dns,dns,18.0.0,26.2.0,True
84+
node:http,http,18.0.0,26.2.0,True
85+
node:http2,http2,18.0.0,26.2.0,True
86+
node:https,http,18.0.0,26.2.0,True
87+
node:net,net,18.0.0,26.2.0,True
8888
nyc,nyc,17.0.0,18.0.0,True
8989
openai,openai,3.0.0,6.39.0,True
9090
oracledb,oracledb,5.0.0,6.10.0,True

0 commit comments

Comments
 (0)