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: add script to make versioning and publishing prereleases easier #2206

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

massao
Copy link
Contributor

@massao massao commented Sep 8, 2022

Purpose of PR

Add script to make the handling of prereleases packages easier.

The script will handle:

  • bumping the version according to the selected prerelease (alpha, beta)
  • adding to the ignore field on changeset configuration
  • publish to npm

PS: kept with the --dry-run flag for now for testing, will remove it before merging into main

@changeset-bot
Copy link

changeset-bot bot commented Sep 8, 2022

⚠️ No Changeset found

Latest commit: c7abb32

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Sep 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
forma-36 ✅ Ready (Inspect) Visit Preview Sep 13, 2022 at 1:36PM (UTC)

@massao massao marked this pull request as ready for review September 8, 2022 13:27
@massao massao requested review from a team, mshaaban0 and Lelith as code owners September 8, 2022 13:27
@massao massao requested a review from denkristoffer September 8, 2022 13:27
@github-actions
Copy link

github-actions bot commented Sep 8, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
CommonJS 120.59 KB (0%) 2.5 s (0%) 459 ms (+19.78% 🔺) 2.9 s
Module 118.39 KB (0%) 2.4 s (0%) 332 ms (+7.18% 🔺) 2.7 s

Copy link
Collaborator

@Lelith Lelith left a comment

Choose a reason for hiding this comment

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

thank you so much for taking care of this!

@denkristoffer
Copy link
Collaborator

How, if at all, does this handle having both a stable and a prerelease version of a component? Is that even possible?

@massao
Copy link
Contributor Author

massao commented Sep 12, 2022

How, if at all, does this handle having both a stable and a prerelease version of a component? Is that even possible?

It doesn't, it could be possible with a bit more tweaking, because we would need to know if it is a new prerelease our going back to a previous one have to store the information of the prerelease somehow, so there is no version conflict, e.g:

alpha -> stable fix -> back to alpha = `alpha.x`
or
alpha -> merge alpha -> new alpha = `4.x.x-alpha.0`

~~For that we could have a json file that store the prerelease versions that weren't merged into stable yet, but we would need to also add a command to mark that we will merge a prerelease package into stable. 🤔 ~~
But the code of the component would be all messed up with that.

Nevermind that, since need the prerelease code on the main branch so it shows up on the website, once a package enter a prerelease state, it will only receive a new stable version if that prerelease is completed.
Otherwise we would have a new stable release but with prerelease code

@denkristoffer
Copy link
Collaborator

I think that's okay, but we should add documentation specifying that prerelease is only for new components. Or something like that. What do you think?

@massao massao merged commit c75ecd0 into main Sep 13, 2022
@massao massao deleted the chore/BAU-912 branch September 13, 2022 16:13
@massao massao restored the chore/BAU-912 branch September 13, 2022 16:14
denkristoffer pushed a commit to Wake1st/forma-36 that referenced this pull request Oct 5, 2022
contentful#2206)

* chore: add prerelease script to make creating prereleases easier

* chore: improve prerelease script and add ignore field on changeset config

* docs: improve documentation around prereleases

* docs: add note about prereleases being only for new packages
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.

3 participants