Skip to content

fix: install corepack from npm when Node doesn't bundle it - #438

Merged
Shinrai merged 1 commit into
nextfrom
fix/corepack-node26
Nov 6, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/corepack-node26

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Node 25+ no longer bundles corepack, and lts/* is now Node 26, so corepack enable failed and pnpm/yarn never got provisioned. A shared enableCorepack() helper now installs corepack from npm when the binary is missing, and every pnpm/yarn call site and the setup-node composite go through it.

Resolves #437

Node 25+ dropped corepack and lts/* now resolves to 26, so every corepack enable failed, pnpm/yarn never reached PATH and pnpm consumers died at install with 'pnpm: not found'. A shared enableCorepack() helper now installs corepack from npm when the binary is missing, then enables it. install-dependencies, build-project, run-tests, create-package, update-package-version and the setup-node composite all use it. The inline 'Enable corepack' steps in the coverage, lint-format and type-check jobs are removed, since install-dependencies right after them does the provisioning. The npm install lives in the Node script, not a workflow run block, so the scorecard Pinned-Dependencies check isn't affected.

Fixes #437
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files labels Nov 6, 2026
@Shinrai
Shinrai merged commit cc6181d into next Nov 6, 2026
16 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/corepack-node26 branch November 6, 2026 23:26
cldmv-bot Bot added a commit that referenced this pull request Nov 7, 2026
# v4.35.4 — 2026-11-06

Patch release with two CI fixes. pnpm and yarn repos work again on Node 26, and `types:check` is now the one type-check script name across the fleet.

## Bug Fixes

- **corepack on Node 25+.** Node stopped bundling corepack in 25, and `lts/*` now resolves to Node 26, so `corepack enable` failed and pnpm/yarn repos died with `pnpm: not found`. A shared `enableCorepack()` helper installs corepack from npm when the binary is missing, then enables it. If either step fails it logs a warning and carries on, in case pnpm/yarn is already on `PATH`. `build-project`, `run-tests`, `create-package`, `install-dependencies`, `update-package-version` and the `setup-node` composite all call it, and the separate "Enable corepack" steps in the coverage, lint-format and type-check jobs are gone. npm repos skip it. Fixes [#437](#437). ([#438](#438))
- **`types:check` is the type-check script.** The fleet used `typecheck`, `test:types` and `types:check` for the same job, and the reusables defaulted to `test:types`. `workflow-ci.yml`, `reusable-coverage-badge.yml` and `reusable-coverage-pr-comment.yml` now default `type_check_command` to `npm run types:check`, and the `ci.yml` template, the setup guide and the lint/format convention follow suit. The type-check step in both coverage reusables now skips with a notice when the named script doesn't exist, the same way the `🔎 Type Check` job already did; before, a missing script failed the coverage job on `next` and on the release PR. [package-layout.md](../conventions/package-layout.md) fixes three names: `types:check` runs `tsc --noEmit` on the source and is what CI runs, `types:build` emits declarations, and `test:types` is kept for consumer-side tests of the published types. ([#436](#436), [#440](#440))

## Upgrade notes

- No caller changes needed for the corepack fix; it rides the `@v4` tag.
- A repo that relied on the old `test:types` default and has no `types:check` script now skips the type check with a notice, on feature PRs and in the coverage jobs. Add a `types:check` script (or set `type_check_command` in `ci.yml`) to keep it running.



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant