Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] scripts.md promotes the use of deprecated and otherwise discouraged features #3992

Open
1 task done
m132 opened this issue Nov 4, 2021 · 0 comments
Open
1 task done
Labels
Bug thing that needs fixing Documentation documentation related issue Release 8.x work is associated with a specific npm 8 release

Comments

@m132
Copy link

m132 commented Nov 4, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Since at least 2015, the documentation has mentioned that prepublish scripts[1], as well as install scripts[2] are discouraged, with the former also being deprecated. Conversely, the section immediately following the deprecation notice of prepublish recommends using it for transpilation and fetching remote resources.

Similarly, the only examples[3] on the page showcase the use of the recently removed uninstall script[4] along with install being used to execute Unix Make scripts, discouraged in favor of node-gyp (and ironically, prepublish scripts) just two sections later.

Expected Behavior

Documentation is consistent and leaves the reader informed, not confused. Current examples should be replaced with more realistic ones. According to bug 10074[5], prepare should take the place of prepublish.

  1. https://github.com/npm/cli/blob/4d93b484abb50e3704fb436db572b93fb36c7ac3/docs/content/using-npm/scripts.md#prepare-and-prepublish
  2. https://github.com/npm/cli/blob/4d93b484abb50e3704fb436db572b93fb36c7ac3/docs/content/using-npm/scripts.md#best-practices
  3. https://github.com/npm/cli/blob/4d93b484abb50e3704fb436db572b93fb36c7ac3/docs/content/using-npm/scripts.md#examples
  4. https://github.com/npm/cli/blob/4d93b484abb50e3704fb436db572b93fb36c7ac3/docs/content/using-npm/scripts.md#a-note-on-a-lack-of-npm-uninstall-scripts
  5. resolving prepublish-on-install npm#10074
@m132 m132 added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Nov 4, 2021
@ruyadorno ruyadorno added Documentation documentation related issue and removed Needs Triage needs review for next steps labels Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Documentation documentation related issue Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

2 participants