Skip to content

chore: remove node_modules, bundle with ncc, and upgrade to Node 24 - #80

Closed
Kevin (kevcube) wants to merge 1 commit into
cloudposse:mainfrom
kevcube:chore/modernize-node24
Closed

Kevin (kevcube) wants to merge 1 commit into
cloudposse:mainfrom
kevcube:chore/modernize-node24

Conversation

@kevcube

Copy link
Copy Markdown
Member

what

  • Remove committed node_modules/ from version control, add node_modules/ to .gitignore, and bundle the action into dist/ using @vercel/ncc
  • Update action.yml from node20 / index.js to node24 / dist/index.js
  • Upgrade dependencies (@actions/artifact to ^6.3.1, @actions/core to ^3.0.1, yaml to ^2.9.1), remove unused crypto, fs, and tmp packages, and await artifactClient.uploadArtifact()
  • Modernize all workflow action references to Node 24-compatible versions (SHA-pinned):
    • actions/checkout@v4 -> actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
    • actions/download-artifact@v4 -> actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
    • nick-fields/assert-action@v2 -> nick-fields/assert-action@0efd6166067d9c59d89c710fab4f79fb066f8985 # v4.0.1
  • Fix YAML syntax error in .github/workflows/test-special-chars.yml (workflow_dispatch.inputs missing newlines on lines 13 and 16)

why

  • GitHub Actions has deprecated the Node 20 runtime in favor of Node 24
  • Committing node_modules/ bloats the repository and causes massive diffs on dependency updates; bundling into dist/ via @vercel/ncc matches standard GitHub Action best practices and other Cloud Posse JS/TS actions
  • @actions/artifact v6+ and actions/download-artifact v8+ ensure compatibility with the current GitHub Actions artifact backend and Node 24
  • test-special-chars.yml had malformed YAML in on.workflow_dispatch.inputs, causing GitHub to reject workflow_dispatch triggers in CI with HTTP 422

references

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 v24

1 participant