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

Add toValidSemver utility function #4113

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

vitaliemiron
Copy link
Contributor

@vitaliemiron vitaliemiron commented Apr 5, 2023

This PR introduces the toValidSemver utility function, ensuring that a given version string complies with the SemVer specification. The function adds a .0 patch version if the input string only consists of a major and minor version (e.g., "1.2" becomes "1.2.0").

I added this function to handle cases where the package version is provided in a shortened format, which might cause issues with SemVer-compliant tools or libraries, such as semver.satisfies. Using toValidSemver ensures that version strings are always in a valid format, preventing potential problems and improving compatibility across our codebase.

Closes: #4112

What are the changes and their implications?

Bug Checklist

  • Changeset added (run pnpm changeset in the root directory)
  • Integration test added (see test docs if needed)

Feature Checklist

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

🦋 Changeset detected

Latest commit: 75661d8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
blitz Patch
next-blitz-auth Patch
@blitzjs/auth Patch
@blitzjs/next Patch
@blitzjs/rpc Patch
@blitzjs/codemod Patch
@blitzjs/config Patch
@blitzjs/generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

.changeset/plenty-gifts-provide.md Outdated Show resolved Hide resolved
Copy link
Member

@siddhsuresh siddhsuresh left a comment

Choose a reason for hiding this comment

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

LGTM!

@flybayer flybayer added the 0 - <(^_^)> - merge it! ✌️ Kodiak automerge label Apr 7, 2023
@kodiakhq kodiakhq bot merged commit 38d945a into blitz-js:main Apr 7, 2023
@blitzjs-bot
Copy link
Contributor

Added @vitaliemiron contributions for doc and code

@blitzjs-bot blitzjs-bot added this to Done in Toolkit Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

A new app generated by blitz new causes Error: DYNAMIC_SERVER_USAGE
4 participants