SKY-Q412 · Quality, structure and performance
Unresolved pnpm catalog reference
A workspace package.json declares a dependency with the catalog protocol, but the referenced catalog in pnpm-workspace.yaml has no entry for that package. The reference can name the default catalog or a named catalog.
- Languages
- package.json, pnpm-workspace.yaml
- Turned on by
skylos . --quality- Quality gate
- counted toward the gate limits (full and diff scans). Reported as quality; counts toward max_quality.
- Finding type
- defect
Why it matters
pnpm cannot resolve the version, so a clean install of the workspace fails. The error appears only when someone installs, often in CI.
What Skylos flags
packages: - "."catalog: lodash: ^4.17.21{"name":"shop","private":true,"dependencies":{"lodash":"catalog:","zod":"catalog:"}}import _ from "lodash";import { z } from "zod";console.log(_, z);What Skylos leaves alone
packages: - "."catalog: lodash: ^4.17.21 zod: ^3.23.0Why Skylos leaves it alone
Both references resolve to entries in the default catalog.
How Skylos decides
- Reads catalog and catalogs from the nearest pnpm-workspace.yaml as data and maps catalog:, catalog:default and catalog:<name> references to entries.
- Checks only package.json files that the workspace packages globs include (the workspace root is always included), and only dependency maps.
- Reports MEDIUM at the dependency line. A malformed workspace file, a pnpmfile hook or a competing bun or Yarn catalog source prevents the check.
How to fix it
Add the package to the referenced catalog, or use an explicit version range.
packages: - "."catalog: lodash: ^4.17.21Added: zod: ^3.23.0When it can be wrong
- A package.json outside the workspace globs is not checked, even if it uses catalog references.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Set
[tool.skylos] ignore = ["SKY-Q412"]to disable this rule project-wide.