Files
pnpm/pnpm11/exec/commands/tsconfig.json
15a5da5864 fix: skip the pre-run install for a project with nothing to install (#16317)
The verify-deps-before-run gate spawned an install whenever no workspace
state file existed, even for projects that give an install nothing to
do. That install only wrote node_modules and pnpm-lock.yaml, which
became visible in directories the workspace packages patterns leave
out after pnpm/pnpm#15125.

The gate now returns up to date when no state file exists and no
project the install would cover declares a dependency, a required peer
that autoInstallPeers would fetch, or an install lifecycle script
(preinstall through postprepare, or an implicit binding.gyp build) that
ignoreScripts does not disable. pnpm:devPreinstall counts only in the
workspace root, the only place an install runs it. Under a shared
lockfile every workspace project is checked, and the projects are walked
only when the root manifest itself has nothing to install. With separate
lockfiles a non-recursive run checks only its own project. A
non-recursive pnpm 11 command gets no allProjects, so the gate reads the
workspace itself, as checkDepsStatus does.

A readPackage hook can add dependencies, so any pnpmfile the install
would load (looked up from the lockfile directory) keeps the install.
A workspace that cannot be read, or a lockfileDir pinned away from the
project, also keeps it. Projects with lifecycle scripts still
install on the first run, so those scripts keep running on first use.

Closes pnpm/pnpm#16313

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 15:19:44 +02:00

128 lines
2.2 KiB
JSON

{
"extends": "@pnpm/tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"include": [
"src/**/*.ts",
"../../__typings__/**/*.d.ts"
],
"references": [
{
"path": "../../__utils__/prepare"
},
{
"path": "../../__utils__/test-ipc-server"
},
{
"path": "../../bins/resolver"
},
{
"path": "../../building/commands"
},
{
"path": "../../catalogs/resolver"
},
{
"path": "../../cli/command"
},
{
"path": "../../cli/common-cli-options-help"
},
{
"path": "../../cli/utils"
},
{
"path": "../../config/reader"
},
{
"path": "../../config/version-policy"
},
{
"path": "../../core/core-loggers"
},
{
"path": "../../core/error"
},
{
"path": "../../core/logger"
},
{
"path": "../../core/types"
},
{
"path": "../../crypto/hash"
},
{
"path": "../../deps/status"
},
{
"path": "../../engine/runtime/commands"
},
{
"path": "../../engine/runtime/system-version"
},
{
"path": "../../fs/dir-lock"
},
{
"path": "../../installing/client"
},
{
"path": "../../installing/commands"
},
{
"path": "../../log/group"
},
{
"path": "../../pkg-manifest/reader"
},
{
"path": "../../resolving/parse-wanted-dependency"
},
{
"path": "../../shell/path"
},
{
"path": "../../store/path"
},
{
"path": "../../testing/command-defaults"
},
{
"path": "../../text/ordinal-comparator"
},
{
"path": "../../workspace/injected-deps-syncer"
},
{
"path": "../../workspace/project-manifest-reader"
},
{
"path": "../../workspace/projects-filter"
},
{
"path": "../../workspace/projects-reader"
},
{
"path": "../../workspace/projects-sorter"
},
{
"path": "../../workspace/task-scheduler"
},
{
"path": "../esm-node-path-loader"
},
{
"path": "../lifecycle"
},
{
"path": "../npm-lifecycle"
},
{
"path": "../pnpm-cli-runner"
}
]
}