mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-28 18:05:29 -04:00
* fix(deps-installer): re-resolve catalog-referencing overrides on update
When `pnpm.overrides` reference a catalog (e.g. `overrides: { foo: 'catalog:' }`),
`pnpm update` bumped the catalog entry during resolution but left the resolved
`overrides` in the lockfile pointing at the old version. The lockfile's
`catalogs` advanced while `overrides` stayed stale, producing an internally
inconsistent lockfile that fails a later `pnpm install --frozen-lockfile` with
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH.
After resolution, re-resolve the overrides against the catalog merged with the
update's `updatedCatalogs`, so the lockfile `overrides` track the bumped catalog
just like `catalogs` and direct catalog dependencies do.
* fix(deps-installer): re-resolve catalog overrides before afterAllResolved
Address review feedback:
- Run the catalog-override re-resolution before the `afterAllResolved`
pnpmfile hook instead of after it, so a hook that edits `lockfile.overrides`
still sees and can amend the final value (the block previously ran after the
hook and would clobber its edits whenever a catalog entry was updated).
- Drop the dead `opts.catalogs ?? {}` fallback; `opts.catalogs` is required on
the install options and always defaulted to `{}`, so it is never nullish here.
* test(pacquet): cover catalog-referencing override sync on update --latest
Mirrors pnpm's regression test for keeping lockfile overrides that resolve
through a catalog in sync when `update --latest` bumps that catalog. pacquet
already behaves correctly (it threads the bumped catalogs through to override
parsing), so this is a guard against a future refactor reintroducing the
inconsistency that pnpm/pnpm#12158 fixes on the TypeScript side.
---------
Co-authored-by: Zoltan Kochan <z@kochan.io>
218 lines
3.7 KiB
JSON
218 lines
3.7 KiB
JSON
{
|
|
"extends": "@pnpm/tsconfig",
|
|
"compilerOptions": {
|
|
"outDir": "lib",
|
|
"rootDir": "src"
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"../../__typings__/**/*.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../../__utils__/assert-project"
|
|
},
|
|
{
|
|
"path": "../../__utils__/assert-store"
|
|
},
|
|
{
|
|
"path": "../../__utils__/prepare"
|
|
},
|
|
{
|
|
"path": "../../__utils__/test-fixtures"
|
|
},
|
|
{
|
|
"path": "../../__utils__/test-ipc-server"
|
|
},
|
|
{
|
|
"path": "../../bins/linker"
|
|
},
|
|
{
|
|
"path": "../../bins/remover"
|
|
},
|
|
{
|
|
"path": "../../building/after-install"
|
|
},
|
|
{
|
|
"path": "../../building/during-install"
|
|
},
|
|
{
|
|
"path": "../../building/policy"
|
|
},
|
|
{
|
|
"path": "../../catalogs/config"
|
|
},
|
|
{
|
|
"path": "../../catalogs/protocol-parser"
|
|
},
|
|
{
|
|
"path": "../../catalogs/resolver"
|
|
},
|
|
{
|
|
"path": "../../catalogs/types"
|
|
},
|
|
{
|
|
"path": "../../config/matcher"
|
|
},
|
|
{
|
|
"path": "../../config/normalize-registries"
|
|
},
|
|
{
|
|
"path": "../../config/parse-overrides"
|
|
},
|
|
{
|
|
"path": "../../core/constants"
|
|
},
|
|
{
|
|
"path": "../../core/core-loggers"
|
|
},
|
|
{
|
|
"path": "../../core/error"
|
|
},
|
|
{
|
|
"path": "../../core/logger"
|
|
},
|
|
{
|
|
"path": "../../core/types"
|
|
},
|
|
{
|
|
"path": "../../crypto/hash"
|
|
},
|
|
{
|
|
"path": "../../crypto/object-hasher"
|
|
},
|
|
{
|
|
"path": "../../deps/graph-hasher"
|
|
},
|
|
{
|
|
"path": "../../deps/graph-sequencer"
|
|
},
|
|
{
|
|
"path": "../../deps/path"
|
|
},
|
|
{
|
|
"path": "../../exec/lifecycle"
|
|
},
|
|
{
|
|
"path": "../../fs/read-modules-dir"
|
|
},
|
|
{
|
|
"path": "../../fs/symlink-dependency"
|
|
},
|
|
{
|
|
"path": "../../hooks/read-package-hook"
|
|
},
|
|
{
|
|
"path": "../../hooks/types"
|
|
},
|
|
{
|
|
"path": "../../lockfile/filtering"
|
|
},
|
|
{
|
|
"path": "../../lockfile/fs"
|
|
},
|
|
{
|
|
"path": "../../lockfile/preferred-versions"
|
|
},
|
|
{
|
|
"path": "../../lockfile/pruner"
|
|
},
|
|
{
|
|
"path": "../../lockfile/settings-checker"
|
|
},
|
|
{
|
|
"path": "../../lockfile/to-pnp"
|
|
},
|
|
{
|
|
"path": "../../lockfile/types"
|
|
},
|
|
{
|
|
"path": "../../lockfile/utils"
|
|
},
|
|
{
|
|
"path": "../../lockfile/verification"
|
|
},
|
|
{
|
|
"path": "../../lockfile/walker"
|
|
},
|
|
{
|
|
"path": "../../network/auth-header"
|
|
},
|
|
{
|
|
"path": "../../network/git-utils"
|
|
},
|
|
{
|
|
"path": "../../patching/config"
|
|
},
|
|
{
|
|
"path": "../../pkg-manifest/reader"
|
|
},
|
|
{
|
|
"path": "../../pkg-manifest/utils"
|
|
},
|
|
{
|
|
"path": "../../pnpr/client"
|
|
},
|
|
{
|
|
"path": "../../resolving/parse-wanted-dependency"
|
|
},
|
|
{
|
|
"path": "../../resolving/registry/types"
|
|
},
|
|
{
|
|
"path": "../../resolving/resolver-base"
|
|
},
|
|
{
|
|
"path": "../../store/cafs"
|
|
},
|
|
{
|
|
"path": "../../store/controller-types"
|
|
},
|
|
{
|
|
"path": "../../store/index"
|
|
},
|
|
{
|
|
"path": "../../store/path"
|
|
},
|
|
{
|
|
"path": "../../testing/mock-agent"
|
|
},
|
|
{
|
|
"path": "../../testing/registry-mock"
|
|
},
|
|
{
|
|
"path": "../../testing/temp-store"
|
|
},
|
|
{
|
|
"path": "../../worker"
|
|
},
|
|
{
|
|
"path": "../../workspace/project-manifest-reader"
|
|
},
|
|
{
|
|
"path": "../context"
|
|
},
|
|
{
|
|
"path": "../deps-resolver"
|
|
},
|
|
{
|
|
"path": "../deps-restorer"
|
|
},
|
|
{
|
|
"path": "../linking/direct-dep-linker"
|
|
},
|
|
{
|
|
"path": "../linking/hoist"
|
|
},
|
|
{
|
|
"path": "../linking/modules-cleaner"
|
|
},
|
|
{
|
|
"path": "../modules-yaml"
|
|
},
|
|
{
|
|
"path": "../package-requester"
|
|
}
|
|
]
|
|
}
|