Skip to content

Conversation

Copy link

Copilot AI commented Nov 20, 2025

Packages built with Node 18 fail when users install with newer Node versions. CI only tests against Node 18, missing compatibility issues.

Changes

  • .github/workflows/lint-test.yml: Add matrix strategy testing Node 18, 20, 22, 23 (8 jobs total: 4 versions × lint/test)
  • .github/actions/release/action.yml: Upgrade release builds from Node 18.x → 20.x (active LTS)
  • package.json: Update engines constraint from >=14.0.0>=18.0.0
  • .nvmrc: Add with value 20 for consistent local development

Impact

CI now catches Node version incompatibilities pre-merge. Releases use stable Node 20 LTS while packages remain compatible across 18-23.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • google.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/npm-catalogue/npm-catalogue/node_modules/.bin/../jest/bin/jest.js --coverage --verbose --runInBand --detectOpenHandles --forceExit (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Problem

The published packages from this repository are only accessible/working with Node 18. When users try to download or use these packages with other Node versions (e.g., Node 23), they fail. This is because all packages are built and published exclusively using Node 18 in the CI/CD pipeline.

Current State

The following files hardcode Node 18:

  1. .github/actions/release/action.yml - Uses node-version: "18.x"
  2. .github/workflows/lint-test.yml - Uses node-version: 18
  3. .github/workflows/release.yml - Indirectly uses Node 18 via the release action
  4. .github/workflows/prerelease.yml - Indirectly uses Node 18 via the release action

Requested Changes

1. Update CI Test Workflow (.github/workflows/lint-test.yml)

Add a matrix strategy to test against multiple Node versions:

  • Node 18.x (LTS)
  • Node 20.x (LTS)
  • Node 22.x (Current)
  • Node 23.x (Latest)

This ensures all packages work across different Node versions before merging.

2. Update Release Action (.github/actions/release/action.yml)

The release action should continue to use a stable LTS version (Node 20.x is recommended as it's the current active LTS) for building and publishing packages. This ensures consistent builds while supporting broader compatibility.

3. Update package.json engines field (root package.json)

Update the engines field to reflect the actual supported Node versions based on testing:

"engines": {
  "node": ">=18.0.0",
  "pnpm": ">=7.5.0"
}

4. Consider adding .nvmrc file (optional)

Add a .nvmrc file at the root specifying the recommended Node version for development (e.g., 20 or lts/iron).

Expected Outcome

After these changes:

  • Packages will be tested against multiple Node versions before release
  • Users can successfully install and use the packages with Node 18, 20, 22, and 23
  • CI will catch any Node version compatibility issues early
  • The build process remains stable using a consistent Node version

Technical Notes

  • Keep the release/publish process on a single stable Node version (recommend Node 20 LTS)
  • Test against multiple versions to ensure compatibility
  • If specific packages require certain Node versions, their individual package.json files should specify stricter engine requirements

This pull request was created as a result of the following prompt from Copilot chat.

Problem

The published packages from this repository are only accessible/working with Node 18. When users try to download or use these packages with other Node versions (e.g., Node 23), they fail. This is because all packages are built and published exclusively using Node 18 in the CI/CD pipeline.

Current State

The following files hardcode Node 18:

  1. .github/actions/release/action.yml - Uses node-version: "18.x"
  2. .github/workflows/lint-test.yml - Uses node-version: 18
  3. .github/workflows/release.yml - Indirectly uses Node 18 via the release action
  4. .github/workflows/prerelease.yml - Indirectly uses Node 18 via the release action

Requested Changes

1. Update CI Test Workflow (.github/workflows/lint-test.yml)

Add a matrix strategy to test against multiple Node versions:

  • Node 18.x (LTS)
  • Node 20.x (LTS)
  • Node 22.x (Current)
  • Node 23.x (Latest)

This ensures all packages work across different Node versions before merging.

2. Update Release Action (.github/actions/release/action.yml)

The release action should continue to use a stable LTS version (Node 20.x is recommended as it's the current active LTS) for building and publishing packages. This ensures consistent builds while supporting broader compatibility.

3. Update package.json engines field (root package.json)

Update the engines field to reflect the actual supported Node versions based on testing:

"engines": {
  "node": ">=18.0.0",
  "pnpm": ">=7.5.0"
}

4. Consider adding .nvmrc file (optional)

Add a .nvmrc file at the root specifying the recommended Node version for development (e.g., 20 or lts/iron).

Expected Outcome

After these changes:

  • Packages will be tested against multiple Node versions before release
  • Users can successfully install and use the packages with Node 18, 20, 22, and 23
  • CI will catch any Node version compatibility issues early
  • The build process remains stable using a consistent Node version

Technical Notes

  • Keep the release/publish process on a single stable Node version (recommend Node 20 LTS)
  • Test against multiple versions to ensure compatibility
  • If specific packages require certain Node versions, their individual package.json files should specify stricter engine requirements

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update CI workflows to support multiple Node versions Add multi-Node version CI testing (18, 20, 22, 23) Nov 20, 2025
Copilot AI requested a review from icy-r November 20, 2025 21:45
Copilot finished work on behalf of icy-r November 20, 2025 21:45
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.

2 participants