Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 7, 2025

This PR upgrades the GitHub Action runtime from Node 20 to Node 24, following the deprecation timeline outlined in actions/runner#3600.

Changes

Runtime & Requirements

  • action.yml: Changed runs.using from node20 to node24
  • package.json: Added engines field requiring Node >=24

Type Definitions & Dependencies

  • @types/node: Updated from ^20.19.19 to ^22 (resolves to v22.18.8)
  • dependabot.yml: Removed ignore rule for @types/node >=22.0.0 to enable automatic updates for Node 22+ type definitions

Compatibility Fix

  • src/github.ts: Removed { type: 'bytes' } parameter from readableWebStream() call to align with Node.js 22+ type definitions. The API behavior remains unchanged.

Documentation

  • CHANGELOG.md: Added "Other Changes" section documenting the Node 24 upgrade

Testing

All existing tests pass:

  • ✅ 37/37 tests passing
  • ✅ Build completes successfully
  • ✅ No TypeScript errors with Node 24 types

Validation

  • The .tool-versions file already specified nodejs 24.2.0
  • The CI workflow (.github/workflows/main.yml) already runs on ubuntu-24.04 and uses .tool-versions
  • The TypeScript configuration (tsconfig.json) with target: "es2022" is compatible with Node 24
  • Marketplace users will be able to run this action on the node24 runtime without deprecation warnings

This upgrade ensures the action continues to work seamlessly as GitHub Actions phases out Node 20 support.

Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade to node 24</issue_title>
<issue_description>- actions/runner#3600 (comment)</issue_description>

<agent_instructions>1) Action runtime
• Edit action.yml:
• Change runs.using: "node20" → runs.using: "node24".
• Keep main: "dist/index.js" unchanged.

  1. CI / workflow
    • Edit .github/workflows/main.yml:
    • Keep actions/setup-node@v4 but ensure it reads the Node version from .tool-versions (it already does). No other changes unless required for Node 24.
    • Confirm runs-on: ubuntu-24.04 is fine.

  2. Tooling & types
    • Edit .tool-versions:
    • Already set to nodejs 24.2.0 — leave as is.
    • Edit package.json:
    • Add an engines field to signal Node 24:

• Bump dev types to match modern Node APIs:
• Change "@types/node": "^20.19.19" → "@types/node": "^22 || ^23 || ^24"
• (Use the highest available version Copilot can resolve in lockfile; prefer ^22 or newer that matches our TS and deps.)
• Keep "typescript": "^5.9.3" and vitest as-is unless Copilot sees incompatibilities with the selected @types/node version. If required, bump to the minimal versions that pass tests.

• Edit .github/dependabot.yml:
• Remove the ignore rule for @types/node >=22.0.0 so Dependabot can track Node 22+ / 24 API types:

  1. Build config
    • tsconfig.json:
    • Keep target: "es2022" and module: "NodeNext".
    • No other changes unless TypeScript emits errors under Node 24 types.

  2. Rebuild distributable
    • Run:
    • npm ci
    • npm run build (this must regenerate dist/index.js via @vercel/ncc)
    • npm test
    • Ensure dist/ is updated and committed (Actions require checked-in dist).

  3. Readme & changelog
    • In CHANGELOG.md:
    • Under ## 2.4.0, confirm the line “Bump to use node 24” remains. If you changed anything else (types/engines), add an “Other Changes” bullet.
    • In README.md:
    • No specific Node version is mentioned; no change needed unless Copilot finds references to node20.

  4. Acceptance criteria
    • npm test passes locally.
    • Workflow main runs green in PR on ubuntu-24.04.
    • No ESM/CJS or @actions/* runtime errors with Node 24.
    • Marketplace users can run the Action on the node24 runtime without warnings.

  5. Commits

Create two commits:

  1. feat: move action runtime to node24 and require Node >=24
  2. chore: bump @types/node, enable Dependabot updates, rebuild dist

After making changes, show me:
• The diff for action.yml, .github/workflows/main.yml, package.json, .github/dependabot.yml, and dist/ file list (not full dist contents).
• The npm test summary output.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #654

💡 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 Copilot AI changed the title [WIP] Upgrade to node 24 Upgrade action runtime to Node 24 Oct 7, 2025
@Copilot Copilot AI requested a review from chenrui333 October 7, 2025 03:21
Copilot finished work on behalf of chenrui333 October 7, 2025 03:21
@chenrui333 chenrui333 marked this pull request as ready for review October 7, 2025 03:38
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.

Upgrade to node 24
2 participants