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

Add readme, more examples #1

Merged
merged 1 commit into from
May 29, 2024
Merged
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Repro for https://github.com/nodejs/node/issues/53182

To reproduce the issue, run the following commands:

| Command | Result in Node 22.1.0 | Result in Node 22.2.0 |
|---------|-------------|-------------|
| `node self-contained.mjs` | ✅ Prints from hooks.mjs | ✅ Prints from hooks.mjs |
| `node with-worker-register-in-import.js` | ✅ Prints from hooks.mjs | ❌ Process hangs |
| `node with-worker-register-in-child.js` | ❌ Doesn’t print from hooks.mjs | ❌ Doesn’t print from hooks.mjs |
2 changes: 2 additions & 0 deletions lib/child-with-register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require("./register");
require("./local");
2 changes: 0 additions & 2 deletions self-contained.js

This file was deleted.

2 changes: 2 additions & 0 deletions self-contained.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
await import("./lib/register.js");
await import("./lib/local.js");
3 changes: 3 additions & 0 deletions with-worker-register-in-child.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { Worker } = require("worker_threads");

new Worker("./lib/child-with-register.js");
File renamed without changes.