No description
Find a file
renovate 9192e5ad03 chore(deps): update rust crates (#5899)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bpaf](https://redirect.github.com/pacak/bpaf) | workspace.dependencies | patch | `0.9.12` -> `0.9.14` |
| [dashmap](https://redirect.github.com/xacrimon/dashmap) | workspace.dependencies | minor | `6.0.1` -> `6.1.0` |
| [globset](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/globset) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/globset)) | workspace.dependencies | patch | `0.4.14` -> `0.4.15` |
| [handlebars](https://redirect.github.com/sunng87/handlebars-rust) | workspace.dependencies | minor | `6.0.0` -> `6.1.0` |
| [ignore](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/ignore) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/ignore)) | workspace.dependencies | patch | `0.4.22` -> `0.4.23` |
| [indexmap](https://redirect.github.com/indexmap-rs/indexmap) | workspace.dependencies | minor | `2.4.0` -> `2.5.0` |
| [insta](https://insta.rs/) ([source](https://redirect.github.com/mitsuhiko/insta)) | workspace.dependencies | minor | `1.39.0` -> `1.40.0` |
| [napi](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `3.0.0-alpha.8` -> `3.0.0-alpha` |
| [napi-derive](https://redirect.github.com/napi-rs/napi-rs) | workspace.dependencies | patch | `3.0.0-alpha.7` -> `3.0.0-alpha` |
| [owo-colors](https://redirect.github.com/jam1garner/owo-colors) | workspace.dependencies | minor | `4.0.0` -> `4.1.0` |
| [oxc_resolver](https://redirect.github.com/oxc-project/oxc-resolver) | workspace.dependencies | minor | `1.10.2` -> `1.11.0` |
| [serde](https://serde.rs) ([source](https://redirect.github.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.209` -> `1.0.210` |
| [serde_json](https://redirect.github.com/serde-rs/json) | workspace.dependencies | patch | `1.0.127` -> `1.0.128` |
| [tokio](https://tokio.rs) ([source](https://redirect.github.com/tokio-rs/tokio)) | workspace.dependencies | minor | `1.39.3` -> `1.40.0` |
| [unicode-id-start](https://redirect.github.com/Boshen/unicode-id-start) | workspace.dependencies | minor | `1.2.0` -> `1.3.0` |
| [unicode-width](https://redirect.github.com/unicode-rs/unicode-width) | workspace.dependencies | minor | `0.1.13` -> `0.2.0` |

---

### Release Notes

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

### [`v0.9.14`](https://redirect.github.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0914--2024-09-19)

[Compare Source](https://redirect.github.com/pacak/bpaf/compare/v0.9.13...v0.9.14)

-   add license files ([#&#8203;388](https://redirect.github.com/pacak/bpaf/issues/388))
    thanks [@&#8203;davide](https://redirect.github.com/davide)
-   fix fish completions - you'll need to regenerate completion files for them to work

### [`v0.9.13`](https://redirect.github.com/pacak/bpaf/blob/HEAD/Changelog.md#bpaf-0913--bpafderive-0513---2024-09-06)

[Compare Source](https://redirect.github.com/pacak/bpaf/compare/v0.9.12...v0.9.13)

-   You can now use `fallback_to_usage` in derive macro for options and subcommands ([#&#8203;376](https://redirect.github.com/pacak/bpaf/issues/376))
-   Bugfixes related to shell completion and file masks
    thanks [@&#8203;ozwaldorf](https://redirect.github.com/ozwaldorf)
-   `not_strict` restriction for positional items (TODO - check the docs)
    thanks [@&#8203;ozwaldorf](https://redirect.github.com/ozwaldorf)
-   more shell completion bugfixes ([#&#8203;384](https://redirect.github.com/pacak/bpaf/issues/384), [#&#8203;382](https://redirect.github.com/pacak/bpaf/issues/382), [#&#8203;381](https://redirect.github.com/pacak/bpaf/issues/381))
-   `ParseFailure::print_mesage` (with one `s` is deprecated in favor of the right spelling

</details>

<details>
<summary>xacrimon/dashmap (dashmap)</summary>

### [`v6.1.0`](https://redirect.github.com/xacrimon/dashmap/releases/tag/v6.1.0)

[Compare Source](https://redirect.github.com/xacrimon/dashmap/compare/v6.0.1...v6.1.0)

-   [https://github.com/xacrimon/dashmap/pull/308](https://redirect.github.com/xacrimon/dashmap/pull/308)

</details>

<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>

### [`v6.1.0`](https://redirect.github.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#610---2024-09-06)

[Compare Source](https://redirect.github.com/sunng87/handlebars-rust/compare/v6.0.0...v6.1.0)

-   \[Added] More data type support in comparison helpers \[[#&#8203;673](https://redirect.github.com/sunng87/handlebars-rust/issues/673)]

</details>

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

### [`v2.5.0`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#250)

[Compare Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.4.0...2.5.0)

-   Added an `insert_before` method to `IndexMap` and `IndexSet`, as an
    alternative to `shift_insert` with different behavior on existing entries.
-   Added `first_entry` and `last_entry` methods to `IndexMap`.
-   Added `From` implementations between `IndexedEntry` and `OccupiedEntry`.

</details>

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

### [`v1.40.0`](https://redirect.github.com/mitsuhiko/insta/blob/HEAD/CHANGELOG.md#1400)

[Compare Source](https://redirect.github.com/mitsuhiko/insta/compare/1.39.0...1.40.0)

-   `cargo-insta` no longer panics when running `cargo insta test --accept --workspace`
    on a workspace with a default crate.  [#&#8203;532](https://redirect.github.com/mitsuhiko/insta/issues/532)

-   MSRV for `insta` has been raised to 1.60, and for `cargo-insta` to 1.64.

-   Added support for compact debug snapshots (`assert_compact_debug_snapshot`).  [#&#8203;514](https://redirect.github.com/mitsuhiko/insta/issues/514)

-   Deprecate `--no-force-pass` in `cargo-insta`.  The `--check` option covers the
    same functionality and has a clearer name.  [#&#8203;513](https://redirect.github.com/mitsuhiko/insta/issues/513)

-   Inline snapshots now use the required number of `#`s to escape the snapshot
    value, rather than always using `###`. This allows snapshotting values which
    themselves contain `###`. If there are no existing `#` characters in the
    snapshot value, a single `#` will be used.  [#&#8203;540](https://redirect.github.com/mitsuhiko/insta/issues/540)

-   Inline snapshots can now be updated with `--force-update-snapshots`.  [#&#8203;569](https://redirect.github.com/mitsuhiko/insta/issues/569)

-   `cargo insta test` accepts multiple `--exclude` flags.  [#&#8203;520](https://redirect.github.com/mitsuhiko/insta/issues/520)

-   `test` `runner` in insta's yaml config works.  [#&#8203;544](https://redirect.github.com/mitsuhiko/insta/issues/544)

-   Print a warning when encountering old snapshot formats.  [#&#8203;503](https://redirect.github.com/mitsuhiko/insta/issues/503)

-   Group the options in `cargo insta --help`, upgrade to `clap` from `structopt`.  [#&#8203;518](https://redirect.github.com/mitsuhiko/insta/issues/518)

-   No longer suggest running `cargo insta` message when running `cargo insta test --check`.  [#&#8203;515](https://redirect.github.com/mitsuhiko/insta/issues/515)

-   Print a clearer error message when accepting a snapshot that was removed.  [#&#8203;516](https://redirect.github.com/mitsuhiko/insta/issues/516)

-   Mark `require-full-match` as experimental, given some corner-cases are currently difficult to manage.  [#&#8203;497](https://redirect.github.com/mitsuhiko/insta/issues/497)

-   Add a new integration test approach for `cargo-insta` and a set of integration tests.  [#&#8203;537](https://redirect.github.com/mitsuhiko/insta/issues/537)

-   Enable Filters to be created from `IntoIterator` types, rather than just `Vec`s.  [#&#8203;570](https://redirect.github.com/mitsuhiko/insta/issues/570)

-   Implemented total sort order for an internal `Key` type correctly.  This prevents potential
    crashes introduced by the new sort algorithm in Rust 1.81.  [#&#8203;586](https://redirect.github.com/mitsuhiko/insta/issues/586)

</details>

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

### [`v3.0.0-alpha.10`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi%403.0.0-alpha.10)

[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.9...napi@3.0.0-alpha.10)

#### What's Changed

-   fix(napi): nullptr handling in `TypedArray`s by [@&#8203;Xanewok](https://redirect.github.com/Xanewok) in [https://github.com/napi-rs/napi-rs/pull/2258](https://redirect.github.com/napi-rs/napi-rs/pull/2258)
-   chore: enable corepack in Debian base Dockerfile by [@&#8203;stevefan1999-personal](https://redirect.github.com/stevefan1999-personal) in [https://github.com/napi-rs/napi-rs/pull/2252](https://redirect.github.com/napi-rs/napi-rs/pull/2252)
-   refactor(napi): allow create BufferSlice from external data by [@&#8203;Brooooooklyn](https://redirect.github.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/2263](https://redirect.github.com/napi-rs/napi-rs/pull/2263)

#### New Contributors

-   [@&#8203;Xanewok](https://redirect.github.com/Xanewok) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2258](https://redirect.github.com/napi-rs/napi-rs/pull/2258)
-   [@&#8203;stevefan1999-personal](https://redirect.github.com/stevefan1999-personal) made their first contribution in [https://github.com/napi-rs/napi-rs/pull/2252](https://redirect.github.com/napi-rs/napi-rs/pull/2252)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8...napi@3.0.0-alpha.10

### [`v3.0.0-alpha.9`](https://redirect.github.com/napi-rs/napi-rs/releases/tag/napi-derive%403.0.0-alpha.9)

[Compare Source](https://redirect.github.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.8...napi@3.0.0-alpha.9)

#### What's Changed

-   fix(derive): fix clippy warning with newer rust version by [@&#8203;richerfu](https://redirect.github.com/richerfu) in [https://github.com/napi-rs/napi-rs/pull/2262](https://redirect.github.com/napi-rs/napi-rs/pull/2262)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@3.0.0-alpha.8...napi-derive@3.0.0-alpha.9

</details>

<details>
<summary>jam1garner/owo-colors (owo-colors)</summary>

### [`v4.1.0`](https://redirect.github.com/jam1garner/owo-colors/compare/v4.0.0...v4.1.0)

[Compare Source](https://redirect.github.com/jam1garner/owo-colors/compare/v4.0.0...v4.1.0)

</details>

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

### [`v1.11.0`](https://redirect.github.com/oxc-project/oxc-resolver/blob/HEAD/CHANGELOG.md#1110---2024-08-26)

[Compare Source](https://redirect.github.com/oxc-project/oxc-resolver/compare/oxc_resolver-v1.10.2...oxc_resolver-v1.11.0)

##### Added

-   use simdutf8 to validate UTF-8 when reading files ([#&#8203;237](https://redirect.github.com/oxc-project/oxc_resolver/pull/237))
-   Yarn PnP (behind a feature flag) ([#&#8203;217](https://redirect.github.com/oxc-project/oxc_resolver/pull/217))

</details>

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

### [`v1.0.210`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.210)

[Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.209...v1.0.210)

-   Support serializing and deserializing `IpAddr` and `SocketAddr` in no-std mode on Rust 1.77+ ([#&#8203;2816](https://redirect.github.com/serde-rs/serde/issues/2816), thanks [@&#8203;MathiasKoch](https://redirect.github.com/MathiasKoch))
-   Make `serde::ser::StdError` and `serde:🇩🇪:StdError` equivalent to `core::error::Error` on Rust 1.81+ ([#&#8203;2818](https://redirect.github.com/serde-rs/serde/issues/2818))

</details>

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

### [`v1.0.128`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.128)

[Compare Source](https://redirect.github.com/serde-rs/json/compare/1.0.127...1.0.128)

-   Support serializing maps containing 128-bit integer keys to serde_json::Value ([#&#8203;1188](https://redirect.github.com/serde-rs/json/issues/1188), thanks [@&#8203;Mrreadiness](https://redirect.github.com/Mrreadiness))

</details>

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

### [`v1.40.0`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.40.0): Tokio v1.40.0

[Compare Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0)

### 1.40.0 (August 30th, 2024)

##### Added

-   io: add `util::SimplexStream` ([#&#8203;6589])
-   process: stabilize `Command::process_group` ([#&#8203;6731])
-   sync: add `{TrySendError,SendTimeoutError}::into_inner` ([#&#8203;6755])
-   task: add `JoinSet::join_all` ([#&#8203;6784])

##### Added (unstable)

-   runtime: add `Builder::{on_task_spawn, on_task_terminate}` ([#&#8203;6742])

##### Changed

-   io: use vectored io for `write_all_buf` when possible ([#&#8203;6724])
-   runtime: prevent niche-optimization to avoid triggering miri ([#&#8203;6744])
-   sync: mark mpsc types as `UnwindSafe` ([#&#8203;6783])
-   sync,time: make `Sleep` and `BatchSemaphore` instrumentation explicit roots ([#&#8203;6727])
-   task: use `NonZeroU64` for `task::Id` ([#&#8203;6733])
-   task: include panic message when printing `JoinError` ([#&#8203;6753])
-   task: add `#[must_use]` to `JoinHandle::abort_handle` ([#&#8203;6762])
-   time: eliminate timer wheel allocations ([#&#8203;6779])

##### Documented

-   docs: clarify that `[build]` section doesn't go in Cargo.toml ([#&#8203;6728])
-   io: clarify zero remaining capacity case ([#&#8203;6790])
-   macros: improve documentation for `select!` ([#&#8203;6774])
-   sync: document mpsc channel allocation behavior ([#&#8203;6773])

[#&#8203;6589]: https://redirect.github.com/tokio-rs/tokio/pull/6589

[#&#8203;6724]: https://redirect.github.com/tokio-rs/tokio/pull/6724

[#&#8203;6727]: https://redirect.github.com/tokio-rs/tokio/pull/6727

[#&#8203;6728]: https://redirect.github.com/tokio-rs/tokio/pull/6728

[#&#8203;6731]: https://redirect.github.com/tokio-rs/tokio/pull/6731

[#&#8203;6733]: https://redirect.github.com/tokio-rs/tokio/pull/6733

[#&#8203;6742]: https://redirect.github.com/tokio-rs/tokio/pull/6742

[#&#8203;6744]: https://redirect.github.com/tokio-rs/tokio/pull/6744

[#&#8203;6753]: https://redirect.github.com/tokio-rs/tokio/pull/6753

[#&#8203;6755]: https://redirect.github.com/tokio-rs/tokio/pull/6755

[#&#8203;6762]: https://redirect.github.com/tokio-rs/tokio/pull/6762

[#&#8203;6773]: https://redirect.github.com/tokio-rs/tokio/pull/6773

[#&#8203;6774]: https://redirect.github.com/tokio-rs/tokio/pull/6774

[#&#8203;6779]: https://redirect.github.com/tokio-rs/tokio/pull/6779

[#&#8203;6783]: https://redirect.github.com/tokio-rs/tokio/pull/6783

[#&#8203;6784]: https://redirect.github.com/tokio-rs/tokio/pull/6784

[#&#8203;6790]: https://redirect.github.com/tokio-rs/tokio/pull/6790

</details>

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

### [`v0.1.14`](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

[Compare Source](https://redirect.github.com/unicode-rs/unicode-width/compare/v0.1.13...v0.1.14)

</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 is behind base branch, or you tick the rebase/retry checkbox.

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

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2024-09-20 02:15:51 +00:00
.cargo chore(dprint): format toml files (#5599) 2024-09-08 14:26:16 +08:00
.github chore(wasm/parser): remove wasm-pack dependency (#5777) 2024-09-15 11:27:48 +08:00
.vscode chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
apps/oxlint release(oxlint): v0.9.6 (#5843) 2024-09-18 12:02:09 +08:00
crates fix(transformer): fix reference flags in logical assignment operator transform (#5903) 2024-09-20 01:26:55 +00:00
editors release(oxlint): v0.9.6 (#5843) 2024-09-18 12:02:09 +08:00
napi feat(isolated_declarations): add stripInternal (#5878) 2024-09-19 23:14:47 +08:00
npm release(oxlint): v0.9.6 (#5843) 2024-09-18 12:02:09 +08:00
tasks fix(transformer): fix reference flags in logical assignment operator transform (#5903) 2024-09-20 01:26:55 +00:00
wasm/parser chore(wasm/parser): remove wasm-pack dependency (#5777) 2024-09-15 11:27:48 +08:00
.clippy.toml chore(clippy): fix typo (#5700) 2024-09-11 19:42:41 +08:00
.editorconfig chore: remove trailing whitespaces for all files; add .editorconfig (#3639) 2024-06-12 15:47:26 +08:00
.git-blame-ignore-revs chore: update .git-blame-ignore-revs 2023-07-28 13:57:29 +08:00
.gitignore chore: add dprint 2024-09-08 13:24:58 +08:00
.ignore chore: add just watch command for overcoming cargo-watch being slow 2023-05-16 13:22:42 +08:00
.node-version chore: bump node to v22.7.0 (#5388) 2024-09-01 21:52:01 +08:00
.rustfmt.toml chore: move rustfmt.toml -> .rustfmt.toml 2024-05-12 13:14:50 +08:00
.typos.toml chore(dprint): format toml files (#5599) 2024-09-08 14:26:16 +08:00
Cargo.lock perf(linter): use aho-corasick instead of regex for string matching in jsx-a11y/img-redundant-alt (#5892) 2024-09-19 22:40:01 +00:00
Cargo.toml chore(deps): update rust crates (#5899) 2024-09-20 02:15:51 +00:00
CHANGELOG.md chore: update CHANGELOG.md 2024-06-06 20:24:19 +08:00
cliff.toml chore: cliff.toml features_always_bump_minor = false 2024-06-14 14:42:20 +08:00
CONTRIBUTING.md chore: change website url to https://oxc.rs 2024-06-05 22:05:08 +08:00
Cross.toml chore: format Cross.toml 2024-09-06 18:51:08 +08:00
deny.toml chore(dprint): format toml files (#5599) 2024-09-08 14:26:16 +08:00
dprint.json chore: fix package.json EOL 2024-09-13 22:51:33 +08:00
justfile chore(justfile): add just watch-oxlint 2024-09-09 16:57:51 +08:00
LICENSE Change license holder to @boshen 2023-11-10 14:26:11 +08:00
MAINTENANCE.md chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
oxc_release.toml chore: add scopes_for_breaking_change to oxc_release.toml 2024-08-29 11:02:48 +08:00
package.json build: use pnpm catalog 2024-09-07 13:15:43 +08:00
pnpm-lock.yaml chore(wasm/parser): remove wasm-pack dependency (#5777) 2024-09-15 11:27:48 +08:00
pnpm-workspace.yaml build: use pnpm catalog 2024-09-07 13:15:43 +08:00
README.md chore(README): change quick-lint-js website link to github 2024-09-20 09:25:37 +08:00
rust-toolchain.toml chore(deps): update dependency rust to v1.81.0 (#5502) 2024-09-05 16:57:47 +00:00
THIRD-PARTY-LICENSE chore(index): fork index_vec crate. (#3092) 2024-04-25 06:09:53 +00:00

OXC Logo

MIT licensed Build Status Code Coverage CodSpeed Badge Sponsors

Discord chat Playground Website

Oxc

The Oxidation Compiler is creating a collection of high-performance tools for JavaScript and TypeScript.

Oxc is building a parser, linter, formatter, transformer, minifier, resolver ... all written in Rust.

See more at oxc.rs!

🙋Who's using Oxc?

Linter Quick Start

The linter is ready to catch mistakes for you. It comes with 93 rules turned on by default (out of 400+ in total) and no configuration is required.

To get started, run oxlint or via npx:

npx oxlint@latest

To give you an idea of its capabilities, here is an example from the vscode repository, which finishes linting 4800+ files in 0.7 seconds.

Performance

  • The parser aims to be the fastest Rust-based ready-for-production parser.
  • The linter is more than 50 times faster than ESLint, and scales with the number of CPU cores.

⌨️ Rust, Node.js and Wasm Usage

Rust

Individual crates are published, you may use them to build your own JavaScript tools.

  • The umbrella crate oxc exports all public crates from this repository.
  • The AST and parser crates oxc_ast and oxc_parser are production ready.
  • The resolver crate oxc_resolver for module resolution is also production ready.
  • Example usages of these crates can be found in their respective crates/*/examples directory.

While Rust has gained a reputation for its comparatively slower compilation speed, we have dedicated significant effort to fine-tune the Rust compilation speed. Our aim is to minimize any impact on your development workflow, ensuring that developing your own Oxc based tools remains a smooth and efficient experience.

This is demonstrated by our CI runs, where warm runs complete in 3 minutes.

Node.js

Wasm


🎯 Tools

🔸 AST and Parser

Oxc maintains its own AST and parser, which is by far the fastest and most conformant JavaScript and TypeScript (including JSX and TSX) parser written in Rust.

As the parser often represents a key performance bottleneck in JavaScript tooling, any minor improvements can have a cascading effect on our downstream tools. By developing our parser, we have the opportunity to explore and implement well-researched performance techniques.

While many existing JavaScript tools rely on estree as their AST specification, a notable drawback is its abundance of ambiguous nodes. This ambiguity often leads to confusion during development with estree.

The Oxc AST differs slightly from the estree AST by removing ambiguous nodes and introducing distinct types. For example, instead of using a generic estree Identifier, the Oxc AST provides specific types such as BindingIdentifier, IdentifierReference, and IdentifierName. This clear distinction greatly enhances the development experience by aligning more closely with the ECMAScript specification.

🏆 Parser Performance

Our benchmark reveals that the Oxc parser surpasses the speed of the swc parser by approximately 3 times and the Biome parser by 5 times.

How is it so fast?
  • AST is allocated in a memory arena (bumpalo) for fast AST memory allocation and deallocation.
  • Short strings are inlined by CompactString.
  • No other heap allocations are done except the above two.
  • Scope binding, symbol resolution and some syntax errors are not done in the parser, they are delegated to the semantic analyzer.

🔸 Linter

The linter embraces convention over configuration, eliminating the need for extensive configuration and plugin setup. Unlike other linters like ESLint, which often require intricate configurations and plugin installations (e.g. @typescript-eslint), our linter only requires a single command that you can immediately run on your codebase:

npx oxlint@latest

🏆 Linter Performance

The linter is 50 - 100 times faster than ESLint depending on the number of rules and number of CPU cores used. It completes in less than a second for most codebases with a few hundred files and completes in a few seconds for larger monorepos. See bench-javascript-linter for details.

As an upside, the binary is approximately 5MB, whereas ESLint and its associated plugin dependencies can easily exceed 100.

You may also download the linter binary from the latest release tag as a standalone binary, this lets you run the linter without a Node.js installation in your CI.

How is it so fast?
  • Oxc parser is used.
  • AST visit is a fast operation due to linear memory scan from the memory arena.
  • Files are linted in a multi-threaded environment, so scales with the total number of CPU cores.
  • Every single lint rule is tuned for performance.

🔸 Resolver

Module resolution plays a crucial role in JavaScript tooling, especially for tasks like multi-file analysis or bundling. However, it can often become a performance bottleneck. To address this, we developed oxc_resolver.

The resolver is production-ready and is currently being used in Rolldown. Usage and examples can be found in its own repository.

🔸 Transformer

A transformer is responsible for turning higher versions of ECMAScript to a lower version that can be used in older browsers.

TypeScript and React transforms are complete. See Milestone 2 for current goals.

oxc-transform can be used for experimentation.

🔸 Isolated Declarations

TypeScript Isolated Declarations Emit without using the TypeScript compiler.

Our benchmark indications that our implementation is at least 20 times faster than the TypeScript compiler.

The npm package or crate can be used for this task.

🔸 Minifier

JavaScript minification plays a crucial role in optimizing website performance as it reduces the amount of data sent to users, resulting in faster page loads. This holds tremendous economic value, particularly for e-commerce websites, where every second can equate to millions of dollars.

However, existing minifiers typically require a trade-off between compression quality and speed. You have to choose between the slowest for the best compression or the fastest for less compression. But what if we could develop a faster minifier without compromising on compression?

We are actively working on a prototype that aims to achieve this goal, by porting all test cases from well-known minifiers such as google-closure-compiler, terser, esbuild, and tdewolff-minify.

Preliminary results indicate that we are on track to achieve our objectives. With the Oxc minifier, you can expect faster minification times without sacrificing compression quality.

🔸 Formatter

While prettier has established itself as the de facto code formatter for JavaScript, there is a significant demand in the developer community for a less opinionated alternative. Recognizing this need, our ambition is to undertake research and development to create a new JavaScript formatter that offers increased flexibility and customization options.

The prototype is currently work in progress.


🧪Test Infrastructure

In Oxc, correctness and reliability are taken extremely seriously.

We spend half of our time on strengthening the test infrastructure to prevent problems from propagating to downstream tools.

Test Infrastructure documents our test procedures:

  • Conformance suite on Test262, Babel, TypeScript
  • Lots of fuzzing
  • Linter snapshot diagnostics
  • oxlint ecosystem ci
  • Idempotency testing
  • Code coverage
  • End to end 3000 top npm packages

✍️ Contribute

See CONTRIBUTING.md for guidance.

Check out some of the good first issues or ask us on Discord.

If you are unable to contribute by code, you can still participate by:

📚 Learning Resources

🤝 Credits

This project was incubated with the assistance of these exceptional mentors and their projects:

Special thanks go to

❤ Who's Sponsoring Oxc?

My sponsors

📖 License

Oxc is free and open-source software licensed under the MIT License.

Oxc ports or copies code from other open source projects, their licenses are listed in Third-party library licenses.