diff options
author | Nathan Fritz <fritzy@github.com> | 2021-08-24 01:56:23 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-08-24 19:08:15 +0300 |
commit | 957fa604035992285572f63c38545eea86bbb1ff (patch) | |
tree | 85bfe231058415230af2ffb2a98789d1d3f2e0ff /docs | |
parent | 52401fd45ae98f44a00350df66fdba313e3deab3 (diff) |
docs: clarify uninstall lifecycle script
PR-URL: https://github.com/npm/cli/pull/3681
Credit: @fritzy
Close: #3681
Reviewed-by: @wraithgar
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/using-npm/scripts.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md index 8fd5c5c0d..e033afd30 100644 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -203,6 +203,19 @@ will default the `start` command to `node server.js`. `prestart` and * `test` * `posttest` +#### A Note on a lack of [`npm uninstall`](/commands/npm-uninstall) scripts + +While npm v6 had `uninstall` lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful. + +Reasons for a package removal include: + +* a user directly uninstalled this package +* a user uninstalled a dependant package and so this dependency is being uninstalled +* a user uninstalled a dependant package but another package also depends on this version +* this version has been merged as a duplicate with another version +* etc. + +Due to the lack of necessary context, `uninstall` lifecycle scripts are not implemented and will not function. ### User |