npm / npm/cli

[DOCS] Please provide clear documentation on how devDependencies installation will be triggered when installing dependencies through the git protocol.

Open
#7,328 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation Needs Triage
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This is a CLI Docs Problem, not another kind of Docs Problem.
  • This is a CLI Docs Problem.
Description of Problem

When installing packages through the git protocol, the document only mentions that prepare will trigger the installation of dependencies and devDependencies. However, the actual code implementation is not limited to this stage, so please clearly indicate in the document all stages that can trigger the installation of devDependencies.

https://docs.npmjs.com/cli/v10/using-npm/scripts#life-cycle-scripts

image

https://github.com/npm/pacote/blob/main/lib/git.js#L167-L172

image
Potential Solution

No response

Affected URL

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the npm lifecycle-scripts documentation and compare its git-protocol guidance with the referenced logic in pacote/lib/git.js lines 167-172. Identify every stage that can trigger dependency and devDependency installation, then update the documentation to describe those stages accurately and clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript, nodejs
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.