Replies: 1 comment
-
|
Hi there, happy new year. I have barely bumped the APIs with napi v3.7.0 and the latest stable toolchain, tested on x86_64 Linux GNU, with 72/72 passed. The only changes to the test files are just using Here's my working branch. My next step:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I’m working on bumping the napi-rs dependency from v2 to v3. Before I push this further, I’d like to check whether this upgrade is actually worth it for lightningcss.
Why I’m considering it
x86_64-pc-windows-gnu/ MSYS2).What I'm not sure about
I’m still getting up to speed with lightningcss, napi-rs, and Rust, so I’d appreciate context/feedback on:
What I've done so far
transform,bundle, andbundleAsyncAPIs.bundleAsynccan accept both synchronous and asynchronous callbacks. The filenapi/src/threadsafe_function.rsis removed from the building process.res.code.toString(), sinceTransformResult.codewas annotated asUint8Array. That behavior looks confusing, and after returning an actualUint8Array,.toString()yields comma-separated byte values (e.g.65,66,67). The correct usage becomesnew TextDecoder().decode(res.code). If downstream users rely on.toString(), this could break them. I’m not sure whether we should preserve the old behavior (e.g. return a string) or treat this as a deliberate correction and document it.bundleAsync.If folks have opinions either way—especially any past discussion, known v2→v3 pitfalls, or guidance on the
codereturn type—I’d really appreciate it.Beta Was this translation helpful? Give feedback.
All reactions