Repository navigation
fix: resolve symlinks for pnpm windows bundle - #278
Merged
Merged
Conversation
Compress-Archive can't store symlinks the way zip -y does, so pnpm's node_modules layout produced broken bundles on Windows. Dereference symlinks in node_modules before compressing. Fixes #183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase of #192 onto main. Same fix as Ben's original, minus the stale lockfile changes.
Compress-Archive doesn't support storing symlinks like
zip -ydoes, so on Windows the pnpm node_modules layout ended up broken in the bundle. Walk node_modules, replace each symlink with a dereferenced copy, then compress.Two small changes from the original: the temp copy is created next to the symlink instead of in the OS temp dir (renameSync fails across volumes on Windows, and Temp is often on a different drive than the project), and
Dirent.parentPathreplaces the deprecatedDirent.path.Fixes #183