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

fix(run-lifecycle): lifecycle events should run to completion in series #3262

Merged
merged 1 commit into from Jul 26, 2022

Conversation

JamesHenry
Copy link
Member

@JamesHenry JamesHenry commented Jul 26, 2022

During the difficult migration from npm-lifecycle to @npmcli/run-script (because of lack of details from npm) we missed the fact (because it is undocumented) that npm-lifecycle actually maintains a queue for lifecycle processes and so even though they are eagerly invoked they will complete in series.

This PR adds back some equivalent behavior to the new usage with @npmcli/run-script by utilizing the existing p-queue library that lerna depends upon.

It also enables a streaming/process inheritance based approach for the "let lerna publish do all the things case".


PS. This issue was discovered as a result of troubleshooting why it was that ionic needed to downgrade from v4 to v5 here: ionic-team/ionic-framework#25497

The reason this issue doesn't affect everyone in the same way as them is because ionic are running their whole build process via publish lifecycle scripts, instead of as a separate step before running publish (which is the more common pattern)

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.

None yet

1 participant