Commit graph

684 commits

Author SHA1 Message Date
Boshen
95fc28168c
chore: apply cargo autoinherit (#2826)
See https://github.com/mainmatter/cargo-autoinherit
2024-03-26 23:57:50 +08:00
Dunqing
220f722f19
chore: update snapshots (#2817)
Babel repo is updated in #2813 and #2814
2024-03-26 11:53:26 +08:00
Boshen
e32a3b3783
ci: use cargo-shear (#2810) 2024-03-26 00:43:10 +08:00
renovate[bot]
3d761f17c2
chore(deps): lock file maintenance rust crates (#2804) 2024-03-25 17:24:30 +08:00
underfin
d9b77d853b
refactor(sourcemap): change sourcemap name to take a reference (#2779) 2024-03-23 21:40:05 +08:00
underfin
a2cfc867cb
feat: SourcemapVisualizer (#2773)
Export `SourcemapVisualizer` from codegen, it will be used oxc and
rolldown sourcemap test, so it support multiply source print, it will
using sourcemap `sourcesContent` as original source.
2024-03-21 11:19:09 +08:00
Danil Karpenko
1721feea0e
feat(prettier/ts): better conformance (#2721)
I know 5% isn't much, but it's small steps like this that move us toward
our goal.
2024-03-20 18:59:49 +08:00
renovate[bot]
1e9c0bc484
chore(deps): update rust crates (#2747) 2024-03-17 16:40:42 +00:00
Boshen
798a1fde09
fix(parser): fix failed to parse JSXChild after JSXEmptyExpression (#2726)
fixes #2723
2024-03-15 13:39:20 +08: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
underfin
9609c34e6d
fix(codegen): CallExpression sourcemap (#2717) 2024-03-14 07:53:22 +00:00
Boshen
0f86333437
refactor(ast): refactor Trivias API - have less noise around it (#2692) 2024-03-12 20:16:36 +08:00
Boshen
86ee074678
fix(parser): remove all duplicated comments in trivia builder (#2689) 2024-03-12 17:51:22 +08:00
Boshen
977c20b677
feat(coverage): add a duplicate comment check (#2688) 2024-03-12 16:52:34 +08:00
Boshen
cda9c93436
fix(parser): improve lexing of jsx identifier to fix duplicated comments after jsx name (#2687) 2024-03-12 15:51:51 +08:00
Boshen
6c6adb46d1
fix(ast): parse rest parameter with the correct optional and type annotation syntax (#2686)
closes #2653
2024-03-12 15:47:22 +08:00
Boshen
8a73d18fcf
chore(parser): make sure all span.end >= span.start (#2681)
closes #2679
2024-03-11 19:49:51 +08:00
Boshen
265b2fb640
feat: miette v7 (#2465) 2024-03-08 15:50:00 +08:00
magic-akari
17bc711bf0
fix(prettier): print bare import (#2633) 2024-03-07 14:03:20 +08:00
Boshen
240ff19675
refactor(parser): improve parsing of BindingPattern in TypeScript (#2624)
closes #2622
2024-03-06 16:16:03 +08:00
Arnaud Barré
97aa9cfd54
fix(parser): fix span end for TSEmptyBodyFunctionExpression (#2606)
https://oxc-project.github.io/oxc/playground/?code=3YCAAICXgICAgICAgICxG4jI43W9aqTWr3WzyAs1pNu4fnf%2FXXEB3Yt%2FfiBIgA%3D%3D

The conformance test are going back to initial state. I think the `.asi`
should be smarter, i can rethink that later

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-03-05 12:45:11 +08:00
Boshen
e2d2ce3369
feat(parser): parse decorators properly (#2603)
closes #2562
2024-03-04 19:30:41 +08:00
Boshen
ef932a3c27
refactor(codegen): clean up API around building sourcemaps (#2602)
closes #2564
2024-03-04 16:03:33 +08:00
Boshen
9cc960e591
fix(parser): fix duplicated comments during parser rewind (#2600)
closes #2592
2024-03-04 14:07:33 +08:00
Arnaud Barré
d9cc429d4a
fix(parser): parse empty method declaration as TSEmptyBodyFunctionExpression (#2574)
That a tricky one, because it's time to decide what does ESTree
compliant means in the TS world (re #2463)

This code:

```ts
export declare class ByteBuffer {
  clear(): void;
     // ^^
}
```

- Is parsed by
[Babel](d38530204e)
as `FunctionExpression` with an empty body
- By
[TS-ESLint](4ea4e2feb5)
as
[TSEmptyBodyFunctionExpression](https://github.com/typescript-eslint/typescript-eslint/pull/1289)
- By
[OXC](https://oxc-project.github.io/oxc/playground/?code=3YCAAIC1gICAgICAgICyHorESipoTXPdvBaE9wxzlOraoWs19SUxDvdcwSVU0kbBO2b7ppX3x2P5IhQlpGHOYEHNCEfLf38HUICA)
as `TSDeclareFunction`

I'm going the easy way to fix this to the Babel way, but I think
following TS-ESLint would make sense. There is an [open babel
issue](https://github.com/babel/babel/issues/13878) about that.

Edit: Ok that not so easy and require updating some logic.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-03-03 13:59:17 +00:00
Boshen
8bb1084863
feat(codegen): add sourcemap (#2565)
Co-authored-by: underfin <2218301630@qq.com>
2024-03-03 14:44:49 +08:00
Boshen
3efbbb2e1f
feat(ast): add "abstract" type to MethodDefinition and PropertyDefinition (#2536)
closes #2532

```
pub enum PropertyDefinitionType {
    PropertyDefinition,
    TSAbstractPropertyDefinition,
}

pub enum MethodDefinitionType {
    MethodDefinition,
    TSAbstractMethodDefinition,
}
```
2024-02-28 17:33:11 +08:00
renovate[bot]
29b213eac7
chore(deps): update rust crates (#2503) 2024-02-26 10:38:11 +08:00
Andrew McClenaghan
6b3b260dcc
feat(Codegen): Improve codegen (#2460)
This gets all the new TS types working to the same level TS output was
before and fixes a bunch of other codegen

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-02-21 14:41:57 +08:00
Dunqing
197fa16613
feat(semantic): add check for duplicate class elements in checker (#2455)
1. Remove the check implementation of the parser
2. Implement it to semantic checker
3. Support typescript's check for duplicate class elements

Support checking for duplicate class elements in semantic checker is
easier to support typescript checking rules.
2024-02-21 14:10:19 +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
60db720fa6
feat(parser): parse import attributes in TSImportType (#2436)
close: #2394 

64d2eeea7b/src/compiler/types.ts (L2177-L2185)

The corresponding test cases were skipped, so I manually added some
cases to misc

f5db48237f/tasks/coverage/src/typescript.rs (L118-L121)
2024-02-19 12:26:42 +08:00
Dunqing
b5deb9a708
fix(codegen): when async is on the left-hand side of a for-of, wrap it in parentheses (#2407)
Refer to
55e1127a49/internal/js_printer/js_printer.go (L3097-L3104)
2024-02-13 22:42:23 +08:00
Boshen
1cbd7539fb
feat(coverage): add prettier idempotency test (#2402)
closes #1329
2024-02-12 15:30:16 +08:00
Boshen
70a0076eed
refactor: remove global allocator from non-user facing apps (#2401)
The runtime performance gains does not out weight the compilation speed from
building the custom allocators, which takes about a minute to build on
slower machines.
2024-02-12 14:09:05 +08:00
Dunqing
73e116e8a1
fix(parser): incorrect parsing of class accessor property name (#2386) 2024-02-11 22:57:13 +08:00
Dunqing
0df7e296f9
feat(tasks/codegen): check node version >= 20 (#2385)
This syntax only works on node >= 20
`import value from './json-value-array_FIXTURE.json' with { type: 'json'
};`
2024-02-11 19:23:11 +08:00
Boshen
ef336cb66b
feat(parser): recover from async x [newline] => x (#2375)
```javascript
async x
=> x
```

Babel recovers and displays "No line break is allowed before '=>'
2024-02-10 11:19:08 +08:00
Dunqing
2eb489e996
fix(codegen): format new expession + import expression with the correct parentheses (#2346)
Similar to #2330
2024-02-09 20:51:50 +08:00
Dunqing
55011e2793
feat(codegen): avoid printing comma in ArrayAssignmentTarget if the elements is empty (#2331) 2024-02-06 22:45:19 +08:00
Boshen
43a9cb5522
chore: update snapshot 2024-02-06 22:17:59 +08:00
Dunqing
a3570d41f0
feat(semantic): report parameter related errors for setter/getter (#2316) 2024-02-05 17:38:43 +08:00
Dunqing
9ca13d040d
feat(semantic): report type parameter list cannot be empty (#2315) 2024-02-05 16:05:51 +08:00
Dunqing
d6d931cd80
fix(tasks/coverage): when providing filter, do not run just submodules (#2310) 2024-02-05 15:06:37 +08:00
Dunqing
f53c54ced9
feat(semantic): report unexpected type annotation in ArrayPattern (#2309) 2024-02-05 13:45:52 +08:00
underfin
2f97b332bd
chore: codegen test skip v8 failed test (#2283)
Because v8 isn't pass some test262 tests, we also need to skip them, you
can find it at
https://chromium.googlesource.com/v8/v8/+/refs/heads/main/test/test262/test262.status.
2024-02-04 14:02:39 +08:00
Boshen
d2f7ea2923
chore: manually clone git modules instead of using submodules (#2274)
closes #2231

Submodules are a blocker for beginners, we should make it clone on
demand.

It is also a blocker for people who wants to target this repo as a crate
for testing purposes, cargo will do a full clone if you specify
oxc_parser = { git = "this repo" } in Cargo.toml
2024-02-02 11:56:18 +00:00
Boshen
28daf83b19
feat(semantic): report no class name error (#2273)
closes #2144
2024-02-02 19:05:00 +08:00
Boshen
650f6c942f
refactor: use our forked version of miette::Reporter for tests (#2266) 2024-02-02 16:15:31 +08:00
Dunqing
da2ffdf7a0
feat(semantic): check parameters property (#2264) 2024-02-02 15:58:32 +08:00
Dunqing
d71175e712
feat(semantic): check optional parameters (#2263) 2024-02-02 15:54:04 +08:00
Boshen
8d99a15ac9
feat(semantic): report error on optional variable declaration in TypeScript (#2261)
closes #2253
closes #2255
2024-02-02 14:13:10 +08:00
Tzvi Melamed
73ccf8a4da
fix(oxc_semantic): proper traversal of try statements (#2250)
Closes #2227
2024-02-01 20:46:38 +08:00
Wenzhe Wang
5fb5d8a01e
chore(tasks): update codegen runtime snapshot (#2223) 2024-01-31 12:25:28 +08:00
renovate[bot]
d7a9bcf191
chore(deps): update rust crates (#2199) 2024-01-30 15:30:22 +08:00
Dunqing
f59e87f9c4
refactor(semantic): checking label in ContinueStatement based on LabelBuilder (#2202) 2024-01-29 18:24:42 +08:00
Dunqing
56adfb1a86
refactor(semantic): use LabelBuilder instead of UnusedLabeled (#2184)
I think `UnusedLabeled` can do more than that.

1. Collect unused label
2. Support check duplication label
3. Support check label in `BreakStatement`
4. Support check label in `ContinueStatement` (Not yet)

But then the `UnusedLabeled` name wouldn't fit, so I renamed it
`LabelBuilder` and moved it to `label.rs`
2024-01-29 15:15:07 +08:00
Dunqing
ea8cc98c34
fix(ast): AcessorProperty is missing decorators (#2176) 2024-01-26 15:43:05 +08:00
underfin
989ab88bc6
fix(codegen): print Directive original string (#2157)
> A Use Strict Directive may not contain an EscapeSequence or
LineContinuation.

It is `Use Strict Directive` spec, but the `expression` of `Directive`
isn't original string value, it has error if using it to codegen, so
here using `directive` of `Directive` to codegen and not to escape it.
Here is crashed test cases.

``` js
'use str\
ict';
```
The babel will print the original string, I follow it and avoid using
`print_str` because it will escape string.

I also changed some code using the `expression` of `Directive` to check
`Use Strict Directive` .
2024-01-25 15:24:05 +08:00
Boshen
ad133ba647
chore: update snapshots 2024-01-22 19:16:09 +08:00
Boshen
26571c72de
chore(just): change sync command to sync-submodules
This should avoid accidentally running the command
2024-01-22 17:45:13 +08:00
Boshen
2f5afff9bd
fix(parser): fix crash on TSTemplateLiteralType in function return position (#2089)
```
interface Helpers {
  inspect(): `~~~~\n${string}\n~~~~`;
}
```
2024-01-19 23:14:05 +08:00
Boshen
b0f4715df1
ci: disable codegen runtime tests for now
It seems to be unstable across node.js versions
2024-01-15 21:24:07 +08:00
Boshen
a69b76ab77
chore: update snapshots 2024-01-15 21:13:05 +08:00
Valerii Smirnov
c60c31521e
feat(linter): eslint-plugin-import no-named-as-default-member rule (#1988)
- Docs:
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md
- Code:
https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default-member.js
- Tests:
https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default-member.js
2024-01-15 11:03:04 +00:00
dependabot[bot]
21909fa962
chore(deps): bump the dependencies group with 3 updates (#2033) 2024-01-15 15:31:32 +08:00
Dunqing
0a086860da
feat(ast): visit TSModuleReference (#1998)
### Failed cases:

* 7c29fbc4db/packages/babel-plugin-transform-typescript/test/fixtures/imports/elision-qualifiedname/input.ts
* 7c29fbc4db/packages/babel-plugin-transform-typescript/test/fixtures/imports/elide-react/input.ts

We need to distinguish whether a reference is a type or a js variable
2024-01-11 23:29:29 +08:00
Dunqing
4e7b7dad78
feat(task): handle expected runtime error correctly (#1987) 2024-01-11 15:04:28 +08:00
Dunqing
6417d2ce9c
feat(task): test codegen runtime in run_async (#1980)
<img width="460" alt="image" src="https://github.com/oxc-project/oxc/assets/29533304/4f2d05a1-4d3e-422e-9722-0c77d4ff989d">
2024-01-11 14:59:29 +08:00
Dunqing
ee286a0a48
feat(task): support run async in suite (#1973) 2024-01-11 14:54:30 +08:00
Dunqing
633b21c5d2
feat(task): skips some cases we don't care about in codegen-runtime (#1986)
#1977
2024-01-11 14:50:39 +08:00
Dunqing
fc7dbd9225
feat(task): codegen test262 runtime test (#1959) 2024-01-10 17:12:11 +08:00
Dunqing
b50c5ec623
fix(parser): unexpected ts type annotation in get/set (#1942)
fix: https://github.com/oxc-project/oxc/issues/1939
2024-01-08 15:07:43 +08:00
Boshen
08438e04ba
refactor(parser): remove TokenValue::RegExp from Token (#1926)
This PR is part of #1880.

`Token` size is reduced from 48 to 40 bytes.

To reconstruct the regex pattern and flags within the parser , the regex
string is
re-parsed from the end by reading all valid flags.

In order to make things work nicely, the lexer will no longer recover
from a invalid regex.
2024-01-08 13:48:52 +08:00
Dunqing
3b4fe0edfd
feat(semantic): allow reserved keyword defined in ts module block (#1907)
https://www.typescriptlang.org/play?target=99#code/PTAEAEBcEMCcHMCmkBcpEGcB2iAekAoECAWwHsATAVwBtE1MAmABkcYBpMd8CiwAHKgCNQAYzJYMkUAGUAKgCUAkgGE5AfQCyAeQAiAUXUA5AIKb9MtDOQAeAGQByKdEgBLUaCmwAfKAC8oPwAFgBm6hjIAISgAN58oAkJAESuJPx0JIhYkBhJ7PGJoCnZiLAh0KKIeQWJSXSQ1cSFSfwVANbQSI1gzfywrgBuLlX5TbV9ZJCIolMU3YVFgkI07vPNzm6ia7UAnq6INHOjYAC+ANy8ePxksNIx5wQU0zRwiKBY0JkYrZWgIWRkWKgAgJcSSaSpdKITLZDBoaBYHZnYGgiRSQLCFaieGI5EgsRoiElMoVeigBFIlGgIawUD1HGU-Fg9E-DpIBl41HgwL9IZTDlMwk8ybTWYCrnojbucUE7l7A4UAUnAhAA
2024-01-06 12:56:27 +08:00
Dunqing
6c5b22f728
refactor(semantic): improve ClassTable implmention and merge properties and methods to elements (#1902) 2024-01-05 18:38:51 +08:00
Boshen
97fa3934a6
deps(rust): bump deps (#1888) 2024-01-04 20:41:31 +08:00
Dunqing
dae5f628b0
perf(semantic): check duplicate parameters in Binder of FormalParameters (#1840) 2024-01-03 12:57:03 +08:00
Dunqing
c3090c2c70
fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs (#1874)
close: https://github.com/oxc-project/oxc/issues/1870#issue-2061901976
2024-01-03 11:34:14 +08:00
dependabot[bot]
c16821a55f
chore(deps): bump the dependencies group with 11 updates (#1865)
Bumps the dependencies group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.71` |
`1.0.73` |
| [quote](https://github.com/dtolnay/quote) | `1.0.33` | `1.0.34` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.108` | `1.0.109`
|
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.51` |
`1.0.53` |
| [is-terminal](https://github.com/sunfishcode/is-terminal) | `0.4.9` |
`0.4.10` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.6.4` | `2.7.1` |
| [syn](https://github.com/dtolnay/syn) | `2.0.43` | `2.0.44` |
| [ouroboros](https://github.com/joshua-maros/ouroboros) | `0.18.1` |
`0.18.2` |
| [similar](https://github.com/mitsuhiko/similar) | `2.3.0` | `2.4.0` |
| [napi](https://github.com/napi-rs/napi-rs) | `2.14.1` | `2.14.2` |
| [napi-derive](https://github.com/napi-rs/napi-rs) | `2.14.4` |
`2.14.6` |

Updates `proc-macro2` from 1.0.71 to 1.0.73
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/proc-macro2/releases">proc-macro2's
releases</a>.</em></p>
<blockquote>
<h2>1.0.73</h2>
<ul>
<li>Documentation improvements</li>
</ul>
<h2>1.0.72</h2>
<ul>
<li>Improve build script to be robust to proc_macro::Span unstable API
changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4dce5d7ebd"><code>4dce5d7</code></a>
Release 1.0.73</li>
<li><a
href="708540bec1"><code>708540b</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/431">#431</a>
from dtolnay/doccfg</li>
<li><a
href="014fa8243f"><code>014fa82</code></a>
Restore documented cfg on LineColumn</li>
<li><a
href="df4fa83806"><code>df4fa83</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/430">#430</a>
from dtolnay/nightlyci</li>
<li><a
href="75897cfc99"><code>75897cf</code></a>
Make CI verify that proc_macro_span works in latest nightly</li>
<li><a
href="643cb897d7"><code>643cb89</code></a>
Release 1.0.72</li>
<li><a
href="3db197755b"><code>3db1977</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/429">#429</a>
from dtolnay/probe</li>
<li><a
href="a961baeb81"><code>a961bae</code></a>
Test for the specific proc_macro_span API expected by proc-macro2</li>
<li><a
href="784ae2e18a"><code>784ae2e</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/428">#428</a>
from dtolnay/cargoenvvar</li>
<li><a
href="8ade7dacec"><code>8ade7da</code></a>
Require cargo promised environment variables to be present</li>
<li>See full diff in <a
href="https://github.com/dtolnay/proc-macro2/compare/1.0.71...1.0.73">compare
view</a></li>
</ul>
</details>
<br />

Updates `quote` from 1.0.33 to 1.0.34
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/quote/releases">quote's
releases</a>.</em></p>
<blockquote>
<h2>1.0.34</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c777ce6fc1"><code>c777ce6</code></a>
Release 1.0.34</li>
<li><a
href="e9cb3c25f3"><code>e9cb3c2</code></a>
Pull in proc-macro2 build script improvement</li>
<li><a
href="f8fc16dc18"><code>f8fc16d</code></a>
Test docs.rs documentation build in CI</li>
<li><a
href="3a9d31fd45"><code>3a9d31f</code></a>
Update actions/checkout@v3 -&gt; v4</li>
<li><a
href="fe2dec4258"><code>fe2dec4</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/quote/issues/262">#262</a>
from dtolnay/syn2</li>
<li><a
href="5d33628e98"><code>5d33628</code></a>
Update syn 1.0 link to syn 2.0</li>
<li>See full diff in <a
href="https://github.com/dtolnay/quote/compare/1.0.33...1.0.34">compare
view</a></li>
</ul>
</details>
<br />

Updates `serde_json` from 1.0.108 to 1.0.109
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.109</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f88bf1fccb"><code>f88bf1f</code></a>
Release 1.0.109</li>
<li><a
href="bb62c73ece"><code>bb62c73</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1097">#1097</a>
from serde-rs/doccfg</li>
<li><a
href="df36d109fd"><code>df36d10</code></a>
Restore doc cfg on re-exports</li>
<li><a
href="c367091342"><code>c367091</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1095">#1095</a>
from dtolnay/hashtest</li>
<li><a
href="b328ee7df4"><code>b328ee7</code></a>
Eliminate hash closure in favor of calling hash_one directly</li>
<li><a
href="b9bcbad3c0"><code>b9bcbad</code></a>
Use BuildHasher::hash_one</li>
<li><a
href="7ff6c9e30c"><code>7ff6c9e</code></a>
Use random hasher state for number hashing test</li>
<li><a
href="fe031cd1de"><code>fe031cd</code></a>
Delete trace_macros! functionality from test</li>
<li><a
href="05196caf16"><code>05196ca</code></a>
Update ui test suite to nightly-2023-11-19</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.108...v1.0.109">compare
view</a></li>
</ul>
</details>
<br />

Updates `thiserror` from 1.0.51 to 1.0.53
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/thiserror/releases">thiserror's
releases</a>.</em></p>
<blockquote>
<h2>1.0.53</h2>
<ul>
<li>Reduce spurious rebuilds under RustRover IDE when using a nightly
toolchain (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/270">#270</a>)</li>
</ul>
<h2>1.0.52</h2>
<ul>
<li>Fix interaction with RUSTC_BOOTSTRAP (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/269">#269</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="af28d9c078"><code>af28d9c</code></a>
Release 1.0.53</li>
<li><a
href="c22822cd8c"><code>c22822c</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/275">#275</a>
from dtolnay/probers</li>
<li><a
href="87223991b7"><code>8722399</code></a>
Rerun build script on changes to probe.rs</li>
<li><a
href="0e280fe61d"><code>0e280fe</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/274">#274</a>
from dtolnay/bootstrap</li>
<li><a
href="f334cfcdc1"><code>f334cfc</code></a>
Do not rebuild on RUSTC_BOOTSTRAP changes on nightly compiler</li>
<li><a
href="5fd95375e3"><code>5fd9537</code></a>
Update crate name used for build script probe</li>
<li><a
href="a9b1585343"><code>a9b1585</code></a>
Move ExitStatus::success check into compile_probe()</li>
<li><a
href="0f349a4bb1"><code>0f349a4</code></a>
Remove needless_raw_string_hashes clippy pedantic suppression from build
script</li>
<li><a
href="c1c003f2a3"><code>c1c003f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/273">#273</a>
from dtolnay/cargoenvvar</li>
<li><a
href="9b7356fd43"><code>9b7356f</code></a>
Require cargo promised environment variables to be present</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.53">compare
view</a></li>
</ul>
</details>
<br />

Updates `is-terminal` from 0.4.9 to 0.4.10
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c3b72b5767"><code>c3b72b5</code></a>
chore: Release is-terminal version 0.4.10</li>
<li><a
href="6c8aff6f8c"><code>6c8aff6</code></a>
windows-sys 0.52 (<a
href="https://redirect.github.com/sunfishcode/is-terminal/issues/32">#32</a>)</li>
<li>See full diff in <a
href="https://github.com/sunfishcode/is-terminal/compare/v0.4.9...v0.4.10">compare
view</a></li>
</ul>
</details>
<br />

Updates `memchr` from 2.6.4 to 2.7.1
<details>
<summary>Commits</summary>
<ul>
<li><a
href="31c1e7911e"><code>31c1e79</code></a>
2.7.1</li>
<li><a
href="d9ac66d726"><code>d9ac66d</code></a>
api: impl Clone for FindRevIter</li>
<li><a
href="8957028d16"><code>8957028</code></a>
benchmarks/engines/rust-memchr: complete bump to 2.7.0</li>
<li><a
href="5caaf3e736"><code>5caaf3e</code></a>
benchmarks/engines/rust-memchr: bump to 2.7.0</li>
<li><a
href="b93d817ea6"><code>b93d817</code></a>
2.7.0</li>
<li><a
href="8b62928c7b"><code>8b62928</code></a>
cargo: remove unused exclusions</li>
<li><a
href="a22b2df27d"><code>a22b2df</code></a>
ci: update to wasmtime 15</li>
<li><a
href="bce19408dd"><code>bce1940</code></a>
benchmarks/engines/bytecount: revert to 0.6.4</li>
<li><a
href="2f5d8c4842"><code>2f5d8c4</code></a>
benchmarks: fix wasmtime command</li>
<li><a
href="e77f0bf07a"><code>e77f0bf</code></a>
arch: simplify and improve is_equal_raw</li>
<li>Additional commits viewable in <a
href="https://github.com/BurntSushi/memchr/compare/2.6.4...2.7.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `syn` from 2.0.43 to 2.0.44
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/syn/releases">syn's
releases</a>.</em></p>
<blockquote>
<h2>2.0.44</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="58b42f5264"><code>58b42f5</code></a>
Release 2.0.44</li>
<li><a
href="4523437760"><code>4523437</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1569">#1569</a>
from dtolnay/cfgvisit</li>
<li><a
href="694a1bb661"><code>694a1bb</code></a>
Render doc cfg on Visit/VisitMut/Fold trait methods</li>
<li><a
href="1728630caa"><code>1728630</code></a>
Add doc cfg on Error::new_spanned</li>
<li><a
href="649e4266ae"><code>649e426</code></a>
Mark exprs which are not parsed in &quot;derive&quot; mode as
&quot;full&quot;-only</li>
<li><a
href="6c4627f24a"><code>6c4627f</code></a>
Fill in missing doc cfg on Expr and Pat nodes</li>
<li><a
href="1cea0bef11"><code>1cea0be</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1568">#1568</a>
from dtolnay/doccfg</li>
<li><a
href="dc2153d04e"><code>dc2153d</code></a>
Restore doc cfg on re-exports</li>
<li><a
href="e2b6ebc55b"><code>e2b6ebc</code></a>
Fix typo in ast_enum cfg</li>
<li><a
href="a193361b83"><code>a193361</code></a>
Fix unused_macros warning on ast_enum when features are disabled</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/syn/compare/2.0.43...2.0.44">compare
view</a></li>
</ul>
</details>
<br />

Updates `ouroboros` from 0.18.1 to 0.18.2
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/joshua-maros/ouroboros/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `similar` from 2.3.0 to 2.4.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md">similar's
changelog</a>.</em></p>
<blockquote>
<h2>2.4.0</h2>
<ul>
<li>Fixed a bug where the LCS diff algorithm didn't always call
<code>D::finish</code>. (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/58">#58</a>)</li>
<li>Fixed a bug in LCS that caused a panic if the common prefix and the
common suffix overlapped. (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/59">#59</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ace8f34a27"><code>ace8f34</code></a>
2.4.0</li>
<li><a
href="e9a05ed6fa"><code>e9a05ed</code></a>
Fix overlap bug in LCS (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/59">#59</a>)</li>
<li><a
href="18712783da"><code>1871278</code></a>
Always call finish (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/58">#58</a>)</li>
<li><a
href="f5c1afa8f4"><code>f5c1afa</code></a>
Use unwrap_or (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/56">#56</a>)</li>
<li><a
href="2b31f65445"><code>2b31f65</code></a>
doc(inline/iter_strings_lossy): describe different behaviors (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/52">#52</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/similar/compare/2.3.0...2.4.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi` from 2.14.1 to 2.14.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/napi-rs/napi-rs/releases">napi's
releases</a>.</em></p>
<blockquote>
<h2><code>@​napi-rs/cli</code><a
href="https://github.com/2"><code>@​2</code></a>.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix CARGO env var in <code>napi build</code> by <a
href="https://github.com/overlookmotel"><code>@​overlookmotel</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1426">napi-rs/napi-rs#1426</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.10.5...@napi-rs/cli@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi@2.10.5...<code>@​napi-rs/cli</code><code>@​2.14.2</code></a></p>
<h2>napi-derive@2.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): compile warning by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1820">napi-rs/napi-rs#1820</a></li>
<li>fix(napi): compile error for wasm32-unknown-unknown target by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1822">napi-rs/napi-rs#1822</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2</a></p>
<h2>napi@2.14.2</h2>
<h2>What's Changed</h2>
<ul>
<li>test(napi): decrease the worker sizes on Linux x64 musl platform by
<a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1823">napi-rs/napi-rs#1823</a></li>
<li>fix(napi): apply clippy suggestions by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1878">napi-rs/napi-rs#1878</a></li>
<li>chore(napi): add status to error messages in AsyncWork by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1880">napi-rs/napi-rs#1880</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2">https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="03eb476cef"><code>03eb476</code></a>
Release independent packages</li>
<li><a
href="f47cc72749"><code>f47cc72</code></a>
chore(release): publish</li>
<li><a
href="f29801686b"><code>f298016</code></a>
fix(cli): copy binding files into wasi packages (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1881">#1881</a>)</li>
<li><a
href="65273a4631"><code>65273a4</code></a>
chore(napi): add status to error messages in AsyncWork (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1880">#1880</a>)</li>
<li><a
href="f2972c743f"><code>f2972c7</code></a>
chore(release): publish</li>
<li><a
href="e175e6fbd6"><code>e175e6f</code></a>
fix(deps): update dependency emnapi to v0.45.0 (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1879">#1879</a>)</li>
<li><a
href="dc79bb86d0"><code>dc79bb8</code></a>
chore(release): publish</li>
<li><a
href="b0ba466f95"><code>b0ba466</code></a>
fix(cli): also load wasm file from packages (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1876">#1876</a>)</li>
<li><a
href="f62685e836"><code>f62685e</code></a>
fix(cli): exclude node_modules in artifacts command (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1875">#1875</a>)</li>
<li><a
href="67743b1046"><code>67743b1</code></a>
fix(cli): exclude node_modules in artifacts command</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.14.1...napi@2.14.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-derive` from 2.14.4 to 2.14.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/napi-rs/napi-rs/releases">napi-derive's
releases</a>.</em></p>
<blockquote>
<h2>napi-derive@2.14.6</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): proc-macro crash on enum by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1870">napi-rs/napi-rs#1870</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6">https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.5...napi-derive@2.14.6</a></p>
<h2>napi-derive@2.14.5</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): catch_unwind on constructor by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1869">napi-rs/napi-rs#1869</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24...napi-derive@2.14.5">https://github.com/napi-rs/napi-rs/compare/<code>@​napi-rs/cli</code><code>@​3.0.0-alpha.24...napi-derive@2.14.5</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5825dcc3a6"><code>5825dcc</code></a>
Release independent packages</li>
<li><a
href="84f3092d70"><code>84f3092</code></a>
fix(napi-derive): proc-macro crash on enum (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1870">#1870</a>)</li>
<li><a
href="85807ad790"><code>85807ad</code></a>
Release independent packages</li>
<li><a
href="02dd4c3fd3"><code>02dd4c3</code></a>
fix(napi-derive): catch_unwind on constructor (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1869">#1869</a>)</li>
<li><a
href="b411b87872"><code>b411b87</code></a>
chore(release): publish</li>
<li><a
href="c42f00ff43"><code>c42f00f</code></a>
feat(cli): support wasi target test &amp; release workflow (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1867">#1867</a>)</li>
<li><a
href="bac8ea0e4d"><code>bac8ea0</code></a>
chore(release): publish</li>
<li><a
href="edba0cbd6c"><code>edba0cb</code></a>
chore(cli): root directory access permissions (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1864">#1864</a>)</li>
<li><a
href="c3eeba1e34"><code>c3eeba1</code></a>
chore(cli): change warning message to yellow</li>
<li><a
href="5f7e170697"><code>5f7e170</code></a>
chore(release): publish</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.4...napi-derive@2.14.6">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 08:06:33 +00:00
Dunqing
9c9d882d93
fix(semantic): remove duplicate errors in ModuleDeclaration::ImportDeclaration (#1846)
<img width="653" alt="image"
src="https://github.com/oxc-project/oxc/assets/29533304/7a3ca98e-6c6e-4170-8b79-e9c63b6b9153">
2023-12-28 10:44:53 +08:00
Dunqing
d63c50a5ca
refactor(semantic): improve check private identifier implementation (#1794)
The regression case in typescript is as expected since we don't
currently store `AccessorProperty` in `ClassTable`.

The following code is one of those cases

```ts
class C1 {
    accessor #a: any;
    accessor #b = 1;
    static accessor #c: any;
    static accessor #d = 2;

    constructor() {
        this.#a = 3;
        this.#b = 4;
    }

    static {
        this.#c = 5;
        this.#d = 6;
    }
}
```

But there was an error

```shell
Expect to Parse: "conformance/classes/propertyMemberDeclarations/autoAccessor2.ts"
  × Private field 'a' must be declared in an enclosing class
    ╭─[conformance/classes/propertyMemberDeclarations/autoAccessor2.ts:9:1]
  9 │     constructor() {
 10 │         this.#a = 3;
    ·              ──
 11 │         this.#b = 4;
    ╰────
```

Let's leave it alone for now. Because of the `AccessorProperty` I
haven't seen it in any repo.
2023-12-26 20:39:22 +08:00
dependabot[bot]
868c35451d
chore(deps): bump the dependencies group with 5 updates (#1808) 2023-12-25 15:17:47 +08:00
magic-akari
5b2696b711
refactor(parser): report this parameter error (#1788)
- follow up: #1728
2023-12-23 22:09:14 +08:00
Boshen
2b4d1bf142
fix(parser): await in jsx expression
closes #1740
2023-12-19 20:23:16 +08:00
Boshen
19e77b0af3
fix(parser): false postive for "Missing initializer in const declaration" in declare + namespace (#1724)
closes #1723
2023-12-18 17:03:42 +08:00
Boshen
cf91379d1b
ci: fix codecov not executing on conformance tests 2023-12-16 13:38:40 +08:00
Boshen
1554f7c0d2
feat(parsr): parse let.a = 1 with error recovery (#1587) 2023-11-29 23:21:39 +08:00
Boshen
7fca9504d2
chore: update snapshots 2023-11-28 16:27:10 +08:00
Boshen
ca87fcfff3
ci(benchmark): use moonrepo/setup-rust to speed up compilation by caching everything (#1568) 2023-11-28 16:03:18 +08:00
magic-akari
9ff0ffcc6f
feat(ast): implement new proposal-import-attributes (#1476)
- [Import Attributes](https://tc39.es/proposal-import-attributes)
2023-11-25 15:56:09 +08:00
Boshen
1a576f60a8
refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08: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
magic-akari
445352991f
fix(parser): Fix type import (#1291)
- fix: #1288 
- fix: #1289
2023-11-14 15:17:58 +08:00
magic-akari
9c0aafcd1c
fix(parser): Disallow ReservedWord in NamedExports (#1230)
- fix: #1222

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-12 10:52:02 +00:00
magic-akari
8afb81aa34
fix(parser): ASI of async class member (#1214)
Co-authored-by: Boshen <boshenc@gmail.com>
2023-11-10 16:21:51 +00:00
Boshen
a60b7e5856
feat(tasks): add misc tests to codegen (#1215) 2023-11-10 16:13:31 +00:00
Boshen
eca98cf2ed
s/web-infra-dev/oxc-project 2023-11-10 14:30:18 +08:00
Boshen
a455c81db6
fix(linter): revert changes to JSX attribute strings (#1101) 2023-10-30 15:26:04 +08:00
dependabot[bot]
bf1e3b5440
chore(deps): bump the dependencies group with 4 updates (#1100) 2023-10-30 15:09:28 +08:00
Boshen
fe1bbaf0d4
chore(codegen): update snapshot (#1090) 2023-10-29 16:04:04 +08:00
Wenzhe Wang
094dfa5604
feat: support filter exec snap (#1084)
Co-authored-by: Boshen <boshenc@gmail.com>
2023-10-29 05:39:32 +00:00
Boshen
a442fad3b7
feat(semantic): bind function expression name (#1049)
closes #1018

We'll eventually recover the mangling tests, which should cover this
change.
2023-10-24 17:25:12 +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
Wenzhe Wang
0e9104477f
feat: adjust the order of print semicolon (#1003)
Add a number of semicolons to our minifier test cases.
2023-10-16 21:33:15 +08:00
Boshen
eaeb63072f
refactor(clippy): allow struct_excessive_bools 2023-10-16 15:18:07 +08:00
Wenzhe Wang
6c18b3e8ec
feat(codegen): beauty class print (#995) 2023-10-15 16:37:01 +08:00
Boshen
1661385c1a
feat(semantic): check non-simple lhs expression of assignment expression (#994) 2023-10-14 23:40:10 +08:00
Boshen
801d78a3c6
refactor(minifier): make the minifier api only accept an ast (#990) 2023-10-14 00:51:29 +08:00
Boshen
f32bf27106
fix(codegen): fix some typescript codegen problems (#989) 2023-10-13 16:23:48 +08:00
Boshen
a6ea901254
feat(coverage): add typescript to codegen tests (#988) 2023-10-13 13:42:54 +08:00
Boshen
e0ca09b1c9
feat(codegen): implement the basics of non-minifying codegen (#987) 2023-10-13 13:34:21 +08:00
Boshen
809f050a5f
feat(codegen): move minifying printer to codegen crate (#985) 2023-10-12 14:56:30 +08:00
Boshen
8c12dff8a3
perf: speed tasks run by using a global allocator 2023-10-11 20:30:30 +08:00
Boshen
d5fb3d43ab
chore(coverage): remove regex-v-flag feature from parser tests (#975)
A regex parser is required to implement this.

Relates #385
2023-10-11 06:18:22 +08:00
Boshen
ef8aaa7bf1
feat(minifier): re-enable mangler (#972) 2023-10-10 14:32:58 +08:00
dependabot[bot]
4ce525c66d
chore(deps): bump the dependencies group with 4 updates (#970)
Bumps the dependencies group with 4 updates:
[num-traits](https://github.com/rust-num/num-traits),
[proc-macro2](https://github.com/dtolnay/proc-macro2),
[syn](https://github.com/dtolnay/syn) and
[similar](https://github.com/mitsuhiko/similar).

Updates `num-traits` from 0.2.16 to 0.2.17
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-num/num-traits/blob/master/RELEASES.md">num-traits's
changelog</a>.</em></p>
<blockquote>
<h1>Release 0.2.17 (2023-10-07)</h1>
<ul>
<li><a
href="https://redirect.github.com/rust-num/num-traits/pull/286">Fix a
doc warning about custom classes with newer rustdoc.</a></li>
</ul>
<p><strong>Contributors</strong>: <a
href="https://github.com/robamu"><code>@​robamu</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0a27d8c95a"><code>0a27d8c</code></a>
Merge <a
href="https://redirect.github.com/rust-num/num-traits/issues/289">#289</a></li>
<li><a
href="34e309a918"><code>34e309a</code></a>
Release 0.2.17</li>
<li><a
href="ef36d69f7c"><code>ef36d69</code></a>
Merge <a
href="https://redirect.github.com/rust-num/num-traits/issues/286">#286</a></li>
<li><a
href="d9d94f8a51"><code>d9d94f8</code></a>
Bugfix for text codeblock in documentation.</li>
<li>See full diff in <a
href="https://github.com/rust-num/num-traits/compare/num-traits-0.2.16...num-traits-0.2.17">compare
view</a></li>
</ul>
</details>
<br />

Updates `proc-macro2` from 1.0.67 to 1.0.69
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/proc-macro2/releases">proc-macro2's
releases</a>.</em></p>
<blockquote>
<h2>1.0.69</h2>
<ul>
<li>Fix Span::source_text() bug causing panics or incorrect source text
(<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/410">#410</a>)</li>
</ul>
<h2>1.0.68</h2>
<ul>
<li>Fix panic in Span::source_text() when source contains multibyte
characters (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/408">#408</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="937bbcdcc1"><code>937bbcd</code></a>
Release 1.0.69</li>
<li><a
href="42dc36efce"><code>42dc36e</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/412">#412</a>
from dtolnay/sourcetext</li>
<li><a
href="6461c2dd60"><code>6461c2d</code></a>
Add out-of-order call to source_text test</li>
<li><a
href="c4c3251c57"><code>c4c3251</code></a>
Explain source_text implementation approach</li>
<li><a
href="31b14c30f2"><code>31b14c3</code></a>
Cache byte offsets computed from a char index</li>
<li><a
href="0e154618a1"><code>0e15461</code></a>
Make FileInfo mut in source_text to allow amortization of char
indices</li>
<li><a
href="90b8e1eb01"><code>90b8e1e</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/411">#411</a>
from dtolnay/sourcetext</li>
<li><a
href="137ae0a341"><code>137ae0a</code></a>
Fix source_text treating span.lo as byte offset not char index</li>
<li><a
href="4c0bd28a61"><code>4c0bd28</code></a>
Add regression test for issue 410</li>
<li><a
href="12eddc03a4"><code>12eddc0</code></a>
Reword explanation of SourceMap initial value</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/proc-macro2/compare/1.0.67...1.0.69">compare
view</a></li>
</ul>
</details>
<br />

Updates `syn` from 2.0.37 to 2.0.38
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/syn/releases">syn's
releases</a>.</em></p>
<blockquote>
<h2>2.0.38</h2>
<ul>
<li>Fix <em>&quot;method 'peek' has an incompatible type for
trait&quot;</em> error when defining <code>bool</code> as a custom
keyword (<a
href="https://redirect.github.com/dtolnay/syn/issues/1518">#1518</a>,
thanks <a
href="https://github.com/Vanille-N"><code>@​Vanille-N</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="43632bfb6c"><code>43632bf</code></a>
Release 2.0.38</li>
<li><a
href="abd2c214b4"><code>abd2c21</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1518">#1518</a>
from Vanille-N/master</li>
<li><a
href="6701e6077e"><code>6701e60</code></a>
Absolute path to <code>bool</code> in
<code>custom_punctuation.rs</code></li>
<li><a
href="7313d24239"><code>7313d24</code></a>
Resolve single_match_else pedantic clippy lint in code generator</li>
<li><a
href="67ab64f3c0"><code>67ab64f</code></a>
Include unexpected token in the test failure message</li>
<li><a
href="137ae33486"><code>137ae33</code></a>
Check no remaining token after the first literal</li>
<li><a
href="258e9e8a11"><code>258e9e8</code></a>
Ignore single_match_else pedantic clippy lint in test</li>
<li><a
href="92fd50ee8c"><code>92fd50e</code></a>
Test docs.rs documentation build in CI</li>
<li>See full diff in <a
href="https://github.com/dtolnay/syn/compare/2.0.37...2.0.38">compare
view</a></li>
</ul>
</details>
<br />

Updates `similar` from 2.2.1 to 2.3.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md">similar's
changelog</a>.</em></p>
<blockquote>
<h2>2.3.0</h2>
<ul>
<li>Added support for <code>Change::value_ref</code> and
<code>Change::value_mut</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="47f46257d4"><code>47f4625</code></a>
2.3.0</li>
<li><a
href="3319f77693"><code>3319f77</code></a>
Downgrade msrv lock file</li>
<li><a
href="d21e126057"><code>d21e126</code></a>
Use Cargo.lock.msrv</li>
<li><a
href="86f68a6394"><code>86f68a6</code></a>
Make clippy happy</li>
<li><a
href="e85ddb0d18"><code>e85ddb0</code></a>
Added value_ref and value_mut</li>
<li><a
href="de455873da"><code>de45587</code></a>
Spelling and grammar fixes (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/49">#49</a>)</li>
<li><a
href="9f76d88c3d"><code>9f76d88</code></a>
fix some english things (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/48">#48</a>)</li>
<li><a
href="e575b88ca1"><code>e575b88</code></a>
Update GitHub Actions CI (<a
href="https://redirect.github.com/mitsuhiko/similar/issues/47">#47</a>)</li>
<li><a
href="ae815d13ea"><code>ae815d1</code></a>
Remove mention of Hunt–McIlroy / Hunt–Szymanski</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/similar/compare/2.2.1...2.3.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 14:56:00 +08:00
Boshen
817f8c295e
ci: turn off doc tests because they are slow to compile and run (#961) 2023-10-07 17:01:23 +08:00
Boshen
b46f34e096
chore: bump submodules and snapshots 2023-10-06 16:15:35 +13:00
Cameron
5b1e1e5408
feat(parser): TypeScript 5.2 (#811)
- adds support for [Using
Declarations](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management)

Closes #786
2023-10-05 12:52:14 +13:00
IWANABETHATGUY
266253c142
fix: ts parsing error (#940)
Fixed https://github.com/web-infra-dev/oxc/issues/932
2023-09-29 22:02:56 +13:00
Boshen
46d2623c1f
feat(transform_conformance): add jsx and ts tests 2023-09-18 15:35:02 +08:00
Boshen
7172953fe9
feat(transformer_conformance): snapshot passed and failed tests (#921) 2023-09-16 20:58:31 +08:00
Boshen
ceeee5909b
Remove HIR (#917)
closes #273
closes #814

HIR is removed from this PR, with the minifier being commented out.

HIR is a wonderful idea for compiling to lower languages, but after
sitting on it for a few months I found that it only adds confusion and
uncertainties to both myself and future contributors.

It also adds too much burden to maintainers if we plan to support more
downstream tools.

1 AST is the only way.
2023-09-15 23:48:32 +08:00
Don Isaac
027a67d94c
feat(minifier): constant addition expression folding (#882)
Fold constant addition expressions. Handles string concatenation and
addition, both with implicit casting.

For example,
```ts
let x = 1 + 1
let y = "hello " + "world"
```
now becomes
```ts
let x = 2
let y = "hello world"
```

## Extra Goodies
- test(minifier): add `test_snapshot` helper to perform snapshot tests
with `insta`
- up(hir): implement `std::ops::Add` for `NumericValue`
- up(span): impl `TryFrom<Cow<'_, &str>>` for `Atom`
2023-09-11 10:38:35 +08:00
Boshen
9ff12a9696
feat(linter): eslint-plugin-import/no-self-import (#878)
closes #440 #441
2023-09-10 00:12:26 +08:00
Boshen
7c8e6ab6f6
fix(parser): parse [+In] in object binding initializer (#874)
closes #873
2023-09-09 14:54:20 +08:00
Boshen
ee54575ec1
feat(linter): add runner for import-plugin (#858) 2023-09-06 14:54:19 +08:00
dependabot[bot]
8caf77300b
chore(deps): bump the dependencies group with 10 updates (#831) 2023-09-01 13:56:12 +08:00
Boshen
75af639d4a
chore(rust): remove unicode support from regex for smaller binary size (#823) 2023-09-01 12:42:58 +08:00
Boshen
00ed939cbc
feat(coverage): init git submodules if they are empty (#808)
closes #805
2023-08-29 13:35:32 +08:00
EliLichtblau
6a9d57061c
TSTypeName change identifer name to identifier reference (#804)
When initially written types were not in the symbol table. Now that
types are in the symbol table it makes sense given
```ts
type A = 1
type B = A
```
that you can get to the symbol id for for A from type B = A.

Please correct me if I'm wrong about how I implemented this. I also
verified that occurrence (I believe this is the correct word) behaves
how I would expect.

```ts
type RecursiveType = string | {[x: string]: RecursiveType}
```
Does populate a reference.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-08-28 11:42:21 +08:00
Yunfei He
e7c2313817
feat(ast): add SymbolId and ReferenceId (#755)
Closes #510
2023-08-19 18:09:47 +08:00
阿良仔
5a73f0e1b5
feat(formatter): add EndOfLine (#747) 2023-08-17 19:04:23 +08:00
Boshen
2f48bdf26f
fix(parser,semantic): make semantic own Trivias (#711)
closes #708

Making the parser return Rc<Trivias> is not a good API, and ideally
`Semantic` should just own `Trivias` so it can process or mutate it.
2023-08-10 15:30:32 +08:00
EliLichtblau
5e54bd0537
Adding types to the symbol table - consistent export type sample rule implemented (#667)
Fixes 11 TS conformance tests and 18 babel tests.

Adds types to the symbol table functionally conformant to TS behavior
but symbol flags implemented slightly differently.

Symbol redeclaration check is also not entirely conformant but fixing
this seems like a separate PR.

For testing purposes - consistent-export-type was also implemented
(WIP).
2023-07-31 12:33:47 +08:00
Matthew "strager" Glazar
ad00720d75 refactor: avoid unstable let_chains
The let_chains Rust feature is unstable, preventing Oxc from using a
stable Rust compiler. Refactor the code to avoid let_chains.
2023-07-27 09:44:57 +08:00
Boshen
2330099a34
deps(rust): bump dependencies 2023-07-21 11:38:12 +08:00
Boshen
38e11956be
chore(rust): rust version 1.71.0 nightly 2023-07-13 23:10:10 +08:00
Boshen
c5402c1cae
feat(linter): implement no-import-assign (nursery) 2023-07-01 11:20:31 +08:00
Boshen
06764f8574
chore(tasks): add swc-7187 test case 2023-06-30 16:41:52 +08:00
Boshen
925cee20c1
feat(parser): parse TypeScript this function parameter (#464) 2023-06-20 21:56:28 +08:00
Boshen
d30735677b
refactor(semantic): merge semantic2 crate into semantic crate (#460) 2023-06-19 20:20:59 +08:00
Boshen
bad8bfcf16
ci: run conformance tests and bail if there are outdated snapshots (#444) 2023-06-14 21:44:10 +08:00
Carter Snook
c0726e444f
feat(lexer): use linear lexing on WASM (#436)
Co-authored-by: Boshen <boshenc@gmail.com>
2023-06-13 15:18:02 +08:00
Boshen
243e48ac09
fix(coverage): make ignoring "literals/regexp" work on Windows 2023-06-13 14:31:59 +08:00
Boshen
1ed8df2d83
feat(parser): parse const type parameter from TypeScript v5.0 (#416) 2023-06-08 22:26:35 +08:00
Wenzhe Wang
ddc129262d
feat(minifer): minify number (#405) 2023-06-03 21:24:39 +08:00
Boshen
f8125af850 feat(minimizer): print parentheses 2023-06-01 22:45:26 +08:00
Boshen
895d26ebf9
chore(coverage): update snapshot 2023-06-01 14:28:00 +08:00
Boshen
6ef839b781
chore(rust): bump deps 2023-05-31 16:34:28 +08:00
Boshen
a7f8b66618
chore: bump submodules 2023-05-25 22:48:10 +08:00
Boshen
b6d9104a52
chore(coverage): remove catch_unwind
There's a stack overflow in one of the files, I think this is one of the cause?
2023-05-25 21:22:00 +08:00
Boshen
c613583544
chore(coverage): bump coverage status 2023-05-25 18:46:48 +08:00
Boshen
4414f3e071
chore(just): add command for updating submodules 2023-05-25 18:40:35 +08:00
Boshen
a8641b9921
chore(parser): move inline tests to snapshot testing 2023-05-21 12:05:25 +08:00
Boshen
ad2835f11b
chore(rustfmt): run cargo fmt 2023-05-21 11:52:26 +08:00
Boshen
fc7a374e7c
feat(coverage): add a directory for tests
closes #363
2023-05-20 23:02:30 +08:00
Wenzhe Wang
9678832f2b
fix: add parens for unary expression (#362) 2023-05-17 10:13:48 +08:00
Boshen
a0b09a3f27
refactor(ast): remove RestElement from BindingPattern 2023-05-16 22:25:52 +08:00
Wenzhe Wang
bd56bb7abe
fix(minifier): break directive prologue (#360) 2023-05-16 21:35:58 +08:00
Boshen
af95b59a0e
feat(ast): split Property into ObjectProperty and BindingProperty (#361) 2023-05-16 15:51:50 +08:00
Boshen
5be0d1b9fa
fix(hir): bring back ParenthesizedExpression as it caused too much chaos 2023-05-14 22:54:57 +08:00
Boshen
dc768ba8ad
feat(minifier): turn on mangle by default 2023-05-14 18:33:29 +08:00
Wenzhe Wang
e6737fdc48
fix(minifier): continue compress left expr (#356) 2023-05-14 13:03:34 +08:00
Boshen
d14329e74e
feat(semantic2): bind identifiers 2023-05-13 22:58:42 +08:00
Boshen
6db5f4e59b
fix(minifier): print SequenceExpression and ObjectExpression with parens 2023-05-13 21:57:02 +08:00
Boshen
1f5fa8d6cb
feat: reimplement semantic builder (#354) 2023-05-13 15:20:00 +08:00
Wenzhe Wang
7b834d4bd9
fix(minifier): not merge different kinds of declarations. (#353) 2023-05-13 10:51:10 +08:00
Boshen
14720e7c69
refactor: move SourceType from oxc_ast to oxc_span (#351)
related #350
2023-05-12 23:16:14 +08:00
Boshen
7f93e58f10
chore: remove all #[must_use] 2023-05-11 21:08:00 +08:00
Boshen
7496bb521f
fix(minifier): print if.consequent correctly (#349) 2023-05-11 11:00:49 +08:00
Boshen
48e524ddcf
feat(ast_lower): scope tree (#344) 2023-05-10 22:38:34 +08:00
Boshen
6924e59c5c
chore: remove unused dependencies found by cargo-machete 2023-05-10 19:22:22 +08:00
Boshen
0a445b4556
chore(coverage): run typescript tests for formatter 2023-05-09 23:19:35 +08:00
Boshen
8161ac2800
refactor: clean up Cargo.toml (put features table on top) 2023-05-09 21:53:47 +08:00
Boshen
e753a886d2
fix(minifier): add parentheses to CallExpression on FunctionExpression 2023-05-08 23:04:35 +08:00
Wenzhe Wang
52aa59bb38
feat(semantic): early check of simple assignment (#340) 2023-05-07 23:05:08 +08:00
Boshen
f4d04c1443
refactor(coverage): use ast.json() method for serialization test 2023-05-07 22:23:31 +08:00
Boshen
e897306f3d
chore(coverage): test serialization on ast and hir (#339) 2023-05-07 22:05:45 +08:00
Boshen
ddf4ac9cc2
refactor(formatter): remove whitespace minification from formatter (#337) 2023-05-07 17:58:57 +08:00
Boshen
c2428d8abd
chore: rename oxc_printer to oxc_formatter (#336) 2023-05-07 17:47:13 +08:00
Boshen
86c01c7fb8
feat(minifier): use hir (#335) 2023-05-07 17:23:00 +08:00
Boshen
72ba29f88b
feat(hir): complete first iteration of ast lowering (#327) 2023-05-06 19:13:44 +08:00
Boshen
1004a1d197
chore: clean up workspace dependencies (#320) 2023-04-27 11:38:39 +08:00
Boshen
4801e68b56
chore: bump deps (#311) 2023-04-22 22:09:53 +08:00
Boshen
080baaa2db
chore: use taplo to reformat toml files 2023-04-22 15:58:59 +08:00
Boshen
7f946fb75d
chore: bump nightly to nightly-2023-04-20 (#304) 2023-04-20 23:35:38 +08:00
Boshen
4d4fb3ac7f
chore: update submodule and snapshots 2023-04-18 21:12:18 +08:00
Shannon Rothe
20755a969a
feat(cli): add --rules CLI flag (#290) 2023-04-18 15:54:44 +08:00
Boshen
92ba59443c
feat(tasks): add minifier coverage test (#292) 2023-04-17 21:30:04 +08:00
Boshen
f79f0eb631
refactor(oxc_ast): change SourceType::with_ methods to return Self 2023-04-16 21:32:00 +08:00
Boshen
6d96748e24
fix(coverage): do not run compiler tests in code coverage due to stack overflow 2023-04-15 18:24:38 +08:00
Boshen
65e8fcd51b
chore(coverage): include conformance tests from the compiler directory 2023-04-15 17:28:25 +08:00
Boshen
cfe3dd0869
chore: rust taplo format 2023-04-15 14:14:11 +08:00
Boshen
f1dcc5429e
refactor(tasks): clean up code around code coverage 2023-04-15 13:53:57 +08:00
Boshen
4c5ece9386
chore(tasks): remove minsize from unit tests as it is too slow 2023-04-15 13:41:52 +08:00
Boshen
919feb2691
fix(coverage): remove jsx tests from babel printing tests 2023-04-15 13:22:09 +08:00
Boshen
6c5db48185
refactor(coverage): change Option<BabelOptions> to BabelOptions 2023-04-15 13:14:44 +08:00
Boshen
b851035293
feat(coverage): add jsx printing tests (#279)
closes #261
2023-04-15 12:31:37 +08:00
Boshen
a7cd845fff
feat: add cargo minsize task for tracking minification size (#276)
* feat: add `cargo minsize` task for tracking minification size

* add gzip
2023-04-14 13:07:37 +08:00
Boshen
d117ce20a1 refactor(benchmark): add more benchmark files 2023-04-13 22:16:48 +08:00
Boshen
62bb985434
ci: use cargo-llvm-cov for code coverage (#274) 2023-04-11 16:03:07 +08:00
Boshen
aedaa1a110
refactor(linter,semantic): move syntax check from linter to semantic (#272)
Syntax checker is part of semantic analyzer,
it doesn't make sense for the user to add a linter just for semantic errors
2023-04-10 12:23:53 +08:00
Boshen
dc090208c4
fix(parser): fix crashing on empty ParenthesizedExpression with comments (#263)
relates #232
2023-04-06 17:16:15 +08:00
Boshen
0674899b88
Fuzz async (#257)
* fix(parser): parse `async(...null)` as call expression

relates #255

* fix(parser): parse `null?async():null`

relates #255
2023-04-05 14:36:37 +08:00
Boshen
1c2acd121c
refactor(parser): clean up parsing of ForStatement (#251)
closes #176
2023-04-04 22:36:35 +08:00
Boshen
236d53ad9d
fix(parser): fix panic on multi-byte char in ExpectCatchFinally error 2023-04-02 20:09:38 +08:00
Boshen
abcda95e8e
deps: bump deps 2023-04-02 16:48:45 +08:00
Boshen
8833a84840 feat(coverage): read typescript dts option in babel 2023-04-02 16:41:53 +08:00
Boshen
f5c7b3751c fix(coverage): babel plugin option can be an array 2023-04-02 16:41:53 +08:00
Boshen
7db1643425 fix(parser): allow non-last rest element in ambient contexts 2023-04-02 16:41:53 +08:00
Boshen
be9b3f9acc feat(coverage): add babel parser option allow_return_outside_function 2023-04-02 16:41:53 +08:00
Boshen
e6079a1b4e feat(coverage): read jsx attribute from typescript files 2023-04-02 16:41:53 +08:00
Boshen
adedc1a405 feat(parser): parse jsx element and fragment in JSXAttributeValue 2023-04-02 16:41:53 +08:00
Boshen
1130f48278 feat(parser): parse ts satisfies operator 2023-04-02 16:41:53 +08:00
Boshen
90e2d386d7 fix(parser): do not check static prototype in ambient contexts 2023-04-02 16:41:53 +08:00
Boshen
a62c9335a2 fix(parser): fix remaining errors around auto accessors 2023-04-02 16:41:53 +08:00
Boshen
adef772d6c refactor: clean up code around code coverage 2023-04-01 15:59:42 +08:00
Boshen
174330561c
fix(parser): fix panic on multi-byte characaters (#233)
* fix(oxc_parser): fix panic when EOF on a multi-byte character

relates #232

* fix(parser): fix panic on multi-byte char in private identifer

relates #232
2023-04-01 13:34:18 +08:00
Boshen
4ccb9e806b
chore(coverage): remove mention of git submodule update --remote in README
We want people to use --init.
2023-04-01 10:57:25 +08:00
Boshen
f8790d4b89
feat(semantic): can turned off ModuleRecordBuilder
relates to #224
2023-04-01 00:41:52 +08:00
Boshen
05f163f2f7
fix(coverage): fix lint on cfg feature 2023-04-01 00:02:58 +08:00
Boshen
d232199e1c
refactor(parser): return Rc<Trivias> from TriviaBuilder (#231)
closes #229
2023-03-31 09:02:48 -07:00
Boshen
1a6f508bb9
ci: add codecov 2023-03-31 22:59:14 +08:00
Boshen
de9be97f0f
chore: clean up Cargo.toml in tasks 2023-03-31 22:22:18 +08:00
Boshen
9e3675a575
chore: clean up Cargo.toml 2023-03-30 23:27:26 +08:00
yangchenye
929b0efebb
feat(linter): implement isolated_declaration (#209)
* feat(linter): implement isolated_declaration

* Implement check for class elements

* Set up Export SymbolFlag and store declaration AST in Symbol

* Fix tests and comments
2023-03-26 04:37:10 -07:00
Boshen
5a1a72204e
chore(coverage): update snapshots 2023-03-25 14:21:22 +08:00
Boshen
d095d45818
refactor(semantic): add source_text and trivias to semantic 2023-03-25 14:19:53 +08:00
yangchenye
40460dd32b
feat(rulegen): fallback to empty rule template (#208) 2023-03-24 22:36:11 -07:00
Xuan
71e575ab41
feat(linter): implement no-new-symbol rule (#201) 2023-03-23 18:29:57 +08:00
yangchenye
0d8d67b593
feat(linter): implement eslint(no-const-assign) (#199)
* feat(linter): implement eslint(no-const-assign)

* feat(semantics & linter): resolve symbols

* Use run_on_symbol

* Add resolved_reference to SymbolTable
2023-03-23 12:55:40 +08:00
Boshen
7dfaf9949c
chore(README): clean up sentences with chatGPT 2023-03-22 20:34:07 +08:00
Boshen
9dfd4cd936
chore(rust): remove unnecessary missing_const_for_fn 2023-03-22 12:35:52 +08:00
Boshen
ff9a2c3ab0
feat(linter): eslint disable comments (#196)
feat(linter): eslint disable comments

closes #100
closes #170
2023-03-22 11:27:42 +08:00
yangchenye
3487772644
feat(linter): implement eslint(no-dupe-class-members) (#195) 2023-03-21 12:43:23 +08:00
Boshen
69109286b5
chore(README): mention stage 3 skipped tests. 2023-03-19 12:47:57 +08:00
yangchenye
4549fb3cdd
fix(parser): parse decorator with separate grammar (#192) 2023-03-19 11:35:59 +08:00
Boshen
37c7b7a752
refactor(oxc_parser): simply diagnostic messages 2023-03-18 14:39:44 +08:00
Boshen
6a89f085b7
refactor(rust): add more clippy restriction rules 2023-03-17 14:51:25 +08:00
Boshen
a1315e3999
refactor(rust): add clippy::clone_on_ref_ptr 2023-03-17 14:51:25 +08:00
Boshen
57f3065d68
refactor: remove unused #[allow(clippy:..)] 2023-03-17 13:28:06 +08:00
Boshen
bee548b945
fix(coverage): correct the number on AST Parsed 2023-03-17 11:15:33 +08:00
Boshen
97d01b4ced
chore(coverage): remove stage 3 decorators from conformance tests
By looking at the grammar, separate AST nodes need to be created.
Disabling this for now because it still looks like a mess for now.
2023-03-17 10:30:18 +08:00
Boshen
9ed682a38e
fix(semantic): fix function redeclaration errors
The problem here we face here is that TypeScript does not consider Annex
B.3.2, which makes implementation a bit more difficult.

This implementation conforms to test262.
2023-03-17 10:06:02 +08:00
yangchenye
37ad6f3a15
feat(parser): support decorators in class expression (#190)
feat(parser): support decorator in class expression
2023-03-17 09:33:04 +08:00
Boshen
164c2831e1 feat(linter): report export errors in javascript 2023-03-15 18:12:34 -07:00
Boshen
326de5006b
chore: bump submodules 2023-03-15 12:46:21 +08:00
yangchenye
aaaefc8ba5
feat(linter): implement eslint(no-unsafe-negation) (#186) 2023-03-15 11:36:56 +08:00
yangchenye
74c731c415
feat(linter): Implement eslint(no-compare-neg-zero) (#185) 2023-03-15 10:44:11 +08:00
Boshen
e262e18e5f
chore(coverage): remove tests for stage 3 proposal-json-modules 2023-03-14 11:02:00 +08:00
Boshen
ee31f5cc6f
feat(linter): check duplicated bound names in ImportDeclaration 2023-03-14 10:42:18 +08:00
Boshen
89f28e9f93
feat(linter): check module in javascript and skip in typescript 2023-03-14 08:53:16 +08:00
Boshen
7b1a7d47b6
feat(linter): check await in ClassStaticBlock in javascript 2023-03-14 08:08:24 +08:00
Boshen
297ce2743f
Revert "feat(linter): check await in class static block"
This reverts commit 7add71c9dd.
2023-03-14 07:56:04 +08:00
Boshen
7add71c9dd
feat(linter): check await in class static block 2023-03-14 07:46:11 +08:00
Boshen
78bd76e8d0
feat(parser): check function name for await and yield 2023-03-14 07:39:07 +08:00
Boshen
c706d1825d
feat(semantic): turn on strict mode in semantic builder 2023-03-14 00:30:22 +08:00
Boshen
76118e4901
feat(linter): check NewTarget in javascript 2023-03-14 00:05:37 +08:00
Boshen
39795dbb1b
feat(linter): check ArrayPattern in javascript 2023-03-13 23:52:36 +08:00
Boshen
76f7e58036
feat(linter): check FormalParameter in javascript 2023-03-13 23:43:31 +08:00
Boshen
f4c8cb2cde
feat(linter): check FunctionDeclaration in javascript 2023-03-13 23:35:42 +08:00
Boshen
5381fd0cf8
feat(linter): check Directive in javascript 2023-03-13 23:19:35 +08:00
Boshen
7269d32346
feat(linter): check FormalParameters in javascript 2023-03-13 23:12:42 +08:00
Boshen
040e41240b
feat(linter): check AwaitExpression and YieldExpression in javascript 2023-03-13 13:45:49 +08:00
Boshen
fce6e1ec73
feat(parser): check YieldExpression 2023-03-12 23:41:27 +08:00
Boshen
88fd0a05ec
feat(parser): check AwaitExpression 2023-03-12 23:37:21 +08:00
Boshen
d6e8c6fb2f
feat(parser): check ReturnStatement in return context 2023-03-12 23:30:32 +08:00
Boshen
84eaa0b7e3
feat(linter): check eval and arguments in JavaScript 2023-03-12 23:25:57 +08:00
Boshen
93b06e948a
feat(ast_parser): check await and yield identifier error 2023-03-12 23:22:10 +08:00
Boshen
d490ca7b31
chore(rust): bump deps 2023-03-11 23:26:45 +08:00
Boshen
b1e01d0774
feat(linter): check top level ModuleDeclaration 2023-03-11 21:09:03 +08:00
Boshen
5c2fea7702
feat(linter): check SwitchStatement in javascript 2023-03-11 20:26:50 +08:00
Boshen
021345173f
feat(linter): check expressions in javascript 2023-03-11 20:18:20 +08:00
Boshen
403682960f
feat(linter): check ForStatementLeft in javascript 2023-03-11 19:12:29 +08:00
Boshen
f22539e93f
feat(linter): check property 2023-03-11 19:12:28 +08:00
Boshen
82ef1f2944
feat(linter): check Super in javascript 2023-03-11 18:48:34 +08:00
Boshen
6c28948faf
feat(linter): check duplicate constructor in javascript 2023-03-11 18:34:05 +08:00
Boshen
d5075a95e9
fix(linter): diagnostics should not print quotes 2023-03-11 17:44:27 +08:00
Boshen
a5f00e8e1c
refactor(oxc_ast): remove unnecessary SourceTypeBuilder 2023-03-11 16:21:14 +08:00
Boshen
58e2741ec9 feat(semantic): bind Function name 2023-03-10 23:28:51 -08:00
Boshen
995e7c1767 feat(linter): bind CatchVariable 2023-03-10 23:28:51 -08:00
Boshen
34c0599db8 feat(semantic): bind FormalParameters 2023-03-10 23:28:51 -08:00
Boshen
323bb9a2b6 feat(semantic): bind VariableDeclarator 2023-03-10 23:28:51 -08:00
Boshen
b1e802cecc feat(semantic): bind Class 2023-03-10 23:28:51 -08:00
Boshen
5c8670d1c8 feat(semantic): declare symbol and reference Identifier 2023-03-10 23:28:51 -08:00
Boshen
be6fa2e7a0 chore(coverage): bump submodules 2023-03-10 23:28:51 -08:00
Boshen
5b8bdaabab
feat(linter): check IdentifierReference in javascript 2023-03-09 20:20:58 +08:00
Boshen
185acc49bd feat(linter): check BindingIdentifier in javascript 2023-03-09 01:27:14 -08:00
Boshen
4ea7ac373d feat(linter): check Identifier in javascript 2023-03-09 01:27:14 -08:00
Boshen
4a582f0487 feat(linter): check WithStatement in javascript 2023-03-09 01:27:14 -08:00
Boshen
0fb8887d3c feat(linter): check LabeledStatement in javascript 2023-03-09 01:27:14 -08:00
Boshen
26387c0660 feat(linter): check ContinueStatement in javascript 2023-03-09 01:27:14 -08:00
Boshen
fa8f685551 fix(coverage): fix broken typescript nagative conformance 2023-03-09 01:27:14 -08:00
Boshen
3e842667b1 feat(linter): check BreakStatement in javascript 2023-03-09 01:27:14 -08:00
Boshen
735b1241c4 feat(linter): check StringLiteral in javascript 2023-03-09 01:27:14 -08:00
Boshen
ed161cc38e feat(linter): check PrivateIdentifier in javascript 2023-03-09 01:27:14 -08:00
Boshen
44675e8cd8 feat(coverage): add always_strict mode for test262 2023-03-09 01:27:14 -08:00
Boshen
f13640e1c2 feat(linter): check NumberLiteral in javascript 2023-03-09 01:27:14 -08:00
Boshen
4e0d785b25 feat(linter): add infrastructure for handling early errors 2023-03-09 01:27:14 -08:00
yangchenye
1ea463e0bb
feat(oxc_linter): implement eslint(no-mixed-operators) (#145) 2023-03-09 00:05:44 +08:00
Boshen
94fdd54368
perf(lexer): fine tune identifier checking with less redundant branches (#154)
perf(lexer): fine tune checking of identifiers with less redundant branches
2023-03-08 22:00:15 +08:00
yangchenye
b76ffb4826
feat(rule_generator): generate test options (#150) 2023-03-08 11:02:01 +08:00
Boshen
3562a49592
chore(coverage): print negative tests; enable decorators; update to the latest remote 2023-03-07 23:37:00 +08:00
Boshen
2f2c133017
fix(coverage): fix broken snapshot 2023-03-07 21:32:55 +08:00
Boshen
4d32bfb55e
refactor: remove all declarations of const fn, which is useless for us 2023-03-07 21:29:47 +08:00
Boshen
2f9e3832a0 chore(rust): bump deps 2023-03-05 04:51:00 -08:00
Fnll
81760da7cc
feat(parser): better diagnostic for missing semicolon in for loop statement (#133)
feat(parser): better diagnostic

Co-authored-by: kerui.lian <kerui.lian@bytedance.com>
2023-03-05 04:13:23 -08:00
Boshen
94fddffc70
chore: use fancy-no-backtrace from miette
See https://github.com/zkat/miette/issues/132
2023-03-05 15:16:26 +08:00
Ye Yangchen
d8c6caf57f feat(oxc_parser): Parse modifiers before declaration 2023-03-01 22:50:23 -08:00
Shannon Rothe
ba6414656c run coverage 2023-03-01 20:47:52 -08:00
Xuan
298e956d0d feat(oxc_cli): support ignore-path 2023-03-01 04:39:18 -08:00
Boshen
ab0b764dfc
chore(README.md): include third party licenses 2023-02-27 12:46:07 +08:00
Ye Yangchen
0bf8f817f5 feat(oxc_parser): Port isStartOfDeclaration form tsc 2023-02-27 12:27:44 +08:00
Xuan
6b43cbbe71 fix(oxc_parser): support export type with star symbol 2023-02-27 12:26:23 +08:00
Xuan
b6d09643e5 fix(oxc_parser): check access correctly 2023-02-27 03:10:02 +08:00
Boshen
da941e8689
chore: update contribution docs 2023-02-24 13:24:42 +08:00
Boshen
5d17512b37
chore(coverage): update snapshots 2023-02-24 13:12:07 +08:00
Boshen
4b80cb2b6a
chore(tasks): update submodules 2023-02-24 13:08:22 +08:00
Xuan
457e85b4a0 fix(oxc_parser): check ambiguous for await 2023-02-24 12:46:59 +08:00
Boshen
d773187f43
ci: skip making comments from forks in benchmark
source: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#restrictions-on-repository-forks
2023-02-23 21:37:08 +08:00
Xuan
65e81ce12c fix(oxc_parser): eat decorator for export 2023-02-23 12:28:34 +08:00
Boshen
7689df3318 feat(coverage): print diagnostics to snapshots 2023-02-22 19:23:01 +08:00
Boshen
978ca362f7 feat(coverage): use test262 to test printer 2023-02-20 18:23:36 +08:00
Boshen
204ea12d6a
fix(coverage): fix empty being reported as not parsed 2023-02-12 21:24:19 +08:00
Boshen
65cfa48fe5
chore(coverage): add typescript to cargo coverage command 2023-02-12 16:27:26 +08:00
Boshen
6758b0c66c feat(coverage): add typescript conformance (currently 4287/4861 88.19%)
Some of the files are not being parsed because we are currently less
recoverable than TypeScript.
2023-02-11 23:46:28 -08:00
Boshen
a4e04d4f6f feat(coverage): add babel conformance (currently 2043/2057 99.32%) 2023-02-11 22:36:32 -08:00
Boshen
a339ba3f92 feat(coverage): print parsing conformance for test262 (currently 100%) 2023-02-11 08:02:42 -08:00
Boshen
62a4f2b551 feat(ast): add ast 2023-02-11 04:27:34 -08:00
Boshen
4ae70b9592 feat(parser): add lexer 2023-02-11 02:29:54 -08:00
Boshen
f4819d976b feat(tasks): add initial test262 setup 2023-02-11 00:43:09 -08:00