Skip to content

Conversation

@mfdebian
Copy link
Contributor

These CJS examples on the Events docs were missing their node:processrequire statements.

With this change they'd all match their ESM counterparts.

Best regards!

@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter. labels Aug 6, 2024
@aduh95
Copy link
Contributor

I don't think this is necessary, global.process and require('node:process') reference the same value, and contrarily to ESM in which we have lint rules to not rely on Node.js-specific globals, it seems fine for CJS to use those.

@mfdebian
Copy link
ContributorAuthor

Oh ok! No problem! I just thought about making this change because I had previously made a similar PR that got merged, but if it's not really necessary I'll close it. Thanks for the review! 🙌

@mfdebianmfdebian closed this Aug 6, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.eventsIssues and PRs related to the events subsystem / EventEmitter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mfdebian@aduh95@nodejs-github-bot