Skip to content
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

Upgrade to Vite 6 #310

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
node-version: [18.x, 20.x, 22.x, latest]

steps:
- name: Checkout code
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"esbuild": "0.16.10",
"eslint": "^8.14.0",
"typescript": "^4.6.4",
"vite": "^5.0.0",
"vite": "^6.0.0",
"vitest": "^0.34.4"
},
"peerDependencies": {
"vite": "^5.0.0"
Comment on lines -52 to -56
Copy link
Member Author

@timacdonald timacdonald Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped this straight to v6 instead of support both v5 and v6.

The Vite plugin is extremely stable and is feature complete.

I don't think we need to support both versions. You can stay on the current version until you are ready to update to Vite 6.

This will help keep our maintenance cost to a minimum.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t that make it to version 2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not according to semver.

See: https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api

You will need to upgrade to Vite 6 in your own project.

Copy link

@meduzen meduzen Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the laravel-vite-plugin is not a standalone and requires vite to work, I’d consider the drop of Vite 5 to be a breaking change.

It becomes quickly complicated for users if they have to wonder if any minor/patch update will stop to work with their current setup. I would prefer a breaking, it sends a clearer signal.

What do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just ran npm update (after v1.1.0 was released) and got this...

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: undefined@undefined
npm error Found: [email protected]
npm error node_modules/vite
npm error   dev vite@"^5.4.10" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vite@"^6.0.0" from [email protected]
npm error node_modules/laravel-vite-plugin
npm error   dev laravel-vite-plugin@"^1.0.5" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also get the same message

Copy link

@elvisblanco1993 elvisblanco1993 Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to change the vite version to "vite": "^6.0" in your package.json file. Then you should be able to update.

image

"vite": "^6.0.0"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
},
"dependencies": {
"picocolors": "^1.0.0",
Expand Down