Skip to content

XS⚠️ ◾ Restore Node 20 Runtime Compatibility#791

Merged
muiriswoulfe merged 3 commits into
mainfrom
fix-node-20-compatibility
May 25, 2026
Merged

XS⚠️ ◾ Restore Node 20 Runtime Compatibility#791
muiriswoulfe merged 3 commits into
mainfrom
fix-node-20-compatibility

Conversation

@muiriswoulfe
Copy link
Copy Markdown
Member

@muiriswoulfe muiriswoulfe commented May 25, 2026

Summary

Some Azure DevOps Server agents execute the task under a Node 20 handler even when Node 24 is declared as the execution target. A recently introduced runtime API requires Node 21 or later and crashed the task on those agents.

This change replaces the call with a back-compatible implementation that works on any supported Node runtime.

Impact

Restores task execution on Azure DevOps Server agents that route to a Node 20 runtime. No behavioural change on Node 24 or later.

Fixes #790

@muiriswoulfe
Copy link
Copy Markdown
Member Author

muiriswoulfe commented May 25, 2026

PR Metrics

Thanks for keeping your pull request small.
⚠️ Consider adding additional tests.

Lines
Product Code 11
Test Code -
Subtotal 11
Ignored Code -
Total 11

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@muiriswoulfe muiriswoulfe changed the title Restore Node 20 Runtime Compatibility XS⚠️ ◾ Restore Node 20 Runtime Compatibility May 25, 2026
Copy link
Copy Markdown
Contributor

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 restores compatibility for Azure DevOps Server agents that still execute the task under a Node 20 handler by removing use of a Node 21+ runtime API (Object.groupBy) and replacing it with an equivalent manual grouping implementation in the metrics file-pattern logic.

Changes:

  • Replaced Object.groupBy usage with a Node 20-compatible loop-based grouping implementation for file matching patterns.

Comment thread src/task/src/metrics/codeMetrics.ts Outdated
@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@microsoft microsoft deleted a comment from muiriswoulfe May 25, 2026
Comment thread dist/index.mjs
@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@muiriswoulfe muiriswoulfe enabled auto-merge (squash) May 25, 2026 16:36
@muiriswoulfe muiriswoulfe merged commit 140f5ce into main May 25, 2026
34 checks passed
@muiriswoulfe muiriswoulfe deleted the fix-node-20-compatibility branch May 25, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pr.Metrics breaks all builds (groupby is not a function)

3 participants