Conversation
The remote library template can retain an older vite-plus range while project setup injects the current core override. Pin the newly scaffolded library to the creating CLI before integration, without changing migration rules for existing projects.
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.
Problem
Running
vp create vite:library --package-manager npmwith Vite+ 0.3.2 generates a project with mismatched toolchain versions:vite-plusis declared as^0.2.4and installs as 0.2.9.viteoverride points to@voidzero-dev/vite-plus-core@0.3.2.The library comes from a remote template whose Vite+ dependency can lag behind the CLI. Scaffolding preserves that dependency, while project setup writes the current CLI's core override. The reproduced project still passes its checks, test and packaging; the confirmed defect is the version mismatch.
Fix
Set the newly downloaded built-in library's
vite-plusdev dependency toVITE_PLUS_VERSIONbefore project integration. The dependency and toolchain override then use the same version, and subsequent workspace integration can still convert the dependency to a catalog reference.The change is confined to
vite:librarycreation. It preserves unrelated dependencies and the existing migration rules for user-owned version pins, including the boundary established in #1697.Verification
cargo test -p vp_cli_snapshots --offline -- create_library_npm: 1 case passed, asserting that both the declared and installed Vite+ versions match the core override.The full CLI snapshot suite was not run; CLI verification covered the npm library case above.