[BUG] Removing dependency from workspace package leads to invalid lockfile #2162
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
Current Behavior:
When removing a dependency from a workspace package's
package.json
and executingnpm install
in the workspace root to update itspackage-lock.json
(as discussed in #2036 and #1984), the file structure ends up in an invalid state where theversion
property holds the URL from theresolved
property, instead of removing the whole dependency block. See this changeset afternpm install
:Expected Behavior:
package-lock.json
is in a valid state and all artifacts of the removed dependency are removed from the lockfile.Steps To Reproduce:
workspaceRoot/packages/package-a/package.json
npm install
inworkspaceRoot/
Environment:
The text was updated successfully, but these errors were encountered: