Commit graph

30 commits

Author SHA1 Message Date
Boshen
a0ccc26c12 feat(napi/transform): add lang option to change source type (#6309)
part of #6274 and #6156

```
    /// Treat the source text as `js`, `jsx`, `ts`, or `tsx`.
    #[napi(ts_type = "'js' | 'jsx' | 'ts' | 'tsx'")]
    pub lang: Option<String>,
```
2024-10-06 04:53:47 +00:00
Boshen
294da86283
fix(napi/transform): fix index.d.ts 2024-10-03 08:52:10 +08:00
Boshen
099ff3a033 refactor(napi/transform): remove "Binding" from types; fix type error (#6260)
closes #6254
closes #6255
2024-10-03 00:44:07 +00:00
Boshen
f98e12c13a feat(napi/transform): add inject plugin (#6250) 2024-10-02 15:15:51 +00:00
Boshen
291891e71a feat(napi/transform): add define option (#6212)
part of #6156
2024-10-01 12:57:29 +00:00
Boshen
afc3ccbece feat(napi/transform)!: rename TransformOptions::react to jsx. (#6211) 2024-10-01 10:25:21 +00:00
Boshen
51a78d5946
feat(napi/transform): rename all mention of React to Jsx; remove mention of Binding (#6198)
This does not alter field names nor file names.

part of #6156
2024-10-01 11:52:50 +08:00
Boshen
f27d59f748 fix(napi/transform): remove confusing jsx option (#6159) 2024-09-29 04:09:53 +00:00
Boshen
f50fdcd0f9 feat(napi/transform): make react refresh option take a boolean (#6146) 2024-09-28 14:52:46 +00:00
Boshen
6f98aadc7f fix(sourcemap): align sourcemap type with Rollup (#6133)
closes #5578
2024-09-28 04:24:05 +00:00
Boshen
84a5816d03
feat(isolated_declarations): add stripInternal (#5878)
closes #3906
closes #5687
closes #3958

---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2024-09-19 23:14:47 +08:00
Boshen
127c88134e fix(napi/transform): fix jsdoc links (#5886) 2024-09-19 13:55:29 +00:00
Boshen
6c04fa1e46 fix(napi/transform): make isolated_declaration options optional (#5880)
closes #5871
2024-09-19 08:07:54 +00:00
Boshen
e698418d1a feat(napi/transform): align output SourceMap with Rollup's ExistingRawSourceMap (#5657)
closes #5578
2024-09-09 15:55:23 +00:00
Boshen
dc741e471f
chore: do not format napi generated files 2024-09-08 13:42:15 +08:00
Boshen
d00a1f6511
chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
underfin
aba9194ebc
feat(napi/transform): export react refresh options (#5533)
Co-authored-by: Boshen <boshenc@gmail.com>
2024-09-08 08:42:17 +08:00
Boshen
ea7a52f1b4
fix(napi/transform): fix test 2024-09-03 11:03:44 +08:00
Dunqing
0abfc5049f feat(transformer/typescript): support rewrite_import_extensions option (#5399)
close: #5395

Babel only supports `rewrite`, we also support `remove`
2024-09-03 01:57:42 +00:00
Boshen
b1d0075359 feat(napi/transform)!: align output API sourceText -> code with babel (#5398)
And `sourceMap` -> `map`

closes #5397
2024-09-02 07:53:46 +00:00
dalaoshu
72740b3f78
feat(isolated_declaration): support sourcemap option (#5170)
closes #4313
2024-08-25 13:32:47 +08:00
Boshen
01d85de834
fix(napi/transform): update napi files 2024-08-06 19:35:58 +08:00
DonIsaac
9b51e045c7 refactor: overhaul napi transformer package (#4592)
## What This PR Does
- Support declaration emit with `transform()`
- Consolidate shared parsing and error reporting logic into a `TransformContext`
- Add JSDoc comments to options

I'm getting this package ready for consumption in [oxc-jest](https://github.com/oxc-project/oxc-jest).
2024-08-06 01:14:10 +00:00
Boshen
27cbd551fb chore: bump napi to v3 (#4365) 2024-07-19 14:06:33 +00:00
Boshen
725571aad1 feat(napi/transformer): add jsx option to force parsing with jsx (#4133)
To mimic the esbuild `loader=jsx` or babel `babel-plugin-syntax-jsx` behavior.
2024-07-10 11:12:10 +00:00
underfin
0b56d50899
chore(napi): make transformer options optional (#3989) 2024-07-01 16:45:00 +08:00
Boshen
e44963acda
Revert "chore(napi/transform): support wasm build (#3933)"
This reverts commit 3e9e4c9912.
2024-06-30 22:04:36 +08:00
Dunqing
3e9e4c9912
chore(napi/transform): support wasm build (#3933)
~~Encountered the same problem as
https://github.com/oxc-project/oxc-resolver/issues/190. Fixed in
napi@2.16.7, but oxc use `3.x`~~

Fixed in napi@3.0.0-alpha.3
2024-06-30 19:49:02 +08:00
underfin
d3cd3ea2de
feat: oxc transform binding (#3896)
closes #3877

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-06-26 21:57:19 +08:00
Boshen
f42c325a06 refactor(napi): change "isolated declarations" to "transform" (#3721) 2024-06-17 14:09:18 +00:00
Renamed from napi/isolated-declarations/index.d.ts (Browse further)