npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

prettier-oxc-parser

v0.2.0

Published

Use oxc as a Prettier parser for JavaScript and TypeScript.

Readme

prettier-oxc-parser npm

Use oxc as a Prettier parser for JavaScript and TypeScript.

Requires Prettier >= 3.6.2

Installation

$ npm install -D prettier-oxc-parser
$ yarn add -D prettier-oxc-parser
$ pnpm install -D prettier-oxc-parser
$ bun add -D prettier-oxc-parser

Add the plugin to your Prettier config:

{
  "plugins": ["prettier-oxc-parser"]
}

Why?

oxc is a fast, really fast. And with the addition of raw transfer, the cost of passing the AST from Rust to JavaScript is close to 0. Raw transfer is only available in Node >= 22.

While Prettier with this plugin is far from the performances of pure native formatters like Biome, it give a significant performance improvement for large TS projects while keeping one tool to format all files types.

Benchmark

For full benchmark results see benchmark/report.md or run it yourself with bun benchmark.

Keep in mind that the timing are for "parse + format". When using oxc as a parser, ~90% of the time is spent of the format part.

On this benchmark, this plugin is faster than @prettier/plugin-oxc because the official one is using the async API without raw transfer. Benchmarking in real conditions is needed to know which one is better.

An interesting thing is that you can get a part of the performance boost for TS files by using babel-ts via overrides.

Averages when running on Apple M1 Pro with node 24.3.

JS(X)

| File size | Small (1kb) | Medium (10kb) | Large (28kb) | | -------------------- | ----------- | ------------- | ------------ | | prettier-oxc-parser | 0.9 ms | 3.9 ms | 10.4 ms | | @prettier/plugin-oxc | 1.2 ms | 4.6 ms | 12.5 ms | | default | 1.0 ms | 3.9 ms | 11.0 ms |

TS(X)

| File size | Small (1kb) | Medium (7kb) | Large (40kb) | TS Compiler | | -------------------- | ----------- | ------------ | ------------ | ----------- | | prettier-oxc-parser | 0.7 ms | 3.8 ms | 18.4 ms | 737 ms | | @prettier/plugin-oxc | 0.9 ms | 5.3 ms | 31.5 ms | 1132 ms | | babel-ts | 0.8 ms | 4.3 ms | 20.6 ms | 848 ms | | default | 1.2 ms | 5.6 ms | 27.8 ms | 1093 ms |

Caveats

Flow inside .js files via @flow pragma is not supported.