Skip to content

chore: normalize Node version declarations to .nvmrc source of truth [AIS-54] - #46

Open
ethan ozelius (ethan-ozelius-contentful) wants to merge 4 commits into
masterfrom
migrate/node-normalization
Open

ethan ozelius (ethan-ozelius-contentful) wants to merge 4 commits into
masterfrom
migrate/node-normalization

Conversation

@ethan-ozelius-contentful

@ethan-ozelius-contentful ethan ozelius (ethan-ozelius-contentful) commented Jun 26, 2026

Copy link
Copy Markdown

This PR was generated by ai-repo-migrator as part of the fleet-wide Node normalization initiative (AIS-54).

What changed

  • .nvmrc is now the single source of truth for the Node version
  • GitHub Actions workflows read from node-version-file: .nvmrc instead of a hardcoded version
  • Dockerfile uses ARG NODE_VERSION sourced from .nvmrc
  • engines.node and volta.node in package.json are aligned to the same version

Changes:

  • .nvmrc: v20 → 22.23.0
  • tsconfig.json: @tsconfig/node20 → @tsconfig/node22 (new in run 2)
  • action.yml: runs.using: 'node20' → runs.using: 'node22' (new in run 2)
    Confidence: 🟡 Medium
    Attention files: action.yml, tsconfig.json, .nvmrc

Why

Collapsing ~2.7 declaration sites per repo to one means future Node CVE bumps are a single-file change per repo, opened automatically by Renovate. See AIS-54 for full context.

@ethan-ozelius-contentful

ethan ozelius (ethan-ozelius-contentful) commented Jun 26, 2026

Copy link
Copy Markdown
Author

Need to verify if this package uses semantic-versioning. Since we're dropping support for node <= 20, that would be a breaking change.

Confirmed, this is going to require a breaking change and new major version.

https://github.com/contentful/actions-app-deploy/releases v1.1.0

@ethan-ozelius-contentful

ethan ozelius (ethan-ozelius-contentful) commented Jun 26, 2026

Copy link
Copy Markdown
Author

tsconfig.json should probably also match same version as .nvmrc

"extends": "@tsconfig/node20/tsconfig.json",

  • done

@ethan-ozelius-contentful

ethan ozelius (ethan-ozelius-contentful) commented Jun 26, 2026

Copy link
Copy Markdown
Author

@ethan-ozelius-contentful
ethan ozelius (ethan-ozelius-contentful) force-pushed the migrate/node-normalization branch 3 times, most recently from d6a1085 to bd837f9 Compare July 1, 2026 17:26
Comment thread action.yml Outdated
default: true
runs:
using: 'node20'
using: 'node22'

@jjolton-contentful Jared Jolton (jjolton-contentful) Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL the actions runtime doesn't actually support 22 😿 maybe we go with node24 (since we are targeting Node 22+ APIs)?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 100% ok with going with 24. What do you mean exactly that the actions runtime doesn't support 22?

@jjolton-contentful Jared Jolton (jjolton-contentful) Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this out https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#runsusing-for-javascript-actions

github skipped Node 22 for custom JavaScript actions 💀

the runs.using parameter only accepts node20 or node24. they announced in a changelog last fall that they were migrating straight from 20 to 24, so if we put node22 in there, the runner will throw an error.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, ok didn't see that coming either.

I'll update to 24

  • node 24

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants