Skip to content

Change Request: Migrate Build install to Corepack standalone #104

Closed
@MikeMcC399

Description

@MikeMcC399

Repo's CI Environment

ESLint version: not used
@eslint/css version: HEAD
Node version: lts/* (currently 22.14.0)
npm version: 10.9.2
Operating System: ubuntu-latest / ubuntu-24.04

What problem do you want to solve?

In the workflow .github/workflows/ci-build-all-pm.yml the jobs:

  • yarn-install
  • pnpm-install

use the bundled version of Corepack from the Node.js LTS installation of actions/setup-node@v4.

The Node.js organization has decided to stop distributing the experimental Corepack module with future versions of Node.js. They have already taken steps to remove documentation from their website and since the release of Node.js v23.11.0 the Node.js latest API documentation page https://nodejs.org/docs/latest/api/ no longer lists Corepack. https://nodejs.org/docs/latest/api/corepack.html does however include a short statement "... Corepack itself will no longer be distributed with future versions of Node.js."

Independent of Node.js bundling, the npm module corepack continues to be available from the npm registry and can be directly installed from there.

What do you think is the correct solution?

In jobs using Corepack, install corepack using npm install -g corepack@latest to become independent from Node.js Corepack unbundling.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

In some ways this is not an urgently needed change. The workflow .github/workflows/ci-build-all-pm.yml is using Node.js lts/* and the next Node.js LTS activation switch is scheduled to be to Node.js 24.x in October 2025. Although the Node.js website documentation does not state this, the Node.js TSC voted to release Node.js 24.x with bundled Corepack. The follow-on LTS version 26.x one year later is intended to be the first LTS version without a bundled Corepack version.

Corepack is however currently not protected against npm registry key signing changes which caused pnpm installation failures in Jan 2025. Moving to install the latest version of Corepack from the npm registry, instead of relying on a bundled version, shortens the time to remediate key mismatch issues when these need a new release of Corepack, therefore the above proposed change already has advantages separate from the Node.js bundling issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions