Skip to content

build(ts)!: emit ES2022 - #452

Open
BridgeAR wants to merge 2 commits into
mainfrom
BridgeAR/2026-11-27-es2022-target
Open

BridgeAR wants to merge 2 commits into
mainfrom
BridgeAR/2026-11-27-es2022-target

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

What does this PR do?

Emit ES2022 and declare Node.js 18 as the minimum runtime. The engine change is breaking for Node.js 16.

Motivation

Node.js 18 is the minimum in the README and release matrix. ES2022 keeps native class fields in the published JavaScript.

Additional Notes

Both targets produced identical pprof and OpenTelemetry bytes for two captured NestJS wall profiles.

Runtime pprof 6,113 pprof 5,599 OpenTelemetry 6,113 OpenTelemetry 5,599
Node 24.20.0 (V8 13.6) 15.16 → 13.21 9.52 → 9.79 32.12 → 33.61 29.68 → 29.55
Node 22.23.5 (V8 12.4) 15.95 → 16.71 11.21 → 11.38 42.57 → 41.78 35.46 → 37.02

Values are CPU ms per profile, ES2020 → ES2022, on macOS arm64. Seven alternating trials per build warmed up with 18 replays and timed 16 each. The means exclude the fastest and slowest trials. Trial ranges overlapped for every workload.

How to test the change?

Run npm test and npm run lint. On Node 18, rebuild the addon and run the pprof serializer, OpenTelemetry serializer, and source mapper suites.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Overall package size

Self size: 3.01 MB
Deduped: 4.14 MB
No deduping: 4.14 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | pprof-format | 2.4.1 | 924.37 kB | 924.37 kB | | source-map | 0.8.0 | 185.66 kB | 185.66 kB | | node-gyp-build | 4.8.4 | 13.86 kB | 13.86 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@BridgeAR BridgeAR added the semver-major Typically reserved for major breaking changes label Nov 30, 2026
szegedi
szegedi previously approved these changes Nov 30, 2026

@szegedi szegedi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agree with this. We already removed most of Node.js 16 support in #207 and #215 so updating package.json makes a lot of sense.

Comment thread tsconfig.json Resolved
BREAKING CHANGE: The package requires Node.js 18 or later.
The gts settings let TypeScript accept calls to Array.prototype.toSorted.
These calls throw a TypeError on Node.js 18.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-11-27-es2022-target branch from 04d14db to 56651c6 Compare November 30, 2026 14:37
@BridgeAR
BridgeAR marked this pull request as ready for review November 30, 2026 14:50

This branch has not been deployed

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

Labels

semver-major Typically reserved for major breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants