Skip to content

Commit

Permalink
removed references to the future in scripts docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed Aug 23, 2021
1 parent 70a94e8 commit 7181aaf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/content/using-npm/scripts.md
Expand Up @@ -203,17 +203,19 @@ will default the `start` command to `node server.js`. `prestart` and
* `test`
* `posttest`

#### [`npm uninstall`](/commands/npm-uninstall) deprecation
#### 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. Lifecycle scripts will need to be reworked in the future in order to handle cases such as:
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.

Until these nuances are addressed, `uninstall` lifecycle scripts are not implemented and will not function.
Due to the lack of necessary context, `uninstall` lifecycle scripts are not implemented and will not function.

### User

Expand Down

0 comments on commit 7181aaf

Please sign in to comment.