Skip to content

chore: drop Node 20 and target ES2023 - #283

Merged
ulissesferreira merged 1 commit into
mainfrom
chore/drop-node20-es2023
Sep 7, 2026
Merged

chore: drop Node 20 and target ES2023#283
ulissesferreira merged 1 commit into
mainfrom
chore/drop-node20-es2023

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Explanation

Re-application of the non-ESM parts of #273, which was closed pending more confidence that the ESM migration wouldn't impact the extraction of TSX/JSX Snap UI components. This PR therefore contains no ESM-only, ts-bridge, or lodash-es changes — only the runtime and TypeScript toolchain bumps:

Drop Node 20

  • Node 18 and 20 are EOL. engines.node is now ^22.14.0 || ^24 in the root and all packages, enforced by the Yarn constraints, and the CI test matrix now runs on 22.x and 24.x only.

ES2023

  • The shared TypeScript target and lib settings are bumped from ES2020 to ES2023, so the library and script configs now match the Snap packages, which already declare ES2023.
  • Why ES2023 is safe:
    • target: ES2023 emits identical code to ES2022 — ES2023 introduced no new syntax.
    • lib: ES2023 is type-checking only (nothing is polyfilled): it surfaces Array.prototype.findLast/findLastIndex (Node 18+), change-array-by-copy toSorted/toReversed/toSpliced/with (Node 20+), all fully supported on Node 22 and 24, i.e. exactly the versions we run after dropping Node 20.
    • The shared package is consumed by the Snaps, whose configs already assume ES2023, so matching removes the inconsistency.

Snap manifest shasums changed because mm-snap re-bundles with the ES2023 target.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@ulissesferreira
ulissesferreira requested review from a team as code owners September 7, 2026 13:08
@ulissesferreira
ulissesferreira force-pushed the chore/drop-node20-es2023 branch from 0c985c8 to 02ad652 Compare September 7, 2026 13:08
- Node 18 and 20 are EOL: `engines.node` is now `^22.14.0 || ^24` in the
  root and all packages, enforced by the Yarn constraints, and the CI test
  matrix runs on 22.x and 24.x only.
- Shared TypeScript `target` and `lib` settings are bumped from ES2020 to
  ES2023, matching the Snap packages, which already target ES2023. ES2023
  adds no syntax over ES2022, and all ES2023 library features are
  supported on Node 22 and 24.
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@taran-a taran-a left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ulissesferreira
ulissesferreira added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 7a52443 Sep 7, 2026
95 checks passed
@ulissesferreira
ulissesferreira deleted the chore/drop-node20-es2023 branch September 7, 2026 15:32
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.

2 participants