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

Follow symlinks (to support PNPM) #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Liamolucko
Copy link

At the moment, this doesn't work at all with PNPM, since it relies on Node following symlinks during module resolution. So I've made it follow symlinks.

It does seem to be a bit slower, if that's a concern:
Before, yarn node_modules: 400ms
After, yarn node_modules: 850ms
After, pnpm node_modules: 2.3s

Copy link
Owner

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

This is notably slower, can you maybe memoize the result of fs.realpath here? I suspect we're calling it on the same filepaths over and over again and we can make some assumptions here around those paths not changing while this is running

@Liamolucko
Copy link
Author

Liamolucko commented Nov 5, 2020

Okay, that seems to have reduced yarn to 600ms and pnpm to 1.3s.

@GitMurf
Copy link

GitMurf commented Aug 30, 2023

Was there ever a solution to this for pnpm? Thanks!

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.

3 participants