Skip to content

Conversation

@schirrel
Copy link
Contributor

@schirrel schirrel commented Mar 19, 2025

πŸ”— Linked issue

Fix for #697

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The code verify if the pkgVersion is only a single number to then perform a search for the highest major version.

Previously PR fix part of the problem but not allow to install full package from a single major version.
This PR enhance the nuxi module add to allowing it to find a Nuxt Module full version when only a major is specified.
Without this PR:
Screenshot 2025-03-19 at 17 20 44

With this PR:

Screenshot 2025-03-20 at 06 53 52

Regression:

default installation not affected

Screenshot 2025-03-19 at 17 19 53

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 19, 2025

Open in Stackblitz

npm i https://pkg.pr.new/create-nuxt@803
npm i https://pkg.pr.new/nuxi@803
npm i https://pkg.pr.new/@nuxt/cli@803

commit: 6544184

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Please upload report for BASE (main@d71c287). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #803   +/-   ##
=======================================
  Coverage        ?   13.40%           
=======================================
  Files           ?       68           
  Lines           ?     3476           
  Branches        ?       99           
=======================================
  Hits            ?      466           
  Misses          ?     2979           
  Partials        ?       31           

β˜” 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.

@schirrel schirrel changed the title Fix/module add with major version fix: module add with major version Mar 19, 2025
@maximepvrt
Copy link

Awesome, I just tested it, but it doesn't work with minor versions: nuxi module add @nuxt/content@2.13

@schirrel
Copy link
Contributor Author

@maximepvrt @danielroe all set and done guys πŸ™πŸ»

@schirrel schirrel changed the title fix: module add with major version fix: module add find full version when not full semver pattern is given Mar 20, 2025
@schirrel schirrel requested a review from danielroe March 21, 2025 11:35
@danielroe danielroe changed the title fix: module add find full version when not full semver pattern is given fix(module): resolve semver module versions Mar 21, 2025
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

this looks good to me! let me know if I've missed something in your implementation when porting it to use semver ranges πŸ™

@danielroe danielroe merged commit 54e9850 into nuxt:main Mar 21, 2025
8 of 11 checks passed
@github-actions github-actions bot mentioned this pull request Mar 21, 2025
@schirrel
Copy link
Contributor Author

@danielroe sure, i was making some experiments on using semver lib but could not finish that, as soon as i can i will update that.
Thanks

@danielroe
Copy link
Member

no worries! i pushed directly

@github-actions github-actions bot mentioned this pull request Mar 31, 2025
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.

4 participants