1
0
Fork 0
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:
Satya Rohith 2024-03-20 10:56:41 +05:30 committed by GitHub
parent 0d43a63636
commit 737adbe1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -564,6 +564,12 @@ class Process extends EventEmitter {
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: typeof notImplementedEvents[number],

View file

@ -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
},
});