Skip to content

feat(tasks/compat_data): integrate node-compat-table#16831

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-14-feat_tasks_compat_data_integrate_node-compat-table_
Dec 18, 2025
Merged

feat(tasks/compat_data): integrate node-compat-table#16831
graphite-app[bot] merged 1 commit intomainfrom
12-14-feat_tasks_compat_data_integrate_node-compat-table_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 14, 2025

Node version changes:

  • TemplateLiterals: 8.10 -> 10.0
  • Classes: 5.0 -> 6.0
  • ObjectSuper: 5.0 -> 6.0
  • Spread: 5.0 -> 6.0
  • TypeofSymbol: 0.12 -> 4.0
  • OptionalChaining: 16.9 -> 16.1
  • PrivatePropertyInObject: 16.9 -> 16.4

fixes #11941
fixes rolldown/rolldown#7293

Copilot AI review requested due to automatic review settings December 14, 2025 15:01
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Dec 14, 2025
Copy link
Member Author

Boshen commented Dec 14, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Boshen Boshen marked this pull request as draft December 14, 2025 15:02
Copy link

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

The Node integration is directionally good, but build.js currently has fragile path resolution (versions file resolved via CWD) and inefficient/ambiguous merge behavior (undefined instead of deleting keys, plus O(n²) name lookups). reformatNodeCompatTable() is also harder to maintain due to repeated key reuse and non-deterministic readdirSync ordering. Addressing these will make the build more reliable and prevent subtle downstream interpretation issues.

Additional notes (1)
  • Performance | tasks/compat_data/build.js:54-106
    reformatNodeCompatTable() reads and parses every JSON file synchronously and unconditionally. For a task script that may be acceptable, but this is likely to become a noticeable bottleneck as the table grows.

Also, the nested for (const key in ...) reuses the identifier key at multiple levels, which makes it easy to introduce subtle bugs during maintenance (e.g., referencing the wrong key in a future edit).

Summary of changes

tasks/compat_data integration of node-compat-table

  • Added node:path usage and new logic in tasks/compat_data/build.js to override Node environment version metadata from ../coverage/node-compat-table/v8.versions.
  • Implemented a reformatNodeCompatTable() pipeline to read node-compat-table V8 result JSON files, normalize them into a Kangax-like tests structure, and merge Node-specific results into the existing compat-table-derived compatibilityTests.
  • Refactored test flattening into a helper flattenFeatureData() to unify handling of tests/subtests.
  • Updated tasks/compat_data/data.json to remove very old Node targets (e.g. 0.4, 0.6, 0.12) and to normalize many Node targets to x.0 style; also adjusted some minimum Node versions (notably several 10 -> 10.0, 16.9 -> 16.1/16.4 etc.).

Copy link
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 integrates the node-compat-table data source to provide more accurate Node.js version compatibility information. Instead of relying solely on the kangax compat-table for Node.js data, it now reads Node.js-specific compatibility data from a separate source and merges it into the existing compatibility tests.

Key changes:

  • Adds logic to read and parse Node.js version data from node-compat-table/v8.versions and compatibility test results
  • Implements a reformatNodeCompatTable function to transform Node.js compatibility data into a format compatible with the existing kangax table structure
  • Merges Node.js-specific test data into the existing compatibility tests, overriding previous Node.js version information

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tasks/compat_data/data.json Updates Node.js version numbers to use consistent patch version format (e.g., "4.0" instead of "4") and removes some outdated Node.js entries, reflecting the integration of new node-compat-table data
tasks/compat_data/build.js Adds node-compat-table integration logic including version parsing, data reformatting, and merging with existing compatibility test data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Boshen Boshen force-pushed the 12-14-feat_tasks_compat_data_integrate_node-compat-table_ branch from 1e0e1e1 to 4fe7af9 Compare December 18, 2025 08:23
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 18, 2025

CodSpeed Performance Report

Merging #16831 will not alter performance

