diff options
author | Gar <gar+gh@danger.computer> | 2022-03-24 19:07:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 19:07:44 +0300 |
commit | 81afa5a8838c71a3a5037e2c8b4ae196e19fe0d7 (patch) | |
tree | d8d65a60bde6f6b913babe6f19f9b79099857b78 /lib/utils | |
parent | 98bfd9a8cc23930e6becd15fffabadd1c269b0a2 (diff) |
fix(unpublish): properly apply publishConfig (#4601)
The tests for unpublish were mocked so heavily they weren't actually
asserting anything. In rewriting them several bugs were found.
- `write=true` was not being consistenly used when fetching packument
data, it is now.
- The decision on when to load the local package.json file was not
working at all, that has been fixed. If the cwd contains a
package.json whose name matches the package you are uninstalling, the
local package.json will be read and its publishConfig applied to your
request.
- dead code inside the `npm unpublish` path was removed. There is no
need to check if you are unpublishing the last version here, you're
already unpublishing the entire project.
- publishConfig is now being applied through the config flatten method,
not a raw object assignment.
Diffstat (limited to 'lib/utils')
0 files changed, 0 insertions, 0 deletions