Skip to content

fix(nuxt): mark compatibility for nuxt v4 stable #3009

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

Merged
merged 2 commits into from
Jul 18, 2025

Conversation

GalacticHypernova
Copy link
Contributor

Resolves #3008

Nuxt v4 (the non-alpha version) has a version that the current compatibility string doesn't capture. This adds the new stable version to the compatibility string (we may want to combine the 2 v4 strings)

Copy link

netlify bot commented Jul 17, 2025

Deploy Preview for pinia-official canceled.

Name Link
🔨 Latest commit 1e5cf29
🔍 Latest deploy log https://app.netlify.com/projects/pinia-official/deploys/6879d4aeecd007000821a334

@@ -27,7 +27,7 @@ const module: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({
name: 'pinia',
configKey: 'pinia',
compatibility: {
nuxt: '^3.15.0 || ^4.0.0-0',
nuxt: '^3.15.0 || ^4.0.0-0 || ^4.0.0',
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! This might be a bug in the semver check instead: https://jubianchi.github.io/semver-check/#/^4.0.0-0/4.0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like we can simplify it further even
https://jubianchi.github.io/semver-check/#/^4.0.0/4.0.0-alpha

Copy link
Member

Choose a reason for hiding this comment

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

Interesting! That didn't use to be the case with npm 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed it is! But at least its a simpler syntax, so no harm in adopting it =)

Choose a reason for hiding this comment

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

This is really strange that it works because 4.0.0-alpha is clearly behind a 4.0.0 release and ^ means 'after' on the second and third digit.

Choose a reason for hiding this comment

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

image

4.0.0-alpha isn't in this range.

Copy link
Contributor Author

@GalacticHypernova GalacticHypernova Jul 19, 2025

Choose a reason for hiding this comment

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

@Barbapapazes in that case, could it actually be a display error on semver's end? I guess we should support stable releases more than alpha pre-releases, but maybe in order to support both we would need to combine the previous compatibility string with this PR's?

Copy link
Member

Choose a reason for hiding this comment

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

The current version with just the stable is fine

Copy link

pkg-pr-new bot commented Jul 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@pinia/nuxt@3009
npm i https://pkg.pr.new/pinia@3009
npm i https://pkg.pr.new/@pinia/testing@3009

commit: 1e5cf29

Copy link

codecov bot commented Jul 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.33%. Comparing base (5e95790) to head (1e5cf29).
Report is 2 commits behind head on v3.

Additional details and impacted files
@@           Coverage Diff           @@
##               v3    #3009   +/-   ##
=======================================
  Coverage   91.33%   91.33%           
=======================================
  Files          17       17           
  Lines        1397     1397           
  Branches      211      211           
=======================================
  Hits         1276     1276           
  Misses        120      120           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@posva posva merged commit c87a249 into vuejs:v3 Jul 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pinia 3.0.3 is not compitable with Nuxt 4.0
3 participants