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

@m0saic/dsl-visual-tests

v1.0.0

Published

Visual golden tests and reusable test harness for the m0 DSL

Readme

dsl-visual-tests

Visual golden tests for @m0saic/dsl-stdlib.

These tests render m0 strings to wireframe PNGs and compare them against committed goldens. Each golden also has a sibling .m0 file so the underlying geometry can be inspected directly.

Purpose

  • Validate geometry correctness, not styling
  • Lock down layout invariants across stdlib helpers
  • Provide human- and AI-readable artifacts (.png + .m0)

Structure

Tests are organized by feature area:

  • grid/
  • strip/
  • split/
  • measureSplit/
  • overlay/
  • edgeCases/
  • replace/
  • swap/

Each folder contains:

  • *.goldens.test.ts
  • __goldens__/ (PNG + .m0 pairs)

How it works

Each test:

  1. Builds a DSL string using stdlib helpers
  2. Serializes to a deterministic .m0 file (includes # size: WxH)
  3. Renders a wireframe PNG via the m0saic CLI
  4. Compares against the committed golden

Running tests

Verify mode (default):

npm test -- --testPathPattern dsl-visual-tests

Update goldens:

M0SAIC_UPDATE_GOLDENS=1 npm test -- --testPathPattern dsl-visual-tests

Verbose output:

M0SAIC_GOLDEN_VERBOSE=1 npm test -- --testPathPattern dsl-visual-tests

Philosophy

  • PNG = visual truth
  • .m0 = geometric truth
  • Input string = “before”
  • Golden = “after”

These tests are intentionally minimal and high-signal.
Not all helpers require visual coverage—some are better validated via unit tests.


License

Licensed under the Apache License, Version 2.0.
See LICENSE and NOTICE.