Repository navigation
plugin-materialize-virtual-workspaces-v1.1: Bypass PnP-patched fs when creating virtual workspace symlinks
·
2 commits
to plugin-materialize-virtual-workspaces
since this release
Docs
Workaround for
yarnpkg/berry#6871 — node --watch (and other file-watching / dependency-analysis tools) don't see changes in PnP workspaces with peer dependencies, because the resolved path lives under .yarn/__virtual__ and that path doesn't exist on disk. This plugin creates real symlinks at those paths after every install.
Changes since v1.0
- Bypass PnP-patched fs when creating virtual workspace symlinks. v1.0 routed its calls through
@yarnpkg/fslib'sxfs, which Yarn's PnP runtime had patched to remap.yarn/__virtual__paths back to their real targets — defeating the entire point of the plugin and producingEEXISTerrors in real monorepos. v1.1 usesnode:fsdirectly. (yarn installnow succeeds on monorepos with many virtualized workspaces.)
Installation
yarn plugin import https://github.com/dobesv/berry/releases/download/plugin-materialize-virtual-workspaces-v1.1/plugin-materialize-virtual-workspaces.js