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

Replace nightly with canary releases #9559

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

MonicaOlejniczak
Copy link
Contributor

@MonicaOlejniczak MonicaOlejniczak commented Mar 1, 2024

↪️ Pull Request

Replaces the nightly release with a canary release, which will trigger on every push to v2 instead of running every night. Other notable changes include:

  • Upgrade lerna from ^3.22.1 to ^6.6.2 to utilise the --summary-file option.

Regarding lerna, there are no notable breaking changes between versions:

  • Node v10 / v12 is not supported
  • Internally lifecycle scripts are called with @npmcli/run-script over npm-lifecycle
  • Some exports have been removed

💻 Examples

This change helps us move to trunk based development with a feature flag system as described in #9539

A working dev release enables installation of parcel@dev-test which points to the latest parcel@dev version

🚨 Test instructions

Change the target push branch to the current branch

Copy link
Contributor

@mattcompiles mattcompiles left a comment

Choose a reason for hiding this comment

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

Amazing work 🚀
I'm happy but let's make sure @devongovett is aware before merging. Not sure if he has any external reliance on nightly.

@marcins
Copy link
Contributor

marcins commented Mar 1, 2024

Amazing work 🚀 I'm happy but let's make sure @devongovett is aware before merging. Not sure if he has any external reliance on nightly.

Would it be possible to also tag each canary release as a nightly? So yarn install parcel@nightly would just give you the latest canary?

@MonicaOlejniczak
Copy link
Contributor Author

@marcins I can have a look, is that just to make this less of a breaking change?

@devongovett
Copy link
Member

so it's essentially the same just more often? I agree about adding a dist-tag for nightly as well for people currently using that.

@marcins
Copy link
Contributor

marcins commented Mar 4, 2024

so it's essentially the same just more often? I agree about adding a dist-tag for nightly as well for people currently using that.

Yeah, it's so the nightly tag still works and points to something. I don't know if that's possible to just do as an "alias" easily (i.e. point the nightly dist-tag to the latest canary) since it isn't a single package, or if it's easier to just release as both nightly and canary from the same build.

.. or I guess another option is to just keep nightly as is?

Running another lerna publish to nightly will take a bit longer as you need to run the command again with a different dist-tag - I'm not sure how much of the work Lerna can re-use, but looks like that part currently takes ~4 min - I guess you could always do it in parallel?

From the npm point of view, I don't think there's any issues with doing this.

@MonicaOlejniczak
Copy link
Contributor Author

MonicaOlejniczak commented Mar 4, 2024

@devongovett Yeah, it's the same but more frequent

@marcins It can be aliased, but it's a bit tedious to do. I've written a custom script that does this in the latest commit.

async function main(tag) {
let publishSummary = JSON.parse(
await readFile(
new URL('../lerna-publish-summary.json', import.meta.url).pathname,
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't seen this kind of pattern of using an URL in a readFile, what does it do over a readFile(path.resolve(__dirname, "../lerna-publish-summary.json"))?

Copy link
Contributor Author

@MonicaOlejniczak MonicaOlejniczak Mar 4, 2024

Choose a reason for hiding this comment

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

Neither, only just used it for the first time. It's the equivalent to your example in esm land, and will be an absolute path due to accessing pathname

Example: /parcel/lerna-publish-summary.json

@MonicaOlejniczak MonicaOlejniczak merged commit 2b91a8a into v2 Mar 4, 2024
14 of 16 checks passed
@devongovett devongovett deleted the molejniczak/canary-releases branch March 5, 2024 00:45
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