Skip to content

docs: clarify package.json resolution in corepack use - #934

Open
abdul-karim-mia wants to merge 1 commit into
nodejs:mainfrom
abdul-karim-mia:docs/corepack-use-description
Open

abdul-karim-mia wants to merge 1 commit into
nodejs:mainfrom
abdul-karim-mia:docs/corepack-use-description

Conversation

@abdul-karim-mia

Copy link
Copy Markdown

Clarifies the behavior of corepack use in the documentation:

  • Explains how Corepack resolves the target package.json by searching the current directory and traversing parent directories.
  • Mentions that in workspace or monorepo structures, it searches upwards for an existing package.json that defines packageManager.
  • Documents that if no package.json exists anywhere in the directory hierarchy, a new package.json containing the assigned packageManager specification will be created in the current working directory.

Fixes #610

Explains how corepack use resolves the target package.json by searching the current and parent directories, how it traverses upwards in workspaces to find an existing packageManager definition, and notes that a new package.json is created in cwd if no manifest is found.

Fixes nodejs#610

Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>
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.

Expand corepack use documentation description

1 participant