WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[code-infra] Version script update #921

@Janpot

Description

@Janpot

problem:

Current version script relies on lerna version. This has some disadvantages:

  • Have to specify a version for each changed package, even though for most packages we just follow the current release line
  • Cumbersome and error prone to rebase release PRs. a previously unchanged package may now have changes and require a version bump. This needs to be manually adjusted and sometimes gets forgotten.

proposal:

a new code-infra version script:

  • Check whether current main version (from root package.json) is published, use release tag to check
    • if yes, ask for a new version number
    • if no, ask if you want to keep the current version number, or move to a different one
  • Updates root package.json if necessary
  • Find changed packages and all of their dependants recursively.
  • Set new version of changed packages and dependants
  • Make sure it's idempotent for the same commit

Also add a --verify mode which doesn't update but which verifies:

  • The current main version is unpublished
  • The version update logic of packages wouldn't cause any changes

Run this mode in CI on release PRs.

We can likely reuse some of the primitives we built for the changelog generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: code-infraInvolves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions