Commit graph

703 commits

Author SHA1 Message Date
Boshen
dd540c8f0f feat(minifier): add skeleton for ReplaceGlobalDefines ast pass (#3803) 2024-06-21 13:53:59 +00:00
Boshen
f8fe583a0b
ci: run cargo check first 2024-06-20 23:38:21 +08:00
Boshen
4fb90eb009 feat(oxc): export isolated-declarations (#3765) 2024-06-19 12:54:02 +00:00
Boshen
8c02c1dac3 chore(isolated-declarations): add snapshot testing (#3756) 2024-06-19 09:20:17 +00:00
github-actions[bot]
1b3cd6c24d
Release crates v0.15.0 (#3743)
## [0.15.0] - 2024-06-18

- 0537d29 cfg: [**BREAKING**] Move control flow to its own crate.
(#3728) (rzvxa)

- 5c38a0f codegen: [**BREAKING**] New code gen API (#3740) (Boshen)

- 4bce59d semantic/cfg: [**BREAKING**] Re-export `petgraph` as
`control_flow::graph`. (#3722) (rzvxa)

- 534242a codegen: [**BREAKING**] Remove
`CodegenOptions::enable_typescript` (#3674) (Boshen)

- 0578ece ast: [**BREAKING**] Remove
`ExportDefaultDeclarationKind::TSEnumDeclaration` (#3666) (Dunqing)

### Features

- 5a99d30 codegen: Improve codegen formatting (#3735) (Boshen)
- bf9b38a codegen: Improve codegen formatting (#3731) (Boshen)
- 4a004e2 codegen: Print TSImport remaining fields (#3695) (Dunqing)
- a56cb1b codegen: Print accessibility for MethodDefinition (#3690)
(Dunqing)
- 38a75e5 coverage: Improve codegen (#3729) (Boshen)
- 750a534 coverage: Transformer idempotency test (#3691) (Boshen)
- ee627c3 isolated-declarations: Create unique name for `_default`
(#3730) (Dunqing)
- 81e9526 isolated-declarations: Inferring set accessor parameter type
from get accessor return type (#3725) (Dunqing)
- 77d5533 isolated-declarations: Report errors that are consistent with
typescript. (#3720) (Dunqing)
- 8f5655d linter: Add eslint/no-useless-constructor (#3594) (Don Isaac)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238) (rzvxa)
- 0b8098a napi: Isolated-declaration (#3718) (Boshen)
- 527bfc8 npm/oxc-transform: Setup npm/oxc-transform and publish
(Boshen)
- d65c652 parser: Display jsx mismatch error, e.g. `<Foo></Bar>` (#3696)
(Boshen)
- 9c31ed9 semantic/cfg: Propagate unreachable edges through subgraphs.
(#3648) (rzvxa)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566) (rzvxa)
- 910193e transformer-dts: Report error for super class (#3711)
(Dunqing)
- 413d7be transformer-dts: Transform enum support (#3710) (Dunqing)
- 35c382e transformer-dts: Remove type annotation from private field
(#3689) (Dunqing)
- 0e6d3ce transformer-dts: Report error for async function and generator
(#3688) (Dunqing)
- b22b59a transformer-dts: Transform namespace support (#3683) (Dunqing)
- 4f2db46 transformer-dts: `--isolatedDeclarations` dts transform
(#3664) (Dunqing)

### Bug Fixes

- 2158268 ast: Incorrect visit order in function (#3681) (Dunqing)
- da1e2d0 codegen: Improve typescript codegen (#3708) (Boshen)
- f1b793f isolated-declarations: Function overloads reaching unreachable
(#3739) (Dunqing)
- 0fbecdc isolated-declarations: Should be added to references, not
bindings (#3726) (Dunqing)
- 8f64d99 minifier: Respect `join_vars: false` option (#3724)
(mysteryven)
- 70fc69b semantic: Add Eq to CtxFlags (#3651) (Yuji Sugiura)
- 7a58fec semantic/cfg: Issue in unlabeled `Ctx`s. (#3678) (rzvxa)
- abd6ac8 semantic/cfg: Discrete finalization path after `NewFunction`s.
(#3671) (rzvxa)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667) (Ali Rezvani)
- 59666e0 transformer: Do not rename accessible identifier references
(#3623) (Dunqing)
- 90743e2 traverse: Change visit order for `Function` (#3685)
(overlookmotel)

### Performance

- 2717a1a semantic/cfg: Lower the visits in
`neighbors_filtered_by_edge_weight`. (#3676) (rzvxa)

### Refactor

- fa7a6ba codegen: Add `gen` method to ast nodes (#3687) (Boshen)
- 09b92b6 codegen: Move `gen_ts` into `gen` to make searching things
easier (#3680) (Boshen)
- 3c59735 isolated-declarations: Remove `TransformDtsCtx` (#3719)
(Boshen)
- 815260e isolated-declarations: Decouple codegen (#3715) (Boshen)
- 7ec44f8 semantic: Rename `cfg` macro to `control_flow`. (#3742)
(rzvxa)
- d8ad321 semantic: Make control flow generation optional. (#3737)
(rzvxa)
- a94a72d semantic: Expose 1 checker function instead of 2 (#3694)
(Boshen)
- bd8d115 semantic/cfg: Remove unused types. (#3677) (rzvxa)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650)
(rzvxa)
- 4f16664 transformer_dts: Create a `Program` for codegen (#3679)
(Boshen)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-19 01:15:55 +08:00
rzvxa
0537d298db refactor(cfg)!: move control flow to its own crate. (#3728) 2024-06-18 15:59:29 +00:00
Boshen
5c38a0fd69 feat(codegen)!: new code gen API (#3740)
This PR introduces two type alias to avoid the confusing const generic `pub struct Codegen<'a, const MINIFY: bool>`

* CodeGenerator - Code generator without whitespace removal.
* WhitespaceRemover - Code generator with whitespace removal.

Usage is changed to a builder pattern:

```rust
CodeGenerator::new()
  .enable_comment(...)
  .enable_sourcemap(...)
  .build(&program);
```
2024-06-18 15:50:12 +00:00
Boshen
f42c325a06 refactor(napi): change "isolated declarations" to "transform" (#3721) 2024-06-17 14:09:18 +00:00
Boshen
0b8098a442 feat(napi): isolated-declaration (#3718) 2024-06-17 13:06:00 +00:00
Boshen
87c3282deb chore(transformer-dts): change crate to oxc_isolated_declarations (#3713) 2024-06-17 11:14:13 +00:00
renovate
8dc985a8fa chore(deps): update rust crates (#3709)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [criterion2](https://bheisler.github.io/criterion.rs/book/index.html) ([source](https://togithub.com/Boshen/criterion2.rs)) | workspace.dependencies | minor | `0.10.0` -> `0.11.0` |
| [memchr](https://togithub.com/BurntSushi/memchr) | workspace.dependencies | patch | `2.7.2` -> `2.7.4` |
| [oxc-browserslist](https://togithub.com/oxc-project/oxc-browserslist) | workspace.dependencies | patch | `0.17.0` -> `0.17.1` |
| [url](https://togithub.com/servo/rust-url) | workspace.dependencies | patch | `2.5.0` -> `2.5.1` |

---

### Release Notes

<details>
<summary>Boshen/criterion2.rs (criterion2)</summary>

### [`v0.11.0`](https://togithub.com/Boshen/criterion2.rs/blob/HEAD/CHANGELOG.md#0110---2024-06-14)

[Compare Source](https://togithub.com/Boshen/criterion2.rs/compare/v0.10.0...v0.11.0)

##### Added

-   \[**breaking**] remove csv_output ([#&#8203;33](https://togithub.com/Boshen/criterion2.rs/pull/33))
-   rm crate `criterion-macro`

##### Other

-   *(deps)* update dependency rust to v1.79.0 ([#&#8203;35](https://togithub.com/Boshen/criterion2.rs/pull/35))
-   *(deps)* update rust crates ([#&#8203;32](https://togithub.com/Boshen/criterion2.rs/pull/32))
-   *(deps)* lock file maintenance rust crates ([#&#8203;31](https://togithub.com/Boshen/criterion2.rs/pull/31))
-   check unused dependencies

</details>

<details>
<summary>BurntSushi/memchr (memchr)</summary>

### [`v2.7.4`](https://togithub.com/BurntSushi/memchr/compare/2.7.3...2.7.4)

[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.3...2.7.4)

### [`v2.7.3`](https://togithub.com/BurntSushi/memchr/compare/2.7.2...2.7.3)

[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.2...2.7.3)

</details>

<details>
<summary>oxc-project/oxc-browserslist (oxc-browserslist)</summary>

### [`v0.17.1`](https://togithub.com/oxc-project/oxc-browserslist/blob/HEAD/CHANGELOG.md#0171---2024-06-17)

[Compare Source](https://togithub.com/oxc-project/oxc-browserslist/compare/oxc-browserslist-v0.17.0...oxc-browserslist-v0.17.1)

##### Other

-   *(deps)* update npm packages ([#&#8203;45](https://togithub.com/oxc-project/oxc-browserslist/pull/45))

</details>

<details>
<summary>servo/rust-url (url)</summary>

### [`v2.5.1`](https://togithub.com/servo/rust-url/releases/tag/v2.5.1)

[Compare Source](https://togithub.com/servo/rust-url/compare/v2.5.0...v2.5.1)

#### What's Changed

-   Be more detailed in documentation of set_query by [@&#8203;philippeitis](https://togithub.com/philippeitis) in [https://github.com/servo/rust-url/pull/737](https://togithub.com/servo/rust-url/pull/737)
-   perf(punycode): avoid double allocation in decode_to_string by [@&#8203;bishopcheckmate](https://togithub.com/bishopcheckmate) in [https://github.com/servo/rust-url/pull/894](https://togithub.com/servo/rust-url/pull/894)
-   Use SPECIAL_PATH_SEGMENT when encoding path in from_file_path by [@&#8203;valenting](https://togithub.com/valenting) in [https://github.com/servo/rust-url/pull/902](https://togithub.com/servo/rust-url/pull/902)
-   Add dependabot by [@&#8203;oriontvv](https://togithub.com/oriontvv) in [https://github.com/servo/rust-url/pull/903](https://togithub.com/servo/rust-url/pull/903)
-   Bump codecov/codecov-action from 3 to 4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/servo/rust-url/pull/904](https://togithub.com/servo/rust-url/pull/904)
-   Bump actions/upload-artifact from 2 to 4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/servo/rust-url/pull/905](https://togithub.com/servo/rust-url/pull/905)
-   Bump actions/checkout from 3 to 4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/servo/rust-url/pull/906](https://togithub.com/servo/rust-url/pull/906)
-   Fix non-base64 data URLs with % characters not followed by hex digits by [@&#8203;SmaugPool](https://togithub.com/SmaugPool) in [https://github.com/servo/rust-url/pull/797](https://togithub.com/servo/rust-url/pull/797)
-   Rename `master` branch to `main` by [@&#8203;mrobinson](https://togithub.com/mrobinson) in [https://github.com/servo/rust-url/pull/914](https://togithub.com/servo/rust-url/pull/914)
-   Add bench for to_ascii on an already-Punycode name by [@&#8203;hsivonen](https://togithub.com/hsivonen) in [https://github.com/servo/rust-url/pull/915](https://togithub.com/servo/rust-url/pull/915)
-   Update URLs by [@&#8203;atouchet](https://togithub.com/atouchet) in [https://github.com/servo/rust-url/pull/916](https://togithub.com/servo/rust-url/pull/916)
-   Fix lint by [@&#8203;valenting](https://togithub.com/valenting) in [https://github.com/servo/rust-url/pull/920](https://togithub.com/servo/rust-url/pull/920)
-   Fix multiple issues on wasm32, and runs url tests in CI by [@&#8203;micolous](https://togithub.com/micolous) in [https://github.com/servo/rust-url/pull/886](https://togithub.com/servo/rust-url/pull/886)
-   Non-special URLs can have their paths erased by [@&#8203;DylanOToole2](https://togithub.com/DylanOToole2) in [https://github.com/servo/rust-url/pull/921](https://togithub.com/servo/rust-url/pull/921)
-   docs: document SyntaxViolation variants, remove bare URLs by [@&#8203;aatifsyed](https://togithub.com/aatifsyed) in [https://github.com/servo/rust-url/pull/924](https://togithub.com/servo/rust-url/pull/924)
-   docs: Document possible replacements of the base URL by [@&#8203;mo8it](https://togithub.com/mo8it) in [https://github.com/servo/rust-url/pull/926](https://togithub.com/servo/rust-url/pull/926)
-   Reimplement idna on top of ICU4X by [@&#8203;hsivonen](https://togithub.com/hsivonen) in [https://github.com/servo/rust-url/pull/923](https://togithub.com/servo/rust-url/pull/923)

#### New Contributors

-   [@&#8203;philippeitis](https://togithub.com/philippeitis) made their first contribution in [https://github.com/servo/rust-url/pull/737](https://togithub.com/servo/rust-url/pull/737)
-   [@&#8203;bishopcheckmate](https://togithub.com/bishopcheckmate) made their first contribution in [https://github.com/servo/rust-url/pull/894](https://togithub.com/servo/rust-url/pull/894)
-   [@&#8203;oriontvv](https://togithub.com/oriontvv) made their first contribution in [https://github.com/servo/rust-url/pull/903](https://togithub.com/servo/rust-url/pull/903)
-   [@&#8203;dependabot](https://togithub.com/dependabot) made their first contribution in [https://github.com/servo/rust-url/pull/904](https://togithub.com/servo/rust-url/pull/904)
-   [@&#8203;SmaugPool](https://togithub.com/SmaugPool) made their first contribution in [https://github.com/servo/rust-url/pull/797](https://togithub.com/servo/rust-url/pull/797)
-   [@&#8203;hsivonen](https://togithub.com/hsivonen) made their first contribution in [https://github.com/servo/rust-url/pull/915](https://togithub.com/servo/rust-url/pull/915)
-   [@&#8203;micolous](https://togithub.com/micolous) made their first contribution in [https://github.com/servo/rust-url/pull/886](https://togithub.com/servo/rust-url/pull/886)
-   [@&#8203;DylanOToole2](https://togithub.com/DylanOToole2) made their first contribution in [https://github.com/servo/rust-url/pull/921](https://togithub.com/servo/rust-url/pull/921)
-   [@&#8203;aatifsyed](https://togithub.com/aatifsyed) made their first contribution in [https://github.com/servo/rust-url/pull/924](https://togithub.com/servo/rust-url/pull/924)
-   [@&#8203;mo8it](https://togithub.com/mo8it) made their first contribution in [https://github.com/servo/rust-url/pull/926](https://togithub.com/servo/rust-url/pull/926)

**Full Changelog**: https://github.com/servo/rust-url/compare/v2.5.0...v2.5.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-06-17 09:49:03 +00:00
Boshen
eff9cff048 feat(coverage): add dts transform coverage test (#3675) 2024-06-14 14:29:27 +00:00
Dunqing
4f2db46ee5 feat(transformer-dts): --isolatedDeclarations dts transform (#3664)
The goal of this PR is to pass the test cases in https://github.com/microsoft/TypeScript/tree/main/tests/cases/transpile

Once this is polished, we may publish a npm package with napi bindings for people to experiment with.
2024-06-14 12:44:10 +00:00
github-actions[bot]
6168969f94
Release oxlint v0.4.4 (#3669)
## [0.4.4] - 2024-06-14

### Features

- 8f5655d linter: Add eslint/no-useless-constructor (#3594) (Don Isaac)
- 29c78db linter: Implement
@typescript-eslint/explicit-function-return-type (#3455) (kaykdm)
- 21d3425 linter: Typescript-eslint no-useless-empty-export (#3605)
(keita hino)
- 85c3b83 linter: Eslint-plugin-jest/max-nested-describes (#3585)
(cinchen)
- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568) (Wang Wenzhe)
- 046ff3f linter/eslint: Add `no_unreachable` rule. (#3238) (rzvxa)
- e32ce00 linter/jsdoc: Implement require-param-name rule (#3636) (Yuji
Sugiura)
- 110661c linter/jsdoc: Implement require-param-description (#3621)
(Yuji Sugiura)
- d6370f1 linter/jsdoc: Implement require-param-type rule (#3601) (Yuji
Sugiura)
- d9c5b33 semantic/cfg: Add `Condition` instruction. (#3567) (Ali
Rezvani)
- f2dfd66 semantic/cfg: Add iteration instructions. (#3566) (rzvxa)

### Bug Fixes

- f0b689d linter: Panic in jsdoc/require-param (#3590) (Don Isaac)
- e148a32 semantic/cfg: Correct unreachability propagation in
try-finally. (#3667) (Ali Rezvani)

### Refactor

- 84304b4 linter: Add a `ctx.module_record()` method (#3637) (Boshen)
- f98f777 linter: Add rule fixer (#3589) (Don Isaac)
- fa11644 linter: Pass `Rc` by value (#3587) (overlookmotel)
- f702fb9 semantic/cfg: Cleanup control flow and it's builder. (#3650)
(rzvxa)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580)
(Dunqing)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-14 15:05:26 +08:00
github-actions[bot]
95e0571c2e
Release crates v0.14.0 (#3643)
## [0.14.0] - 2024-06-12

### Breaking

* fix(codegen)!: remove the unecessary 4th argument from `Codegen::new`
(#3640)
* feat(ast)!: make `Trivias` clonable by adding `Arc` (#3638)

### Features

- f6d9ca6 linter: Add `eslint/sort-imports` rule (#3568) (Wang Wenzhe)
- 129f91e span: Port over more methods from TextRange (#3592) (Don
Isaac)

### Bug Fixes

- f8f6d33 ast: Correct `visited_node` attr for strict mode of arrow fns
(#3635) (overlookmotel)
- e6ad3fb diagnostics: Do not print ansi color codes in non-TTYs (#3624)
(Boshen)
- d65202d span: Correct doc comments (#3608) (overlookmotel)
- 35e267b transformer: Arrow function transform use UIDs for `_this`
vars (#3634) (overlookmotel)
- 39bdebc transformer: Arrow func transform maintain scope ID (#3633)
(overlookmotel)
- 5cb7e6a transformer: Arrow func transform use correct spans (#3630)
(overlookmotel)
- 0c4ccb4 transformer: Arrow function transform alter `</this>` (#3627)
(overlookmotel)
- 8d237c4 transformer: JSX source calculate correct column when Unicode
chars (#3615) (overlookmotel)
- 9e8f4d6 transformer: Do not add `__source` for generated nodes (#3614)
(overlookmotel)
- 0fb4c35 transformer: Use UID for JSX source filename var (#3612)
(overlookmotel)

### Performance

- 3a59294 transformer: React display name transform reduce Atom
allocations (#3616) (overlookmotel)
- f4c1389 transformer: Create `Vec` with capacity (#3613)
(overlookmotel)

### Refactor

- 0f92521 ast: Replace recursion with loop (#3626) (overlookmotel)
- 08f1010 ast: Make `AstBuilder` `Copy` (#3602) (overlookmotel)
- 84304b4 linter: Add a `ctx.module_record()` method (#3637) (Boshen)
- f98f777 linter: Add rule fixer (#3589) (Don Isaac)
- e90e6a2 minifier: Make `Prepass` `Copy` (#3603) (overlookmotel)
- 7d61832 semantic: Pass `Rc` by value (#3586) (overlookmotel)
- 89bcbd5 transformer: Move `BoundIdentifier` into helpers (#3610)
(overlookmotel)
- 5793ff1 transformer: Replace `&’a Trivias` with `Rc<Trivias>` (#3580)
(Dunqing)
- 509871f transformer: Comment for unimplemented `spec` option in arrow
fns transform (#3618) (overlookmotel)
- 4b2e3a7 transformer: Fix indentation (#3617) (overlookmotel)
- 3467e3d transformer: Remove outdated comment (#3606) (overlookmotel)
- a799225 transformer: Flatten file structure for React transform
(#3604) (overlookmotel)
- 70f31a8 transformer: Reduce branching in JSX transform (#3596)
(overlookmotel)
- 3ae567d transformer: Remove dead code (#3588) (overlookmotel)
- 60cbdec traverse: `generate_uid_in_root_scope` method (#3611)
(overlookmotel)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-12 17:52:41 +08:00
Boshen
5c6a9a0821
chore: update Cargo.lock 2024-06-10 16:59:26 +08:00
renovate[bot]
2fd433fed7
chore(deps): update rust crates (#3595)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [base64](https://togithub.com/marshallpierce/rust-base64) |
workspace.dependencies | patch | `0.22.0` -> `0.22.1` |
| [bpaf](https://togithub.com/pacak/bpaf) | workspace.dependencies |
patch | `0.9.11` -> `0.9.12` |
| [flate2](https://togithub.com/rust-lang/flate2-rs) |
workspace.dependencies | patch | `1.0.29` -> `1.0.30` |
| [insta](https://insta.rs/)
([source](https://togithub.com/mitsuhiko/insta)) |
workspace.dependencies | patch | `1.38.0` -> `1.39.0` |
| [mimalloc](https://togithub.com/purpleprotocol/mimalloc_rust) |
workspace.dependencies | patch | `0.1.41` -> `0.1.42` |
| [napi](https://togithub.com/napi-rs/napi-rs) | workspace.dependencies
| patch | `2` -> `2.16.6` |
| [napi-build](https://togithub.com/napi-rs/napi-rs) |
workspace.dependencies | patch | `2` -> `2.1.3` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs) |
workspace.dependencies | patch | `2` -> `2.16.5` |
| [num-bigint](https://togithub.com/rust-num/num-bigint) |
workspace.dependencies | patch | `0.4.4` -> `0.4.5` |
| [num-traits](https://togithub.com/rust-num/num-traits) |
workspace.dependencies | patch | `0.2.18` -> `0.2.19` |
| [ouroboros](https://togithub.com/someguynamedjosh/ouroboros) |
workspace.dependencies | patch | `0.18.3` -> `0.18.4` |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver) |
workspace.dependencies | patch | `1.7.0` -> `1.8.1` |
| [petgraph](https://togithub.com/petgraph/petgraph) |
workspace.dependencies | patch | `0.6.4` -> `0.6.5` |
| [phf](https://togithub.com/rust-phf/rust-phf) | workspace.dependencies
| patch | `0.11` -> `0.11.2` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2) |
workspace.dependencies | patch | `1.0.81` -> `1.0.85` |
| [regex](https://togithub.com/rust-lang/regex) | workspace.dependencies
| patch | `1.10.4` -> `1.10.5` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.199` -> `1.0.203` |
| [serde_json](https://togithub.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.116` -> `1.0.117` |
| [textwrap](https://togithub.com/mgeisler/textwrap) |
workspace.dependencies | patch | `0.16.0` -> `0.16.1` |
| [tokio](https://tokio.rs)
([source](https://togithub.com/tokio-rs/tokio)) | workspace.dependencies
| patch | `1` -> `1.38.0` |
| [tracing-subscriber](https://tokio.rs)
([source](https://togithub.com/tokio-rs/tracing)) |
workspace.dependencies | patch | `0.3` -> `0.3.18` |
| [trybuild](https://togithub.com/dtolnay/trybuild) |
workspace.dependencies | patch | `1.0.93` -> `1.0.96` |
| [unicode-id-start](https://togithub.com/Boshen/unicode-id-start) |
workspace.dependencies | patch | `1` -> `1.1.2` |
| [unicode-width](https://togithub.com/unicode-rs/unicode-width) |
workspace.dependencies | patch | `0.1.12` -> `0.1.13` |
| [wasm-bindgen](https://rustwasm.github.io/)
([source](https://togithub.com/rustwasm/wasm-bindgen)) |
workspace.dependencies | patch | `0.2` -> `0.2.92` |

---

### Release Notes

<details>
<summary>rust-lang/regex (regex)</summary>

###
[`v1.10.5`](https://togithub.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1105-2024-06-09)

[Compare
Source](https://togithub.com/rust-lang/regex/compare/1.10.4...1.10.5)

\===================
This is a new patch release with some minor fixes.

Bug fixes:

-   [BUG #&#8203;1203](https://togithub.com/rust-lang/regex/pull/1203):
Escape invalid UTF-8 when in the `Debug` impl of `regex::bytes::Match`.

</details>

<details>
<summary>unicode-rs/unicode-width (unicode-width)</summary>

###
[`v0.1.13`](https://togithub.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13)

[Compare
Source](https://togithub.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-09 17:56:49 +00:00
github-actions[bot]
6bdd74c476
Release crates v0.13.5 (#3584)
## [0.13.5] - 2024-06-08

### Bug Fixes

- 48bb97e traverse: Do not publish the build script (Boshen)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-08 16:44:50 +08:00
github-actions[bot]
d215e3d906
Release crates v0.13.4 (#3582)
## [0.13.4] - 2024-06-07

### Features

- 5c8e16c coverage: Second transformer build does not print typescript
(#3561) (Dunqing)
- 646b993 coverage/transformer: Handle @jsx option (#3553) (Dunqing)
- a939ddd transformer/typescript: Remove more typescript ast nodes
(#3563) (Dunqing)
- e8a20f8 transformer/typescript: Remove typescript ast nodes (#3559)
(Dunqing)
- ee9a215 transformer/typescript: Handle namespace directive correctly
(#3532) (Dunqing)

### Bug Fixes

- affb2c8 codegen: Print indentation before directive (#3512) (Dunqing)
- f6939cb transformer: Store `react_importer` in `Bindings` in JSX
transform (#3551) (overlookmotel)
- 7982b93 transformer: Correct spans for JSX transform (#3549)
(overlookmotel)
- c00598b transformer: JSX set `reference_id` on refs to imports (#3524)
(overlookmotel)

### Performance

- 37cdc13 transformer: Faster checks if JSX plugin enabled (#3577)
(overlookmotel)
- 9f467b8 transformer: Avoid fragment update where possible (#3535)
(overlookmotel)
- ac394f0 transformer: JSX parse pragma only once (#3534)
(overlookmotel)

### Documentation

- 1d3c0d7 span: Add doc comments to `oxc_span::Span` (#3543) (Don Isaac)

### Refactor

- f2113ae transformer: Reduce cloning and referencing `Rc`s (#3576)
(overlookmotel)
- 0948124 transformer: Pass `Rc`s by value (#3550) (overlookmotel)
- e4d74ac transformer: Remove `update_fragment` from JSX transform
(#3541) (overlookmotel)
- 73b7864 transformer: Combine import and usage in JSX transform (#3540)
(overlookmotel)
- 6978269 transformer/typescript: Replace reference collector with
symbols references (#3533) (Dunqing)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-07 17:41:11 +08:00
github-actions[bot]
8cbf937e84
Release oxlint v0.4.3 (#3581)
## [0.4.3] - 2024-06-07

### Features

- 1fb9d23 linter: Add fixer for no-useless-fallback-in-spread rule
(#3544) (Don Isaac)
- 6506d08 linter: Add fixer for no-single-promise-in-promise-methods
(#3531) (Don Isaac)
- daf559f linter: Eslint-plugin-jest/no-large-snapshot (#3436) (cinchen)
- 4c17bc6 linter: Eslint/no-constructor-return (#3321) (谭光志)
- 4a075cc linter/jsdoc: Implement require-param rule (#3554) (Yuji
Sugiura)
- 747500a linter/jsdoc: Implement require-returns-type rule (#3458)
(Yuji Sugiura)
- 6b39654 linter/tree-shaking: Support options (#3504) (Wang Wenzhe)
- 0cdb45a oxc_codegen: Preserve annotate comment (#3465)
(IWANABETHATGUY)

### Bug Fixes

- b188778 linter/eslint: Fix `require-await` false positives in
`ForOfStatement`. (#3457) (rzvxa)
- 350cd91 parser: Should parser error when function declaration has no
name (#3461) (Dunqing)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-07 16:39:51 +08:00
rzvxa
3c7ee85ce4 improvement(semantic/cfg): better break and continue flow. (#3462)
This PR adds a new edge type called `Jump` to distinguish between normal edges and jumps.
There is also a control flow context which is used to keep track of cfg scopes and labels. It replaces the old `preserve_state` and `restore_state`.
It corrects some mistakes - such as labeled blocks especially labeled continue which wasn't easy to implement with the old approach - in the old control flow but other than that it is mostly refactored to have a more declarative API instead of a procedural approach.
2024-06-06 07:55:31 +00:00
Boshen
20f1754f57
chore: update Cargo.lock 2024-06-04 18:05:57 +08:00
github-actions[bot]
079d42f68b
Release crates v0.13.2 (#3513)
Co-authored-by: Boshen <Boshen@users.noreply.github.com>
2024-06-03 12:40:53 +08:00
renovate[bot]
dc0ccba397
chore(deps): lock file maintenance rust crates (#3509)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [oxc_resolver](https://togithub.com/oxc-project/oxc-resolver) |
workspace.dependencies | minor | `1.7.0` -> `1.8.1` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2) |
workspace.dependencies | patch | `1.0.84` -> `1.0.85` |
| [tokio](https://tokio.rs)
([source](https://togithub.com/tokio-rs/tokio)) | workspace.dependencies
| minor | `1.37.0` -> `1.38.0` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>oxc-project/oxc-resolver (oxc_resolver)</summary>

###
[`v1.8.1`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#181---2024-05-31)

[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.8.0...oxc_resolver-v1.8.1)

##### Fixed

- alias value should try fragment as path
([#&#8203;172](https://togithub.com/oxc-project/oxc_resolver/pull/172))

###
[`v1.8.0`](https://togithub.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#180---2024-05-27)

[Compare
Source](https://togithub.com/oxc-project/oxc-resolver/compare/v1.7.0...oxc_resolver-v1.8.0)

##### Added

- \[**breaking**] remove the constraint on packages exports `default`
must be the last one
([#&#8203;171](https://togithub.com/oxc-project/oxc_resolver/pull/171))
- \[**breaking**] return `ResolveError:Builtin("node:{specifier}")` from
package imports and exports
([#&#8203;165](https://togithub.com/oxc-project/oxc_resolver/pull/165))

##### Fixed

- alias not found should return error
([#&#8203;168](https://togithub.com/oxc-project/oxc_resolver/pull/168))

##### Other

- add panic test for extensions without a leading dot
([#&#8203;150](https://togithub.com/oxc-project/oxc_resolver/pull/150))
- add test case for empty alias fields
([#&#8203;149](https://togithub.com/oxc-project/oxc_resolver/pull/149))

</details>

<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>

###
[`v1.0.85`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.85)

[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.84...1.0.85)

- Mark some tests as only for 64-bit targets
([#&#8203;463](https://togithub.com/dtolnay/proc-macro2/issues/463))

</details>

<details>
<summary>tokio-rs/tokio (tokio)</summary>

###
[`v1.38.0`](https://togithub.com/tokio-rs/tokio/releases/tag/tokio-1.38.0):
Tokio v1.38.0

[Compare
Source](https://togithub.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0)

This release marks the beginning of stabilization for runtime metrics.
It
stabilizes `RuntimeMetrics::worker_count`. Future releases will continue
to
stabilize more metrics.

##### Added

-   fs: add `File::create_new` ([#&#8203;6573])
-   io: add `copy_bidirectional_with_sizes` ([#&#8203;6500])
-   io: implement `AsyncBufRead` for `Join` ([#&#8203;6449])
-   net: add Apple visionOS support ([#&#8203;6465])
-   net: implement `Clone` for `NamedPipeInfo` ([#&#8203;6586])
-   net: support QNX OS ([#&#8203;6421])
-   sync: add `Notify::notify_last` ([#&#8203;6520])
-   sync: add `mpsc::Receiver::{capacity,max_capacity}` ([#&#8203;6511])
- sync: add `split` method to the semaphore permit ([#&#8203;6472],
[#&#8203;6478])
- task: add `tokio::task::join_set::Builder::spawn_blocking`
([#&#8203;6578])
- wasm: support rt-multi-thread with wasm32-wasi-preview1-threads
([#&#8203;6510])

##### Changed

- macros: make `#[tokio::test]` append `#[test]` at the end of the
attribute list ([#&#8203;6497])
-   metrics: fix `blocking_threads` count ([#&#8203;6551])
-   metrics: stabilize `RuntimeMetrics::worker_count` ([#&#8203;6556])
- runtime: move task out of the `lifo_slot` in `block_in_place`
([#&#8203;6596])
-   runtime: panic if `global_queue_interval` is zero ([#&#8203;6445])
- sync: always drop message in destructor for oneshot receiver
([#&#8203;6558])
-   sync: instrument `Semaphore` for task dumps ([#&#8203;6499])
- sync: use FIFO ordering when waking batches of wakers ([#&#8203;6521])
-   task: make `LocalKey::get` work with Clone types ([#&#8203;6433])
-   tests: update nix and mio-aio dev-dependencies ([#&#8203;6552])
-   time: clean up implementation ([#&#8203;6517])
-   time: lazily init timers on first poll ([#&#8203;6512])
-   time: remove the `true_when` field in `TimerShared` ([#&#8203;6563])
-   time: use sharding for timer implementation ([#&#8203;6534])

##### Fixed

- taskdump: allow building taskdump docs on non-unix machines
([#&#8203;6564])
-   time: check for overflow in `Interval::poll_tick` ([#&#8203;6487])
- sync: fix incorrect `is_empty` on mpsc block boundaries
([#&#8203;6603])

##### Documented

-   fs: rewrite file system docs ([#&#8203;6467])
-   io: fix `stdin` documentation ([#&#8203;6581])
- io: fix obsolete reference in `ReadHalf::unsplit()` documentation
([#&#8203;6498])
- macros: render more comprehensible documentation for `select!`
([#&#8203;6468])
-   net: add missing types to module docs ([#&#8203;6482])
-   net: fix misleading `NamedPipeServer` example ([#&#8203;6590])
- sync: add examples for `SemaphorePermit`, `OwnedSemaphorePermit`
([#&#8203;6477])
- sync: document that `Barrier::wait` is not cancel safe
([#&#8203;6494])
- sync: explain relation between `watch::Sender::{subscribe,closed}`
([#&#8203;6490])
- task: clarify that you can't abort `spawn_blocking` tasks
([#&#8203;6571])
-   task: fix a typo in doc of `LocalSet::run_until` ([#&#8203;6599])
- time: fix test-util requirement for pause and resume in docs
([#&#8203;6503])

[#&#8203;6421]: https://togithub.com/tokio-rs/tokio/pull/6421

[#&#8203;6433]: https://togithub.com/tokio-rs/tokio/pull/6433

[#&#8203;6445]: https://togithub.com/tokio-rs/tokio/pull/6445

[#&#8203;6449]: https://togithub.com/tokio-rs/tokio/pull/6449

[#&#8203;6465]: https://togithub.com/tokio-rs/tokio/pull/6465

[#&#8203;6467]: https://togithub.com/tokio-rs/tokio/pull/6467

[#&#8203;6468]: https://togithub.com/tokio-rs/tokio/pull/6468

[#&#8203;6472]: https://togithub.com/tokio-rs/tokio/pull/6472

[#&#8203;6477]: https://togithub.com/tokio-rs/tokio/pull/6477

[#&#8203;6478]: https://togithub.com/tokio-rs/tokio/pull/6478

[#&#8203;6482]: https://togithub.com/tokio-rs/tokio/pull/6482

[#&#8203;6487]: https://togithub.com/tokio-rs/tokio/pull/6487

[#&#8203;6490]: https://togithub.com/tokio-rs/tokio/pull/6490

[#&#8203;6494]: https://togithub.com/tokio-rs/tokio/pull/6494

[#&#8203;6497]: https://togithub.com/tokio-rs/tokio/pull/6497

[#&#8203;6498]: https://togithub.com/tokio-rs/tokio/pull/6498

[#&#8203;6499]: https://togithub.com/tokio-rs/tokio/pull/6499

[#&#8203;6500]: https://togithub.com/tokio-rs/tokio/pull/6500

[#&#8203;6503]: https://togithub.com/tokio-rs/tokio/pull/6503

[#&#8203;6510]: https://togithub.com/tokio-rs/tokio/pull/6510

[#&#8203;6511]: https://togithub.com/tokio-rs/tokio/pull/6511

[#&#8203;6512]: https://togithub.com/tokio-rs/tokio/pull/6512

[#&#8203;6517]: https://togithub.com/tokio-rs/tokio/pull/6517

[#&#8203;6520]: https://togithub.com/tokio-rs/tokio/pull/6520

[#&#8203;6521]: https://togithub.com/tokio-rs/tokio/pull/6521

[#&#8203;6534]: https://togithub.com/tokio-rs/tokio/pull/6534

[#&#8203;6551]: https://togithub.com/tokio-rs/tokio/pull/6551

[#&#8203;6552]: https://togithub.com/tokio-rs/tokio/pull/6552

[#&#8203;6556]: https://togithub.com/tokio-rs/tokio/pull/6556

[#&#8203;6558]: https://togithub.com/tokio-rs/tokio/pull/6558

[#&#8203;6563]: https://togithub.com/tokio-rs/tokio/pull/6563

[#&#8203;6564]: https://togithub.com/tokio-rs/tokio/pull/6564

[#&#8203;6571]: https://togithub.com/tokio-rs/tokio/pull/6571

[#&#8203;6573]: https://togithub.com/tokio-rs/tokio/pull/6573

[#&#8203;6578]: https://togithub.com/tokio-rs/tokio/pull/6578

[#&#8203;6581]: https://togithub.com/tokio-rs/tokio/pull/6581

[#&#8203;6586]: https://togithub.com/tokio-rs/tokio/pull/6586

[#&#8203;6590]: https://togithub.com/tokio-rs/tokio/pull/6590

[#&#8203;6596]: https://togithub.com/tokio-rs/tokio/pull/6596

[#&#8203;6599]: https://togithub.com/tokio-rs/tokio/pull/6599

[#&#8203;6603]: https://togithub.com/tokio-rs/tokio/pull/6603

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 18:31:21 +00:00
Boshen
ac66de651b
chore: bump criterion2 to 0.10.0 (#3499) 2024-06-02 00:22:53 +08:00
Boshen
9ff4feaa4c
chore: bump oxc-browserslist to 0.17.0 (#3495) 2024-06-01 15:06:34 +08:00
Boshen
83a1715a08
chore: oxc-browserslist to v0.16.2 (#3466) 2024-05-30 19:30:21 +08:00
IWANABETHATGUY
0cdb45a1ff
feat(oxc_codegen): preserve annotate comment (#3465)
1. Copy tests from
efa3dd2d8e/internal/bundler_tests/bundler_dce_test.go (L3833-L3971)
2. Add option to preserve annotate comment like `/* #__NO_SIDE_EFFECTS__
*/` and `/* #__PURE__ */`
2024-05-30 15:25:23 +08:00
Boshen
ec041a07fd
chore: oxc-browserslist to v0.16.1 (#3466) 2024-05-30 10:30:57 +08:00
Boshen
64246c59ae
deps: bump oxc-browserslist (removes the build script) 2024-05-28 23:04:20 +08:00
Boshen
c2c425d4dc
chore: bump criterion2 (#3444) 2024-05-28 15:49:51 +08:00
Boshen
570b234a70
chore(transformers): switch crate browserslist-rs to oxc-browserslist 2024-05-28 10:49:49 +08:00
Dunqing
816a782254
feat(transformer): support targets option of preset-env (#3371)
The implementation of the `targets` options was copied from
[swc](https://github.com/swc-project/swc/tree/main/crates/preset_env_base),
which resulted in some added dependencies in transformer.
Currently, it has supported enabling plugins by `targets`
2024-05-27 10:33:40 +08:00
renovate[bot]
ea0d57f944
chore(deps): lock file maintenance rust crates (#3422)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [insta](https://insta.rs/)
([source](https://togithub.com/mitsuhiko/insta)) |
workspace.dependencies | minor | `1.38.0` -> `1.39.0` |
| [itertools](https://togithub.com/rust-itertools/itertools) |
workspace.dependencies | minor | `0.12.1` -> `0.13.0` |
| [mimalloc](https://togithub.com/purpleprotocol/mimalloc_rust) |
workspace.dependencies | patch | `0.1.41` -> `0.1.42` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs) |
workspace.dependencies | patch | `2.16.4` -> `2.16.5` |
| [ouroboros](https://togithub.com/someguynamedjosh/ouroboros) |
workspace.dependencies | patch | `0.18.3` -> `0.18.4` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2) |
workspace.dependencies | patch | `1.0.82` -> `1.0.84` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.201` -> `1.0.203` |
| [trybuild](https://togithub.com/dtolnay/trybuild) |
workspace.dependencies | patch | `1.0.95` -> `1.0.96` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>mitsuhiko/insta (insta)</summary>

###
[`v1.39.0`](https://togithub.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1390)

[Compare
Source](https://togithub.com/mitsuhiko/insta/compare/1.38.0...1.39.0)

- Fixed a bug in `require_full_match`.
[#&#8203;485](https://togithub.com/mitsuhiko/insta/issues/485)

- Fixed a bug that caused snapshot and module names to sometimes be
inaccurate.
[#&#8203;483](https://togithub.com/mitsuhiko/insta/issues/483)

- Insta will no longer error when removing snapshots that were already
removed. [#&#8203;484](https://togithub.com/mitsuhiko/insta/issues/484)

- Added support for trailing commas in inline snapshots.
[#&#8203;472](https://togithub.com/mitsuhiko/insta/issues/472)

- Don't pass `--color` in all cases to `libtest` any more to work around
limitations
with custom test harnesses.
[#&#8203;491](https://togithub.com/mitsuhiko/insta/issues/491)

</details>

<details>
<summary>rust-itertools/itertools (itertools)</summary>

###
[`v0.13.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0130)

[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0)

##### Breaking

- Removed implementation of `DoubleEndedIterator` for `ConsTuples`
([#&#8203;853](https://togithub.com/rust-itertools/itertools/issues/853))
- Made `MultiProduct` fused and fixed on an empty iterator
([#&#8203;835](https://togithub.com/rust-itertools/itertools/issues/835),
[#&#8203;834](https://togithub.com/rust-itertools/itertools/issues/834))
- Changed `iproduct!` to return tuples for maxi one iterator too
([#&#8203;870](https://togithub.com/rust-itertools/itertools/issues/870))
- Changed `PutBack::put_back` to return the old value
([#&#8203;880](https://togithub.com/rust-itertools/itertools/issues/880))
- Removed deprecated `repeat_call, Itertools::{foreach, step,
map_results, fold_results}`
([#&#8203;878](https://togithub.com/rust-itertools/itertools/issues/878))
- Removed `TakeWhileInclusive::new`
([#&#8203;912](https://togithub.com/rust-itertools/itertools/issues/912))

##### Added

- Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by,
largest_by_key}`
([#&#8203;654](https://togithub.com/rust-itertools/itertools/issues/654),
[#&#8203;885](https://togithub.com/rust-itertools/itertools/issues/885))
- Added `Itertools::tail`
([#&#8203;899](https://togithub.com/rust-itertools/itertools/issues/899))
- Implemented `DoubleEndedIterator` for `ProcessResults`
([#&#8203;910](https://togithub.com/rust-itertools/itertools/issues/910))
- Implemented `Debug` for `FormatWith`
([#&#8203;931](https://togithub.com/rust-itertools/itertools/issues/931))
- Added `Itertools::get`
([#&#8203;891](https://togithub.com/rust-itertools/itertools/issues/891))

##### Changed

- Deprecated `Itertools::group_by` (renamed `chunk_by`)
([#&#8203;866](https://togithub.com/rust-itertools/itertools/issues/866),
[#&#8203;879](https://togithub.com/rust-itertools/itertools/issues/879))
- Deprecated `unfold` (use `std::iter::from_fn` instead)
([#&#8203;871](https://togithub.com/rust-itertools/itertools/issues/871))
- Optimized `GroupingMapBy`
([#&#8203;873](https://togithub.com/rust-itertools/itertools/issues/873),
[#&#8203;876](https://togithub.com/rust-itertools/itertools/issues/876))
- Relaxed `Fn` bounds to `FnMut` in `diff_with,
Itertools::into_group_map_by`
([#&#8203;886](https://togithub.com/rust-itertools/itertools/issues/886))
- Relaxed `Debug/Clone` bounds for `MapInto`
([#&#8203;889](https://togithub.com/rust-itertools/itertools/issues/889))
- Documented the `use_alloc` feature
([#&#8203;887](https://togithub.com/rust-itertools/itertools/issues/887))
- Optimized `Itertools::set_from`
([#&#8203;888](https://togithub.com/rust-itertools/itertools/issues/888))
- Removed badges in `README.md`
([#&#8203;890](https://togithub.com/rust-itertools/itertools/issues/890))
- Added "no-std" categories in `Cargo.toml`
([#&#8203;894](https://togithub.com/rust-itertools/itertools/issues/894))
- Fixed `Itertools::k_smallest` on short unfused iterators
([#&#8203;900](https://togithub.com/rust-itertools/itertools/issues/900))
- Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`)
([#&#8203;895](https://togithub.com/rust-itertools/itertools/issues/895))
- Deprecated `GroupingMap::fold_first` (renamed `reduce`)
([#&#8203;902](https://togithub.com/rust-itertools/itertools/issues/902))
- Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized
`Itertools::k_smallest(1)`
([#&#8203;909](https://togithub.com/rust-itertools/itertools/issues/909))
- Specialized `Combinations::nth`
([#&#8203;914](https://togithub.com/rust-itertools/itertools/issues/914))
- Specialized `MergeBy::fold`
([#&#8203;920](https://togithub.com/rust-itertools/itertools/issues/920))
- Specialized `CombinationsWithReplacement::nth`
([#&#8203;923](https://togithub.com/rust-itertools/itertools/issues/923))
- Specialized `FlattenOk::{fold, rfold}`
([#&#8203;927](https://togithub.com/rust-itertools/itertools/issues/927))
- Specialized `Powerset::nth`
([#&#8203;924](https://togithub.com/rust-itertools/itertools/issues/924))
- Documentation fixes
([#&#8203;882](https://togithub.com/rust-itertools/itertools/issues/882),
[#&#8203;936](https://togithub.com/rust-itertools/itertools/issues/936))
- Fixed `assert_equal` for iterators longer than `i32::MAX`
([#&#8203;932](https://togithub.com/rust-itertools/itertools/issues/932))
- Updated the `must_use` message of non-lazy `KMergeBy` and
`TupleCombinations`
([#&#8203;939](https://togithub.com/rust-itertools/itertools/issues/939))

##### Notable Internal Changes

- Tested iterator laziness
([#&#8203;792](https://togithub.com/rust-itertools/itertools/issues/792))
- Created `CONTRIBUTING.md`
([#&#8203;767](https://togithub.com/rust-itertools/itertools/issues/767))

</details>

<details>
<summary>purpleprotocol/mimalloc_rust (mimalloc)</summary>

###
[`v0.1.42`](https://togithub.com/purpleprotocol/mimalloc_rust/releases/tag/v0.1.42):
Version 0.1.42

[Compare
Source](https://togithub.com/purpleprotocol/mimalloc_rust/compare/v0.1.41...v0.1.42)

##### Changes

-   MiMalloc `v2.1.6`
- Expose `usable_size` and `version`. Credits
[@&#8203;nathaniel-daniel](https://togithub.com/nathaniel-daniel).
- Link with libatomic on armv6-linux. Credits
[@&#8203;notorca](https://togithub.com/notorca).
- Add no_thp option for Linux/Android. Credits
[@&#8203;devnexen](https://togithub.com/devnexen).

</details>

<details>
<summary>napi-rs/napi-rs (napi-derive)</summary>

###
[`v2.16.5`](https://togithub.com/napi-rs/napi-rs/compare/napi-derive@2.16.4...napi-derive@2.16.5)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi-derive@2.16.4...napi-derive@2.16.5)

</details>

<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>

###
[`v1.0.84`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.84)

[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.83...1.0.84)

- Documentation improvements
([#&#8203;455](https://togithub.com/dtolnay/proc-macro2/issues/455),
thanks
[@&#8203;CensoredUsername](https://togithub.com/CensoredUsername))

###
[`v1.0.83`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.83)

[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.82...1.0.83)

- Optimize the representation of `Ident`
([#&#8203;462](https://togithub.com/dtolnay/proc-macro2/issues/462))

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.203`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.203)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

- Documentation improvements
([#&#8203;2747](https://togithub.com/serde-rs/serde/issues/2747))

###
[`v1.0.202`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.202)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.201...v1.0.202)

- Provide public access to RenameAllRules in serde_derive_internals
([#&#8203;2743](https://togithub.com/serde-rs/serde/issues/2743))

</details>

<details>
<summary>dtolnay/trybuild (trybuild)</summary>

###
[`v1.0.96`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.96)

[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.95...1.0.96)

- Support Windows builds that have OUT_DIR prefixed with `\\?\`
([#&#8203;271](https://togithub.com/dtolnay/trybuild/issues/271))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Boshen <boshenc@gmail.com>
2024-05-27 01:48:50 +00:00
Boshen
19bb1c02f2 fix(website): hack schemars to render code snippet in markdown (#3417) 2024-05-26 10:36:53 +00:00
Boshen
21505e885c refactor(cli): move crates/oxc_cli to apps/oxlint (#3413)
We need to split the cli crate up to reduce dependencies,
the current cli crate is pulling in `oxc_prettier`, which is redundant
for the linter.
2024-05-26 05:00:30 +00:00
Boshen
4149d22aa3 chore(cli): remove the regex feature from tracing_subscriber (#3412) 2024-05-26 04:46:25 +00:00
overlookmotel
bcdc658bbb
feat(transformer): add TraverseCtx::generate_uid (#3394)
Add `TraverseCtx::generate_uid` method.

This is modelled on Babel's `scope.generateUid()` method. As discussed
in
https://github.com/oxc-project/oxc/discussions/3251#discussioncomment-9416826,
this is required to fix most of the remaining failing tests in
transformer Milestone 1.

I have implemented this to work as closely as possible to Babel, so that
it will generate same output as Babel for our tests. However, as
mentioned in the code comments, this means it's a pretty expensive
function to call. Those code comments suggest 2 ways in which we could
make it much more efficient, but we'd need to decide how we're going to
handle divergence from Babel before we can decide which route to go.

I've left it as a `TODO(improve-on-babel)` for now.
2024-05-24 17:19:02 +08:00
Boshen
9377a60677
chore(linter): write json schema to npm/oxlint 2024-05-24 13:28:03 +08:00
Boshen
809e4fc03f
chore(website): snapshot cli and json schema output 2024-05-24 12:23:43 +08:00
Boshen
ead637bf50
feat(website): generate linter configuration page 2024-05-23 12:07:17 +08:00
Boshen
57d2bcacea feat(tasks/website): start generating linter config markdown from json schema (#3386) 2024-05-22 16:09:33 +00:00
Boshen
86beca5379
Release crates v0.13.1 2024-05-22 16:50:30 +08:00
Boshen
40ab95b055 feat(tasks): add website tasks (#3377)
Adds the following tasks so we can use them in the website repo to generate documentations.

`cargo run -p website`
* linter-cli
* linter-rules
* linter-json-schema
2024-05-21 17:46:07 +00:00
Boshen
fe208ddef6
feat(linter): start adding json schema for configuration file (#3375) 2024-05-22 00:35:29 +08:00
Dunqing
e2c6fe0cb1
feat(transformer): report errors when options have unknown fields (#3322) 2024-05-19 01:19:40 +08:00
Don Isaac
27030b9eb4
perf(lexer): use bitshifting when parsing known integers (#3296)
## What This PR Does

- perf(lexer): use bit shifting when parsing hex, octal, and binary
integers instead of `mul_add`-ing on `f64`s. Check out the difference in
assembly generated [here](https://godbolt.org/z/zMEKaeYzh)
- perf(lexer): skip redundant utf8 check when parsing BigInts
- refactor(lexer): remove `unsafe` usage (as per @overlookmotel's
request
[here](https://github.com/oxc-project/oxc/pull/3283#issuecomment-2111814598))
- test(lexer): add numeric parsing unit tests

I don't expect this PR to have a large performance improvement, since
the most common case (`Kind::Decimal`) is not affected. We could do
this, however, by splitting `Kind::Decimal` into `Kind::DecimalFloat`
and `Kind::DecimalInt` when the lexer encounters a `.`
2024-05-17 09:39:10 +08:00
overlookmotel
05c71d20b1 refactor(traverse): Traverse produce scopes tree using Semantic (#3304)
`Traverse` use `Semantic` to construct scopes tree and expose it to visitors via `TraverseCtx`.

Currently scopes tree is immutable. Will expose it as a mutable in a follow-on.

This is extremely inefficient. Semantic does all kinds of stuff (control flow graph etc) which `Traverse` doesn't need, and `Traverse` just throws away all that work after semantic has done it. Intent here is to get a working implementation first, and then to do another pass later on to improve performance.
2024-05-16 16:21:20 +00:00
Boshen
6dcfc13e02
Publish oxc_module_lexer v0.13.0 2024-05-16 22:14:47 +08:00
Dunqing
9ee962add8 feat(transformer): support from_babel_options in TransformOptions (#3301)
Move `BabelOptions` to Transformer. The `output.json` is a standard babel configuration. We can reuse BabelOptions to read [babel.config.json](https://babeljs.io/docs/configuration#babelconfigjson) or our configuration(maybe oxc.config.json)

The current `from_babel_options` implementation is copied from the `transform_options` in `test_case.rs`, which I'll completely reimplement next
2024-05-16 10:10:39 +00:00
Boshen
23b39169a6
Release crate oxc_ast_macros v0.13.0 2024-05-14 23:15:20 +08:00
Boshen
c395f8641e
Release crates v0.13.0 2024-05-14 23:14:15 +08:00
renovate[bot]
3633500dec
chore(deps): lock file maintenance rust crates (#3248)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [napi](https://togithub.com/napi-rs/napi-rs) | workspace.dependencies
| patch | `2.16.4` -> `2.16.6` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs) |
workspace.dependencies | patch | `2.16.3` -> `2.16.4` |
| [num-bigint](https://togithub.com/rust-num/num-bigint) |
workspace.dependencies | patch | `0.4.4` -> `0.4.5` |
| [petgraph](https://togithub.com/petgraph/petgraph) |
workspace.dependencies | patch | `0.6.4` -> `0.6.5` |
| [proc-macro2](https://togithub.com/dtolnay/proc-macro2) |
workspace.dependencies | patch | `1.0.81` -> `1.0.82` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.200` -> `1.0.201` |
| [serde_json](https://togithub.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.116` -> `1.0.117` |
| [trybuild](https://togithub.com/dtolnay/trybuild) |
workspace.dependencies | patch | `1.0.93` -> `1.0.95` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (napi)</summary>

###
[`v2.16.6`](https://togithub.com/napi-rs/napi-rs/releases/tag/napi%402.16.6)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@2.16.5...napi@2.16.6)

#### What's Changed

- fix(napi): panic when deserializing empty buffer with Rust 1.78 by
[@&#8203;mischnic](https://togithub.com/mischnic) in
[https://github.com/napi-rs/napi-rs/pull/2094](https://togithub.com/napi-rs/napi-rs/pull/2094)

**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/napi@2.16.5...napi@2.16.6

###
[`v2.16.5`](https://togithub.com/napi-rs/napi-rs/releases/tag/napi%402.16.5)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5)

##### What's Changed

- Fix panic in JsArrayBufferValue as_ref/as_mut with Rust 1.78 by
[@&#8203;tronical](https://togithub.com/tronical) in
[https://github.com/napi-rs/napi-rs/pull/2083](https://togithub.com/napi-rs/napi-rs/pull/2083)
- fix(napi): make sure env without exception pending before throw error
by [@&#8203;southorange0929](https://togithub.com/southorange0929) in
[https://github.com/napi-rs/napi-rs/pull/2092](https://togithub.com/napi-rs/napi-rs/pull/2092)

**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/napi@2.16.4...napi@2.16.5

</details>

<details>
<summary>rust-num/num-bigint (num-bigint)</summary>

###
[`v0.4.5`](https://togithub.com/rust-num/num-bigint/blob/HEAD/RELEASES.md#Release-045-2024-05-06)

[Compare
Source](https://togithub.com/rust-num/num-bigint/compare/num-bigint-0.4.4...num-bigint-0.4.5)

-   [Upgrade to 2021 edition, **MSRV 1.60**][292]
-   [Add `const ZERO` and implement `num_traits::ConstZero`][298]
-   [Add `modinv` methods for the modular inverse][288]
-   [Optimize multiplication with imbalanced operands][295]
-   [Optimize scalar division on x86 and x86-64][236]

**Contributors**: [@&#8203;cuviper](https://togithub.com/cuviper),
[@&#8203;joelonsql](https://togithub.com/joelonsql),
[@&#8203;waywardmonkeys](https://togithub.com/waywardmonkeys)

[236]: https://togithub.com/rust-num/num-bigint/pull/236

[288]: https://togithub.com/rust-num/num-bigint/pull/288

[292]: https://togithub.com/rust-num/num-bigint/pull/292

[295]: https://togithub.com/rust-num/num-bigint/pull/295

[298]: https://togithub.com/rust-num/num-bigint/pull/298

</details>

<details>
<summary>petgraph/petgraph (petgraph)</summary>

###
[`v0.6.5`](https://togithub.com/petgraph/petgraph/blob/HEAD/RELEASES.rst#Version-065-2024-05-06)

[Compare
Source](https://togithub.com/petgraph/petgraph/compare/petgraph@v0.6.4...petgraph@v0.6.5)

\==========================

-   Add rayon support for `GraphMap` (`#573`*, `#615`*)
-   Add `Topo::with_initials` method (`#585`\_)
-   Add logo to the project (`#598`\_)
-   Add Ford-Fulkerson algorithm (`#640`\_)
-   Update `itertools` to 0.12.1 (`#628`\_)
-   Update `GraphMap` to allow custom hash functions (`#623`\_)
-   Fix documentation (`#630`\_)
-   Fix clippy warnings (`#627`\_)
-   (internal) Fix remove old `copyclone` macro (`#601`\_)
-   (internal) Move minimum spanning tree into own module (`#624`\_)

.. \_`#573`:
[https://github.com/petgraph/petgraph/pull/573](https://togithub.com/petgraph/petgraph/pull/573)
.. \_`#615`:
[https://github.com/petgraph/petgraph/pull/615](https://togithub.com/petgraph/petgraph/pull/615)
.. \_`#585`:
[https://github.com/petgraph/petgraph/pull/585](https://togithub.com/petgraph/petgraph/pull/585)
.. \_`#598`:
[https://github.com/petgraph/petgraph/pull/598](https://togithub.com/petgraph/petgraph/pull/598)
.. \_`#640`:
[https://github.com/petgraph/petgraph/pull/640](https://togithub.com/petgraph/petgraph/pull/640)
.. \_`#628`:
[https://github.com/petgraph/petgraph/pull/628](https://togithub.com/petgraph/petgraph/pull/628)
.. \_`#623`:
[https://github.com/petgraph/petgraph/pull/623](https://togithub.com/petgraph/petgraph/pull/623)
.. \_`#630`:
[https://github.com/petgraph/petgraph/pull/630](https://togithub.com/petgraph/petgraph/pull/630)
.. \_`#627`:
[https://github.com/petgraph/petgraph/pull/627](https://togithub.com/petgraph/petgraph/pull/627)
.. \_`#601`:
[https://github.com/petgraph/petgraph/pull/601](https://togithub.com/petgraph/petgraph/pull/601)
.. \_`#624`:
[https://github.com/petgraph/petgraph/pull/624](https://togithub.com/petgraph/petgraph/pull/624)

</details>

<details>
<summary>dtolnay/proc-macro2 (proc-macro2)</summary>

###
[`v1.0.82`](https://togithub.com/dtolnay/proc-macro2/releases/tag/1.0.82)

[Compare
Source](https://togithub.com/dtolnay/proc-macro2/compare/1.0.81...1.0.82)

- Resolve unexpected_cfgs warning
([#&#8203;456](https://togithub.com/dtolnay/proc-macro2/issues/456))

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.201`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.201)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.200...v1.0.201)

- Resolve unexpected_cfgs warning
([#&#8203;2737](https://togithub.com/serde-rs/serde/issues/2737))

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.117`](https://togithub.com/serde-rs/json/releases/tag/v1.0.117)

[Compare
Source](https://togithub.com/serde-rs/json/compare/v1.0.116...v1.0.117)

- Resolve unexpected_cfgs warning
([#&#8203;1130](https://togithub.com/serde-rs/json/issues/1130))

</details>

<details>
<summary>dtolnay/trybuild (trybuild)</summary>

###
[`v1.0.95`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.95)

[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.94...1.0.95)

- Keep long type names in diagnostics so that test output does not vary
depending on the length of the absolute filepath of the crate
([#&#8203;269](https://togithub.com/dtolnay/trybuild/issues/269))

###
[`v1.0.94`](https://togithub.com/dtolnay/trybuild/releases/tag/1.0.94)

[Compare
Source](https://togithub.com/dtolnay/trybuild/compare/1.0.93...1.0.94)

- Resolve unexpected_cfgs warning
([#&#8203;268](https://togithub.com/dtolnay/trybuild/issues/268))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-12 19:31:59 +00:00
Boshen
551632a348
refactor(diagnostics): remove thiserror 2024-05-12 11:34:14 +08:00
overlookmotel
be958ce299
refactor(transform): transformer use Traverse (#3182)
Sliced off from #3152.

This switches the transformer over to use `Traverse` instead of
`VisitMut`.

This is incomplete - scopes are not implemented yet. At present, no
transforms use scopes anyway, so all tests pass, but regardless I don't
think should be merged until the implementation is complete.
2024-05-08 17:18:40 +08:00
Boshen
7363e14335
feat(sourcemap): add "rayon" feature (#3198) 2024-05-07 23:47:36 +08:00
overlookmotel
be87ca8419
feat(transform): oxc_traverse crate (#3169)
First part of #3152.

This adds a crate `oxc_traverse`, but doesn't connect it up to the
transformer or anything else yet.

I think we could merge this now - as it doesn't affect any code that's
in use - and then iterate on it to add scopes before using it in
transformer. Please see
https://github.com/oxc-project/oxc/pull/3152#issuecomment-2094965406 for
the broader picture.
2024-05-06 09:37:04 +08:00
renovate[bot]
46b4f4fd31
chore(deps): lock file maintenance rust crates (#3164)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|  |  | lockFileMaintenance | All locks refreshed |
| [base64](https://togithub.com/marshallpierce/rust-base64) |
workspace.dependencies | patch | `0.22.0` -> `0.22.1` |
| [bpaf](https://togithub.com/pacak/bpaf) | workspace.dependencies |
patch | `0.9.11` -> `0.9.12` |
| [flate2](https://togithub.com/rust-lang/flate2-rs) |
workspace.dependencies | patch | `1.0.29` -> `1.0.30` |
| [num-traits](https://togithub.com/rust-num/num-traits) |
workspace.dependencies | patch | `0.2.18` -> `0.2.19` |
| [serde](https://serde.rs)
([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies
| patch | `1.0.199` -> `1.0.200` |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Release Notes

<details>
<summary>marshallpierce/rust-base64 (base64)</summary>

###
[`v0.22.1`](https://togithub.com/marshallpierce/rust-base64/blob/HEAD/RELEASE-NOTES.md#0221)

[Compare
Source](https://togithub.com/marshallpierce/rust-base64/compare/v0.22.0...v0.22.1)

-   Correct the symbols used for the predefined `alphabet::BIN_HEX`.

</details>

<details>
<summary>pacak/bpaf (bpaf)</summary>

###
[`v0.9.12`](https://togithub.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0912---2024-04-29)

[Compare
Source](https://togithub.com/pacak/bpaf/compare/v0.9.11...v0.9.12)

-   better error messages

</details>

<details>
<summary>rust-lang/flate2-rs (flate2)</summary>

###
[`v1.0.30`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.30):
- docs.rs pages should build again

[Compare
Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30)

#### What's Changed

- Fix typos by [@&#8203;striezel](https://togithub.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/406](https://togithub.com/rust-lang/flate2-rs/pull/406)
- Update actions/checkout in GitHub Actions workflows to v4 by
[@&#8203;striezel](https://togithub.com/striezel) in
[https://github.com/rust-lang/flate2-rs/pull/407](https://togithub.com/rust-lang/flate2-rs/pull/407)
- fix CI - `--all-features` wasn't tested and didn't work with arrival
of `zlib-rs` by [@&#8203;Byron](https://togithub.com/Byron) in
[https://github.com/rust-lang/flate2-rs/pull/405](https://togithub.com/rust-lang/flate2-rs/pull/405)

#### New Contributors

- [@&#8203;striezel](https://togithub.com/striezel) made their first
contribution in
[https://github.com/rust-lang/flate2-rs/pull/406](https://togithub.com/rust-lang/flate2-rs/pull/406)

**Full Changelog**:
https://github.com/rust-lang/flate2-rs/compare/1.0.29...1.0.30

</details>

<details>
<summary>rust-num/num-traits (num-traits)</summary>

###
[`v0.2.19`](https://togithub.com/rust-num/num-traits/blob/HEAD/RELEASES.md#Release-0219-2024-05-03)

[Compare
Source](https://togithub.com/rust-num/num-traits/compare/num-traits-0.2.18...num-traits-0.2.19)

-   [Upgrade to 2021 edition, **MSRV 1.60**][310]
-   [The new `Float::clamp` limits values by minimum and maximum][305]

**Contributors**: [@&#8203;cuviper](https://togithub.com/cuviper),
[@&#8203;michaelciraci](https://togithub.com/michaelciraci)

[305]: https://togithub.com/rust-num/num-traits/pull/305

[310]: https://togithub.com/rust-num/num-traits/pull/310

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.200`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.200)

[Compare
Source](https://togithub.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

- Fix formatting of "invalid type" and "invalid value" deserialization
error messages containing NaN or infinite floats
([#&#8203;2733](https://togithub.com/serde-rs/serde/issues/2733), thanks
[@&#8203;jamessan](https://togithub.com/jamessan))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 09:33:57 +08:00
Dunqing
a52e321b25
feat(transformer/jsx-source): get the correct lineNumber and columnNumber from the span. (#3142) 2024-05-01 00:30:47 +00:00
Boshen
67225a8091
refactor(coverage): replace yaml parsing with saphyr (#3144)
closes #3128

Profiling `cargo run -p oxc_coverage -- parser` no longer shows a
bottleneck in yaml parsing
2024-04-30 22:49:39 +08:00
Boshen
a63a45d5b2
refactor(transformer): remove the requirement of Semantic (#3140)
It seems like we need to rebuild the scopes and symbols while
traversing. We can't utilize the scopes and symbols built by semantic
because they are immutable.
2024-04-30 12:48:21 +08:00
Boshen
870d11f1bb
feat(syntax): add ToJsString trait for f64 (#3131) 2024-04-29 21:00:04 +08:00
Dunqing
843318cdbe
refactor(transformer/typescript): reimplementation of Enum conversion based on Babel (#3102)
The remaining test cases will perform better with a scope
implementation, and while we can implement them without the scope, it
still requires us to do what the scope did.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-04-29 16:26:22 +08:00
renovate[bot]
6fd6170154
chore(deps): lock file maintenance rust crates (#3125) 2024-04-29 06:00:15 +00:00
Boshen
ae6561308c
refactor(syntax): use FxHashMap for ModuleRecord::request_modules (#3124)
closes #3121

The ordering is not important here.
2024-04-29 03:37:34 +00:00
Ali Rezvani
ac72d08592
chore: cleanup the dependencies on static_assertions and oxc_index. (#3095)
We used to export `static_assertions` as part of the `oxc_index`. It
would've made sense back when it was only a vessel for exporting other
crates - although even then it wouldn't make much sense other than being
convenient - Now with it turning into a port of `index_vec` and
potentially getting bigger as the result of specific needs of the
project; It makes much more sense to stop exporting it from `oxc_index`
and use the crate directly in places that used to use what `oxc_index`
were exporting.


PS: we may want to follow up this with an `oxc_asset` crate containing
our own set of assertion tools which would also export
`static_assertions`.
2024-04-25 16:56:23 +08:00
Ali Rezvani
8618f6b32a
chore(index): fork index_vec crate. (#3092)
related to #3086
2024-04-25 06:09:53 +00:00
Boshen
559bca86c5
Release crates v0.12.5 2024-04-22 12:52:17 +08:00
renovate[bot]
df7b9ee8da
chore(deps): lock file maintenance rust crates (#3059) 2024-04-22 09:58:21 +08:00
Boshen
a05c4e39b8
Release crates v0.12.4 2024-04-19 16:40:05 +08:00
Boshen
e43c245388
feat(transformer): add import helpers to manage module imports (#2996)
closes #2971
2024-04-16 14:33:44 +08:00
Boshen
d57526103c
feat(coverage): add transformer to prevent crashes (#2970) 2024-04-14 18:52:51 +08:00
Boshen
b15bf2826b
feat(napi/parser): remove experimental flexbuffer api (#2957) 2024-04-13 14:59:31 +08:00
Boshen
f366d9bd7c
chore(minsize): remove brotlic because it takes too long to compile (#2954) 2024-04-13 13:24:25 +08:00
branchseer
f159f60084
Make ast types covariant over the allocator lifetime. (#2943)
## Why

Due to the usage of `&'alloc mut T` in `oxc_allocator::Box`, and
`bumpalo::collections::Vec` in `oxc_allocator::Vec`, ast types are
currently invariant over their allocator lifetime `'a`. This prevents
`ouroboros` from generating `borrow_*` on ast type fields, leading to
the unfriendly `with_*` api:
c250b288ef/crates/oxc_parser/examples/multi-thread.rs (L82-L84)

## How

- For `oxc_allocator::Vec`, switch to `allocator_api2::vec::Vec`, which
has a covariant relationship with the allocator lifetime.
- For `oxc_allocator::Box`, use `std::ptr::NonNull` which is
specifically designed to be covariant. I don't use
`allocator_api2::boxed::Box` because it holds the allocator for
dropping, so the size is bigger.

## Downside

Now that `oxc_allocator::Box` uses the unsafe `NonNull`. It has to be a
private field to be safe. This make it impossible to do `Box(....)`
pattern matching.
2024-04-12 18:12:18 +08:00
Boshen
0c04bf743f
feat(transformer): transform TypeScript namespace (#2942) 2024-04-12 10:19:13 +08:00
Boshen
614f73b66c
Release crates v0.12.3 2024-04-11 16:18:17 +08:00
Boshen
d43d404d61
fix: update lock file 2024-04-08 11:17:26 +08:00
renovate[bot]
cd6f4f1938
chore(deps): lock file maintenance rust crates (#2913) 2024-04-08 02:49:53 +00:00
Boshen
366a7fb0d4
Release crates v0.11.2 2024-04-03 19:36:54 +08:00
Boshen
54f7cd3978
Release crates v0.11.1 2024-04-03 16:57:52 +08:00
Boshen
93897c530c
chore: bump syn to v2 (#2888) 2024-04-02 20:57:09 +08:00
Boshen
a0532adc65
chore: bump criterion2, which removes clap and 10s compile time 2024-04-02 16:48:40 +08:00
Boshen
3ca6721783
ci: always run cargo shear 2024-03-31 16:06:22 +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
Boshen
31ed532b79
Release crates v0.11.0 2024-03-30 13:54:53 +08:00
underfin
b199cb89a2
feat: add oxc sourcemap crate (#2825)
The sourcemap implement port from
[rust-sourcemap](https://github.com/getsentry/rust-sourcemap), but has
some different with it.

- Encode sourcemap at parallel, including quote `sourceContent` and
encode token to `vlq` mappings.
- Avoid `Sourcemap` some methods overhead, like `SourceMap::tokens()`
caused extra overhead at common cases. Here using `SourceViewToken` to
instead of it.
2024-03-28 19:36:38 +08:00
renovate[bot]
8c6936ab74
chore(deps): lock file maintenance rust crates (#2827) 2024-03-26 16:04:53 +00: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
renovate[bot]
525031b7a2
chore(deps): update rust crates (#2802) 2024-03-25 09:47:26 +08:00
underfin
dc3f6e7570
chore: update sourcemap 8.0.0 (#2788) 2024-03-22 21:52:21 +08:00
Andi Pabst
4c5abb590e
feat(cli): wildcard expansion in paths for windows (#2767)
Unlike on other OS, on Windows there is no wildcard expansion/globbing
by the shell. Instead the application has to handle this. Therefore I
used the `glob` package to handle wildcards on Windows.

I also had to make the parent directory check more strict due to the
glob package resolving `..` in the middle of the path as well.

This closes #2695.
2024-03-22 00:21:30 +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
overlookmotel
508091314f
feat(tasks): benchmark NodeJS parser (#2770)
Add NodeJS parser to benchmarks.

Previous attempt #2724 did not work due CodSpeed producing very
inaccurate results (https://github.com/CodSpeedHQ/action/issues/96).

This version runs the actual benchmarks without CodSpeed's
instrumentation. Then another faux-benchmark runs within Codspeed's
instrumented action and just performs meaningless calculations in a loop
for as long as is required to take same amount of time as the original
uninstrumented benchmarks took.

It's unfortunate that we therefore don't get flame graphs on CodSpeed,
but this seems to be the best we can do for now.
2024-03-20 05:06:09 +00:00
renovate[bot]
1e9c0bc484
chore(deps): update rust crates (#2747) 2024-03-17 16:40:42 +00:00
Boshen
178d205d53
chore: criterion2 (#2737) 2024-03-16 18:55:04 +08:00
Boshen
a5ddb5b452
Release crates v0.10.0 2024-03-14 18:23:34 +08:00
Boshen
cbc2f5ff97
refactor: remove unused dependencies (#2718) 2024-03-14 17:50:31 +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
2dfc0cc28e
chore: upgrade sourcemap 7.1.1 (#2701) 2024-03-13 13:52:36 +08:00
renovate[bot]
b822b6d9eb
chore(deps): update rust crates (#2671) 2024-03-11 13:39:02 +08:00
overlookmotel
3c1e0db53f
refactor: reduce cfg_attr boilerplate with SerAttrs derive (#2669)
Closes #2641.

Also added `tsify` attribute to the `SerAttrs` derive macro, so `#[cfg_attr(feature = "wasm", tsify(...))]` can also be reduced to `#[tsify(...)]`.
2024-03-11 13:38:24 +08:00
Boshen
32303b20fb
New tool: oxc_module_lexer (#2650)
# Oxc Module Lexer

This is not a lexer. The name "lexer" is used for easier recognition.

## [es-module-lexer](https://github.com/guybedford/es-module-lexer)

Outputs the list of exports and locations of import specifiers,
including dynamic import and import meta handling.

Does not have any
[limitations](https://github.com/guybedford/es-module-lexer?tab=readme-ov-file#limitations)
mentioned in `es-module-lexer`.

I'll also work on the following cases to make this feature complete.

- [ ] get imported variables
https://github.com/guybedford/es-module-lexer/issues/163
- [ ] track star exports as imports as well
https://github.com/guybedford/es-module-lexer/issues/76
- [ ] TypeScript specific syntax
- [ ] TypeScript `type` import / export keyword

## [cjs-module-lexer](https://github.com/nodejs/cjs-module-lexer)

- [ ] TODO

## Benchmark

This is 2 times slower than `es-module-lexer`, but will be significantly
faster when TypeScript is processed.

The difference is around 10ms vs 20ms on a large file (700k).
2024-03-09 23:23:55 +08:00
Boshen
265b2fb640
feat: miette v7 (#2465) 2024-03-08 15:50:00 +08:00
Boshen
1f14d946aa
chore: update Cargo.toml and deny.yaml 2024-03-05 16:31:05 +08:00
Boshen
cca6eb073c
Release crates v0.9.0 2024-03-05 15:57:31 +08:00
cinchen
35ce3ccdc0
feat(linter): eslint-plugin-jest: prefer-to-have-length (#2580)
Rule Detail:
[link](https://github.com/jest-community/eslint-plugin-jest/blob/main/src/rules/prefer-to-have-length.ts)
2024-03-05 09:15:19 +08:00
renovate[bot]
9bd1d5b25e
chore(deps): update rust crates (#2589) 2024-03-04 11:23:06 +08:00
Boshen
8bb1084863
feat(codegen): add sourcemap (#2565)
Co-authored-by: underfin <2218301630@qq.com>
2024-03-03 14:44:49 +08:00
Boshen
c56b6cb643
refactor: replace InlinableString with CompactString for Atom (#2517)
relates #2516
2024-02-26 23:11:46 +08:00
Boshen
be6b8b7ce6
[BREAKING CHANGE] Change Atom to Atom<'a> to make it safe (#2497)
Part of #2295

This PR splits the `Atom` type into `Atom<'a>` and `CompactString`.

All the AST node strings now use `Atom<'a>` instead of `Atom` to signify
it belongs to the arena.

It is now up to the user to select which form of the string to use.

This PR essentially removes the really unsafe code 


93742f89e9/crates/oxc_span/src/atom.rs (L98-L107)

which can lead to 

![image](https://github.com/oxc-project/oxc/assets/1430279/8c513c4f-19b0-4b63-b61c-e07c187c95b5)
2024-02-26 19:34:40 +08:00
Boshen
4fabe66621
Publish crates v0.8.0 2024-02-26 19:01:51 +08:00
renovate[bot]
29b213eac7
chore(deps): update rust crates (#2503) 2024-02-26 10:38:11 +08:00
Boshen
f64c7e04a3
feat(linter): handle cjs module.exports.foo = bar and exports.foo = bar (#2492) 2024-02-24 23:54:43 +08:00
Boshen
7f867221ca
feat(linter): handle built-in modules in import/no_unresolved (#2479) 2024-02-23 22:10:27 +08:00
Boshen
fca6e02f84
refactor(cli): remove the codeowners feature (#2448)
I should've done a better job at selecting features. Every feature
requires more than just code to get it right.

linting by codeowners' files sounds good on paper but actually not that
useful.
2024-02-20 12:54:16 +08:00
renovate[bot]
daaea40d0e
chore(deps): update rust crate env_logger to 0.11.2 (#2430) 2024-02-19 10:32:34 +08:00
overlookmotel
90f9266d00
chore(deps): update bumpalo crate (#2417)
Latest version of `bumpalo` includes a couple of performance fixes for
`String` (e.g. https://github.com/fitzgen/bumpalo/pull/229) which may
help the parser a little.
2024-02-18 11:49:31 +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
renovate[bot]
e5fcf82b93
chore(deps): update rust crates (#2396) 2024-02-12 11:42:57 +08:00
overlookmotel
383f5b3081
perf(parser): consume multi-line comments faster (#2377)
Consume multi-line comments faster.

* Initially search for `*/`, `\r`, `\n` or `0xE2` (first byte of
irregular line breaks).
* Once a line break is found, switch to faster search which only looks
for `*/`, as it's not relevant whether there are more line breaks or
not.

Using `memchr` for the 2nd simpler search, as it's efficient for a
search with only one "needle".

Initializing `memchr::memmem::Finder` is fairly expensive, and tried
numerous ways to handle it. This is most performant way I could find.
Any ideas how to avoid re-creating it for each Lexer pass? (it can't be
a `static` as `Finder::new` is not a const function, and `lazy_static!`
is too costly)
2024-02-11 12:43:14 +08:00
Boshen
d6d921ea1f
Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
overlookmotel
d3a59f27f7
perf(parser): lex identifiers as bytes not chars (#2352)
This PR re-implements lexing identifiers with a fast path for the most common case - identifiers which are pure ASCII characters, using the new `Source` / `SourcePosition` APIs.

Lexing identifiers is a hot path, and accounts for the majority of the time the Lexer spends. The performance bump from this change is (if I do say so myself!) quite decent.

I've spent a lot of time tuning the implementation, which gained a further 10-15% on the Lexer benchmarks compared to my first, simpler attempt. Some of the design decisions, if they look odd, are likely motivated by gains in performance.

### Techniques

This implementation uses a few different strategies for performance:

* Search byte-by-byte, not char-by-char.
* Process batches of 32 bytes at a time to reduce bounds checks.
* Mark uncommon paths `#[cold]`.

### Structure

The implementation is built in 3 layers:

1. ASCII characters only.
2. ASCII and Unicode characters.
3. `\` escape sequences (and all the above).

`identifier_name_handler` starts at the top layer, and is optimized for consuming ASCII as fast as possible. Each "layer" is considered more uncommon than the previous, and dropping down a layer is a de-opt.

I'm assuming that 95%+ of JavaScript code does not include either Unicode characters or escapes in identifiers, so the speed of the fast path is prioritised.

That said, once a Unicode character is encountered, the next layer does expect to find further Unicode characters, rather than de-opting over and over again. If an identifier *starts* with a Unicode character, it enters the code straight on the 2nd layer, so is not penalised by going through a `#[cold]` boundary. Lexing Unicode is never going to be as fast as ASCII, but still I felt it was important not to penalise it unnecessarily, so as not to be Anglo-centric.

### ASCII search macro

The main ASCII search is implemented as a macro. I found that, for reasons I don't understand, it's significantly faster to have all the code in a single function, even compared to multiple functions marked `#[inline]` or `#[inline(always)]`. The fastest implementation also requires some code to be repeated twice, which is nicer to do with a macro.

This macro, and the `ByteMatchTable` types that go with it, are designed to be re-usable. Next step will be to apply them for whitespace and strings, which should be fairly simple.

Searching in batches of 32 bytes is also designed to be forward-compatible with SIMD.

### Bye bye `AutoCow`

`AutoCow` is removed. Instead, a string-builder is only created if it's needed, when a `\` escape is first encountered. The string builder is also more efficient than `AutoCow` was, as it copies bytes in chunks, rather than 1-by-1.

This won't make much difference for identifiers, as escapes are so rare anyway, but this same technique can be used for strings, where they're more common.
2024-02-09 12:01:30 +08:00
renovate[bot]
41d1876650
chore(deps): update rust crates (#2302) 2024-02-05 14:36:53 +08:00
Boshen
6002560fa1
feat(span): fix memory leak by implementing inlineable string for oxc_allocator (#2294)
closes #1803

This string is currently unsafe, but I want to get miri working before
introducing more changes.

I want to make a progress from memory leak to unsafe then to safety.
It's harder to do the steps in one go.
2024-02-04 19:28:23 +08:00
Boshen
1822cfe18d
refactor(ast): fix BigInt memory leak by removing it (#2293)
relates

We'll need to evaluate the value by other means.
2024-02-04 16:47:00 +08:00
Boshen
d2b304b1f8
Publish crates v0.6.0 2024-02-03 22:35:30 +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
a79988d5e2
feat(transformer/decorators): support static member (#2235) 2024-01-31 19:11:27 +08:00
Boshen
5ac61f09a0
feat: setup wasm parser for npm (#2221) 2024-01-30 21:40:10 +08:00
Nicholas Roberts
cd5026c015
feat(ast): TypeScript definition for wasm target (#2158)
Closes #2151
2024-01-30 15:43:03 +08:00
renovate[bot]
d7a9bcf191
chore(deps): update rust crates (#2199) 2024-01-30 15:30:22 +08:00
renovate[bot]
4b83d97c3b
chore(deps): update cargo (#2191) 2024-01-29 11:38:47 +08:00
Boshen
87b9978859
refactor: move all miette usages to oxc_diagnostics 2024-01-28 16:52:16 +08:00
Yuji Sugiura
cba8a4c131
feat(tasks): Enable tasks/lint_rules(JS ver) (#2177)
- [x] Remove old task(Rust ver)
- [x] Migrate to new task(JS ver)
- [x] Confirm CI works w/o `--output`
-
https://github.com/oxc-project/oxc/actions/runs/7663961642/job/20887579432?pr=2177
- [x] Confirm CI works w/ fake issue no
  - https://github.com/oxc-project/oxc/issues/2117
- [x] Enable

- - -

I've noticed that

- eslint/no-extra-semi
- eslint/no-mixed-spaces-and-tabs

are maked as deprecated and also recommended.

This is ESLint side
[issue](https://github.com/eslint/eslint/pull/17696#issuecomment-1792452766)
and will fix after v9.
2024-01-26 15:45:05 +08:00
fi3ework
ee5b9682ae
feat(linter): support read env from eslintrc (#2130)
## target

resolve #732 

## contexts

- globals definition from
https://github.com/sindresorhus/globals/blob/main/globals.json
- port https://github.com/eslint/eslintrc/blob/main/conf/environments.js
to derive environments
2024-01-26 10:43:44 +08:00
Boshen
889837704c
feat(semantic): cfg prototype (#2019)
Co-authored-by: U9G <git@u9g.dev>
2024-01-25 20:19:35 +08:00
Boshen
16a192cf1a
chore: try fix broken env_logger 2024-01-23 15:03:53 +08:00
renovate[bot]
0be0a234ce
chore(deps): update cargo (#2138) 2024-01-23 14:48:04 +08:00
Boshen
b329cc4db6
deps: bump env_logger 2024-01-23 14:37:07 +08:00
Boshen
69fecac733
feat(linter): eslint config jsonc support (#2121) 2024-01-22 16:19:31 +08:00
Yuji Sugiura
2f1e1e2e46
feat/tasks: expose linter RULES and use it for listing (#2083)
Part of #2020 , follow up of #2081 .
2024-01-19 16:45:00 +08:00
Yuji Sugiura
85c98525d7
feat(tasks): introduce tasks/lint_rules (#2068)
Part of #2020
2024-01-18 21:22:29 +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
overlookmotel
66a7a68f9f
perf(parser): lexer byte handlers consume ASCII chars faster (#2046)
In the lexer, most `BYTE_HANDLER`s immediately consume the current char
with `lexer.consume_char()`.

Byte handlers are only called if there's a certain value (or range of
values) for the next char. This is their entire purpose. So in all cases
we know for sure that we're not at EOF, and that the next char is a
single-byte ASCII character.

The compiler, however, doesn't seem to be able to "see through" the
`BYTE_HANDLERS[byte](self)` call and understand these invariants. So it
produces very verbose ASM for `lexer.consume_char()`.

This PR replaces `lexer.consume_char()` in the byte handlers with an
unsafe `lexer.consume_ascii_char()` which skips on to next char with a
single `inc` instruction.

The difference in codegen can be seen here:
https://godbolt.org/z/1ha3cr9W5 (compare the 2 x
`core::ops::function::FnOnce::call_once` handlers).

Downside is that this does introduce a lot of unsafe blocks, but in my
opinion they're all pretty trivial to validate.

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2024-01-16 12:31:45 +08:00
dependabot[bot]
21909fa962
chore(deps): bump the dependencies group with 3 updates (#2033) 2024-01-15 15:31:32 +08:00
Boshen
61f37ea973
Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
Boshen
39f026f3e2
chore(benchmark): remove custom allocators because they are flaky (#2004) 2024-01-12 16:05:47 +08:00
Dunqing
ee286a0a48
feat(task): support run async in suite (#1973) 2024-01-11 14:54:30 +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
Dunqing
fc7dbd9225
feat(task): codegen test262 runtime test (#1959) 2024-01-10 17:12:11 +08:00
Boshen
a6717db423
refactor(formatter,linter,codegen): remove oxc_formatter (#1968)
closes #1941
2024-01-10 06:41:20 +00:00
dependabot[bot]
b97a536df7
chore(deps): bump the dependencies group with 5 updates (#1943) 2024-01-08 14:54:17 +08:00
Cameron
d24738d3fc
feat(linter) eslint-plugin-next google-font-display (#1931) 2024-01-08 11:49:40 +08:00
Valerii Smirnov
c6eb519417
feat(linter): eslint-plugin-react: no-unknown-property (#1875)
Based on:
- tests: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/no-unknown-property.js
- docs: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
- code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-unknown-property.js
2024-01-07 12:23:32 +00:00
Boshen
97fa3934a6
deps(rust): bump deps (#1888) 2024-01-04 20:41:31 +08: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
dependabot[bot]
8374197a08
chore(deps): bump handlebars from 4.5.0 to 5.0.0 (#1866) 2024-01-02 11:03:05 +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
IWANABETHATGUY
de2f834774
chore: rename crate oxc_vscode to oxc_language_server (#1825)
1. Closed https://github.com/oxc-project/oxc/issues/1821
2023-12-26 23:01:12 +08:00
IWANABETHATGUY
bd11b02cac
chore: better diagnostic when config is not a json file (#1813)
1. Closed https://github.com/oxc-project/oxc/pull/1804
2023-12-25 22:50:13 +08:00
msdlisper
d984d59e68
feat(linter): eslint-plugin-jsx-a11y lang (#1812)
lang linter for #1141
2023-12-25 18:36:55 +08:00
dependabot[bot]
868c35451d
chore(deps): bump the dependencies group with 5 updates (#1808) 2023-12-25 15:17:47 +08:00
Boshen
51a243b989
perf(linter): reduce the RuleEnum enum size from 168 to 16 bytes (#1783)
Co-authored-by: Dunqing <dengqing0821@gmail.com>
2023-12-22 22:54:41 +08:00
IWANABETHATGUY
fc7c857f80
fix(vscode): don't lint files in .gitignore and .eslintignore (#1765)
Closed https://github.com/oxc-project/oxc/issues/1752
2023-12-21 21:45:32 +08:00
Boshen
2e707bc1c7
perf(linter): use simd (memchr) for no-useless-escape search (#1766) 2023-12-21 19:14:16 +08:00
Boshen
82dc4035eb
chore(linter): bump oxc_resolver to v1.0.1 2023-12-21 16:43:27 +08:00
dependabot[bot]
2f4d6d35d5
chore(deps): bump the dependencies group with 4 updates (#1716) 2023-12-18 15:24:12 +08:00
Herrington Darkholme
c63f5123b3
feat(parser/napi): add flexbuffer to AST transfer (2x speedup) (#1680)
Hi! I have created a proof of concept of improving using oxc in
JavaScript. The method is not polished but it provides valuable insights
for future direction!

Feel free to close~ It is for reference only :)

# Context 

This is a proof of concept implementation of passing binary AST to
JavaScript. JavaScript can selectively read flexbuffers-based AST nodes
on demand to avoid the deserialization toll. More context
[here](https://dev.to/herrington_darkholme/benchmark-typescript-parsers-demystify-rust-tooling-performance-2go8).

# Changes

* Add a `parseSyncBuffer` napi method to return a binary AST from Rust
to JavaScript. The AST is in flexbuffer format.
* Add a `test_buffer.js` to test usage of flexbuffers in JavaScript. It
is in cjs format because flexbuffers does not support ESM :/

# Result
Some preliminary results, for reference only.

```
~ node test_buffer.js
testJSON: 4.043s
testBuffer: 2.395s
```

Buffer based API is 100% faster than JSON.

# Future Ideas
* Flexbuffers itself is slow. A better binary protocol is desired!
* Using binary reader to traverse AST is undesirable. A proxy-based API
to emulate object behavior will be nice.
2023-12-15 02:52:33 +00:00
IWANABETHATGUY
e63576d03c
feat(vscode): add a option to control oxc lint timing (#1659)
1. Closed https://github.com/oxc-project/oxc/issues/1653
2. Now you use `oxc-client.run` to control the lint timing.


[录屏 2023年12月12日
23时39分16秒.webm](https://github.com/oxc-project/oxc/assets/17974631/123326dc-6110-4f2e-9d48-ef1a3b0a4536)
2023-12-13 11:40:39 +08:00
dependabot[bot]
a3b52fb548
chore(deps): bump the dependencies group with 7 updates (#1651) 2023-12-11 14:21:56 +08:00
Boshen
8347e2225c
Release crates v0.4.0 2023-12-08 17:20:37 +08:00
Boshen
335647585d
deps(rust): bump ryu-js to v1.0.0 2023-12-08 17:15:35 +08:00
Boshen
9b849f5dd2
deps(rust): itertools 0.12.0 2023-12-08 16:54:07 +08:00
Boshen
be731fe90c
chore: move oxc_resolver to https://github.com/oxc-project/oxc_resolver (#1636)
It is moved to https://github.com/oxc-project/oxc_resolver
2023-12-06 18:52:59 +08:00
dependabot[bot]
09618e9db0
chore(deps): bump the dependencies group with 2 updates (#1623) 2023-12-04 15:26:44 +08:00
Boshen
8d8276ae52
Release oxc_resolver v0.5.5 2023-11-30 17:16:04 +08:00
Boshen
6ec257ba2d
feat(prettier): add --no-semi to prettier example (#1588) 2023-11-29 23:33:35 +08:00
magic-akari
92c1d9d527
feat(transform): TypeScript Enum (#1173) 2023-11-28 10:33:01 +08:00
dependabot[bot]
e1704d96a3
chore(deps): bump the dependencies group with 9 updates (#1558)
Bumps the dependencies group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [ignore](https://github.com/BurntSushi/ripgrep) | `0.4.20` | `0.4.21`
|
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.69` |
`1.0.70` |
| [serde](https://github.com/serde-rs/serde) | `1.0.192` | `1.0.193` |
| [ureq](https://github.com/algesten/ureq) | `2.8.0` | `2.9.1` |
| [url](https://github.com/servo/rust-url) | `2.4.1` | `2.5.0` |
| [tracing-subscriber](https://github.com/tokio-rs/tracing) | `0.3.17` |
`0.3.18` |
|
[codspeed-criterion-compat](https://github.com/CodSpeedHQ/codspeed-rust)
| `2.3.1` | `2.3.3` |
| [napi](https://github.com/napi-rs/napi-rs) | `2.14.0` | `2.14.1` |
| [napi-derive](https://github.com/napi-rs/napi-rs) | `2.14.1` |
`2.14.2` |

Updates `ignore` from 0.4.20 to 0.4.21
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/BurntSushi/ripgrep/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `proc-macro2` from 1.0.69 to 1.0.70
<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.70</h2>
<ul>
<li>Add #[track_caller] on <code>Ident::new</code> so that panics on
invalid input are attributed to the caller (<a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/423">#423</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cd31a69e9c"><code>cd31a69</code></a>
Release 1.0.70</li>
<li><a
href="4482662ae5"><code>4482662</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/423">#423</a>
from dtolnay/trackcaller</li>
<li><a
href="690ab11e04"><code>690ab11</code></a>
Track caller for Ident validation panics</li>
<li><a
href="f15383f9f0"><code>f15383f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/422">#422</a>
from dtolnay/newchecked</li>
<li><a
href="ea2cd7f2e4"><code>ea2cd7f</code></a>
Rename internal Ident::new -&gt; Ident::new_checked</li>
<li><a
href="8059195101"><code>8059195</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/421">#421</a>
from dtolnay/identunchecked</li>
<li><a
href="805a6adf92"><code>805a6ad</code></a>
Bypass Ident validation on identifiers created by parser</li>
<li><a
href="c51346270e"><code>c513462</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/proc-macro2/issues/420">#420</a>
from dtolnay/newraw</li>
<li><a
href="bd778e1383"><code>bd778e1</code></a>
Delete Ident::_new_raw</li>
<li><a
href="0cb3649e01"><code>0cb3649</code></a>
Ignore checked_conversions pedantic clippy lint</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/proc-macro2/compare/1.0.69...1.0.70">compare
view</a></li>
</ul>
</details>
<br />

Updates `serde` from 1.0.192 to 1.0.193
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.193</h2>
<ul>
<li>Fix field names used for the deserialization of
<code>RangeFrom</code> and <code>RangeTo</code> (<a
href="https://redirect.github.com/serde-rs/serde/issues/2653">#2653</a>,
<a
href="https://redirect.github.com/serde-rs/serde/issues/2654">#2654</a>,
<a
href="https://redirect.github.com/serde-rs/serde/issues/2655">#2655</a>,
thanks <a
href="https://github.com/emilbonnek"><code>@​emilbonnek</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="44613c7d01"><code>44613c7</code></a>
Release 1.0.193</li>
<li><a
href="c706281df3"><code>c706281</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2655">#2655</a>
from dtolnay/rangestartend</li>
<li><a
href="65d75b8fe3"><code>65d75b8</code></a>
Add RangeFrom and RangeTo tests</li>
<li><a
href="332b0cba40"><code>332b0cb</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2654">#2654</a>
from dtolnay/rangestartend</li>
<li><a
href="8c4af41296"><code>8c4af41</code></a>
Fix more RangeFrom / RangeEnd mixups</li>
<li><a
href="24a78f071b"><code>24a78f0</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2653">#2653</a>
from emilbonnek/fix/range-to-from-de-mixup</li>
<li><a
href="c91c33436d"><code>c91c334</code></a>
Fix Range{From,To} deserialize mixup</li>
<li><a
href="2083f43a28"><code>2083f43</code></a>
Update ui test suite to nightly-2023-11-19</li>
<li>See full diff in <a
href="https://github.com/serde-rs/serde/compare/v1.0.192...v1.0.193">compare
view</a></li>
</ul>
</details>
<br />

Updates `ureq` from 2.8.0 to 2.9.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/algesten/ureq/blob/main/CHANGELOG.md">ureq's
changelog</a>.</em></p>
<blockquote>
<h1>2.9.1</h1>
<h2>Fixed</h2>
<ul>
<li>Unbreak feature <code>http-interop</code>. This feature is version
locked to http crate 0.2</li>
<li>New feature <code>http-crate</code>. This feature is for http crate
1.0</li>
<li>New feature <code>proxy-from-env</code> to detect proxy settings for
global Agent (ureq::get).</li>
</ul>
<h1>2.9.0</h1>
<h2>Fixed</h2>
<ul>
<li>Broken rustls dep (introduced new function in patch version) (<a
href="https://redirect.github.com/algesten/ureq/issues/677">#677</a>)</li>
<li>Doc and test fixes (<a
href="https://redirect.github.com/algesten/ureq/issues/670">#670</a>, <a
href="https://redirect.github.com/algesten/ureq/issues/673">#673</a>, <a
href="https://redirect.github.com/algesten/ureq/issues/674">#674</a>)</li>
</ul>
<h2>Added</h2>
<ul>
<li>Upgraded http dep to 1.0</li>
<li>http_interop to not require utf-8 headers (<a
href="https://redirect.github.com/algesten/ureq/issues/672">#672</a>)</li>
<li>http_interop implement conversion for
<code>http::request::Parts</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/669">#669</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9092222fbd"><code>9092222</code></a>
2.9.1</li>
<li><a
href="73690436cb"><code>7369043</code></a>
Rename feature http -&gt; http-crate</li>
<li><a
href="87108e006d"><code>87108e0</code></a>
Support both http 0.2 and 1.0</li>
<li><a
href="89a69a5834"><code>89a69a5</code></a>
docs: update doc comment on <code>try_proxy_from_env</code> method to
reflect the `proxy...</li>
<li><a
href="395218de39"><code>395218d</code></a>
feat: add a feature flag &quot;proxy-from-env&quot; to control whether
or not to detect...</li>
<li><a
href="260213b3e2"><code>260213b</code></a>
2.9.0</li>
<li><a
href="c83ba95ac4"><code>c83ba95</code></a>
Update changelog</li>
<li><a
href="07b8925f3b"><code>07b8925</code></a>
Simpler version expression for rustls dep</li>
<li><a
href="c1bc86ad58"><code>c1bc86a</code></a>
http 1.0</li>
<li><a
href="916ffbffbe"><code>916ffbf</code></a>
Fix missing add_trust_anchors method due to lax rustls versioning</li>
<li>Additional commits viewable in <a
href="https://github.com/algesten/ureq/compare/2.8.0...2.9.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `url` from 2.4.1 to 2.5.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00e9e18ce6"><code>00e9e18</code></a>
Update url 2.5.0 (<a
href="https://redirect.github.com/servo/rust-url/issues/885">#885</a>)</li>
<li><a
href="464b1f7d8f"><code>464b1f7</code></a>
Fix another overflow in punycode encode_into (<a
href="https://redirect.github.com/servo/rust-url/issues/880">#880</a>)</li>
<li><a
href="912d716b04"><code>912d716</code></a>
Correct spelling mistake in <code>Position</code> docs (<a
href="https://redirect.github.com/servo/rust-url/issues/875">#875</a>)</li>
<li><a
href="5f454e2031"><code>5f454e2</code></a>
Added #[must_use] Attributes for Configuration Options (<a
href="https://redirect.github.com/servo/rust-url/issues/876">#876</a>)</li>
<li><a
href="67fc2730b6"><code>67fc273</code></a>
Fix search setting for non-special urls with space, query and fragment
(<a
href="https://redirect.github.com/servo/rust-url/issues/879">#879</a>)</li>
<li><a
href="ae8d29e04a"><code>ae8d29e</code></a>
use checked addition to not panic in debug build (<a
href="https://redirect.github.com/servo/rust-url/issues/877">#877</a>)</li>
<li><a
href="e39c9a20be"><code>e39c9a2</code></a>
Fix clippy (<a
href="https://redirect.github.com/servo/rust-url/issues/878">#878</a>)</li>
<li>See full diff in <a
href="https://github.com/servo/rust-url/compare/v2.4.1...v2.5.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `tracing-subscriber` from 0.3.17 to 0.3.18
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tracing/releases">tracing-subscriber's
releases</a>.</em></p>
<blockquote>
<h2>tracing-subscriber 0.3.18</h2>
<p>This release of <code>tracing-subscriber</code> adds support for the
<a href="https://no-color.org/"><code>NO_COLOR</code></a> environment
variable (an informal standard to disable emitting ANSI color escape
codes) in
<code>fmt::Layer</code>, reintroduces support for the <a
href="https://github.com/chronotope/chrono"><code>chrono</code></a>
crate, and increases the
minimum supported Rust version (MSRV) to Rust 1.63.0.</p>
<p>It also introduces several minor API improvements.</p>
<h3>Added</h3>
<ul>
<li><strong>chrono</strong>: Add <a
href="https://github.com/chronotope/chrono"><code>chrono</code></a>
implementations of <code>FormatTime</code> (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2690">#2690</a>)</li>
<li><strong>subscriber</strong>: Add support for the <a
href="https://no-color.org/"><code>NO_COLOR</code></a> environment
variable in
<code>fmt::Layer</code> (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2647">#2647</a>)</li>
<li><strong>fmt</strong>: make <code>format::Writer::new()</code> public
(<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2680">#2680</a>)</li>
<li><strong>filter</strong>: Implement <code>layer::Filter</code> for
<code>Option&lt;Filter&gt;</code> (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2407">#2407</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li><strong>log</strong>: bump version of <code>tracing-log</code> to
0.2 (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2772">#2772</a>)</li>
<li>Increased minimum supported Rust version (MSRV) to 1.63.0+.</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tracing/issues/2690">#2690</a>:
<a
href="https://redirect.github.com/tokio-rs/tracing/pull/2690">tokio-rs/tracing#2690</a>
<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2647">#2647</a>:
<a
href="https://redirect.github.com/tokio-rs/tracing/pull/2647">tokio-rs/tracing#2647</a>
<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2680">#2680</a>:
<a
href="https://redirect.github.com/tokio-rs/tracing/pull/2680">tokio-rs/tracing#2680</a>
<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2407">#2407</a>:
<a
href="https://redirect.github.com/tokio-rs/tracing/pull/2407">tokio-rs/tracing#2407</a>
<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2772">#2772</a>:
<a
href="https://redirect.github.com/tokio-rs/tracing/pull/2772">tokio-rs/tracing#2772</a></p>
<p>Thanks to <a
href="https://github.com/shayne-fletcher"><code>@​shayne-fletcher</code></a>,
<a href="https://github.com/dmlary"><code>@​dmlary</code></a>, <a
href="https://github.com/kaifastromai"><code>@​kaifastromai</code></a>,
and <a href="https://github.com/jsgf"><code>@​jsgf</code></a> for
contributing!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8b7a1dde69"><code>8b7a1dd</code></a>
chore: prepare tracing-subscriber 0.3.18 release (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2789">#2789</a>)</li>
<li><a
href="befb4de073"><code>befb4de</code></a>
chore: fix <code>ahash</code>-caused build breakage (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2792">#2792</a>)</li>
<li><a
href="1dc1e6a302"><code>1dc1e6a</code></a>
chore: bump <code>ahash</code> to 0.7.7 (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2794">#2794</a>)</li>
<li><a
href="abb23931ef"><code>abb2393</code></a>
chore: backport CI improvements (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2238">#2238</a>)</li>
<li><a
href="c6abc10c3a"><code>c6abc10</code></a>
chore: bump MSRV to 1.63 (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2793">#2793</a>)</li>
<li><a
href="4529182e60"><code>4529182</code></a>
attributes: added missing RecordTypes for instrument (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2781">#2781</a>)</li>
<li><a
href="7b594354cf"><code>7b59435</code></a>
subcriber: update docs for EnvFilter Builder (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2782">#2782</a>)</li>
<li><a
href="119f91a85c"><code>119f91a</code></a>
tracing: removed core imports in macros (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2762">#2762</a>)</li>
<li><a
href="346d6e6456"><code>346d6e6</code></a>
core: fix incorrect (incorrectly updated) docs for LevelFilter (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2767">#2767</a>)</li>
<li><a
href="8cdc9da202"><code>8cdc9da</code></a>
appender: remove <code>Sync</code> bound from writer for
<code>NonBlocking</code> (<a
href="https://redirect.github.com/tokio-rs/tracing/issues/2607">#2607</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.18">compare
view</a></li>
</ul>
</details>
<br />

Updates `codspeed-criterion-compat` from 2.3.1 to 2.3.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/CodSpeedHQ/codspeed-rust/releases">codspeed-criterion-compat's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.3</h2>
<h2>What's Changed</h2>
<h3><code>criterion-compat</code></h3>
<ul>
<li>Avoid creating a breaking change while adding generics to
<code>BenchmarkGroup</code> <a
href="https://github.com/art049"><code>@​art049</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/30">CodSpeedHQ/codspeed-rust#30</a></li>
</ul>
<h3><code>cargo-codspeed</code></h3>
<ul>
<li>Correct <code>cargo-codspeed</code> repository url by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/28">CodSpeedHQ/codspeed-rust#28</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a>
made their first contribution in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/28">CodSpeedHQ/codspeed-rust#28</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.3.2...v2.3.3">https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.3.2...v2.3.3</a></p>
<h2>v2.3.2 (yanked)</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(criterion): <code>BenchmarkGroup</code> compat with
<code>Measurement</code> generic param and <code>plot_config</code> by
<a href="https://github.com/sdd"><code>@​sdd</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/26">CodSpeedHQ/codspeed-rust#26</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/sdd"><code>@​sdd</code></a> made their
first contribution in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/26">CodSpeedHQ/codspeed-rust#26</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.3.1...v2.3.2">https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.3.1...v2.3.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fc751390d7"><code>fc75139</code></a>
Release 2.3.3</li>
<li><a
href="ca39531092"><code>ca39531</code></a>
feat(criterion): support explicit lifetime for BenchmarkGroup</li>
<li><a
href="487fdee134"><code>487fdee</code></a>
fix(criterion): add a default measurement to the benchmark group
struct</li>
<li><a
href="68a0039a4e"><code>68a0039</code></a>
chore: add codspeed badges in sub readmes</li>
<li><a
href="6064482e87"><code>6064482</code></a>
fix: correct repository_url for crates</li>
<li><a
href="dc6b1f1875"><code>dc6b1f1</code></a>
chroe: add the codspeed badge to the readme</li>
<li><a
href="3af70b54c9"><code>3af70b5</code></a>
Release 2.3.2</li>
<li><a
href="e033746ad1"><code>e033746</code></a>
feat(criterion): <code>BenchmarkGroup</code> compat with
<code>Measurement</code> generic param and...</li>
<li>See full diff in <a
href="https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.3.1...v2.3.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi` from 2.14.0 to 2.14.1
<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.1</h2>
<h2>What's Changed</h2>
<ul>
<li>[Fix] Quote toml path by <a
href="https://github.com/TheBrenny"><code>@​TheBrenny</code></a> in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1410">napi-rs/napi-rs#1410</a></li>
<li>chore(cli): update CI template by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1416">napi-rs/napi-rs#1416</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/TheBrenny"><code>@​TheBrenny</code></a>
made their first contribution in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1410">napi-rs/napi-rs#1410</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.10.4...@napi-rs/cli@2.14.1">https://github.com/napi-rs/napi-rs/compare/napi@2.10.4...<code>@​napi-rs/cli</code><code>@​2.14.1</code></a></p>
<h2>napi-derive@2.14.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(napi-derive): async task void output type by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1795">napi-rs/napi-rs#1795</a></li>
<li>fix(napi-derive): async task optional output type by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1796">napi-rs/napi-rs#1796</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/napi-rs/napi-rs/compare/napi-sys@2.3.0...napi-derive@2.14.1">https://github.com/napi-rs/napi-rs/compare/napi-sys@2.3.0...napi-derive@2.14.1</a></p>
<h2>napi@2.14.1</h2>
<h2>What's Changed</h2>
<ul>
<li>style(napi): clippy fix by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1815">napi-rs/napi-rs#1815</a></li>
<li>fix(napi): cargo doc build by <a
href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>
in <a
href="https://redirect.github.com/napi-rs/napi-rs/pull/1819">napi-rs/napi-rs#1819</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@2.14.0...napi@2.14.1">https://github.com/napi-rs/napi-rs/compare/napi@2.14.0...napi@2.14.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6a4f4f173d"><code>6a4f4f1</code></a>
chore(release): publish</li>
<li><a
href="e4ac44e560"><code>e4ac44e</code></a>
Release independent packages</li>
<li><a
href="8a9c42a985"><code>8a9c42a</code></a>
fix(napi): compile error for wasm32-unknown-unknown target</li>
<li><a
href="7dced934a7"><code>7dced93</code></a>
fix(napi): cargo doc build</li>
<li><a
href="751312cec9"><code>751312c</code></a>
test: add test file name into error message (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1821">#1821</a>)</li>
<li><a
href="7c3f8b514e"><code>7c3f8b5</code></a>
fix(napi-derive): compile warning (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1820">#1820</a>)</li>
<li><a
href="8c911b5d34"><code>8c911b5</code></a>
chore: upgrade emnapi dependencies (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1817">#1817</a>)</li>
<li><a
href="76dcf833da"><code>76dcf83</code></a>
chore(deps): update dependency emnapi to v0.44.0 (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1805">#1805</a>)</li>
<li><a
href="6df0ca112e"><code>6df0ca1</code></a>
chore: 🤖 align wasi template to nodejs demo (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1814">#1814</a>)</li>
<li><a
href="c321071c89"><code>c321071</code></a>
chore(deps): update dependency <code>@​emnapi/runtime</code> to v0.44.0
(<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1804">#1804</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi@2.14.0...napi@2.14.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `napi-derive` 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-derive's
releases</a>.</em></p>
<blockquote>
<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>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6a4f4f173d"><code>6a4f4f1</code></a>
chore(release): publish</li>
<li><a
href="e4ac44e560"><code>e4ac44e</code></a>
Release independent packages</li>
<li><a
href="8a9c42a985"><code>8a9c42a</code></a>
fix(napi): compile error for wasm32-unknown-unknown target</li>
<li><a
href="7dced934a7"><code>7dced93</code></a>
fix(napi): cargo doc build</li>
<li><a
href="751312cec9"><code>751312c</code></a>
test: add test file name into error message (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1821">#1821</a>)</li>
<li><a
href="7c3f8b514e"><code>7c3f8b5</code></a>
fix(napi-derive): compile warning (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1820">#1820</a>)</li>
<li><a
href="8c911b5d34"><code>8c911b5</code></a>
chore: upgrade emnapi dependencies (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1817">#1817</a>)</li>
<li><a
href="76dcf833da"><code>76dcf83</code></a>
chore(deps): update dependency emnapi to v0.44.0 (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1805">#1805</a>)</li>
<li><a
href="6df0ca112e"><code>6df0ca1</code></a>
chore: 🤖 align wasi template to nodejs demo (<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1814">#1814</a>)</li>
<li><a
href="c321071c89"><code>c321071</code></a>
chore(deps): update dependency <code>@​emnapi/runtime</code> to v0.44.0
(<a
href="https://redirect.github.com/napi-rs/napi-rs/issues/1804">#1804</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.1...napi-derive@2.14.2">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-11-27 09:01:15 +00:00
IWANABETHATGUY
9897cab220
chore(vscode): improve dx (#1528) 2023-11-24 15:05:27 +08:00
ubugeeei
8e923f1372
Initialize JS Regex crates and def AST. (#1500)
ref: https://github.com/oxc-project/oxc/issues/1164

I have initialized a crate for handling JavaScript Regexp and defined
the AST.
I implemented the AST while referring to
[eslint-community/regexpp](2e8f1af992/src/ast.ts).
2023-11-23 00:22:17 +08:00
IWANABETHATGUY
f66e4d8ac3
feat(transformer): add transform property-literal plugin (#1458)
1. Add `transform-property-literal-plugin`
2. Passing 2 testcases.

---------

Co-authored-by: Wenzhe Wang <mysteryven@gmail.com>
2023-11-21 23:07:43 +08:00
IWANABETHATGUY
4fb4a85ab1
chore(transformer): 🤖 add diff section when conformance failed in filter mode (#1488) 2023-11-21 21:47:58 +08:00
Boshen
f41b3f0968
Release oxc_resolver v0.5.4 2023-11-21 18:57:27 +08:00
Boshen
507958d5bf
Revert "chore(deps): bump the dependencies group with 2 updates (#1446)"
This reverts commit b052f022aa.
2023-11-20 17:24:25 +08:00
dependabot[bot]
b052f022aa
chore(deps): bump the dependencies group with 2 updates (#1446) 2023-11-20 15:09:29 +08:00
Boshen
6ee072aafd
refactor(prettier): comment flags should be bigflags (#1433) 2023-11-19 21:24:22 +08:00
Boshen
3bfe05ec7c
chore(resolver): remove tracing_subscriber (#1362)
this is no longer required for rspack
2023-11-17 13:34:54 +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
Dunqing
ba0e4d1a6a
feat(tasks/prettier-conformance): parse the specs and pass the correct options to prettier (#1327)
### This PR did the following things.

1. Parse specs
2. Collect `run_spec's` arguments
3. Pass the correct `PrettierOptions` to the `Prettier`
4. Printing snapshots correctly
2023-11-15 13:30:44 +08:00
Boshen
3dee2c7178
feat(benchmark): add prettier (#1302) 2023-11-14 17:47:17 +08:00
Boshen
4977ea1554
feat(cli): add basic prettier cli infrastructure (#1300) 2023-11-14 08:22:22 +00:00
Boshen
4a6f54cc1a
feat(prettier_conformance): add prettier test runner (#1262) 2023-11-13 20:14:35 +08:00
dependabot[bot]
6da449ef48
chore(deps): bump the dependencies group with 1 update (#1261)
Bumps the dependencies group with 1 update:
[env_logger](https://github.com/rust-cli/env_logger).

<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's
changelog</a>.</em></p>
<blockquote>
<h2>[0.10.1] - 2023-11-10</h2>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="36623f573b"><code>36623f5</code></a>
chore: Release env_logger version 0.10.1</li>
<li><a
href="8a033d8438"><code>8a033d8</code></a>
chore: Fix packaging</li>
<li><a
href="9df7e6c081"><code>9df7e6c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/241">#241</a>
from ChrisDenton/simple-insert</li>
<li><a
href="46ccdd94f5"><code>46ccdd9</code></a>
perf: Replace <code>HashMap</code> with a <code>Vec</code></li>
<li><a
href="bdc96a421f"><code>bdc96a4</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/249">#249</a>
from atouchet/v10</li>
<li><a
href="983837c47b"><code>983837c</code></a>
Update links and remove broken badge</li>
<li><a
href="dcd220dfaf"><code>dcd220d</code></a>
Update listed version number</li>
<li><a
href="36b1508ea1"><code>36b1508</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/260">#260</a>
from y-yagi/2018-edition</li>
<li><a
href="6f64347c6a"><code>6f64347</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/282">#282</a>
from epage/syntax</li>
<li><a
href="b29735781a"><code>b297357</code></a>
chore: Update docs and examples to 2018 edition</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=env_logger&package-manager=cargo&previous-version=0.10.0&new-version=0.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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-11-13 08:38:31 +00:00
Boshen
65be4acdd4
feat(prettier): init project and infrastructure (#1260)
> [!NOTE]  
> This is going to be a community project because I don't have the time
and energy to work on this alone.

# Prettier

Background: 22.5K USD bounty for prettier written in Rust?!

See https://console.algora.io/challenges/prettier

> [!WARNING]  
> ## Contribution Agreement
> 
> You hereby agree that you contribute for fun and for the purpose of
learning, not for the goal of winning the challenge.
> 
> In the unlikely event of winning the challenge, @boshen will
ultimately decide on how to spend the money.
>

> [!IMPORTANT]  
Please talk to me on [discord](https://discord.com/invite/9uXCAwqQZW)
and indicate that you are willing to contribute and agree to the
contribution agreement.

## Getting started

Create a `test.js` and run the example `just example prettier` from
`crates/oxc_prettier/examples/prettier.rs`, follow the code structure
and read the references documented at the top of the files.

# Tasks

- [x] Have the basic infrastructure ready for contribution
- [ ] Implement a test runner in Rust which extracts the snapshots and
do a comparison over it
- [ ] Establish a way to pass all the tests by manually porting code
- [ ] Pass as many tests as possible in
https://github.com/prettier/prettier/tree/main/tests/format/js
2023-11-13 14:34:20 +08:00
Boshen
9aa78f65fd
Update Cargo.lock 2023-11-11 23:28:41 +08:00
Boshen
c202bc9dcb
feat: Release resolver with NAPI (#1212) 2023-11-10 15:25:17 +00:00
dependabot[bot]
57d24e569b
chore(deps): bump the dependencies group with 6 updates (#1210) 2023-11-10 15:09:38 +08:00
Boshen
90ff0ddbe0
refactor: change @oxidation-compiler/napi to oxc-parser (#1209) 2023-11-10 06:17:05 +00: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
Boshen
48de83b20c
Release oxc_resolver v0.5.2 2023-11-08 17:03:17 +08:00
Boshen
ba603cebb9
Release Oxc v0.3.0 2023-11-06 19:11:16 +08:00
Boshen
b4d0518c4e
Release oxc_resolver v0.5.1 2023-11-06 19:01:22 +08:00
dependabot[bot]
167dedcca7
chore(deps): bump the dependencies group with 6 updates (#1165) 2023-11-06 15:11:02 +08:00
Boshen
a6ef574985
Release oxc_resolver v0.5.0 2023-11-06 11:40:39 +08:00
Boshen
58f8225e08
Release oxc_resolver v0.4.0 2023-11-06 10:50:08 +08:00
Boshen
38c90db0fe
ci: check unused dependencies via cargo machete (#1143) 2023-11-04 14:45:44 +00:00
dependabot[bot]
bf1e3b5440
chore(deps): bump the dependencies group with 4 updates (#1100) 2023-10-30 15:09:28 +08:00
Boshen
1051f15005
feat(transformer/jsx): escape xhtml in jsx attributes (#1088) 2023-10-29 15:16:50 +08:00
u9g
1704a76f6f
Codeowners filtering (#1083)
closes #1066
2023-10-29 13:30:20 +08:00
Wenzhe Wang
7192520d2b
feat(transformer_conformance): use bun to run babel exec.js test cases (#1012)
closes #999 

Co-authored-by: Boshen <boshenc@gmail.com>
2023-10-25 03:06:07 +00:00
Boshen
3eb28e4972
deps(rust): bump 2023-10-24 10:49:41 +08:00
dependabot[bot]
31edfa105e
chore(deps): bump the dependencies group with 4 updates (#1037)
Bumps the dependencies group with 4 updates:
[regex](https://github.com/rust-lang/regex),
[ropey](https://github.com/cessen/ropey),
[thiserror](https://github.com/dtolnay/thiserror) and
[codspeed-criterion-compat](https://github.com/CodSpeedHQ/codspeed-rust).

Updates `regex` from 1.10.1 to 1.10.2
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's
changelog</a>.</em></p>
<blockquote>
<h1>1.10.2 (2023-10-16)</h1>
<p>This is a new patch release that fixes a search regression where
incorrect
matches could be reported.</p>
<p>Bug fixes:</p>
<ul>
<li>[BUG <a
href="https://redirect.github.com/rust-lang/regex/issues/1110">#1110</a>](<a
href="https://redirect.github.com/rust-lang/regex/issues/1110">rust-lang/regex#1110</a>):
Revert broadening of reverse suffix literal optimization introduced in
1.10.1.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5f1f1c8b6d"><code>5f1f1c8</code></a>
1.10.2</li>
<li><a
href="1a54a829ba"><code>1a54a82</code></a>
deps: bump regex-automata to 0.4.3</li>
<li><a
href="61242b1e0e"><code>61242b1</code></a>
regex-automata-0.4.3</li>
<li><a
href="50fe7d177d"><code>50fe7d1</code></a>
changelog: 1.10.2</li>
<li><a
href="eb950f65e6"><code>eb950f6</code></a>
automata/meta: revert broadening of reverse suffix optimization</li>
<li><a
href="e7bd19dd3e"><code>e7bd19d</code></a>
regex-lite-0.1.5</li>
<li><a
href="0086dec69a"><code>0086dec</code></a>
lite: fix stack overflow test</li>
<li><a
href="4ae14720e9"><code>4ae1472</code></a>
tests: fix compilation of doctests on 32-bit architectures</li>
<li><a
href="cd79881df4"><code>cd79881</code></a>
regex-lite-0.1.4</li>
<li><a
href="466e42ca2b"><code>466e42c</code></a>
lite: fix stack overflow in NFA compiler</li>
<li>See full diff in <a
href="https://github.com/rust-lang/regex/compare/1.10.1...1.10.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `ropey` from 1.6.0 to 1.6.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cessen/ropey/blob/master/CHANGELOG.md">ropey's
changelog</a>.</em></p>
<blockquote>
<h2>[1.6.1] - 2023-10-18</h2>
<ul>
<li>Fixed test code that was incorrect on some platforms / with some
configurations.</li>
<li>Minor documentation improvements.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d41ee247f2"><code>d41ee24</code></a>
Prepare for release v1.6.1.</li>
<li><a
href="c185ec562e"><code>c185ec5</code></a>
Expose tree constants for internal testing.</li>
<li><a
href="dfb0a78635"><code>dfb0a78</code></a>
Merge pull request <a
href="https://redirect.github.com/cessen/ropey/issues/91">#91</a> from
blinxen/master</li>
<li><a
href="e629850c3a"><code>e629850</code></a>
[tests] Run search_char_idx_02 and search_line_break_idx_04 only in
debug mode</li>
<li><a
href="387ea30b35"><code>387ea30</code></a>
Merge pull request <a
href="https://redirect.github.com/cessen/ropey/issues/86">#86</a> from
tshepang/patch-1</li>
<li><a
href="9e257b06c4"><code>9e257b0</code></a>
Revert &quot;missing comma&quot;</li>
<li><a
href="1af8c3983b"><code>1af8c39</code></a>
missing comma</li>
<li><a
href="7393572984"><code>7393572</code></a>
missing comma (for readability)</li>
<li><a
href="f1292371ca"><code>f129237</code></a>
Merge pull request <a
href="https://redirect.github.com/cessen/ropey/issues/81">#81</a> from
Johan-Mi/master</li>
<li><a
href="3485d8c9d3"><code>3485d8c</code></a>
Remove unused lifetimes</li>
<li>See full diff in <a
href="https://github.com/cessen/ropey/compare/v1.6.0...v1.6.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `thiserror` from 1.0.49 to 1.0.50
<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.50</h2>
<ul>
<li>Improve diagnostic when a #[source], #[from], or #[transparant]
attribute refers to a type that has no std::error::Error impl (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/258">#258</a>,
thanks <a
href="https://github.com/de-vri-es"><code>@​de-vri-es</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a7d220d791"><code>a7d220d</code></a>
Release 1.0.50</li>
<li><a
href="4088d169ed"><code>4088d16</code></a>
Ignore module_name_repetitions pedantic clippy lint</li>
<li><a
href="ebebf77fe0"><code>ebebf77</code></a>
Format ui tests with rustfmt</li>
<li><a
href="ff0a0a5859"><code>ff0a0a5</code></a>
Source and From attributes only have single-ident path</li>
<li><a
href="7cec716420"><code>7cec716</code></a>
Remove reliance on Spanned for Member</li>
<li><a
href="c9fe739272"><code>c9fe739</code></a>
Touch up PR 258</li>
<li><a
href="4850c6f80f"><code>4850c6f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/258">#258</a>
from de-vri-es/as-dyn-error-span</li>
<li><a
href="a49f7c603d"><code>a49f7c6</code></a>
Change span of <code>as_dyn_error()</code> to point compile error at
attribute.</li>
<li><a
href="f4eac7ef7b"><code>f4eac7e</code></a>
Ignore needless_raw_string_hashes clippy lint</li>
<li>See full diff in <a
href="https://github.com/dtolnay/thiserror/compare/1.0.49...1.0.50">compare
view</a></li>
</ul>
</details>
<br />

Updates `codspeed-criterion-compat` from 2.2.0 to 2.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/CodSpeedHQ/codspeed-rust/releases">codspeed-criterion-compat's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(ci): change the version of the codspeed action to main by <a
href="https://github.com/art049"><code>@​art049</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/18">CodSpeedHQ/codspeed-rust#18</a></li>
<li>feat(cargo-codspeed): add <code>--features vendored-openssl</code>
by <a href="https://github.com/Boshen"><code>@​Boshen</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/14">CodSpeedHQ/codspeed-rust#14</a></li>
<li>chore(cargo-codspeed): set verbosity to normal by <a
href="https://github.com/Boshen"><code>@​Boshen</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/15">CodSpeedHQ/codspeed-rust#15</a></li>
<li>chore: bump rust toolchain to 1.73 by <a
href="https://github.com/art049"><code>@​art049</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/21">CodSpeedHQ/codspeed-rust#21</a></li>
<li>feat(criterion): allow explicit lifetime usage with compat by <a
href="https://github.com/art049"><code>@​art049</code></a> in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/22">CodSpeedHQ/codspeed-rust#22</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Boshen"><code>@​Boshen</code></a> made
their first contribution in <a
href="https://redirect.github.com/CodSpeedHQ/codspeed-rust/pull/14">CodSpeedHQ/codspeed-rust#14</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.2.0...v2.3.0">https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.2.0...v2.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="518659da83"><code>518659d</code></a>
Release 2.3.0</li>
<li><a
href="dd3763fea9"><code>dd3763f</code></a>
feat(criterion): allow explicit lifetime usage with compat</li>
<li><a
href="1621b664db"><code>1621b66</code></a>
chore(cargo-codspeed): set verbosity to normal</li>
<li><a
href="87506ab5ca"><code>87506ab</code></a>
chore: update readme</li>
<li><a
href="7b43e1eb7c"><code>7b43e1e</code></a>
feat(cargo-codspeed): add --features <code>vendored-openssl</code></li>
<li>See full diff in <a
href="https://github.com/CodSpeedHQ/codspeed-rust/compare/v2.2.0...v2.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-23 15:07:02 +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
dependabot[bot]
3688f6a06f
chore(deps): bump the dependencies group with 5 updates (#1002) 2023-10-16 15:23:20 +08:00
Boshen
0f72066f2e
feat(transformer): finish 2016 exponentiation operator (#996) 2023-10-16 09:30:04 +08:00
Boshen
2e2b7587ac
feat(playground): add transform and minify (#993) 2023-10-14 19:49:58 +08:00
Boshen
801d78a3c6
refactor(minifier): make the minifier api only accept an ast (#990) 2023-10-14 00:51:29 +08:00
Boshen
e0ca09b1c9
feat(codegen): implement the basics of non-minifying codegen (#987) 2023-10-13 13:34:21 +08:00
Boshen
efad0fce2d
deps(rust): bump deps 2023-10-12 21:03:17 +08:00
Boshen
ce79bc12ab
feat(transform_conformance): move Formatter to codegen (#986) 2023-10-12 15:13:14 +08:00
Boshen
809f050a5f
feat(codegen): move minifying printer to codegen crate (#985) 2023-10-12 14:56:30 +08:00
Boshen
f28d96c378
feat(codegen): initialize the codegen crate and struct (#983) 2023-10-12 10:41:44 +08:00
Boshen
bd99c7f174
chore(cli): remove cmd snapshot and building oxlint binary to speed up ci 2023-10-11 20:38:59 +08:00
Boshen
8c12dff8a3
perf: speed tasks run by using a global allocator 2023-10-11 20:30:30 +08:00
Boshen
eaa0c58e24
feat(linter): eslint-plugin-unicorn(filename-case) (#978) 2023-10-11 15:23:17 +08:00
Boshen
903854dac0
refactor(ast): fix the lifetime annotations around Vist and VisitMut (#973) 2023-10-10 17:05:48 +08:00
Boshen
ef8aaa7bf1
feat(minifier): re-enable mangler (#972) 2023-10-10 14:32:58 +08:00
Boshen
d529a406e5
Release oxc_resolver v0.3.1 2023-10-10 10:39:42 +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
09386013d2
Release oxc_resolver v0.3.0 2023-10-08 19:20:24 +08:00
Boshen
55b2f031df
feat(minifier): partially re-enable minifier (#963)
closes #949
closes #950
closes #951

All minifier tests are disable from this PR.

We are going to fix the compilation errors first, then the behavioral
errors.
2023-10-08 11:06:42 +08:00
dependabot[bot]
9fcb3ce725
chore(deps): bump the dependencies group with 3 updates (#956) 2023-10-03 18:14:27 +13:00
Boshen
74160ac3d7
deps(rust): bump deps 2023-09-29 23:57:43 +13:00
dependabot[bot]
0b02cb7da9
chore(deps): bump the dependencies group with 3 updates (#936)
Bumps the dependencies group with 3 updates:
[rayon](https://github.com/rayon-rs/rayon),
[insta](https://github.com/mitsuhiko/insta) and
[unicode-width](https://github.com/unicode-rs/unicode-width).

Updates `rayon` from 1.7.0 to 1.8.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rayon-rs/rayon/blob/master/RELEASES.md">rayon's
changelog</a>.</em></p>
<blockquote>
<h1>Release rayon 1.8.0 / rayon-core 1.12.0 (2023-09-20)</h1>
<ul>
<li>The minimum supported <code>rustc</code> is now 1.63.</li>
<li>Added <code>ThreadPoolBuilder::use_current_thread</code> to use the
builder thread as
part of the new thread pool. That thread does not run the pool's main
loop,
but it may participate in work-stealing if it yields to rayon in some
way.</li>
<li>Implemented <code>FromParallelIterator&lt;T&gt;</code> for
<code>Box&lt;[T]&gt;</code>, <code>Rc&lt;[T]&gt;</code>, and
<code>Arc&lt;[T]&gt;</code>, as well as
<code>FromParallelIterator&lt;Box&lt;str&gt;&gt;</code> and
<code>ParallelExtend&lt;Box&lt;str&gt;&gt;</code> for
<code>String</code>.</li>
<li><code>ThreadPoolBuilder::build_scoped</code> now uses
<code>std:🧵:scope</code>.</li>
<li>The default number of threads is now determined using
<code>std:🧵:available_parallelism</code> instead of the
<code>num_cpus</code> crate.</li>
<li>The internal logging facility has been removed, reducing bloat for
all users.</li>
<li>Many smaller performance tweaks and documentation updates.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="21e1ae1e12"><code>21e1ae1</code></a>
Release rayon 1.4.0 / rayon-core 1.8.0</li>
<li><a
href="a0e5833b76"><code>a0e5833</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/785">#785</a> <a
href="https://redirect.github.com/rayon-rs/rayon/issues/790">#790</a> <a
href="https://redirect.github.com/rayon-rs/rayon/issues/791">#791</a></li>
<li><a
href="9f7357befb"><code>9f7357b</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/792">#792</a></li>
<li><a
href="998f134242"><code>998f134</code></a>
Removed outdated documentation</li>
<li><a
href="c7d963a9c2"><code>c7d963a</code></a>
Use crossbeam_deque::Injector instead of crossbeam_queue::SegQueue</li>
<li><a
href="2e889293a8"><code>2e88929</code></a>
Micro-optimize the WorkerThread::steal loop</li>
<li><a
href="66559fe9ce"><code>66559fe</code></a>
Remove the lifetime constraint from the scope OP</li>
<li><a
href="09428ec11d"><code>09428ec</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/746">#746</a></li>
<li><a
href="ed6a5f75c4"><code>ed6a5f7</code></a>
Update ci/compat-Cargo.lock</li>
<li><a
href="96ba9ef188"><code>96ba9ef</code></a>
inline more Counter methods</li>
<li>Additional commits viewable in <a
href="https://github.com/rayon-rs/rayon/compare/rayon-core-v1.7.0...rayon-core-v1.8.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `insta` from 1.31.0 to 1.32.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's
changelog</a>.</em></p>
<blockquote>
<h2>1.32.0</h2>
<ul>
<li>Added <code>--profile</code> parameter support to <code>cargo insta
test</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="845ee36cf4"><code>845ee36</code></a>
1.32.0</li>
<li><a
href="5b34e7eaad"><code>5b34e7e</code></a>
Added changlog entry</li>
<li><a
href="bee0ff41af"><code>bee0ff4</code></a>
cargo-insta: reduce visibility of all items (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/407">#407</a>)</li>
<li><a
href="6e22d67092"><code>6e22d67</code></a>
cargo-insta: edit reject message (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/404">#404</a>)</li>
<li><a
href="7e9315ede7"><code>7e9315e</code></a>
test-stable requires 1.61</li>
<li><a
href="84cddf9c70"><code>84cddf9</code></a>
Fix incorrect --profile command</li>
<li><a
href="20656ad902"><code>20656ad</code></a>
cargo-insta: allow passing --profile (<a
href="https://redirect.github.com/mitsuhiko/insta/issues/402">#402</a>)</li>
<li>See full diff in <a
href="https://github.com/mitsuhiko/insta/compare/1.31.0...1.32.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `unicode-width` from 0.1.10 to 0.1.11
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8942487195"><code>8942487</code></a>
Publish 0.1.11 (Unicode 15.1)</li>
<li><a
href="34fdd6b66e"><code>34fdd6b</code></a>
Add ignore file</li>
<li><a
href="24651a204d"><code>24651a2</code></a>
Merge pull request <a
href="https://redirect.github.com/unicode-rs/unicode-width/issues/33">#33</a>
from chrisduerr/unicode_15_1</li>
<li><a
href="30e33bdb2c"><code>30e33bd</code></a>
Fixup script</li>
<li><a
href="8872449ab3"><code>8872449</code></a>
Create rust.yml</li>
<li><a
href="a859939f91"><code>a859939</code></a>
Update to Unicode 15.1</li>
<li><a
href="f5a9b4efa5"><code>f5a9b4e</code></a>
Merge pull request <a
href="https://redirect.github.com/unicode-rs/unicode-width/issues/32">#32</a>
from linkmauve/patch-1</li>
<li><a
href="78cfe571e0"><code>78cfe57</code></a>
Use Iterator::sum() instead of fold()</li>
<li>See full diff in <a
href="https://github.com/unicode-rs/unicode-width/compare/v0.1.10...v0.1.11">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-09-25 23:38:30 -04:00
Boshen
46d2623c1f
feat(transform_conformance): add jsx and ts tests 2023-09-18 15:35:02 +08:00
dependabot[bot]
9c259a4ddf
chore(deps): bump the dependencies group with 3 updates (#929) 2023-09-18 15:33:02 +08:00
Boshen
7172953fe9
feat(transformer_conformance): snapshot passed and failed tests (#921) 2023-09-16 20:58:31 +08:00
Boshen
f4cea34534
feat(transformer): add babel conformance test suite (#920) 2023-09-16 18:50:51 +08:00
Boshen
540fa03ec0
feat(benchmark): add transformer benchmark (#919) 2023-09-16 17:09:27 +08:00
Boshen
419d5aa6ee
feat(transformer): transformer prototype (#918)
This PR introduces the oxc transformer.

The code is purposely arranged without any Rust trickery such as traits
and macros.
I intend to keep the code style this way until something blows up.

The next steps are:
* unit tests
* conformance tests with TypeScript and Babel
* benchmarks
2023-09-16 16:05:35 +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
Boshen
38bbc96fb0
Release oxc v0.2.0 2023-09-14 23:41:44 +08:00
dependabot[bot]
e174c2f555
chore(deps): bump the dependencies group with 5 updates (#908) 2023-09-14 16:15:50 +08:00
Boshen
242c698d78
Release oxc_resolver v0.2.0 2023-09-14 15:36:41 +08:00
Boshen
4faf3c7976
feat(resolver): add more tracing events to resolver (#907) 2023-09-14 15:34:51 +08:00
Boshen
38aa3205b4
deps: remove default-features from codspeed-criterion-compat 2023-09-11 18:59:30 +08:00
dependabot[bot]
9204c19dab
chore(deps): bump the dependencies group with 4 updates (#893) 2023-09-11 18:53:29 +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
75d928a20d feat(syntax): add loaded_modules to ModuleRecord 2023-09-07 22:56:09 +08:00
Boshen
ee54575ec1
feat(linter): add runner for import-plugin (#858) 2023-09-06 14:54:19 +08:00
dependabot[bot]
5defa2fa96
chore(deps): bump the dependencies group with 6 updates (#852) 2023-09-04 15:46:27 +08:00
Boshen
bcc069e847
Release oxc_resolver v0.1.0 2023-09-04 14:45:29 +08:00
Boshen
aa7b665fe9
feat(resolver): add thiserror (#847) 2023-09-03 14:50:31 +08:00
Boshen
73be3eab4c
chore: update lock file 2023-09-03 13:51:28 +08:00
Boshen
37bf4c4421
Release oxc v0.1.2 2023-09-03 11:30:44 +08:00
Boshen
da44fd8999
feat(benchmark): add linter benchmark (#842) 2023-09-03 09:55:01 +08:00
Boshen
53b094e46c
chore: clean up deps (#840) 2023-09-02 21:34:24 +08:00
Boshen
56aaf31fb1
refactor(benchmark): use codspeed for all benchmarks (#839) 2023-09-02 20:35:48 +08:00
Boshen
e4a3838ecb
chore(resolver): benchmark with codspeed (#838) 2023-09-02 18:27:37 +08:00
Boshen
9724365862
refactor(resolver): remove nodejs_resolver comparison
we no longer need to compare with nodejs_resolver
2023-09-02 15:12:26 +08:00
Boshen
5b98bf42b5
deps: remove regex support from env_logger 2023-09-02 15:12:25 +08:00
dependabot[bot]
8caf77300b
chore(deps): bump the dependencies group with 10 updates (#831) 2023-09-01 13:56:12 +08:00
Boshen
693145107c
refactor(linter): less a global hashmap to reduce rule timer macro expansion (#822)
closes #819
2023-09-01 10:32:17 +08:00
u9g
a38619b780
feat(vscode): Add linter plugin to vscode extension (#813) 2023-08-29 23:35:32 -04:00
u9g
a44dde5303
feat(linter_plugin): Add linter plugin crate (#798)
Adds a `linter_plugin` crate which adds `oxc_query` support to any
`oxc_linter` consumers such as `oxc_cli` and `editor/vscode`
2023-08-28 11:40:00 +08:00
阿良仔
0fef2d317a
chore: proxy detection for all tasks (#801)
related PR: #740
2023-08-27 17:24:28 +08:00
Boshen
1f27426570
Release crates as v0.1.1 2023-08-26 17:53:11 +08:00
Boshen
592137586c
feat(cli): use insta_cmd for cli snapshot testing (#791)
closes #776
2023-08-25 16:26:34 +08:00
Boshen
ba8ef7bfc7
fix(deps): use one version of textwrap 2023-08-25 12:54:38 +08:00
u9g
4f686b6a75
feat(query): add Paren*Expr* type and add index to Argument type and fix todo in ObjectExpr (#780)
```diff
+ Argument.index

+ ParenthesizedExpression
+ ParenthesizedExpression implements Expression
+ ParenthesizedExpression implements HasSpan
+ ParenthesizedExpression.expression

+ ParenthesizedExpressionAST
+ ParenthesizedExpressionAST implements Expression
+ ParenthesizedExpressionAST implements HasSpan
+ ParenthesizedExpressionAST implements ParenthesizedExpression
+ ParenthesizedExpressionAST implements ASTNode
```
2023-08-24 04:21:02 +00:00
Boshen
28544e1d59
deps: bump deps per security advice for rustls-webpki
rustls-webpki: CPU denial of service in certificate path building
2023-08-23 11:16:58 +08:00
Boshen
1851a8ae26
deps(rust): bump dependencies (#771)
generated with `cargo upgrade -i` then `cargo update`
2023-08-21 18:04:29 +08:00
Boshen
5152b39b17
chore: clean up Cargo.toml with cargo machete (#767) 2023-08-20 15:29:09 +08:00
Boshen
a9a6bb800c
refactor(cli,linter): move path processing logic from cli to linter (#766) 2023-08-20 15:12:08 +08:00
Boshen
a9c4fddb6d
refactor(cli): use bpaf instead clap (#756) 2023-08-18 17:14:06 +08:00
Boshen
629055cfce
deps(rust): bump dependencies 2023-08-12 16:48:24 +08:00
u9g
99a4816ce7
feat(website): add query playground (#698) 2023-08-11 10:53:21 +08:00
Boshen
8ae345bde0
chore(parser): add an AST Send example (#712)
relates #709

The allocator and lifetime gets in the way if we want to parse in
parallel but process them in a single thread.

This example uses `ouroboros` to provide a safe API for working with
this unsafe behavior.
2023-08-10 15:56:31 +08:00
Boshen
9714e46a02
feat(resolver): add tracing (#710) 2023-08-10 13:51:28 +08:00
Boshen
fdded5e97c
refactor(resolver): remove the identity-hash crate 2023-08-09 19:01:26 +08:00
Boshen
91fd375a3b
refactor(resolver): return package json error immediately instead of saving it (#702)
The error is propagated so there is no need to save it.
2023-08-09 14:28:44 +08:00
Don Isaac
38fb4c296a
test(semantic): test harness (#679)
A test harness for checking results of semantic analysis.

I got tired of writing ad-hoc test cases when finding bugs in semantic
analysis, so I made this.
2023-08-07 10:43:05 +08:00
阿良仔
8a915cec5c
feat: vscode extension (#690)
related: #688 .
There are some unfinished things that need to be finalised by Boshen.

1. Official icon and description for the package.
2. Publishing strategy ( It's probably not a good idea to use
`package.json` as a probe to publish extension, as there's too much
vscode configuration coupled to it, a git tag like `vscode_v0.0.x` might
be worth considering ).
3. License for the extension.
2023-08-06 21:28:49 +08:00
Alexandr Metreniuc
d1531cd144
feat(linter): add no-extra-boolean-cast rule (#677)
Closes https://github.com/web-infra-dev/oxc/issues/596

Rule: [Docs](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
|
[Source](https://github.com/eslint/eslint/blob/main/lib/rules/no-extra-boolean-cast.js)
| [Tests
](https://github.com/eslint/eslint/blob/main/tests/lib/rules/no-extra-boolean-cast.js)
2023-08-04 18:46:50 +08:00
Devin-Yeung
ba8dbf5446
fix(linter): fix false positives in loss-of-precision lint (#664)
Almost rewrite the no-loss-of-precision lint, fix known false positives,
close #656

---------

Co-authored-by: Boshen <boshenc@gmail.com>
2023-07-31 14:48:00 +08:00
Boshen
c956f7e897
refactor(cli): remove experimental code "module_tree_handler" (#670)
This code will eventually be superseded by
https://github.com/web-infra-dev/oxc/pull/530, removing this for now so
others don't have to touch this.
2023-07-31 12:40:14 +08:00
Don Isaac
d3accc1ee3
fix(semantic): nested references (#661)
Addresses #660
2023-07-31 12:29:15 +08:00
Boshen
1012d8300c
chore: release crates as v0.1.0 2023-07-27 13:54:17 +08:00
Boshen
d587065436
chore(rust): update crate info, add minimal rust-version, add categories 2023-07-27 13:33:18 +08:00
Sg
fbb8aa3338
refactor: remove unstable feature const_trait_impl & const_slice_index & slice_group_by (#629) 2023-07-26 17:37:09 +08:00
Boshen
32b8ad2b57
feat(resolver): initialize implementation of package.json exports field (#630) 2023-07-26 16:54:54 +08:00
u9g
1d504ac94a
Add oxc_query crate (#625) 2023-07-26 13:03:00 +08:00
Boshen
f094d5881e
perf(resolver): hash once for the get + insert case (#606) 2023-07-25 16:47:17 +08:00
Boshen
108bdbbdae
deps(rust): bump with cargo upgrade --incompatible 2023-07-24 23:24:31 +08:00
Boshen
7b7e3a2032
chore(resolver): add multi-threaded benchmark (#588) 2023-07-23 12:40:52 +08:00