Skip to content

Conversation

guybedford
Copy link
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
Copy link
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
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
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
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