Skip to content

chore(deps): update napi#16383

Merged
overlookmotel merged 2 commits intomainfrom
renovate/napi
Dec 2, 2025
Merged

chore(deps): update napi#16383
overlookmotel merged 2 commits intomainfrom
renovate/napi

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 2, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Type Update
@napi-rs/cli 3.4.1 -> 3.5.0 age adoption passing confidence pnpm.catalog.default minor
napi 3.5.2 -> 3.6.1 age adoption passing confidence workspace.dependencies minor
napi-derive 3.3.3 -> 3.4.0 age adoption passing confidence workspace.dependencies minor

Release Notes

napi-rs/napi-rs (@​napi-rs/cli)

v3.5.0

Compare Source

Added
  • (sys) use libloading to load napi symbols at runtime on all platform (#​2996)
Fixed
  • (napi) memory leak in PromiseRaw cleanup callback (#​2995)
Other
  • (napi) mark tsfn data as pub and split SendableResolver to indent file (#​2992)
  • (napi) mark SendableResolver and PromiseRaw as pub (#​2981)
  • add sponsors

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 2, 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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Dec 2, 2025
@renovate renovate bot changed the title chore(deps): update dependency @napi-rs/cli to v3.5.0 chore(deps): update napi Dec 2, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 2, 2025

CodSpeed Performance Report

Merging #16383 will not alter performance

Comparing renovate/napi (5faea8a) with main (12bd794)

Summary

✅ 42 untouched
⏩ 3 skipped1

Footnotes

  1. 3 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.

@renovate renovate bot force-pushed the renovate/napi branch 10 times, most recently from 26a2bb6 to 6ed4e97 Compare December 2, 2025 14:39
@overlookmotel
Copy link
Member

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.

graphite-app bot pushed a commit that referenced this pull request Dec 2, 2025
…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.
@github-actions github-actions bot added the A-parser Area - Parser label Dec 2, 2025
@overlookmotel
Copy link
Member

overlookmotel commented Dec 2, 2025

After #16403, and an extra commit pushed to this branch to fix napi/parser tests, CI should now pass (hopefully).

@renovate
Copy link
Contributor Author

renovate bot commented Dec 2, 2025

Edited/Blocked Notification

Renovate 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.

⚠️ Warning: custom changes will be lost.

@overlookmotel overlookmotel merged commit 7731160 into main Dec 2, 2025
30 checks passed
@overlookmotel overlookmotel deleted the renovate/napi branch December 2, 2025 18:27
graphite-app bot pushed a commit that referenced this pull request Dec 2, 2025
…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.
Afsoon pushed a commit to Afsoon/oxc that referenced this pull request Dec 3, 2025
…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.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…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.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
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) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.4.1/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.4.1/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| pnpm.catalog.default | minor |
| [napi](https://github.com/napi-rs/napi-rs) | `3.5.2` ->
`3.6.1` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/napi/3.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi/3.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi/3.5.2/3.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi/3.5.2/3.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| workspace.dependencies | minor |
| [napi-derive](https://github.com/napi-rs/napi-rs) | `3.3.3`
-> `3.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/crate/napi-derive/3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/crate/napi-derive/3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/crate/napi-derive/3.3.3/3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/crate/napi-derive/3.3.3/3.4.0?slim=true)](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>
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant