Skip to content

chore: Migrate from yarn to npm and update to Node 22#2772

Merged
praveenkatha-nr merged 7 commits intoreleasefrom
chore/migrate-to-npm-and-node22
Jan 27, 2026
Merged

chore: Migrate from yarn to npm and update to Node 22#2772
praveenkatha-nr merged 7 commits intoreleasefrom
chore/migrate-to-npm-and-node22

Conversation

@praveenkatha-nr
Copy link
Collaborator

Summary

  • Migrate from yarn to npm package manager
  • Update Node.js version from 20 to 22
  • Update dependencies for Node 22 compatibility
  • Fix TypeScript compilation errors
  • Add Jest 29 compatibility updates

Changes

CI/CD Updates

  • Bootstrap action: yarn → npm, Node 20 → 22
  • All workflow files updated to use npm commands
  • Cache configuration updated for package-lock.json

Dependency Updates

  • Updated @types/node to ^22.0.0
  • Updated typescript to ^5.9.3
  • Updated ts-jest to ^29.4.6
  • Updated @inquirer/prompts to ^8.2.0
  • Removed yarn.lock, added package-lock.json

Code Fixes

  • Fixed TypeScript errors with ES module imports (express, cors, lodash)
  • Fixed cockatiel retry API order (.exponential().attempts())
  • Fixed github-api-helpers response handling order
  • Added .sort() to glob results for deterministic ordering

Test Updates (Jest 29 Compatibility)

  • toBeCalledtoHaveBeenCalled
  • toBeCalledTimestoHaveBeenCalledTimes
  • Added jest.setup.js with @actions/core mock
  • Updated fs mock to use jest.requireActual

Test plan

  • TypeScript compilation: 0 errors
  • All 15 test suites pass (140 tests)
  • All CI/CD scripts verified locally:
    • npm run check-quickstart-uniqueness
    • npm run validate-quickstart-ids
    • npm run validate-icons
    • npm run validate-images
    • npm run check-dashboard-name-uniqueness
    • npm run add-datasource-ids
    • npm run build-validate-quickstart-artifact
    • npm run generate-uuids
  • Release script starts correctly
  • Preview script works with arguments

🤖 Generated with Claude Code

praveenkatha-nr and others added 6 commits January 27, 2026 11:37
- Update bootstrap action to use Node 22 and npm
- Replace yarn cache with built-in npm caching in setup-node
- Change all workflow commands from yarn to npm run
- Add -- separator for npm script arguments where needed
- Update .nvmrc to Node 22

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Upgrade typescript from ^4.6.4 to ^5.9.3
- Upgrade jest from ^27.5.1 to ^29.7.0
- Upgrade ts-jest from ^27.1.5 to ^29.4.6
- Upgrade @types/jest from ^27.5.1 to ^29.5.14
- Upgrade @types/node from ^17.0.24 to ^22.0.0
- Add @types/lodash.get for type definitions
- Remove yarn.lock, regenerate package-lock.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update target from es6 to ES2022
- Add skipLibCheck to avoid type errors in node_modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- release.ts: consolidate @InQuirer imports to use unified package
- preview.ts: use default imports for express and cors
- build-validate-quickstart-artifact.ts: fix lodash.get import path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
File imported from non-existent helpers module and was not
referenced anywhere in the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add jest.setup.js with @actions/core mock for test isolation
- Add setupFiles config to jest.config.js
- Fix cockatiel retry API order (.exponential().attempts() instead of .attempts().exponential())
- Fix github-api-helpers.ts response handling (check resp.ok before parsing JSON)
- Add .sort() to glob results in Alert.ts for deterministic ordering
- Update Jest assertions for v29 compatibility:
  - toBeCalled -> toHaveBeenCalled
  - toBeCalledTimes -> toHaveBeenCalledTimes
- Update fs mock in validate_images.test.js to use jest.requireActual

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Download artifacts to temp directory to prevent file override attacks
- Validate PR number is numeric before using it
- Add explicit permissions to all workflows following least-privilege

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@praveenkatha-nr praveenkatha-nr changed the title chore: migrate from yarn to npm and update to Node 22 chore: Migrate from yarn to npm and update to Node 22 Jan 27, 2026
@praveenkatha-nr praveenkatha-nr merged commit 3c6a1ab into release Jan 27, 2026
14 checks passed
@praveenkatha-nr praveenkatha-nr deleted the chore/migrate-to-npm-and-node22 branch January 27, 2026 17:17
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

Comments