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

@match-kit/decomp-yaml

v0.1.0

Published

Read a project's decomp.yaml (the decomp_settings format), checked against the spec, and each tool's block with a Standard Schema

Downloads

217

Readme

@match-kit/decomp-yaml

Read a project's decomp.yaml, the decomp_settings format that matching-decompilation tools share, checked against its spec. Read your tool's block with your own Standard Schema (zod, valibot, ArkType, …).

npm install @match-kit/decomp-yaml

Read a project's decomp.yaml

import { toolBlock } from '@match-kit/decomp-yaml';
import { loadDecompYaml, searchDecompYaml } from '@match-kit/decomp-yaml/files';
import * as z from 'zod';

const loaded = searchDecompYaml(); // { path, dir, config }, or null when there is none
loaded?.config.platform; // 'gba'

const MyTool = z.strictObject({ compiler: z.string().optional(), jobs: z.number().int().optional() });
const settings = toolBlock(loaded, 'mytool', MyTool); // { compiler?, jobs? }, or undefined
  • searchDecompYaml(from?) reads the nearest decomp.yaml from from (default: the working directory) up to the root, trying decomp.yaml before decomp.yml in each directory, or returns null.
  • loadDecompYaml(path) reads the file at path, and a missing one throws.
  • @match-kit/decomp-yaml/files needs Node or Bun. In a browser, use parseDecompYaml(text, path?).

Your tool's block

toolBlock(loaded, tool, schema) validates tools.<tool> with schema and returns the schema's output, so defaults and transforms apply. It returns undefined when there is no config or no block for the tool.

The schema decides what the block may hold: z.strictObject refuses unknown keys, such as a typo, and z.object drops them. The schema must validate synchronously.

The format

SPEC.md specifies decomp.yaml as decomp_settings 0.0.10 declares it, and schema.json is the same specification as a JSON Schema, also exported as @match-kit/decomp-yaml/schema.json. To check a file in your editor, start it with:

# yaml-language-server: $schema=https://cdn.jsdelivr.net/npm/@match-kit/decomp-yaml/schema.json