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

[Feature] support for nightly versioning #6583

Open
2 tasks done
snowystinger opened this issue Oct 29, 2024 · 0 comments
Open
2 tasks done

[Feature] support for nightly versioning #6583

snowystinger opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@snowystinger
Copy link

snowystinger commented Oct 29, 2024

  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

As a developer, I often want to do publish all of my packages daily, but I need to coordinate (pin) all the versions of my packages.

Describe the solution you'd like

I'd like to be able to use yarn version to apply my changes, which I've set up like so

    "version:nightly": "yarn workspaces foreach --all --no-private -t version -d 3.0.0-nightly-$(git rev-parse --short HEAD)-$(date +'%y%m%d') && yarn version apply --all",
    "publish:nightly": "yarn workspaces foreach --all --no-private -t npm publish --tag nightly --access public",

except that in our monorepo, all of our interworkspace dependencies use range dependencies, which, when published to npm, remain and resolve incorrectly.

I'd like for yarn version apply to take a flag to remove the range dependency.

For example, one of our packages

"@react-stately/layout": "^3.0.0-nightly-fb28ab3b4-241024" actually resolves to 3.13.9

Describe the drawbacks of your solution

there shouldn't be any drawbacks

Describe alternatives you've considered

When we switch to the workspace protocol, it'd be simple enough to strip the range through sed or an equivalent.
We could also write a plugin, however, most of the logic already exists in version, so it seems silly to copy all of that for this, when it would probably be used by others. This is the same versioning scheme that other libraries use.

@snowystinger snowystinger added the enhancement New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant