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

@tomasko/xmlfmt

v0.1.4

Published

XML formatter — MoonBit port of python xmlformatter

Readme

xmlfmt (npm)

npm wrapper for xmlfmt — an XML formatter written in MoonBit.

pnpm install -g @tomasko/xmlfmt
xmlfmt --help
xmlfmt input.xml

How it works

The package itself contains only a small launcher. On install, install.js downloads the prebuilt xmlfmt binary for the current platform from GitHub Releases and writes it to bin/xmlfmt. The published bin entry (bin/xmlfmt.js) then spawns it, forwarding arguments, standard IO and the exit code.

The postinstall download is best-effort, and the launcher downloads the binary on first run if it is missing (for example when installing with --ignore-scripts, or when the release was not available yet).

Supported targets:

| Node platform-arch | Release asset | | -------------------- | ------------------- | | linux-x64 | xmlfmt-linux-x86_64 | | linux-arm64 | xmlfmt-linux-aarch64 | | darwin-arm64 | xmlfmt-darwin-aarch64 | | darwin-x64 | xmlfmt-darwin-x86_64 |

Assets are produced by .github/workflows/release.yml when a v* tag is pushed.

Install scripts are blocked by default

Recent npm (12+) and pnpm (10+) versions do not run a dependency's install scripts unless the package is approved, so postinstall is skipped and bin/xmlfmt is missing right after install:

npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts   @tomasko/[email protected] (postinstall: node install.js)
xmlfmt: native binary not found at .../node_modules/@tomasko/xmlfmt/bin/xmlfmt

Nothing is broken: bin/xmlfmt.js downloads the binary on first run. To have it downloaded at install time instead, approve the build once:

npm install-scripts approve @tomasko/xmlfmt   # npm 12+ (writes `allowScripts`)
pnpm approve-builds                       # pnpm 10+

Either way, re-run the download manually with:

npm rebuild @tomasko/xmlfmt
# or
pnpm rebuild @tomasko/xmlfmt

Overrides

| Variable | Purpose | | -------------------- | ------------------------------------------------ | | XMLFMT_REPO | owner/repo to download from | | XMLFMT_VERSION | release version to download | | XMLFMT_DOWNLOAD_BASE | full base URL (mirror), e.g. https://host/assets | | XMLFMT_FORCE_DOWNLOAD | re-download even if the binary is present | | XMLFMT_SKIP_DOWNLOAD | skip the download entirely |

Publishing

From this directory:

npm publish --access public
# or
pnpm publish --access public

--access public is required for scoped packages such as @tomasko/xmlfmt. Change name, repository and homepage in package.json first if you publish under a different scope or repository.