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

GLSP-1298: Add updateNext command #1299

Merged
merged 2 commits into from Apr 12, 2024
Merged

GLSP-1298: Add updateNext command #1299

merged 2 commits into from Apr 12, 2024

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Mar 26, 2024

What it does

Add updateNext command that serves as a replacement for the (currently broken) update:next scripts in GLSP repos.

It automatically scanns all workspace pacakges for next dependencies, resolves the latest next version for these dependencies and then updates the yarn.lock by temorAdd updateNext command that serves as a replacement for the (currently broken) update:next scripts in GLSP repos.

It automatically scanns all workspace pacakges for next dependencies, resolves the latest next version for these dependencies and then updates the yarn.lock by temorary adding a resolutions block to the root package.json to enforece an update.

Fixes #1298

How to test

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
    ary adding a resolutions block to the root package.json to enforece an update.

Add `updateNext` command that serves as a replacement for the (currently broken) update:next scripts in GLSP repos.

It automatically scanns all workspace pacakges for `next` dependencies, resolves the latest `next` version for these dependencies and then updates the `yarn.lock` by temorary adding a `resolutions` block to the root package.json to enforece an update.

Fixes #1298
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

Very nice, thank you Tobias!

Script looks good to me for the most part. However, I detected a small improvement and we need some error fix or handling for the JSON processing.

dev-packages/cli/src/commands/update-next.ts Outdated Show resolved Hide resolved
dev-packages/cli/src/commands/update-next.ts Show resolved Hide resolved
@tortmayr
Copy link
Contributor Author

@martin-fleck-at Thanks for the review.
I addressed your comments and also added a pre-condition check to ensure that we don't execute the command if there are uncommited changes in the root package.json.

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

LGTM!

@tortmayr tortmayr merged commit b5aff4f into master Apr 12, 2024
5 checks passed
@tortmayr tortmayr deleted the glsp-1298 branch April 12, 2024 14:56
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.

Rework update:next script
2 participants