Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Only create
@babel/node
IPC channel when needed (#13295)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
- Loading branch information
1 parent
875fc8e
commit cca97d1
Showing
8 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/cli/subprocess-send/in-files/payload.js → ...es/cli/subprocess-ipc/in-files/payload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
process.send({ hello: "world" }); | ||
console.log("sent"); | ||
console.log("ipc enabled"); |
6 changes: 6 additions & 0 deletions
6
packages/babel-node/test/fixtures/cli/subprocess-ipc/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"args": ["payload.js"], | ||
"ipcMessage": { "hello": "world" }, | ||
"ipc": true, | ||
"stdout": "ipc enabled" | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-node/test/fixtures/cli/subprocess-no-ipc/in-files/payload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if (process.send == null) { | ||
console.log("ipc disabled"); | ||
} |
2 changes: 1 addition & 1 deletion
2
...fixtures/cli/subprocess-send/options.json → ...xtures/cli/subprocess-no-ipc/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"args": ["payload.js"], | ||
"stdout": "sent" | ||
"stdout": "ipc disabled" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.