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

Copilot AI review requested due to automatic review settings January 15, 2026 17:32
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 for the Segment Destination Function template, along with updating development dependencies to resolve security vulnerabilities and maintain compatibility with the new Node version.

Changes:

  • Node.js runtime upgraded from 18 to 22 across all environments (.nvmrc, package.json, GitHub Actions)
  • Development dependencies updated including lint-staged (v13.3.0 → v16.2.7), husky (v8.0.1 → v9.1.7), and other tooling packages
  • Pre-commit hook enhanced with Node version verification and NVM setup logic
  • GitHub Actions workflows updated to use newer action versions (v4 → v6)
  • Documentation cleaned up to remove outdated version references

Reviewed changes

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

Show a summary per file
File Description
.nvmrc Updates Node version specification from 18 to 22
package.json Updates Node engine requirement and upgrades all devDependencies to versions compatible with Node 22
README.md Removes outdated Node version comment and fixes indentation formatting
.husky/pre-commit Adds NVM environment setup and Node 22 version verification with enhanced error messaging
.github/workflows/deployDestinationFunction.yml Updates GitHub Actions checkout and setup-node actions from v4 to v6

@JasonSooter JasonSooter merged commit 54f6e01 into main Jan 15, 2026
10 checks passed
@JasonSooter JasonSooter deleted the chore/upgrade-to-node-22 branch January 15, 2026 17:47
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