mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-28 01:45:30 -04:00
## Summary Fixes `pnpm install` with `optimisticRepeatInstall` incorrectly returning `Already up to date` when `pnpm-lock.yaml` changed but project manifests did not. Fixes #12100. ## Root Cause `checkDepsStatus` used modified manifest mtimes as the only signal for whether it needed to validate dependency status. If no manifest was newer than `workspaceState.lastValidatedTimestamp`, it returned `upToDate: true` before checking whether the wanted lockfile had changed. That skipped lockfile validation for workflows like: - `git checkout HEAD~1 -- pnpm-lock.yaml` - restoring only `pnpm-lock.yaml` from a stash - external tools rewriting the lockfile without touching manifests ## Changes - Check wanted lockfile mtimes before taking the optimistic fast path. - If any wanted lockfile is missing or newer than the workspace state timestamp, validate all projects instead of only modified manifests. - Add a regression test proving a lockfile-only change does not skip wanted-lockfile validation. - Add a patch changeset for `@pnpm/deps.status` and `pnpm`. --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
17 lines
455 B
JavaScript
17 lines
455 B
JavaScript
import eslintConfig from "@pnpm/eslint-config";
|
|
import * as regexpPlugin from "eslint-plugin-regexp";
|
|
|
|
export default [
|
|
{
|
|
ignores: ["**/fixtures", "**/__fixtures__", "**/node_modules", "**/lib", ".claude/**", "bench-work-env/**"],
|
|
},
|
|
...eslintConfig,
|
|
regexpPlugin.configs['flat/recommended'],
|
|
{
|
|
files: ["pnpm/src/**/*.ts"],
|
|
rules: {
|
|
"import-x/no-extraneous-dependencies": "off",
|
|
},
|
|
},
|
|
]
|