Skip to content

Conversation

@JasonSooter
Copy link
Contributor

Before this PR

  • Node 18 used for local development and CI/CD
  • lint-staged v13.3.0 with micromatch security vulnerability (moderate severity)

After this PR

  • Node 22 now used for Segment Functions
  • lint-staged updated to v16.2.7 resolving all security vulnerabilities (0 vulnerabilities)
  • Upgraded all devDependencies given they aren't used by the code in production
  • ESLint pinned to v8.x to maintain .eslintrc.js config compatibility
  • Pre-commit hook now runs lint-staged before tests

Reason that prompted this change

Test Plan

  • All unit tests continue to pass
  • ESLint runs successfully
  • Code remains identical; only Node runtime version changes

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the Node.js runtime from version 18 to version 22 and updates all development dependencies to resolve security vulnerabilities. The upgrade addresses a moderate severity vulnerability in micromatch (via lint-staged v13.3.0).

Changes:

  • Node.js runtime upgraded from v18 to v22 in .nvmrc, package.json, and all workflows
  • All devDependencies upgraded to latest compatible versions, with lint-staged moving from v13.0.3 to v16.2.7
  • GitHub Actions updated from actions/checkout@v4 to v6 and actions/setup-node@v4 to v6
  • Husky configuration migrated from legacy format to v9.x with enhanced pre-commit script that enforces Node 22 requirement

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
package.json Updated Node engine to 22, upgraded all devDependencies, migrated husky config from inline hooks to script-based approach
.nvmrc Changed Node version from 18 to 22
.husky/pre-commit Replaced simple husky.sh loader with comprehensive script that loads NVM, validates Node 22, and runs lint-staged before tests
.github/workflows/deployFunction.yml Updated GitHub Actions to v6 for both checkout and setup-node across all environments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JasonSooter JasonSooter merged commit adadc3a into main Jan 15, 2026
10 of 12 checks passed
@JasonSooter JasonSooter deleted the chore/upgrade-to-node-22 branch January 15, 2026 18:26
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