Skip to content

[Decision] With packages: [] shipped, the engines.pnpm >=10.15 floor is now what refuses pnpm 10.0–10.4 — measured: they install with a lower floor, but never read the scaffold's build allowlist #11048

Description

@os-elon

Filed unassigned from the execution seat that implemented #10933 (Option A, the explicit empty packages: [] on both scaffold paths). It is not a defect in that change and does not block it — it is the question that change uncovered, and it needs a maintainer ruling because it is a support-contract statement, not an implementation detail.

What changed under the ruling's own premise

The #10933 ruling reads, verbatim:

Option A — the scaffolded pnpm-workspace.yaml declares the explicit empty packages: []. This makes the file's existing intent ("acts purely as a settings file", a workspace root with no member packages) explicit, and lets pnpm 10.0–10.4 — which parse the workspace file before reading engines and therefore can never be reached by any floor — install a scaffolded project normally.

The clause "can never be reached by any floor" was true of the keyless file. With packages: [] present, those versions get past the parse and reach the engines.pnpm check — where PR #10932's >=10.15 floor now refuses them. Measured on the shape that ships, one clean install per pnpm version, each with its own store:

fixturepnpmresult
keyless (before #10933)10.0.0 / 10.4.0exit 1, ERROR packages field missing or empty
packages: [], floor >=10.15 (ships today)10.0.0 / 10.4.0exit 1, ERR_PNPM_UNSUPPORTED_ENGINE — "Your pnpm version is incompatible with PROJECT. Expected version: >=10.15. Got: 10.0.0"
packages: [], floor >=10.010.0.0exit 0Done in 12.3s
packages: [], floor >=10.010.4.0exit 0Done in 8.6s

So the diagnosis half of the card is fully delivered: every unsupported pnpm now names a cause the user can act on. The "install normally" half is not, and one line decides which.

Why it was not taken unilaterally

Lowering the floor is not free, and the cost is measured rather than argued. On both 10.0.0 and 10.4.0 the install succeeds and silently skips the scaffold's build approvals — those versions do not read the settings out of pnpm-workspace.yaml at all:

The following dependencies have build scripts that were ignored: better-sqlite3, esbuild
To allow the execution of build scripts for these packages, add their names to
"pnpm.onlyBuiltDependencies" in your "package.json", then run "pnpm rebuild"

The peer rules are ignored on the same versions (both declared skews are still reported as unmet peers). On 10.15.0 the allowlist is honoured — better-sqlite3 runs node-gyp rebuild during the install.

A scaffold installed on 10.0–10.4 is therefore a project whose native driver was never built. That is the failure the allowlist exists to prevent, so admitting those versions trades a clear refusal for a quiet degradation.

The options

Not recommending one: axis ① (real business need) turns on a reading nobody has — the share of new users on pnpm 10.0–10.4, a band released Jan–Feb 2025. The #10933 triage flagged the same gap ("我们没有任何用户环境的 pnpm 版本分布读数"). What this measurement adds is that option B is no longer free, which is the part that was not known when the original ruling was written.

Scope

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions