@@ -5,7 +5,6 @@ const chai = require('chai')
5
5
const sinonChai = require ( 'sinon-chai' )
6
6
const { setTimeout } = require ( 'timers/promises' )
7
7
const proxyquire = require ( '../proxyquire' )
8
- const { NODE_MAJOR } = require ( '../../../../version' )
9
8
10
9
{
11
10
// get-port can often return a port that is already in use, thanks to a race
@@ -53,35 +52,3 @@ if (/^v\d+\.x$/.test(process.env.GITHUB_BASE_REF || '')) {
53
52
process . env . DD_INJECTION_ENABLED = 'true'
54
53
process . env . DD_INJECT_FORCE = 'true'
55
54
}
56
-
57
- // TODO(bengl): remove this block once we can properly support Node.js 24 without it
58
- if ( NODE_MAJOR >= 24 && ! process . env . OPTIONS_OVERRIDE ) {
59
- const childProcess = require ( 'child_process' )
60
- const { exec, fork } = childProcess
61
-
62
- childProcess . exec = function ( ...args ) {
63
- const opts = args [ 1 ]
64
- if ( opts ) {
65
- if ( opts ?. env ?. NODE_OPTIONS && ! opts . env . NODE_OPTIONS . includes ( '--no-async-context-frame' ) ) {
66
- opts . env . NODE_OPTIONS += ' --no-async-context-frame'
67
- } else {
68
- opts . env ||= { }
69
- opts . env . NODE_OPTIONS = '--no-async-context-frame'
70
- }
71
- }
72
- return exec . apply ( this , args )
73
- }
74
-
75
- childProcess . fork = function ( ...args ) {
76
- const opts = args [ 1 ]
77
- if ( opts ) {
78
- if ( opts ?. env ?. NODE_OPTIONS && ! opts . env . NODE_OPTIONS . includes ( '--no-async-context-frame' ) ) {
79
- opts . env . NODE_OPTIONS += ' --no-async-context-frame'
80
- } else {
81
- opts . env ||= { }
82
- opts . env . NODE_OPTIONS = '--no-async-context-frame'
83
- }
84
- }
85
- return fork . apply ( this , args )
86
- }
87
- }
0 commit comments