Comparing 12-14-feat_tasks_compat_data_integrate_node-compat-table_ (83a51bd) with main (3d2b492)1

Summary

✅ 38 untouched
⏩ 7 skipped2

Footnotes

  1. No successful run was found on main (cf3dbfd) during the generation of this report, so 3d2b492 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen force-pushed the 12-14-feat_tasks_compat_data_integrate_node-compat-table_ branch from 3e8be9e to 83a51bd Compare December 18, 2025 08:46
@Boshen Boshen marked this pull request as ready for review December 18, 2025 08:47
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 18, 2025
Copy link
Member Author

Boshen commented Dec 18, 2025

Merge activity

Node version changes:

* TemplateLiterals: 8.10 -> 10.0
* Classes: 5.0 -> 6.0
* ObjectSuper: 5.0 -> 6.0
* Spread: 5.0 -> 6.0
* TypeofSymbol: 0.12 -> 4.0
* OptionalChaining: 16.9 -> 16.1
* PrivatePropertyInObject: 16.9 -> 16.4

fixes #11941
fixes rolldown/rolldown#7293
@graphite-app graphite-app bot force-pushed the 12-14-feat_tasks_compat_data_integrate_node-compat-table_ branch from 83a51bd to c16082c Compare December 18, 2025 10:21
@graphite-app graphite-app bot merged commit c16082c into main Dec 18, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 12-14-feat_tasks_compat_data_integrate_node-compat-table_ branch December 18, 2025 10:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 18, 2025
overlookmotel added a commit that referenced this pull request Dec 19, 2025
### 🚀 Features

- d209c21 allocator: Add cap to FixedSizeAllocatorPool and block when
exhausted (#17023) (Cameron)
- fb2af91 allocator: Add bitset utils (#17042) (zhaoting zhou)
- c16082c tasks/compat_data: Integrate `node-compat-table` (#16831)
(Boshen)
- 5586823 span: Extract TS declaration file check to its own function
(#17037) (camchenry)
- 3d2b492 minifier: Fold iife arrow functions in call expressions
(#16477) (Armano)
- 67e9f9e codegen: Keep comments on the export specifiers (#16943)
(夕舞八弦)
- cb515fa parser: Improve error message for `yield` as identifier usage
(#16950) (sapphi-red)
- dcc856b parser: Add help for `new_dynamic_import` error (#16949)
(sapphi-red)
- c3c79f8 parser: Improve import attribute value error message (#16948)
(sapphi-red)
- 291b57b ast_tools: Generate TS declaration files for deserializer and
walk files (#16912) (camc314)
- 74eae13 minifier: Remove unused import specifiers (#16797) (camc314)

### 🐛 Bug Fixes

- fb9e193 linter: OOM problems with custom plugins (#17082)
(overlookmotel)
- e59132b parser/napi: Fix lazy deser (#17069) (overlookmotel)
- a92faf0 ast_tools: Support `u128` in `assert_layouts` generator
(#17050) (overlookmotel)
- 47b4c2f minifier/docs: Correct hyperlink path in OPTIMIZATIONS.md
(#16986) (GRK)
- 3002649 transformer/typescript: Remove unused import equals
declaration (#16776) (Dunqing)
- 5a2af88 regular_expression: Correct named capture group reference
error (#16952) (sapphi-red)

### ⚡ Performance

- b657bb6 allocator: Reduce time `Mutex` lock is held in
`FixedSizeAllocatorPool::get` (#17079) (overlookmotel)
- 1f3b19b ast: `#[ast]` macro use `#[repr(transparent)]` for
single-field structs (#17052) (overlookmotel)
- 225f229 parser: Use SmallVec for duplicate default export detection
(#16801) (camc314)

### 📚 Documentation

- a9c419f traverse: Update safety comments (#16944) (overlookmotel)

Co-authored-by: overlookmotel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node14-node16.8.0 target erroneously replaces optional chaning transformer: do not lower optional chaining for node14 and node16

1 participant

Comments