Skip to content

Fix publishing process - #7039

Closed
yavorsky wants to merge 7 commits into
babel:masterfrom
yavorsky:fix-publishing-process
Closed

yavorsky wants to merge 7 commits into
babel:masterfrom
yavorsky:fix-publishing-process

Conversation

@yavorsky

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #6174
Patch: Bug Fix? 👍
Major: Breaking Change? 🙅
Minor: New Feature? 🙅
Tests Added + Pass? 🙅
Documentation PR 🙅
Any Dependency Changes? 🙅
License MIT

When we are publishing new packages, we run BABEL_ENV=production make build-dist first, and only then lerna publish. During build-dist process we creating standalone bundles, it takes version from babel-core, which wasn’t actually updated yet, because it will be updated during lerna publish on the next step.

Proposed solution runs lerna publish 2 times: firstly - before build-dist with --skip-npm --skip-git --skip-temp-tag arguments, so we just overriding versions for all packages.
For the second run, we ignore step where we select the version and just take it from the lerna.json, which was updated during the first lerna publish, so it just publishes the new version and creates git commit.

cc @Daniel15

@babel-bot

babel-bot commented Dec 17, 2017 •

Copy link
Copy Markdown
Collaborator

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

@babel-bot

Copy link
Copy Markdown
Collaborator

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

@Daniel15

Copy link
Copy Markdown
Member

This seems reasonable to me. It would be good if Lerna had better support for this, since it'll come up for any project that uses Lerna + embeds the version number in the resulting bundle.

@yavorsky yavorsky added the PR: Needs Review A pull request awaiting more approvals label Dec 17, 2017
@loganfsmyth

Copy link
Copy Markdown
Member

One alternative is that we use a prepublish or version script to build the bundles after the version has been updated in the package. I'm probably most in favor of that because it also means that we could make the day-to-day development steps use the normal non-bundled files.

@yavorsky

yavorsky commented Dec 27, 2017 •

Copy link
Copy Markdown
Member Author

I've added version script to the babel-standalone and babel-preset-env-standalone, because prepublish runs on every lerna bootstrap before any builds.
I've tested it with my pet project, but still needs a review.

@xtuc

xtuc commented Nov 6, 2018

Copy link
Copy Markdown
Member

Do you still need this or could we close it?

@xtuc xtuc added the i: stale label Nov 6, 2018
@lock lock Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

i: stale outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Needs Review A pull request awaiting more approvals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

babel-standalone version number runs behind the actual version number

5 participants