Skip to content

feat: drop Node.js 18 and 20 support, keep only Node 22 and 24#16111

Open
qfai wants to merge 7 commits into
devfrom
qfai/drop-node-18-20-support
Open

feat: drop Node.js 18 and 20 support, keep only Node 22 and 24#16111
qfai wants to merge 7 commits into
devfrom
qfai/drop-node-18-20-support

Conversation

@qfai

@qfai qfai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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.tsLtsNodeChecker supported versions: ["18", "20", "22"]["22", "24"]
  • deps-checker/internal/funcToolChecker.tsnodeFuncVersionRangeMapping replaced with { "22": ">=4.0.5530", "24": ">=4.0.5530" } (legacy 12/14/16/18 entries dropped — now unreachable since LtsNodeChecker rejects them upstream)
  • generator/spfx/utils/constants.tsDEFAULT_NODE_VERSION (fallback for SPFx-generated engines.node) "18""22"

Tests

  • funcToolChecker.test.ts — rewrote nodeVersionValidationDataArr to cover Node 22/24 against the new mapping
  • testToolChecker.test.ts — 8 occurrences of v18.16.1v22.22.3 (generic Node version fixture; not testing version-check logic)
  • cases/node.it.tsltsNodeRange "18 || 20 || 22""22 || 24"
  • spfxGenerator.test.ts — two DEFAULT_NODE_VERSION fallback assertions 18 → 22

Templates (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>= 22
  • packages/vscode-extension/README.md (SPFx section): v18.xv22.x
  • packages/tests/README.md: node >= 18node >= 22; "node-18" task → "node-22"
  • templates/vsc/{ts,python}/basic-tab/README.md*: >=20>=22

Deliberately NOT changed

  • packages/server/buildExe.jsnode18-win-x64 pkg 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.
  • 6 DA-with-action templates' m365agents.local.yml.tpl func: 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 pass
  • spfxGenerator.test.ts: 58/58 pass
  • testToolChecker.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

  • Update wording in READMEs/CONTRIBUTING to "Node LTS" once QA has verified the new support matrix.
  • Decide whether to migrate buildExe.js off vercel/pkg.
  • Once we have confirmed Azure Functions Core Tools cutoffs for Node 22/24 from QA, tighten the nodeFuncVersionRangeMapping ranges (currently both set conservatively to >=4.0.5530).

workitem

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>
@qfai qfai temporarily deployed to engineering June 9, 2026 05:56 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 05:56 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

E2E Test Selection — AI Selected

Why 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):

  • ./declarativeAgent/DeclarativeAgentBasic.tests.ts
  • ./declarativeAgent/DeclarativeAgentWithApiKeyAuth.tests.ts
  • ./declarativeAgent/DeclarativeAgentWithEntra.tests.ts
  • ./declarativeAgent/DeclarativeAgentWithNoneAuth.tests.ts
  • ./declarativeAgent/DeclarativeAgentWithOAuth.tests.ts
  • ./declarativeAgent/DeclarativeAgentInvalidManifestShape.tests.ts
  • ./declarativeAgent/mcp/DeclarativeAgentMCPWithAuth.tests.ts
  • ./declarativeAgent/mcp/DeclarativeAgentMCPNoAuth.tests.ts
  • ./declarativeAgent/mcp/DeclarativeAgentMCPAuthEdgeCases.tests.ts
  • ./declarativeAgent/typespec/typespec.withAction.tests.ts
  • ./declarativeAgent/typespec/typespec.withoutAction.tests.ts
  • ./declarativeAgent/addKnowledge/AddWebSearchByAll.tests.ts
  • ./declarativeAgent/addKnowledge/AddWebSearchByUrl.tests.ts
  • ./teamsAgent/DebugCustomCopilotBasicBot.tests.ts
  • ./teamsAgent/DebugCustomCopilotRagBasicBot.tests.ts
  • ./teamsAgent/DebugCustomCopilotRagAiSearchBot.tests.ts
  • ./teamsAgent/teamsCollaboratorAgent.tests.ts
  • ./teamsApp/basicBot.tests.ts
  • ./teamsApp/basicTab.tests.ts
  • ./teamsApp/basicMessageExtension.tests.ts
  • ./feature/multienv.tests.ts

View pipeline run

Need to run more tests?

Comment on this PR:

  • /e2e-run ./path/to/test.tests.ts — add specific cases to AI selection
  • /e2e-run-all — run all e2e cases

Then re-run the workflow.

@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:02 — with GitHub Actions Inactive
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.15%. Comparing base (1bff6ff) to head (8ee513c).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@           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     
Files with missing lines Coverage Δ
...re/src/component/generator/spfx/utils/constants.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…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>
@qfai qfai temporarily deployed to engineering June 9, 2026 06:54 — with GitHub Actions Inactive
@qfai qfai temporarily deployed to engineering June 9, 2026 06:54 — with GitHub Actions Inactive
…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>
qfai and others added 3 commits June 9, 2026 15:20
…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>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

✅ VscUse Test Plan — All tests passed

Why 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: qfai/drop-node-18-20-supportdev

Plans run:

  • Basic_Custom_Engine_Azure_OpenAI_ts_Copilot_Remote_Debug
  • General_Teams_Agent_OpenAI_py_Remote_Debug

Step Status
1️⃣ Build VSIX (CD) ✅ Done
2️⃣ Build Docker image ✅ Done
3️⃣ Run UI tests ✅ All tests passed

🔗 Full pipeline results

ℹ️ How were these tests selected?

GitHub Copilot (GPT-4.1) analysed the PR title, description, and the diff between
qfai/drop-node-18-20-support and dev
to pick the most relevant test plans from packages/tests/vscuse/Index.md.

@qfai

qfai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/atk-vsuse-test I want to test all affected template like spfx related, da related

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🎯 VscUse test plan hint from @qfai:

I want to test all affected template like spfx related, da related

The next atk-vsuse-test run will pass this hint to the AI plan selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant