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

[BUG] 7.20.0 - incorrect interaction with workspace postinstall scripts (worked on 7.19.1) #3553

Closed
1 task done
TomFoyster opened this issue Jul 16, 2021 · 3 comments
Closed
1 task done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@TomFoyster
Copy link

TomFoyster commented Jul 16, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running npm i from the project root - the script referenced as the postinstall script in the workspace package json is called. This should not be called when installing from the project root.

Expected Behavior

As in 7.19.1, when running npm i from the project root - the script referenced as the postinstall script in the workspace package json is not called.

Steps To Reproduce

Please see https://github.com/TomFoyster/npm.7.20.0.bug

Environment

  • OS: Mac OS 11.2.3
  • Node: 15.4.0
  • npm: 7.20.0
@TomFoyster TomFoyster added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Jul 16, 2021
@TomFoyster TomFoyster changed the title [BUG] 7.20.0 - incorrect interaction with workspace postinstall scripts [BUG] 7.20.0 - incorrect interaction with workspace postinstall scripts (worked on 7.19.1) Jul 16, 2021
@TomFoyster
Copy link
Author

Apologies - the attached repo has now been made public.

@gavinsharp
Copy link

Why don't you expect postinstall to be called in this scenario? Per #3065 and #2900 I think the behaviour change in 7.20.0 was a bug fix for previously broken functionality.

@nlf
Copy link
Contributor

nlf commented Mar 8, 2022

Why don't you expect postinstall to be called in this scenario? Per #3065 and #2900 I think the behaviour change in 7.20.0 was a bug fix for previously broken functionality.

this is exactly the case. the postinstall script for each workspace is meant to be run in this use case. i'm closing this as the current behavior is the intended one.

@nlf nlf closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants