Skip to content

Conversation

Fdawgs
Copy link
Contributor

@Fdawgs Fdawgs commented Feb 27, 2025

Description

Adds missing node: prefix on imports of builtin modules.

Motivation and Context

Allows redundant require.cache calls to be bypassed for builtin modules, saving a few yoctoseconds.

See https://nodejs.org/api/modules.html#core-modules and discussion in nodejs/node repo regarding why require.cache calls are redundant for builtins.

Usage examples

N/A

How Has This Been Tested?

Ran existing tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@escapedcat escapedcat merged commit 0cd8f41 into conventional-changelog:master Feb 28, 2025
7 checks passed
@escapedcat
Copy link
Member

"yoctoseconds" 🚀 🚀 🚀 🚀 🚀

Thanks!

@Fdawgs Fdawgs deleted the perf/node-prefix branch February 28, 2025 16:38
@escapedcat
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants