Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor node:module #14227

Merged
merged 9 commits into from
Oct 3, 2024
Merged

Refactor node:module #14227

merged 9 commits into from
Oct 3, 2024

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Sep 28, 2024

What does this PR do?

Refactor node:module to add missing properties and be a lot closer to what Node does

Main goal of this PR is to unblock optimizing _resolveFilename, which is used heavily by Next.js and shows up near the top when profiling.

Fixes #6227
Fixes #8974

How did you verify your code works?

Draft. Something is wrong currently with the static hash table causing it to never materialize the properties.

Copy link
Member

Choose a reason for hiding this comment

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

this file does not seem to be formatted correctly

@Jarred-Sumner Jarred-Sumner marked this pull request as ready for review October 3, 2024 07:49
@Jarred-Sumner Jarred-Sumner merged commit 4d4dd1c into main Oct 3, 2024
45 of 49 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/module-module branch October 3, 2024 07:54
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.

require.resolve unable to find node module require('node:module')._preloadModules is not a function.
3 participants