Skip to content

Require Node.js 22 and update CI to 22, 24, and 26 - #2009

Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 3 commits into
devfrom
ramsessanchez-nodejs-version-support
Oct 22, 2026
Merged

Ramses Sanchez-Hernandez (ramsessanchez) merged 3 commits into
devfrom
ramsessanchez-nodejs-version-support

Conversation

@ramsessanchez

@ramsessanchez Ramses Sanchez-Hernandez (ramsessanchez) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

A similar PR may already be submitted! Please search among the Pull request before creating one.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.

NOTE: PR's will be accepted only in case of appropriate information is provided below

Summary

  • Build and test on Node.js 22, 24, and 26 only in GitHub Actions, Azure Pipelines, and Travis; build the production release artifact on Node.js 22.
  • Raise the SDK, sample, and ESM test package engine minimum to Node.js 22 and align current and historical documentation.
  • Upgrade Node-based GitHub Actions to Node.js 24-based releases and replace Azure NodeTool@0 with UseNode@1.
  • Apply the JWT dependency patches and ESM Mocha upgrade required for Node.js 26 compatibility. Align sample Azure Identity and TypeScript versions with the existing SDK baseline, and infer the upload sample's stream type correctly.
  • Pin the transitive serialize-javascript dependency to exactly 7.1.1 using overrides in both the root and ESM npm projects, refreshing both lockfiles without upgrading the parent Mocha/Terser packages.
  • Preserve existing security checks, aggregate status checks, and artifact publication.

Motivation

Remove obsolete Node.js build selections and support claims, and establish a consistent minimum runtime and explicit CI matrix for new builds and releases. This is a breaking support-policy change: consumers must use Node.js 22 or newer.

The existing locked JWT dependencies imported the removed SlowBuffer API on Node.js 26, and the old ESM test runner hit a yargs module-loading failure. The dependency updates address these observed failures rather than performing a general dependency refresh.

The serializer follow-up explicitly pins version 7.1.1 for both independent npm installations, superseding the earlier 7.0.2 pin. Its Node.js 20+ requirement is covered by the new minimum. This remains a build/test dependency change, with no new SDK runtime dependencies or SDK source changes.

Provider-controlled Azure reporting/security tasks without newer supported bundled runtimes remain unchanged so their checks are not removed. External Azure DevOps release configuration is outside this checkout.

Searched existing pull requests before opening this one. The setup-node action upgrade overlaps #1988; this PR additionally coordinates the runtime support policy, release build, compatibility fixes, and documentation.

Test plan

Demonstrate the code is solid. Example: The exact commands you ran and their output.

Verified the final serializer 7.1.1 pin using isolated supported Node.js runtimes on Windows. Builds exercise Rollup/Terser serialization; serial and parallel tests exercise both Mocha versions:

Command Node.js 22.23.3 Node.js 24.22.0 Node.js 26.12.0
npm run build Passed Passed Passed
npm run test:cjs Passed Passed Passed
npm run test:cjs -- --parallel --jobs 2 --reporter dot Passed; 359 tests Passed; 359 tests Passed; 359 tests
npm --prefix test-esm test Passed; 1 test Passed; 1 test Passed; 1 test
npm --prefix test-esm test -- --parallel --jobs 2 Passed; 1 test Passed; 1 test Passed; 1 test
  • npm ci --no-audit --no-fund and npm --prefix test-esm ci --no-audit --no-fund: passed with the final serializer 7.1.1 lockfiles using Node.js 22.
  • Explicit lockfile and module-resolution assertions passed: both overrides, all serializer lock entries, and every installed Mocha/Terser serializer consumer resolve to exactly 7.1.1. Unrelated package metadata is unchanged by the 7.0.2-to-7.1.1 follow-up.
  • npm ls serialize-javascript --all: passed with version 7.1.1.
  • git diff --cached --check: passed before committing the 7.1.1 follow-up.
  • Earlier validation with the 7.0.2 pin: npm test passed on Node.js 22/24/26, including 352 browser tests per runtime using Chrome Headless 156. Browser tests were not rerun for the build/test-only 7.1.1 bump; the CJS suites were rerun as shown above.
  • npm --prefix samples run build:typescript: passed on Node.js 22/24/26 during the initial Node.js update.
  • npm run lint: not run.
  • Hosted GitHub Actions, Azure Pipelines, and Travis runs were not run locally; their results remain pending hosted execution.
  • Existing test suites cover the runtime matrix; no new standalone test cases were added.

Additional diagnostic limitations, not changes to the normal CI commands:

  • npm run test:cjs -- --parallel --jobs 2 fails in the existing JUnit reporter with Cannot read properties of undefined (reading 'testsuite'). An isolated serializer 6.0.2 baseline reproduced the same failure during the earlier investigation. Parallel serializer compatibility is verified with the built-in dot reporter; normal serial npm run test:cjs retains the unchanged JUnit reporter and passes with 7.1.1.
  • Earlier npm --prefix test-esm ls serialize-javascript --all reported ELSPROBLEMS for the linked SDK's dev-only Mocha/Terser ^6 ranges when traversing the root installation. That inventory diagnostic was not rerun for 7.1.1; both clean installs and explicit consumer-resolution checks pass with version 7.1.1.

Closing issues

N/A — no linked issue.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Use Node.js 22, 24, and 26 in CI and Node.js 22 for production artifacts. Align engines, workflow runtimes, documentation, and dependencies needed for Node.js 26 compatibility.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 37bb4a6b-a434-49e8-8017-3b488dc09bd1
Microsoft Graph DevX Tooling and others added 2 commits October 21, 2026 15:41
Override the transitive serializer in both npm projects and refresh their lockfiles without changing the parent tool versions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37bb4a6b-a434-49e8-8017-3b488dc09bd1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37bb4a6b-a434-49e8-8017-3b488dc09bd1
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) merged commit e6a6221 into dev Oct 22, 2026
8 checks passed
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