Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: import node process to skip checking runtime #2887

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ under the licensing terms detailed in LICENSE:
* Matt Johnson-Pint <mattjohnsonpint@gmail.com>
* Fabián Heredia Montiel <fabianhjr@users.noreply.github.com>
* Jonas Minnberg <sasq64@gmail.com>
* Omar Aziz <omaraziz.dev@gmail.com>

Portions of this software are derived from third-party works licensed under
the following terms:
Expand Down
6 changes: 1 addition & 5 deletions bin/asc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/usr/bin/env node
import process from "node:process";

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

const hasSourceMaps = nodeArgs.includes("--enable-source-maps");
const posCustomArgs = args.indexOf("--");
const isDeno = typeof Deno !== "undefined";

if (isDeno) {
process.on = function() { /* suppress 'not implemented' message */ };
}

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

Check failure on line 10 in bin/asc.js

View workflow job for this annotation

GitHub Actions / Compiler (ubuntu, node current)

'isDeno' is not defined

Check failure on line 10 in bin/asc.js

View workflow job for this annotation

GitHub Actions / Compiler (ubuntu, node lts/*)

'isDeno' is not defined

Check failure on line 10 in bin/asc.js

View workflow job for this annotation

GitHub Actions / Compiler (macos, node current)

'isDeno' is not defined

Check failure on line 10 in bin/asc.js

View workflow job for this annotation

GitHub Actions / Compiler (macos, node lts/*)

'isDeno' is not defined
if (!hasSourceMaps) {
nodeArgs.push("--enable-source-maps");
}
Expand Down
Loading