File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
packages/dd-trace/src/guardrails Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 9393 },
9494 "homepage" : " https://github.com/DataDog/dd-trace-js#readme" ,
9595 "engines" : {
96- "node" : " >=18"
96+ "node" : " >=18 <26 "
9797 },
9898 "files" : [
9999 " ci/**/*" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ function guard (fn) {
1414 var clobberBailout = false
1515 var forced = isTrue ( process . env . DD_INJECT_FORCE )
1616 var engines = require ( '../../../../package.json' ) . engines
17- var minMajor = parseInt ( engines . node . replace ( / [ ^ 0 - 9 ] / g, '' ) )
17+ var majors = engines . node . match ( / \d + / )
18+ var minMajor = parseInt ( majors [ 0 ] )
19+ var maxMajor = parseInt ( majors [ 1 ] )
1820 var version = process . versions . node
1921
2022 if ( process . env . DD_INJECTION_ENABLED ) {
@@ -40,7 +42,7 @@ function guard (fn) {
4042
4143 // If the runtime doesn't match the engines field in package.json, then we
4244 // should not initialize the tracer.
43- if ( ! clobberBailout && NODE_MAJOR < minMajor ) {
45+ if ( ! clobberBailout && ( NODE_MAJOR < minMajor || NODE_MAJOR > maxMajor ) ) {
4446 initBailout = true
4547 telemetry ( [
4648 { name : 'abort' , tags : [ 'reason:incompatible_runtime' ] } ,
You can’t perform that action at this time.
0 commit comments