Skip to content

Update to Node.js v22 (OSOE-1010) #965

Open
@Piedone

Description

@Piedone

The currently implied Node.js version we use in our projects (implied by pnpm-lock.json files) is v20, which is not the active LTS version anymore: that's v22. So, update to that.

  • Update Node.js Extensions by following its update docs.
  • If the enable-corepack action of ours still references a corepack version, remove it.
  • Change both the enable-corepack action and the corepack enable command in NE to instead install corepack, see this comment. Or if we don't need corepack since PNPM needs to be installed anyway, then remove both in favor of the install.
  • Update all OSOCE projects using Node.js Extensions too. Most possibly only the version in the pnpm-lock.json files will change.
  • Add a Node.js version policy (that we always target the latest LTS version) to Lombiq GitHub Actions, like we have it for .NET.
  • Add a setup-node step to Lombiq GitHub Actions, similar to setup-dotnet, that's used in the beginning of every build workflow, and which sets up a specific Node.js version with actions/setup-node. This is to avoid any surprise breakage due to Node updates. We currently implicitly depend on the Node.js version provided by the GHA runners (which as of the opening of this issue is v20.18.2, with v22 and v18 being cached for enabling too, see here).
  • Try out the Sustainable npm action in conjunction with actions/setup-node, and add it if it makes the build. We need audit to run, but the other options can be enabled.

Jira issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions