Skip to content

feat: use run by default and run-script as the alias #8265

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

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

owlstronaut
Copy link
Contributor

@owlstronaut owlstronaut commented Apr 29, 2025

npm/statusboard#467

This pull request standardizes the use of npm run across the codebase and documentation, replacing all references to the npm run-script - now an alias. It also includes file renaming and updates to reflect this change.

@owlstronaut owlstronaut force-pushed the owlstronaut/canonical-run branch from 304fff4 to babff31 Compare April 29, 2025 18:48
@owlstronaut owlstronaut marked this pull request as ready for review April 29, 2025 18:57
@owlstronaut owlstronaut requested a review from a team as a code owner April 29, 2025 18:57
Copy link
Contributor

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

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

Changes here look good to me, but I wonder about the impact on the docs.

How will https://github.com/npm/documentation/blob/main/content/cli/v11/commands/npm-run-script.mdx get updated? If someone starts from https://docs.npmjs.com/cli/v10/commands/npm-run-script, do we want to have 11.3.0 redirect to /commands/npm-run somehow?

version selector at the docs site

@owlstronaut
Copy link
Contributor Author

Changes here look good to me, but I wonder about the impact on the docs.

How will https://github.com/npm/documentation/blob/main/content/cli/v11/commands/npm-run-script.mdx get updated? If someone starts from https://docs.npmjs.com/cli/v10/commands/npm-run-script, do we want to have 11.3.0 redirect to /commands/npm-run somehow?

version selector at the docs site

It's a good question, @wraithgar brought it up too and was in-between on if redirects were worth it for this. How would we set them up if we want to do that?

@wraithgar
Copy link
Member

Yeah I knew it was already being done. Found it: https://github.com/npm/documentation/blob/c85e584bfea44c299e9415c847218b33cdf0a55c/cli/lib/redirects.js

You can see a couple of these redirects from renames at the bottom of that file

Copy link
Contributor

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

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

Diff looks reasonable to me, and I think we have a solution for the docs site. Curious what concerns or cautions other reviewers might have.

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.

3 participants