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

Run prepublish build after versioning #12028

Merged
merged 2 commits into from Sep 3, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Sep 1, 2020

Q                       A
Fixed Issues? After make new-version is run, make publish will fail because committed changes of yarn.lock.
License MIT

This PR reorders workflows in publish-test to align with our actual workflow. I added a "version" lifecycle event: So when we run lerna version, it will invoke the version lifecycle event after package.json is updated but before it is committed: See also https://github.com/lerna/lerna/tree/master/commands/version#lifecycle-scripts

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Sep 1, 2020
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/28230/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 1, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6305cf4:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

👍

@@ -8,7 +8,8 @@
"build": "make build",
"fix": "make fix",
"lint": "make lint",
"test": "make test"
"test": "make test",
"version": "yarn --immutable-cache && git add yarn.lock"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

--immutable-cache is used here to bail when new dep needs to be fetched from network, which can happen when people edit external deps in package.json but forget to checkout the updated yarn.lock, and if that happens it should be addressed in separate commits instead of the version commit. In all, the version commit should include the following changes only:

  • Updated version in related package.json
  • Updated workspace@new-version resolution in yarn.lock

@JLHwung JLHwung merged commit 2026a42 into babel:main Sep 3, 2020
@JLHwung JLHwung deleted the run-prepublish-build-after-versioning branch September 3, 2020 12:25
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Dec 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants