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(rebuild): don't run lifecycle scripts twice on linked deps #4529

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Mar 9, 2022

Fixes #2905

@wraithgar wraithgar requested a review from a team as a code owner March 9, 2022 22:08
@wraithgar
Copy link
Member Author

While we're looking at lifecycle scripts + linked deps we may want to see if #3918 is related enough to address in the same PR

Copy link
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

it would be nice to have a test that throws if a lifecycle script runs a second time, that can now pass with this change 😁


// links should also run prepare scripts and only link bins after that
if (type === 'links') {
// links should run prepare scripts and only link bins after that
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment sounds off now 🤔 maybe just remove it

@ruyadorno ruyadorno added Release 8.x work is associated with a specific npm 8 release semver:patch semver patch level for changes labels Mar 9, 2022
@wraithgar
Copy link
Member Author

it would be nice to have a test that throws if a lifecycle script runs a second time, that can now pass with this change 😁

I'm gonna need help w/ that one and planned on pairing w/ someone for this.

Copy link
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

Let's land this in time for today's release and backlog an issue to work on a test later on.

ref: npm/statusboard#439

@n8agrin
Copy link

n8agrin commented Mar 28, 2022

There is suspicion that this PR caused lifecycle scripts in workspaces to stop working in 8.5.4. Bug is #4552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 8.x work is associated with a specific npm 8 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] "npm rebuild" runs any symlinked package's lifecycle scripts twice.
3 participants