fix(ext/node): improve process event handling and add missing APIs#32200
Merged
bartlomieju merged 11 commits intodenoland:mainfrom Feb 17, 2026
Merged
fix(ext/node): improve process event handling and add missing APIs#32200bartlomieju merged 11 commits intodenoland:mainfrom
bartlomieju merged 11 commits intodenoland:mainfrom
Conversation
Make process.config and its nested objects immutable via Object.freeze() to match Node.js behavior. Enable test-process-config.js node compat test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…emory() Add process.availableMemory() using Deno.systemMemoryInfo().available and process.constrainedMemory() backed by a new op that reads cgroup memory limits on Linux. Also freeze process.config for immutability. Enable three node compat tests: test-process-config.js, test-process-available-memory.js, test-process-constrained-memory.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix process event methods (on, off, emit, prependListener) to handle
Symbol event names by guarding `startsWith("SIG")` checks with a
`typeof event === "string"` check. Also fix process.emit to always
dispatch through EventEmitter rather than sending OS signals.
Enable test-process-emit.js and test-process-beforeexit-throw-exit.js
node compat tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hrows When a beforeExit handler throws, dispatch the exit event and terminate with process.exitCode instead of re-throwing. This matches Node.js behavior where the exit handler can override the exit code. Enable test-process-beforeexit-throw-exit.js node compat test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
process.configand its nested objects for Node.js compatibility (immutability)process.availableMemory()usingDeno.systemMemoryInfo().availableprocess.on/off/emit/prependListenerto handle Symbol event names by guardingstartsWith("SIG")checksprocess.emitto dispatch through EventEmitter instead of sending OS signalsTest plan
cargo test --test node_compat parallel -- --filter test-process-config.jscargo test --test node_compat parallel -- --filter test-process-available-memory.jscargo test --test node_compat parallel -- --filter test-process-emit.js🤖 Generated with Claude Code