Commit graph

109 commits

Author SHA1 Message Date
Boshen
3419306ac0
feat(transformer): add filename (#2941) 2024-04-11 18:43:51 +08:00
Boshen
293b9f482a
feat(transformer): add transform-typescript boilerplate (#2866) 2024-03-30 20:48:35 +08:00
Boshen
c1a2958a5a
chore: remove oxc_transformer for a reimplementation (#2865)
closes #2860
2024-03-30 17:19:46 +08:00
underfin
d9b77d853b
refactor(sourcemap): change sourcemap name to take a reference (#2779) 2024-03-23 21:40:05 +08:00
overlookmotel
75226f3b4a
chore: silence erroneous RA warnings for Tsify (#2731) 2024-03-15 12:42:12 +00:00
Boshen
697b6b70c0
feat: merge features serde and wasm to serialize (#2716)
This PR merges the previous confusing features `serde` and `wasm` into a
single `serialize` feature.

We'll eventually do serialize + type information for both wasm and napi
targets.

`oxc_macros` is removed from `oxc_ast`'s dependency because it requires
`syn` and friends, which goes against our policy ["Third-party
dependencies should be
minimal."](https://oxc-project.github.io/docs/contribute/rules.html#development-policy)
2024-03-14 17:13:12 +08:00
Boshen
0f86333437
refactor(ast): refactor Trivias API - have less noise around it (#2692) 2024-03-12 20:16:36 +08:00
Wang Wenzhe
a218242632
fix(wasm): use default compress option when compress is opened in playground (#2661)
Closes: #2645
2024-03-10 14:29:29 +08:00
Boshen
ef932a3c27
refactor(codegen): clean up API around building sourcemaps (#2602)
closes #2564
2024-03-04 16:03:33 +08:00
Boshen
6b42233628
feat(playground): display comments (#2599) 2024-03-04 14:02:22 +08:00
Arnaud Barré
9d4e255a73
feat(playground): support TS codegen (#2587) 2024-03-04 11:33:48 +08:00
Dunqing
3807d83767
feat(wasm): call build module record when symbol is true (#2533)
symbols depend on module record
2024-02-28 14:47:34 +08:00
Dunqing
f760108094
feat(transformer): call build module record (#2529) 2024-02-28 14:35:35 +08:00
Arnaud Barré
76add55031
Support file type in playground (#2520)
<img width="1514" alt="Screenshot 2024-02-27 at 00 16 21"
src="https://github.com/oxc-project/oxc/assets/14235743/32fee380-a2c1-41b3-a564-351597d4a60e">

Not sure about the bindgen thing.

I made the filename optional but given the impact on parsing I think it
could be great for external users to not depend on the tsx default in
the future
2024-02-27 12:54:38 +08:00
Andrew McClenaghan
e6d536cb9b
feat(codegen): configurable typescript codegen (#2443)
- Adds option to `CodegenOptions` - `enable_typescript` to enable output
of TS.
- Stops skipping output that is TS when `enable_typescript` is enabled
- Adds TS support to 
    - Function
    - FormalParameter
    - BindingPattern
 - Adds basic tests for TS generation

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-02-20 12:09:28 +08:00
Dunqing
3ff3495126
fix(playground): syntax check does not work (#2412) 2024-02-15 20:05:14 +08:00
Boshen
3ea6c95371
fix(playground): only lint when there are no syntax errors (#2400) 2024-02-12 13:44:44 +08:00
Boshen
63dbac764f
chore(wasm): remove console_error_panic_hook
We don't really need it.
2024-02-02 17:02:01 +08:00
Dunqing
f673e41539
feat(ast): remove serde skip for symbol_id and reference_id (#2220)
We want to see symbol_id and reference_id in ast
2024-01-30 21:03:05 +08:00
Nicholas Roberts
cd5026c015
feat(ast): TypeScript definition for wasm target (#2158)
Closes #2151
2024-01-30 15:43:03 +08:00
msdlisper
a36813405b
refactor(linter): perfect the scope linter (#2092)
perfect the scope linter for #1141
2024-01-20 10:46:35 +08:00
Boshen
ae4e714713
refactor(linter): remove the LintSettings parameter from LintContext::new. (#2051) 2024-01-16 17:17:46 +08:00
Boshen
f4132976e9
chore: say good bye to ezno (#2048)
ezno has decided to focus on its own compiler for 2024,
we part away but we still collaborate and share knowledge together.
2024-01-16 13:53:54 +08:00
dependabot[bot]
21909fa962
chore(deps): bump the dependencies group with 3 updates (#2033) 2024-01-15 15:31:32 +08:00
Boshen
0f6674563e
chore: remove DSL based linter plugin (#1985)
Due to maintenance issues, we are going to stop exploring a linter based
DSL plugins.
2024-01-11 04:54:39 +00:00
Boshen
a6717db423
refactor(formatter,linter,codegen): remove oxc_formatter (#1968)
closes #1941
2024-01-10 06:41:20 +00:00
Dunqing
f1b433b126
feat(playground): visualize symbol (#1886)
close: https://github.com/oxc-project/oxc/issues/1048
2024-01-04 15:36:31 +08:00
Dunqing
45a7985524
feat(playground): visualize scope (#1882)
Partial support https://github.com/oxc-project/oxc/issues/1048
2024-01-03 16:10:42 +08:00
msdlisper
6a90cd4af4
feat(linter): add jsx-a11y settings (#1668)
When we developed linter for #1141 , we needed to configure some
settings for `jsx-a11y`, which was not supported before, but I am trying
to support it now.
like this:
```
fn config() -> serde_json::Value {
    serde_json::json!([2,{
        "ignoreNonDOM": true
    }])
}

fn settings() -> serde_json::Value {
    serde_json::json!({
        "jsx-a11y": {
            "components": {
                "Button": "button",
            }
        }
    })
}

let pass = vec![
    ("<Button />", Some(config()), Some(settings())),
];
```
2023-12-16 13:45:14 +08:00
dependabot[bot]
a3b52fb548
chore(deps): bump the dependencies group with 7 updates (#1651) 2023-12-11 14:21:56 +08:00
dependabot[bot]
09618e9db0
chore(deps): bump the dependencies group with 2 updates (#1623) 2023-12-04 15:26:44 +08:00
Wenzhe Wang
3fe9cccb9e
feat(playground): format Prettier IR (#1567) 2023-11-28 13:51:47 +08:00
Boshen
272f6d292d
fix(wasm): fix prettier crashing 2023-11-22 21:27:47 +08:00
Boshen
7af6d129cb
fix(wasm): turn off Parser::preserve_parens for the playground (#1498) 2023-11-22 19:45:26 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08:00
Boshen
fb7cdc6687
refactor(prettier): impl Display for Doc (#1401) 2023-11-18 11:17:03 +08:00
Boshen
128406a8ab
Rust v1.74.0 (#1357) 2023-11-16 15:21:45 +00:00
Shannon Rothe
abd5924ce9
feat(playground): add prettier IR output (#1350)
<img width="1549" alt="image"
src="https://github.com/oxc-project/oxc/assets/803013/08046826-9141-48ce-985d-6dd22642bfd6">

- Close: #1338
2023-11-16 20:42:02 +08:00
Shannon Rothe
735beb7fab
feat(playground): add prettier formatting + IR (#1349)
- [x] add Prettier format button which takes source text and updates
view with formatted source text
- [ ] add button to show Prettier IR
2023-11-16 09:33:37 +00:00
Boshen
9780621925
chore: run fmt 2023-11-16 13:36:42 +08:00
Boshen
73d6d40778
rust: do not compile libs and bins that do not have tests (#1342) 2023-11-16 13:35:24 +08:00
Boshen
eca98cf2ed
s/web-infra-dev/oxc-project 2023-11-10 14:30:18 +08:00
Dunqing
8c624abf9c
feat(transformer/react-jsx): throw the pragma and pragmaFrag cannot be set when runtime is automatic error (#1196)
close: #1194

Here's a rough implementation of my idea of throwing an error.
2023-11-10 12:50:54 +08:00
dependabot[bot]
167dedcca7
chore(deps): bump the dependencies group with 6 updates (#1165) 2023-11-06 15:11:02 +08:00
Boshen
69150d812c
refactor(transformer): move Semantic into Transformer (#1130) 2023-11-02 13:10:15 +08:00
dependabot[bot]
bf1e3b5440
chore(deps): bump the dependencies group with 4 updates (#1100) 2023-10-30 15:09:28 +08:00
Boshen
46a5c42c75
refactor(transformer): add TransformerCtx struct for easier access to symbols and scopes 2023-10-19 16:19:27 +08:00
Boshen
1b3b100475
feat(transformer_conformance): read plugins options from babel options.json (#1006)
This PR correctly handles babel `options.json` such as
https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-nullish-coalescing-operator/test/fixtures/assumption-noDocumentAll/options.json
2023-10-17 14:52:51 +08:00
Boshen
678db1d955
feat(transformer): ES2020 Nullish Coalescing Operator (#1004)
The test runner needs an update for reading options.jon, which I'll work
on in the up coming PR.
2023-10-16 21:45:58 +08:00
Boshen
eaeb63072f
refactor(clippy): allow struct_excessive_bools 2023-10-16 15:18:07 +08:00