-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
spawn(process.argv[0], ['-e', ...])
(#6118)
This detects a specific pattern for invoking a node process to evaluate a string of JavaScript code. Since a filepath can't (or shouldn't) be passed here, this exempts it from static analysis. This pattern is used by the package `xmlhttprequest-ssl`, which is required transitively by socket.io-client: https://github.com/mjwwit/node-XMLHttpRequest/blob/b0271d5e52692d9f48da6088b27d5bf2a6f50d86/lib/XMLHttpRequest.js#L544 Fixes WEB-1554 Resolves vercel/next.js#54787 Test Plan: - Added snapshot test - Manual test with a project using socket.io-client
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { spawn } from "child_process"; | ||
|
||
let x = spawn(process.argv[0], ["-e", "console.log('foo');"]); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"environment": "NodeJs" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.