Repository navigation
plugin-materialize-virtual-workspaces-v1.2: Only remove virtual slug subdirs instead of rm -rf'ing virtualFolder
·
1 commit
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.1
- Tighten cleanup. Previous versions removed the whole
virtualFolder(default.yarn/__virtual__) withrm -rfat the start of every install. That's correct under default config but offers no guard against a misconfiguredvirtualFolder. v1.2 listsvirtualFolderand removes only entries matching the slug pattern (-virtual-<hex>$). Standard.yarnsiblings (cache,plugins,sdks,install-state.gz, …) don't match, so even if the config ever resolves to.yarnitself, nothing important would be deleted.
Installation
yarn plugin import https://github.com/dobesv/berry/releases/download/plugin-materialize-virtual-workspaces-v1.2/plugin-materialize-virtual-workspaces.js