feat: drop Node.js 18 and 20 support, keep only Node 22 and 24#16111
feat: drop Node.js 18 and 20 support, keep only Node 22 and 24#16111qfai wants to merge 7 commits into
Conversation
Update LtsNodeChecker supported versions to [22, 24], replace legacy node->func mapping entries with 22/24, bump SPFx default node fallback to 22, update template engines.node to '22 || 24', and bump version references in docs from 18/20 to 22. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
E2E Test Selection — AI SelectedWhy these tests: fx-core deps-checker/spfx changes trigger teamsApp/, teamsAgent/, declarativeAgent/, and feature/multienv; declarative-agent templates map to all declarativeAgent/* tests; custom-copilot and custom-engine-agent templates map to teamsAgent/DebugCustomCopilot*; default-bot maps to basicBot, basic-tab to basicTab, message-extension to basicMessageExtension, and teams-collaborator-agent to teamsCollaboratorAgent. Cases selected (21):
Need to run more tests?Comment on this PR:
Then re-run the workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #16111 +/- ##
========================================
Coverage 93.14% 93.15%
========================================
Files 608 608
Lines 36866 36868 +2
Branches 6890 6742 -148
========================================
+ Hits 34339 34343 +4
+ Misses 1882 1881 -1
+ Partials 645 644 -1
🚀 New features to boost your workflow:
|
…ode, and azure.bicep linuxFxVersion - 23 READMEs: supported versions 18/20/22 -> 22, 24 - 9 package.json.tpl: @types/node ^18.x or ^20.x -> ^22.0.0 - 10 azure.bicep: linuxFxVersion '~20' -> '~22' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…8/20 Per review feedback: '18, 20, 22' -> '22', '20, 22' -> '22'. Do not introduce 24 where it was not originally listed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…l.it.ts The environment-checker CI gate only runs on PRs that touch deps-checker. It surfaced a latent TS5 strict assertion-function check: 'const assert =' 'chai.assert' creates an unannotated alias, and TS now requires assertion functions to be referenced through an annotated binding. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…from func Azure Functions Core Tools >= 4.0.6280 changed its no-project hint from 'Unable to find project root' to 'Can't determine project language from files'. Latent assertion in funcTool.it.ts only matched the old text; the env-checker CI gate (triggered only on deps-checker PRs) caught it. Accept either message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ot introduce 24) All 19 template package.json.tpl engines.node values now follow the same rule we applied to READMEs: keep only versions originally listed, minus 18/20. '18 || 20 || 22' -> '22', '20 || 22' -> '22'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ VscUse Test Plan — All tests passedWhy these tests: PR only changes Node version references in docs, READMEs, package.json engines fields, and internal checker logic—no template functionality changes—so 2 smoke plans across different languages suffice as a basic sanity check. Branch diff: Plans run:
ℹ️ How were these tests selected?GitHub Copilot (GPT-4.1) analysed the PR title, description, and the diff between |
|
/atk-vsuse-test I want to test all affected template like spfx related, da related |
|
🎯 VscUse test plan hint from @qfai: The next |
Summary
First step of moving the toolkit to only support Node LTS (22 and 24). Drops all Node 18 / 20 references from code, tests, templates, and version numbers in docs. Doc wording is intentionally not changed to say "LTS" yet — that will land in a follow-up after QA verification.
Changes
Engine code (
packages/fx-core/src)deps-checker/internal/nodeChecker.ts—LtsNodeCheckersupported versions:["18", "20", "22"]→["22", "24"]deps-checker/internal/funcToolChecker.ts—nodeFuncVersionRangeMappingreplaced with{ "22": ">=4.0.5530", "24": ">=4.0.5530" }(legacy 12/14/16/18 entries dropped — now unreachable sinceLtsNodeCheckerrejects them upstream)generator/spfx/utils/constants.ts—DEFAULT_NODE_VERSION(fallback for SPFx-generatedengines.node)"18"→"22"Tests
funcToolChecker.test.ts— rewrotenodeVersionValidationDataArrto cover Node 22/24 against the new mappingtestToolChecker.test.ts— 8 occurrences ofv18.16.1→v22.22.3(generic Node version fixture; not testing version-check logic)cases/node.it.ts—ltsNodeRange"18 || 20 || 22"→"22 || 24"spfxGenerator.test.ts— twoDEFAULT_NODE_VERSIONfallback assertions 18 → 22Templates (
templates/vsc/**/package.json.tpl, 19 files)engines.node:"18 || 20 || 22"or"20 || 22"→"22 || 24"Docs (numbers only — no "LTS" wording yet)
packages/{api,fx-core,vscode-ui,sdk}/CONTRIBUTING.md:>= 18→>= 22packages/vscode-extension/README.md(SPFx section):v18.x→v22.xpackages/tests/README.md:node >= 18→node >= 22;"node-18"task →"node-22"templates/vsc/{ts,python}/basic-tab/README.md*:>=20→>=22Deliberately NOT changed
packages/server/buildExe.js—node18-win-x64pkg target; vercel/pkg 5.x doesn't ship prebuilt binaries for newer Node. Separate engineering work.packages/sdk/CHANGELOG.md— historical record.templates/unused/**— per repo convention.tests/component/deps-checker/data/node-version/package.json— generic semver range fixture, not LTS-set related.m365agents.local.yml.tplfunc: version: ^4.0.5530—^range still resolves to latest 4.x, satisfies the new mapping.Verification
funcToolChecker.test.ts: 43/43 pass (including the 8 new Node 22/24 cases)cases/nodeChecker.test.ts: 4/4 passspfxGenerator.test.ts: 58/58 passtestToolChecker.test.ts: 17 pass / 11 fail — the 11 failures are pre-existing on the baseline (verified by stashing this PR's changes and re-running), unrelated to this PR.Follow-ups
buildExe.jsoff vercel/pkg.nodeFuncVersionRangeMappingranges (currently both set conservatively to>=4.0.5530).workitem