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

chore(repo): Prepend commit hash with a char in prereleaseTemp #1888

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

nikosdouvlis
Copy link
Member

We recently found out that npm may incorrectly treat a part of the version as a number instead of a string when it only contains numeric characters.

This can cause rare issues when a version only contain numeric characters and it begins with a leading 0, as this 0 will be dropped when npm parses the version as a number.

For example, if we release 4.61.1-staging.0175607 it will end up on npm as 4.61.1-staging.175607

In order to fix this, we simply prepend the verson with a non-numeric character

Description

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

We recently found out that `npm` may incorrectly treat a part of the version as a number instead of a string when it only contains numeric characters.

This can cause rare issues when a version only contain numeric characters and it begins with a leading `0`, as this `0` will be dropped when `npm` parses the version as a number.

For example, if we release `4.61.1-staging.0175607` it will end up on `npm` as `4.61.1-staging.175607`

In order to fix this, we simply prepend the verson with a non-numeric character
@nikosdouvlis nikosdouvlis requested a review from a team as a code owner October 16, 2023 08:20
@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2023

🦋 Changeset detected

Latest commit: b940d81

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@nikosdouvlis nikosdouvlis self-assigned this Oct 16, 2023
Copy link
Member

@kostaspt kostaspt left a comment

Choose a reason for hiding this comment

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

🚀

@nikosdouvlis nikosdouvlis merged commit cc9c483 into main Oct 16, 2023
11 of 12 checks passed
@nikosdouvlis nikosdouvlis deleted the nikos/fix-npm-changeset-issue branch October 16, 2023 08:25
@clerk-cookie
Copy link
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants