mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 08:33:43 -05:00
fix(ext/node): add process.setSourceMapsEnabled noop (#22993)
Closes https://github.com/denoland/deno/issues/22992
This commit is contained in:
parent
0d43a63636
commit
737adbe1b0
2 changed files with 16 additions and 0 deletions
|
@ -564,6 +564,12 @@ class Process extends EventEmitter {
|
||||||
return platform;
|
return platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://nodejs.org/api/process.html#processsetsourcemapsenabledval
|
||||||
|
setSourceMapsEnabled(_val: boolean) {
|
||||||
|
// This is a no-op in Deno. Source maps are always enabled.
|
||||||
|
// TODO(@satyarohith): support disabling source maps if needed.
|
||||||
|
}
|
||||||
|
|
||||||
override addListener(event: "exit", listener: (code: number) => void): this;
|
override addListener(event: "exit", listener: (code: number) => void): this;
|
||||||
override addListener(
|
override addListener(
|
||||||
event: typeof notImplementedEvents[number],
|
event: typeof notImplementedEvents[number],
|
||||||
|
|
|
@ -1058,3 +1058,13 @@ Deno.test({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test({
|
||||||
|
name: "process.setSourceMapsEnabled",
|
||||||
|
fn() {
|
||||||
|
// @ts-ignore: setSourceMapsEnabled is not available in the types yet.
|
||||||
|
process.setSourceMapsEnabled(false); // noop
|
||||||
|
// @ts-ignore: setSourceMapsEnabled is not available in the types yet.
|
||||||
|
process.setSourceMapsEnabled(true); // noop
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue