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

docs: consolidate docs and help for package spec #5048

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Jun 21, 2022

Many of our commands parse their args via
npm-package-arg, which is a good
standard way of parsing a "package" argument. However the docs
surrounding these args are not very consistent. This can lead to
confusion in commands such as npm publish where the behavior is
slightly different than in the past due to this.

This adds a new help command npm help package-spec that describes what
this argument is, and can be, and also updates all the commands that
interpret their args this with to refer to them as <package-spec>. It
also adds a link to the new help page on their docs pages.

@wraithgar wraithgar requested a review from a team as a code owner June 21, 2022 18:14
@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Jun 21, 2022

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 38.852 ±1.31 20.886 ±0.08 18.701 ±0.11 21.449 ±0.55 3.382 ±0.04 3.315 ±0.02 2.755 ±0.14 13.058 ±0.09 2.621 ±0.02 3.733 ±0.02
#5048 38.830 ±1.13 20.742 ±0.47 19.332 ±0.19 23.073 ±0.01 3.422 ±0.09 3.410 ±0.02 2.778 ±0.00 13.386 ±0.01 2.760 ±0.02 4.107 ±0.16
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 28.165 ±1.15 15.397 ±0.13 13.864 ±0.17 14.760 ±0.16 3.024 ±0.03 3.021 ±0.10 2.800 ±0.13 9.500 ±0.10 2.489 ±0.04 3.383 ±0.00
#5048 28.451 ±1.40 16.066 ±0.10 13.744 ±0.31 15.335 ±0.40 3.102 ±0.01 3.052 ±0.00 2.742 ±0.07 9.556 ±0.15 2.537 ±0.05 3.440 ±0.00

Many of our commands parse their args via
[npm-package-arg](https://npm.im/npm-package-arg), which is a good
standard way of parsing a "package" argument.  However the docs
surrounding these args are not very consistent.  This can lead to
confusion in commands such as `npm publish` where the behavior is
slightly different than in the past due to this.

This adds a new help command `npm help package-spec` that describes what
this argument is, and can be, and also updates all the commands that
interpret their args this with to refer to them as `<package-spec>`.  It
also adds a link to the new help page on their docs pages.
@wraithgar
Copy link
Member Author

Closes #4126

fritzy
fritzy previously requested changes Jun 21, 2022
Copy link
Contributor

@fritzy fritzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run help on this branch, it doesn't match the response properly.

image

docs/content/using-npm/package-spec.md Show resolved Hide resolved
@wraithgar wraithgar requested a review from fritzy June 22, 2022 13:44
@fritzy fritzy dismissed their stale review June 22, 2022 18:34

different approach later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants