Skip to content

docs: Missing documentation for package.json settings #657

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
MelodicsPavol opened this issue Apr 2, 2025 · 3 comments
Open

docs: Missing documentation for package.json settings #657

MelodicsPavol opened this issue Apr 2, 2025 · 3 comments

Comments

@MelodicsPavol
Copy link

The PR #656 has removed a lot of documentation from https://pnpm.io/package_json page, such as pnpm.onlyBuiltDependencies.

Those have been moved into https://pnpm.io/settings but I cannot find indication saying that these can be used in package.json as the format has been changed to YAML and the top of the page does not mention package.json:

pnpm gets its configuration from the command line, environment variables, pnpm-workspace.yaml, and .npmrc files.

Is this intentional and it means that "pnpm" settings in package.json are deprecated?

Confusingly there are now two Configuration pages related to pnpm-workspace.yaml

  1. Settings (pnpm-workspace.yaml)
  2. pnpm-workspace.yaml
@zkochan
Copy link
Member

zkochan commented Apr 2, 2025

Yes, settings in package.json are deprecated. We might remove support for them in a next major version.

I agree that the two pages are confusing. I don't know yet how we will solve it. We will either merge the two or change the name to just "Settings".

@scarf005 scarf005 marked this as a duplicate of #661 Apr 17, 2025
@val1984
Copy link
Contributor

val1984 commented Apr 29, 2025

Does it mean that package.json resolutions will not be supported anynmore?

The documentation for it has disappeared when settings were moved to the pnpm-workspace.yaml page.

What is the rationale to remove support for defining configuration in package.json?

Thank you.

@zkochan
Copy link
Member

zkochan commented Apr 29, 2025

Here is the related discussion: https://github.com/orgs/pnpm/discussions/9037

We are loading settings from multiple places at the moment. We want to use a single place, the pnpm-workspace.yaml, in the future.

Does it mean that package.json resolutions will not be supported anynmore?

I don't think it will be supported. "overrides" will be supported from pnpm-workspace.yaml.

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

No branches or pull requests

3 participants