Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
9a23ea0 to
7ef41e5
Compare
CodSpeed Performance ReportMerging #16383 will not alter performanceComparing Summary
Footnotes
|
26a2bb6 to
6ed4e97
Compare
|
Looks like new version of NAPI-RS changes the field order of objects. This is causing a few of the ESTree conformance tests for parser to fail. |
…16403) NAPI-RS 3.6.0 makes a change to the ordering of objects. It now puts optional fields last. This made tests in `napi/parser` for module record fail when we tried to update (#16383) because the `module_request` field of `ExportEntry` moves to last which breaks the snapshots. The change in NAPI-RS is unlikely to be reverted, because it's a sizeable perf optimization: napi-rs/napi-rs#2990 To work around this problem: 1. Move the field in the `ExportEntry` intermediate struct in `napi/parser` to last, so NAPI's output matches what you'd expect from the struct definition. 2. Alter the `#[estree]` attr on `ExportEntry` struct in `oxc_syntax` crate to match. Note: The `ExportEntry` struct in `napi/parser` is just an intermediate structure used for serialization. So I think it's fine to fiddle with its field order. The actual `ExportEntry` struct used in the module record is in `oxc_syntax` crate, and it remains unaltered.
6ed4e97 to
73ae8fb
Compare
|
After #16403, and an extra commit pushed to this branch to fix |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
…ll` (#16411) Follow-on after #16383 and #16403. While working on those I discovered an option NAPI-RS has to represent `Option::None` as `null`, instead of omitting the field entirely. Use that option on the structs used for transferring errors and module record over to JS. I think this is likely more performant because: 1. NAPI-RS can create all properties of the objects using only the faster `node_api_create_object_with_properties` API. 2. It produces consistent object shapes, so JS engine can better optimize code using these objects. It also brings the shape of the data perfectly into line between standard transfer and raw transfer, and is consistent with how empty fields in the AST are represented as `null`. I would have used this option before if I'd known it existed. ### Breaking change I've marked this as a breaking change because code consuming these objects would now need to check for empty fields with `value === null` instead of `value === undefined`. However in practice, most people probably use `!value` or `value ?? ...`, so it's unlikely to affect many users. This only affects module record and errors anyway, not the AST itself, as we transfer that as JSON, not via NAPI.
…ll` (oxc-project#16411) Follow-on after oxc-project#16383 and oxc-project#16403. While working on those I discovered an option NAPI-RS has to represent `Option::None` as `null`, instead of omitting the field entirely. Use that option on the structs used for transferring errors and module record over to JS. I think this is likely more performant because: 1. NAPI-RS can create all properties of the objects using only the faster `node_api_create_object_with_properties` API. 2. It produces consistent object shapes, so JS engine can better optimize code using these objects. It also brings the shape of the data perfectly into line between standard transfer and raw transfer, and is consistent with how empty fields in the AST are represented as `null`. I would have used this option before if I'd known it existed. ### Breaking change I've marked this as a breaking change because code consuming these objects would now need to check for empty fields with `value === null` instead of `value === undefined`. However in practice, most people probably use `!value` or `value ?? ...`, so it's unlikely to affect many users. This only affects module record and errors anyway, not the AST itself, as we transfer that as JSON, not via NAPI.
…xc-project#16403) NAPI-RS 3.6.0 makes a change to the ordering of objects. It now puts optional fields last. This made tests in `napi/parser` for module record fail when we tried to update (oxc-project#16383) because the `module_request` field of `ExportEntry` moves to last which breaks the snapshots. The change in NAPI-RS is unlikely to be reverted, because it's a sizeable perf optimization: napi-rs/napi-rs#2990 To work around this problem: 1. Move the field in the `ExportEntry` intermediate struct in `napi/parser` to last, so NAPI's output matches what you'd expect from the struct definition. 2. Alter the `#[estree]` attr on `ExportEntry` struct in `oxc_syntax` crate to match. Note: The `ExportEntry` struct in `napi/parser` is just an intermediate structure used for serialization. So I think it's fine to fiddle with its field order. The actual `ExportEntry` struct used in the module record is in `oxc_syntax` crate, and it remains unaltered.
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@napi-rs/cli](https://github.com/napi-rs/napi-rs) | [`3.4.1` -> `3.5.0`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.4.1/3.5.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | pnpm.catalog.default | minor | | [napi](https://github.com/napi-rs/napi-rs) | `3.5.2` -> `3.6.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | | [napi-derive](https://github.com/napi-rs/napi-rs) | `3.3.3` -> `3.4.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | minor | --- ### Release Notes <details> <summary>napi-rs/napi-rs (@&oxc-project#8203;napi-rs/cli)</summary> ### [`v3.5.0`](https://github.com/napi-rs/napi-rs/releases/tag/napi-v3.5.0) [Compare Source](https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.4.1...@napi-rs/cli@3.5.0) ##### Added - *(sys)* use libloading to load napi symbols at runtime on all platform ([#&oxc-project#8203;2996](https://github.com/napi-rs/napi-rs/pull/2996)) ##### Fixed - *(napi)* memory leak in PromiseRaw cleanup callback ([#&oxc-project#8203;2995](https://github.com/napi-rs/napi-rs/pull/2995)) ##### Other - *(napi)* mark tsfn data as pub and split SendableResolver to indent file ([#&oxc-project#8203;2992](https://github.com/napi-rs/napi-rs/pull/2992)) - *(napi)* mark SendableResolver and PromiseRaw as pub ([#&oxc-project#8203;2981](https://github.com/napi-rs/napi-rs/pull/2981)) - add sponsors </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xOS45IiwidXBkYXRlZEluVmVyIjoiNDIuMTkuOSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
…ll` (oxc-project#16411) Follow-on after oxc-project#16383 and oxc-project#16403. While working on those I discovered an option NAPI-RS has to represent `Option::None` as `null`, instead of omitting the field entirely. Use that option on the structs used for transferring errors and module record over to JS. I think this is likely more performant because: 1. NAPI-RS can create all properties of the objects using only the faster `node_api_create_object_with_properties` API. 2. It produces consistent object shapes, so JS engine can better optimize code using these objects. It also brings the shape of the data perfectly into line between standard transfer and raw transfer, and is consistent with how empty fields in the AST are represented as `null`. I would have used this option before if I'd known it existed. ### Breaking change I've marked this as a breaking change because code consuming these objects would now need to check for empty fields with `value === null` instead of `value === undefined`. However in practice, most people probably use `!value` or `value ?? ...`, so it's unlikely to affect many users. This only affects module record and errors anyway, not the AST itself, as we transfer that as JSON, not via NAPI.
This PR contains the following updates:
3.4.1->3.5.03.5.2->3.6.13.3.3->3.4.0Release Notes
napi-rs/napi-rs (@napi-rs/cli)
v3.5.0Compare Source
Added
Fixed
Other
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.