You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3600b05
Browse filesBrowse the repository at this point in the historyBrowse files
fix: remove a dependency whose manifest is malformed (#17828)
`removeBinsOfDependency` read the removed dependency's manifest with
`safeReadPackageJsonFromDir`, which throws on a malformed
`package.json`. The isolated linker's prune, the hoisted stale-link
pass with a real `.bin`, and the hoisted orphan cleanup all go through
it, so a malformed manifest failed the install before the dependency
was removed. v12 skips the bins and removes the dependency.
A new `safeReadDependencyManifest` returns `undefined` for a missing or
malformed manifest, or one under a path that is not a directory, and
rethrows other errors, as v12 does. `removeBinsOfDependency` and the
hoisted stale-link pass both use it. Both stacks' tests now cover the
removal under each linker, with and without a real `.bin`.
Closespnpm/tasks#295
pnpm no longer fails to remove a dependency whose `package.json` is malformed. It removes the dependency and keeps its bins [pnpm/tasks#295](https://github.com/pnpm/tasks/issues/295).
0 commit comments