Skip to content

Add further process private exports#5131

Merged
guybedford merged 2 commits intomainfrom
gbedford/process-private-exports
Sep 20, 2025
Merged

Add further process private exports#5131
guybedford merged 2 commits intomainfrom
gbedford/process-private-exports

Conversation

@guybedford
Copy link
Copy Markdown
Contributor

Adds a simple implementation for _rawDebug.

Also adds _events, _eventsCount, _maxListeners event properties.

And adds _disconnect, _handleQueue, _pendingMessage, _channel, _send all as undefined.

@guybedford guybedford requested review from a team as code owners September 19, 2025 00:21
@guybedford guybedford requested a review from a team September 19, 2025 00:21
@guybedford guybedford requested a review from a team as a code owner September 19, 2025 00:21
Copy link
Copy Markdown
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some tests please?

@guybedford guybedford force-pushed the gbedford/process-private-exports branch from c7395c9 to 3deb888 Compare September 19, 2025 22:35
@guybedford
Copy link
Copy Markdown
Contributor Author

Added further testing which fully covers what throws and what is undefined.

@guybedford guybedford enabled auto-merge (squash) September 19, 2025 22:42
@vicb
Copy link
Copy Markdown
Contributor

vicb commented Sep 20, 2025

@guybedford we mentioned that some APIs were not exported by name (i.e. on, off, ...). Do you want to update this PR with them or do you plan to create a follow up PR?

Edits:

  • we will probably wait for everything to be in before updating the unenv preset,
  • could you please cc @petebacondarwin and I on native module updates.

Thx

@guybedford
Copy link
Copy Markdown
Contributor Author

guybedford commented Sep 20, 2025

@vicb process.on is a prototype property not an export, so process.on exists, but import { on } from 'node:process' does not. That is, we implement all these fine.

@guybedford guybedford merged commit e2981b7 into main Sep 20, 2025
21 of 23 checks passed
@guybedford guybedford deleted the gbedford/process-private-exports branch September 20, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants