Fix scanning Yarn PnP workspace packages - #20485
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. WalkthroughThe Vite plugin now resolves Yarn PnP virtual source paths before constructing its scanner. It preserves paths that resolve inside zip archives. A new integration test creates a Yarn 4 workspace, verifies virtual dependency resolution, runs a Vite build, and checks that expected utilities are generated while excluded utilities are absent. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The Yarn PnP scanner-path change is covered by an integration test and does not leave a concrete merge-blocking risk. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
resolveVirtualcan still return a path inside a ZIP archive; this is not a general PnP filesystem implementation.source(none), an explicit source, a negated source, prefixing, and a relative JS plugin.Fixes #17739.
Test plan
The packed-artifact regression was checked against an unmodified current-main Vite tarball: baseline fails to emit the workspace utilities, the candidate passes, swapping back to baseline fails again, and restoring the candidate passes. A normal non-PnP Vite smoke build produced byte-identical CSS, and an alternating 20-build benchmark showed no meaningful overhead.
Scope
This fixes scanning for Yarn virtual packages backed by real files. It intentionally does not make Oxide scan Yarn ZIP archives or Vite in-memory virtual modules.