Skip to content

MAI-56: drop cache:'npm' and bump node 20→24 in generated GH Actions bump workflow#18

Merged
vsmash merged 1 commit into
developfrom
bug/MAI-56_gh-action-no-npm-lock
May 24, 2026
Merged

MAI-56: drop cache:'npm' and bump node 20→24 in generated GH Actions bump workflow#18
vsmash merged 1 commit into
developfrom
bug/MAI-56_gh-action-no-npm-lock

Conversation

@vsmash
Copy link
Copy Markdown
Owner

@vsmash vsmash commented May 24, 2026

Ticket

https://velvary.atlassian.net/browse/MAI-56

Problem

maiass --create-gh-action generated .github/workflows/maiass-version-bump.yml with an actions/setup-node@v4 step that set cache: 'npm'. For projects with no Node lock file (e.g. WordPress/PHP plugins), setup-node fails before maiass runs:

Dependencies lock file is not found ... package-lock.json, npm-shrinkwrap.json, yarn.lock

The generated workflow only does npm install -g maiass, which needs no project-level npm cache, so the cache was pointless. The generated node-version: '20' is also deprecated on GitHub runners.

Fix

In the template templates/ci/github-version-bump.yml (consumed by lib/ci-templates.js createGithubAction()):

  • Removed cache: 'npm' from the generated setup-node step (added an explanatory comment).
  • Bumped generated node-version from '20' to '24'.

Verification

  • Ran maiass --create-gh-action in a clean temp dir → generated workflow now has node-version: '24' and no cache: key.
  • node maiass.mjs --help works.

Scope note

Only the generated template was changed. This repo's own .github/workflows/version-bump.yml mirrors the template but has a real package-lock.json, so cache: 'npm' works there — left untouched, out of scope for this ticket.

🤖 Generated with Claude Code

  - remove cache: 'npm' from generated setup-node step so workflow runs on projects without a Node lock file
  - bump generated node-version 20 to 24 (node 20 deprecated on GitHub runners)
@vsmash vsmash merged commit b009eca into develop May 24, 2026
8 checks passed
@vsmash vsmash deleted the bug/MAI-56_gh-action-no-npm-lock branch May 24, 2026 21:55
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.

1 participant