Skip to content

chore: drop the dead .npmrc and fix the stale pnpm version in CONTRIBUTING#3750

Merged
cixzhang merged 1 commit into
facebook:mainfrom
Han5991:chore/drop-dead-npmrc
Jul 11, 2026
Merged

chore: drop the dead .npmrc and fix the stale pnpm version in CONTRIBUTING#3750
cixzhang merged 1 commit into
facebook:mainfrom
Han5991:chore/drop-dead-npmrc

Conversation

@Han5991

@Han5991 Han5991 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

Two leftovers from #3700 (the pnpm 11 upgrade):

  1. Delete .npmrc. pnpm 11 reads nodeLinker / shamefullyHoist / linkWorkspacePackages from pnpm-workspace.yaml, not .npmrc. chore: upgrade pinned package manager to pnpm 11 #3700 migrated all three into the YAML (and says so in a comment there) but left .npmrc on disk, so the file has been a no-op ever since. It carried nothing else, so it goes away entirely.

  2. Fix CONTRIBUTING.md. chore: upgrade pinned package manager to pnpm 11 #3700 swept pnpm@10pnpm@11 through the doc, but the verification snippet spells the version as 10.x.x, which the string replace never matched. A contributor following the doc today sees 11.10.0 and wonders whether they installed the wrong thing.

Why it's safe

.npmrc looked load-bearing because both files declared the same values — nothing revealed which one was winning. Removing one shows it:

setup pnpm config list reports the 3 keys?
.npmrc only no
pnpm-workspace.yaml only yes
this repo, .npmrc deleted yes

nodeLinker defaults to isolated, so if the value were coming from .npmrc it would have to show up. It doesn't. Hoisting stays on and the node_modules layout is unchanged.

pnpm install --frozen-lockfile on this branch: Already up to date, exit 0, pnpm-lock.yaml untouched.

Every CI workflow runs pnpm install --frozen-lockfile under pnpm 11 (the npm install strings in the workflows are comments and log messages), so nothing in CI depended on .npmrc either.

Bonus

The dead file was making every npm invocation in the repo print:

npm warn Unknown project config "shamefully-hoist".
npm warn Unknown project config "node-linker".
npm warn Unknown project config "link-workspace-packages".

Out of scope

Three related things surfaced while digging, each worth its own PR:

  • packageManager and devEngines.packageManager coexist, so pnpm 11 warns "packageManager" will be ignored on every command. Predates chore: upgrade pinned package manager to pnpm 11 #3700, and corepack still reads the field, so nothing breaks.
  • @types/node sits at ^25.9.3 (dependabot jumped it 22 → 25 in chore(deps-dev): bump @types/node from 22.19.6 to 25.6.0 #1473) while CI and the docs are on Node 24. Correcting the pin also needs a dependabot.yml guard, or the bot re-raises it.
  • packages/cli and apps/example-vite set types: ["node"] in their tsconfigs without declaring @types/node — phantom deps that only resolve because shamefullyHoist is on.

…UTING

pnpm 11 reads nodeLinker / shamefullyHoist / linkWorkspacePackages from
pnpm-workspace.yaml, not .npmrc. facebook#3700 migrated those three settings into
the YAML but left .npmrc in place, so the file has been a no-op since.

Verified by A/B: a directory with only .npmrc surfaces none of the three
keys in `pnpm config list`, while one with only pnpm-workspace.yaml
surfaces all three. Removing .npmrc here leaves nodeLinker: hoisted,
shamefullyHoist: true and linkWorkspacePackages: true intact, and
`pnpm install --frozen-lockfile` is a no-op ("Already up to date").

The file only carried those three keys, so it goes away entirely. It was
also making every `npm` invocation in the repo print three "Unknown
project config" warnings.

Separately, facebook#3700 swept `pnpm@10` -> `pnpm@11` through CONTRIBUTING.md
but the verification snippet spells the version as `10.x.x`, which the
string replace never matched.
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 10, 2026 10:31am

Request Review

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed via the review rubric — drop dead .npmrc + fix stale pnpm version in CONTRIBUTING — chore, verified matches pinned pnpm 11. Verified against main; no consumer API change. Approving.

@cixzhang
cixzhang merged commit efa3ea5 into facebook:main Jul 11, 2026
15 checks passed
@Han5991
Han5991 deleted the chore/drop-dead-npmrc branch July 11, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants