Skip to content

Commit 2ea6966

Browse files
authored
chore: import node process to skip checking runtime
Deno now supports node process. It requires it to be imported from `node:process` then it should work the same way. This change means it's no longer necessary to check whether the runtime is Deno
1 parent 285afb1 commit 2ea6966

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bin/asc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
#!/usr/bin/env node
2+
import process from "node:process";
23

34
const [ nodePath, thisPath, ...args ] = process.argv;
45
const nodeArgs = process.execArgv;
56

67
const hasSourceMaps = nodeArgs.includes("--enable-source-maps");
78
const posCustomArgs = args.indexOf("--");
8-
const isDeno = typeof Deno !== "undefined";
9-
10-
if (isDeno) {
11-
process.on = function() { /* suppress 'not implemented' message */ };
12-
}
139

1410
if ((!hasSourceMaps || ~posCustomArgs) && !isDeno) {
1511
if (!hasSourceMaps) {

0 commit comments

Comments
 (0)