-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
chore(deps): update dependency vite [security] #9708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/npm-vite-vulnerability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,599
−1,744
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🔴 Critical: Unmet peer dependency — [email protected] incompatible with vite 5
[email protected]declares a peer constraint ofvite ^2 || ^3 || ^4. Upgrading vite to^5.4.21(line 18) while keeping[email protected](line 19) causesnpm installto fail with an ERESOLVE error, breaking the dev server and build for this example.This example is on Vue 2.6, which is incompatible with the maintained
@vitejs/plugin-vue2. Choose one fix:@vitejs/plugin-vue2, and optionally upgrade vite to^7.2.2per the PR objectiveOption 1: Keep Vue 2.6 — revert vite to compatible version
"devDependencies": { "typescript": "5.8.3", - "vite": "^5.4.21", + "vite": "^4.5.14", "vite-plugin-vue2": "2.0.3" }Option 2: Migrate to Vue 2.7 and @vitejs/plugin-vue2 (aligns with PR objective of vite 7)
"dependencies": { "@tanstack/vue-query": "^5.90.2", "@vue/composition-api": "1.7.2", - "vue": "2.6.14", - "vue-template-compiler": "2.6.14" + "vue": "2.7.16", + "vue-template-compiler": "2.7.16" }, "devDependencies": { "typescript": "5.8.3", - "vite": "^5.4.21", - "vite-plugin-vue2": "2.0.3" + "vite": "^7.2.2", + "@vitejs/plugin-vue2": "^2.4.0" }Then update
vite.config.jsto import and use@vitejs/plugin-vue2instead ofvite-plugin-vue2.Please clarify whether this example should remain on Vue 2.6 or migrate to 2.7 to align with the PR security update goal.
[/web_search]
[/web_search]
[/run_scripts]
🏁 Script executed:
Length of output: 14
🏁 Script executed:
Length of output: 459
🏁 Script executed:
Length of output: 32
🌐 Web query:
💡 Result:
[email protected] declares a peerDependency on vite >= 2.0.0. [1][2]
Sources:
🌐 Web query:
💡 Result:
Short answer: Likely yes — @vitejs/plugin-vue2 works with Vue 2.7 and is listed as an official Vite plugin, and there’s no public documentation saying it’s incompatible with Vite 7. However the plugin targets Vue 2.7 and is no longer actively maintained, so you may hit peer-dependency or plugin-API breakages when upgrading to Vite 7; other official/community plugins have already needed updates for Vite 7. Test in a branch and pin versions (or use a patched fork) if you hit issues. [1][2][3][4]
Sources
If you want I can:
[/web_search]
[/run_scripts]
🏁 Script executed:
Length of output: 148
🏁 Script executed:
Length of output: 79
🌐 Web query:
💡 Result:
Do you want me to look up which Vite version is listed in the peerDependencies for @vitejs/[email protected]? (I can fetch the package.json and cite the source.)
[/run_scripts]
🏁 Script executed:
Length of output: 105
🏁 Script executed:
Length of output: 86
🔴 Critical: Vite-plugin-vue2 incompatible with vite 5 — version error in Option 2, and vite.config.js must be created
[email protected] declares peer constraint
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0". Upgrading vite to^5.4.21(line 18) while keeping[email protected](line 19) causesnpm installto fail with an ERESOLVE error, breaking this example's dev server and build.Two valid paths exist:
Option 1: Keep Vue 2.6 — revert vite to ^4.x
"devDependencies": { "typescript": "5.8.3", - "vite": "^5.4.21", + "vite": "^4.5.14", "vite-plugin-vue2": "2.0.3" }Option 2: Migrate to Vue 2.7 and @vitejs/plugin-vue2
@vitejs/plugin-vue2 latest (2.3.4) supports
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", and @tanstack/[email protected] supports"vue": "^2.6.0", making Vue 2.7.16 compatible.Update
package.json:"dependencies": { "@tanstack/vue-query": "^5.90.2", "@vue/composition-api": "1.7.2", - "vue": "2.6.14", - "vue-template-compiler": "2.6.14" + "vue": "2.7.16", + "vue-template-compiler": "2.7.16" }, "devDependencies": { "typescript": "5.8.3", - "vite": "^5.4.21", - "vite-plugin-vue2": "2.0.3" + "vite": "^7.2.2", + "@vitejs/plugin-vue2": "^2.3.4" }Create
vite.config.js(file does not currently exist):Clarify whether this example should remain on Vue 2.6 (requiring Option 1) or migrate to 2.7 (Option 2).