Move root package.json pnpm settings into pnpm-workspace.yaml

Open Beginner friendly
#1,948 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
devtools

Research direction

The pnpm settings sit in the pnpm block of root package.json (lines 68-94), and pnpm-workspace.yaml already holds allowBuilds, packageExtensions and peerDependencyRules. Start by comparing the onlyBuiltDependencies and ignoredBuiltDependencies lists against allowBuilds, then move pnpm.overrides into the overrides key. Done when the pnpm block is gone from package.json, the workspace file carries every setting, and pnpm install --frozen-lockfile leaves pnpm-lock.yaml unchanged without the pnpm 11 warning.

Written by the indexing model from the issue text.

Description

Area: Infrastructure Chore Difficulty: Low Priority: Low

Root package.json (package.json:68-94) still carries a "pnpm" configuration block (overrides, onlyBuiltDependencies, ignoredBuiltDependencies). When a host runs a pnpm 11 global binary (even when delegating to "packageManager": "[email protected]" via manage-package-manager-versions), every pnpm command prints:

[WARN] The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.overrides", "pnpm.onlyBuiltDependencies". See https://pnpm.io/settings for the new home of each setting.

pnpm-workspace.yaml (pnpm-workspace.yaml:2-13, 84-109) already holds the workspace's other pnpm 10/11 settings (allowBuilds, packageExtensions, patchedDependencies, peerDependencyRules, minimumReleaseAge), which creates two problems:

  1. Duplicate, diverging build-script lists: pnpm-workspace.yaml declares allowBuilds (with msgpackr-extract: false and without @tailwindcss/oxide or oxc-resolver), while package.json declares pnpm.onlyBuiltDependencies (including @tailwindcss/oxide, msgpackr-extract, and oxc-resolver) and pnpm.ignoredBuiltDependencies (@scarf/scarf).
  2. Overrides live only in package.json: pnpm.overrides (@tailwindcss/typography>postcss-selector-parser, @types/react, @types/react-dom, find-my-way@9, sharp, yaml@2) has not been moved to overrides in pnpm-workspace.yaml, so upgrading packageManager to pnpm 11 (or running pnpm 11 directly) silently drops those overrides.

Suggested fix

Move pnpm.overrides into overrides in pnpm-workspace.yaml, reconcile pnpm.onlyBuiltDependencies / pnpm.ignoredBuiltDependencies into allowBuilds in pnpm-workspace.yaml, remove the "pnpm" key from root package.json, and verify pnpm install --frozen-lockfile leaves pnpm-lock.yaml intact.

Dominant language
TypeScript
Stars
119
Forks
19
Avg merge
1d 18h
Merged PRs (30d)
60

Getting set up

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.

More from DouglasNeuroInformatics/OpenDataCapture

All issues in DouglasNeuroInformatics/OpenDataCapture

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.