Repository navigation
fix: remove .pnpmrc, a config file pnpm never reads - #1397
Merged
Merged
Conversation
pnpm resolves configuration from CLI flags, environment variables, pnpm-workspace.yaml, and .npmrc (auth/registry only as of pnpm 12). No pnpm release reads a .pnpmrc, so the file has never affected behavior. Verified on pnpm 10.26.2, the pinned packageManager, by installing a probe project four ways and reading node_modules/.modules.yaml: (none) -> isolated .npmrc -> hoisted .pnpmrc -> isolated (ignored) pnpm-workspace.yaml -> hoisted The same A/B on this repository, wiping node_modules and reinstalling for each case, yields isolated both with and without the file. The file was added in e805f93 (2025-08-26) together with the removal of the package-manager lock in package.json#engines. Five days later c68daf6 added the equivalent shamefully-hoist=true to .npmrc while upgrading sharp, which is where the intent actually took effect. a032ece (2025-12-25) removed that, and every surface has run pnpm's default isolated layout with no regressions since. Nothing references the file: not in code, documentation, or any workflow, and it is absent from the published tarball (files whitelist, 119 entries). No behavior change. CI, Docker, and fresh clones already resolve to isolated: - .github/actions/setup-env/action.yml and npm-publish.yml run `pnpm install --frozen-lockfile` with no linker override - Dockerfile copies only package.json and pnpm-lock.yaml before installing - bin/utils/build-workspace.ts copies no dotfiles into the build workspace package.json is untouched, so the tracked dist/cli.js needs no rebuild.
Owner
|
@jakero Thanks for checking this against the pinned pnpm version. It is merged and included in pake-cli 3.17.3; install behavior stays the same, since pnpm never read that file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pnpmrchas never affected pnpm behavior, so this removes it. No functional change.pnpm resolves configuration from CLI flags, environment variables,
pnpm-workspace.yaml, and.npmrc(auth/registry only as of pnpm 12). No pnpm release reads a.pnpmrc. The file was added 2025-08-26 and has never been modified since.Two of those three lines were already pnpm defaults (
strict-peer-dependenciesdefaults tofalse,auto-install-peerstotruesince pnpm 8), so the only line with any potential effect wasnode-linker=hoisted.Why the file does nothing
Verified on pnpm 10.26.2, the version pinned in
packageManager, by installing a probe project four ways and reading the resultingnode_modules/.modules.yaml:nodeLinkerisolated.npmrchoisted.pnpmrcisolated(ignored)pnpm-workspace.yamlhoistedThe same A/B run against this repository, wiping
node_modulesand reinstalling for each case, producesisolatedboth with and without the file.How it got here
2b45a1f(2025-08-26 15:10) — npm → pnpm migration. Createspnpm-workspace.yamlwithonlyBuiltDependencies, i.e. the correct pnpm-native config file was already known here.e805f93(same day, 15:30) — removes the package-manager lock frompackage.json#engines("npm": "please-use-pnpm","yarn": "please-use-pnpm","pnpm": ">=10.0.0") and creates.pnpmrcwithnode-linker=hoisted. Since the PM lock was being loosened, making pnpm produce an npm-like flat layout was a reasonable goal; the filename was inferred from the.npmrc/.yarnrcconvention rather than from pnpm's docs.c68daf6(5 days later) — upgradessharp0.33 → 0.34 and creates.npmrccontainingshamefully-hoist=true, which is the same intent and does take effect. This is where the setting actually landed..pnpmrcwas left in place.a032ece(2025-12-25) — removesshamefully-hoist=truefrom.npmrc. From this point every surface runs pnpm's defaultisolatedlayout, with no regressions.So the file has been inert for its entire ~13-month lifetime, and the project has been on
isolatedin CI since 2025-12-25.Nothing references it
llms.txtpackage.json#fileswhitelist, 119 entries)Why removal is safe
Every surface already resolves to
isolated, i.e. the layout CI and Docker have been using all along:.github/actions/setup-env/action.ymlandnpm-publish.ymlrunpnpm install --frozen-lockfilewith no linker overrideDockerfilecopies onlypackage.jsonandpnpm-lock.yamlbefore installing, so no config file is present in the image at that layerbin/utils/build-workspace.tscopies onlypackage.json,pnpm-lock.yaml,package-lock.json, and the rust-toolchain files into the private build workspace, so end-user Tauri dependency installs never see this file eitherpnpm-lock.yamlis unchanged by this PRpackage.jsonis untouched, so the trackeddist/cli.jsneeds no rebuild.Verification
The 2 vitest failures are
tests/unit/local-staging.test.tsrequiringfs.symlinkSync, which returnsEPERMon a Windows machine without Developer Mode. They fail identically onmainwith.pnpmrcrestored — verified by re-running the same suite onmain:Note for reviewers
This is a deletion with no behavior change, so the only question is whether the setting was wanted. If a flat
node_modulesis genuinely required, the correct place ispnpm-workspace.yaml(.npmrcalso works on pnpm 10, but pnpm 12 reads only auth/registry from it). I did not add that file here because nothing currently depends on hoisting: the repository has zero undeclared root-level imports across 99 source files, andpendingBuildsis identical under both layouts.Note on local verification on Windows
pnpm run release:checkcannot complete on a Windows checkout for reasons unrelated to this change:.gitattributessets notext/eolrules, socore.autocrlf=truechecks files out as CRLF while.editorconfigdeclaresend_of_line = lfand Prettier enforces it, failingformat:checkon 152 files. The gates above were therefore run individually.