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

@essence-lang/ariadne

v0.2.0

Published

A TypeScript port of the ariadne diagnostic renderer.

Readme

Ariadne (TypeScript port)

A TypeScript port of ariadne, a fancy compiler diagnostics & error reporting crate for Rust by Joshua Barretto, licensed under MIT. The renderer is a statement-by-statement port of upstream src/report/write.rs and is verified against the upstream snapshot test suite (see report.spec.ts).

Error: can't compare apples with oranges
   ╭─┤ <unknown>:1:1 │
   │
 1 │ apple == orange;
   │ ──┬──    ───┬──
   │   ╰─────────│──── This is an apple
   │             │
   │             ╰──── This is an orange
───╯

Usage

import { Config, Label, Report } from "@essence-lang/ariadne"

let report = new Report({
	kind: "error",
	span: { start: 0, end: 0 },
	code: "E03",
	message: "can't compare apples with oranges",
	labels: [
		new Label({ start: 0, end: 5 }, { message: "This is an apple" }),
		new Label({ start: 9, end: 15 }, { message: "This is an orange" }),
	],
	helps: ["have you tried peeling the orange?"],
})

console.log(report.render("apple == orange;"))

A code is optional; when given it is printed on its own line above the header, in the same color as Note and Help.

Report.render accepts a plain string, a Source, or — for reports whose labels point into multiple sources — a Cache (see sources()). Labels can be colored individually (ColorGenerator produces distinct colors), ordered, prioritised, and span multiple lines; see LabelOptions and ConfigOptions for everything that can be tuned.

Differences from upstream

  • Span offsets are counted in Unicode code points (indexType: "char", the default) or UTF-16 code units (indexType: "utf16"), the JavaScript-native analog of upstream's byte spans.
  • The Report/Label/Config builders are replaced with options objects.
  • The unstable named-styles feature (Styleable/Config::styles) and the concolor/stream-detection integration are not ported. Terminal color support detection is the caller's responsibility (color: false disables styling, stripAnsi: true additionally strips codes embedded in messages).
  • A Report's code sits on its own line above the header, in the note color, rather than sharing the header line and the kind's color.
  • Character display widths use a compact approximation of the Unicode East-Asian-width tables rather than the full unicode-width data.

Package extraction

This directory is deliberately self-contained (no imports from the rest of the compiler, no external dependencies, no runtime-specific APIs) so it can be extracted into a standalone package by moving the folder and adding a package.json.