Repository navigation
fix: install corepack from npm when Node doesn't bundle it - #438
Merged
Merged
Conversation
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
This was referenced Nov 6, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Node 25+ no longer bundles corepack, and
lts/*is now Node 26, socorepack enablefailed and pnpm/yarn never got provisioned. A sharedenableCorepack()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