Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oxc-transform npm package: allow options argument to isolatedDeclaration to be optional? #5871

Closed
MichaelMitchell-at opened this issue Sep 19, 2024 · 2 comments · Fixed by #5880
Assignees
Labels
C-bug Category - Bug

Comments

@MichaelMitchell-at
Copy link
Contributor

#5170 added support for sourcemaps and a third "options" argument to isolatedDeclaration, but starting in v0.26.0 the third argument became required. If you omit the third argument you get:

Uncaught TypeError: Cannot convert undefined or null to object

and if you pass in {} as the third argument you get

Uncaught [Error: Missing field sourcemap] { code: 'InvalidArg' }

This differs from the transform function, where the third argument is optional and the default behavior is equivalent to passing in {sourcemap: false}.

@MichaelMitchell-at MichaelMitchell-at added the C-bug Category - Bug label Sep 19, 2024
@Boshen Boshen self-assigned this Sep 19, 2024
@Boshen
Copy link
Member

Boshen commented Sep 19, 2024

@MichaelMitchell-at I assume you are using oxc at Airtable, feel free to dm me on Discord or twitter if you wish for a direct line of communication for higher level support.

@MichaelMitchell-at
Copy link
Contributor Author

@MichaelMitchell-at I assume you are using oxc at Airtable

Almost! Hoping to by the end of the week.

FWIW we're planning to be using the Rust crates directly now instead of the npm package, so this issue isn't blocking us :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants