fix(js): sourcemaps should work with js:node executor (#17261)

This commit is contained in:
Craigory Coppola 2023-05-29 11:08:11 -04:00 committed by GitHub
parent 7dd8fb615e
commit f01cdca79d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,8 +135,9 @@ export async function* nodeExecutor(
task.promise = new Promise<void>((resolve, reject) => {
task.childProcess = fork(
joinPathFragments(__dirname, 'node-with-require-overrides'),
getExecArgv(options),
options.runtimeArgs ?? [],
{
execArgv: getExecArgv(options),
stdio: [0, 1, 'pipe', 'ipc'],
env: {
...process.env,
@ -230,11 +231,7 @@ export async function* nodeExecutor(
}
function getExecArgv(options: NodeExecutorOptions) {
const args = [
'-r',
require.resolve('source-map-support/register'),
...options.runtimeArgs,
];
const args = ['-r', require.resolve('source-map-support/register')];
if (options.inspect === true) {
options.inspect = InspectType.Inspect;