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

realpath performance improvements + error handling #125

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Aug 12, 2023

The PR does 2 things:

  • Use fs.realpathSync.native in non-Windows environments and use fs.realpathSync on Windows
  • Caching NodeModule.realpath getter
  • Make NodeModule.realpath fall back to NodeModule.path when encountering an ENOENT error.
    • When using the package.json's overwrites field with @favware/skip-dependency, the module will have a symlink point to a non-existing path, causing fs.realpathSync to choke.

Copy link
Owner

@ranyitz ranyitz left a comment

Choose a reason for hiding this comment

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

Thanks @SukkaW! That looks great 👍

@ranyitz ranyitz merged commit 52933c1 into ranyitz:master Aug 12, 2023
10 checks passed
@ranyitz
Copy link
Owner

ranyitz commented Aug 12, 2023

This is available on qnm@2.10.2 🎉

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.

None yet

2 participants