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

@madenowhere/phaze-check

v0.0.1

Published

Headless type-checker for projects using .phaze files. Wraps @volar/typescript's runTsc with @madenowhere/phaze-language-tools' string-keyed LanguagePlugin so every tsc CLI flag passes through (--noEmit, --watch, --project). Same pattern as vue-tsc / svel

Readme

@madenowhere/phaze-check

Headless type-checker for projects using .phaze files. Wraps the real TypeScript compiler with the same Volar LanguagePlugin the VSCode extension uses, so every tsc flag passes through and .phaze errors land at the right line.

pnpm add -D @madenowhere/phaze-check
pnpm exec phaze-check --noEmit

What it does

phaze-check runs tsc against your project with two patches applied:

  1. .phaze is registered as a script extension TypeScript recognises.
  2. Each .phaze file is parsed through @madenowhere/phaze-compile's format transform to produce a virtual .tsx + a v3 sourcemap, and the TS service drives type-checking against the virtual code. Diagnostics are routed back through the sourcemap to .phaze lines.

Same pattern as vue-tsc, svelte-check, astro check — built on the @volar/typescript runTsc helper.

Why a separate tool from tsc

tsc doesn't know .phaze files exist. Without phaze-check:

  • tsc --noEmit skips every .phaze file (extension not recognised), so CI never catches type errors in pages written as .phaze.
  • Adding .phaze to tsconfig.json's include produces a "File '…' has an unsupported extension" error.

phaze-check is the bridge — it teaches tsc about .phaze and runs the same checker over the synthesised .tsx so type errors are caught exactly as they would be in handwritten .tsx.

Usage

Drop-in replacement for tsc --noEmit in CI:

// package.json
{
  "scripts": {
    "check": "phaze-check --noEmit"
  }
}

All tsc flags work:

pnpm exec phaze-check --noEmit
pnpm exec phaze-check --noEmit --watch
pnpm exec phaze-check --project tsconfig.app.json
pnpm exec phaze-check --noEmit --noUnusedLocals

(The bin passes process.argv straight through to tsc.)

What it doesn't do

  • No autofix. Same scope as tsc — report errors, exit non-zero.
  • No formatting. Use Prettier (or a future Phaze formatter — out of scope here).
  • No phaze-compile diagnostics. Parse / fence-shape errors surface at build time via the Vite plugin's code-frame overlay. phaze-check is type-error-only.

Architecture

                phaze-check  (bin/phaze-check.js)
                       │
                       ▼
                   src/run.ts
                       │
        ┌──────────────┴──────────────┐
        ▼                             ▼
@volar/typescript            @madenowhere/phaze-
   .runTsc(tscPath,            language-tools
            ['.phaze'],            .getPhazeLanguage
            () => [plugin])          PluginForTsc()
        │                             │
        └──────────────┬──────────────┘
                       ▼
            patched real `tsc.js`
            (TypeScript compiler — your project's version)
                       │
                       ▼
            exit 0 (no errors) or 1 (errors found)

The patching is a one-shot rewrite of tsc.js's source as it loads: runTsc intercepts fs.readFileSync for the tsc path, splices in the extra extension + proxyCreateProgram call, then requires the patched source. The original tsc binary on disk is never modified.

Files

| Path | Role | |---|---| | package.json | Bin (phaze-check), dep on @madenowhere/phaze-language-tools + @volar/typescript. | | bin/phaze-check.js | Executable. Imports runPhazeCheck from dist/run.js. | | src/run.ts | Wraps runTsc with the string-keyed LanguagePlugin. | | src/index.ts | Re-exports runPhazeCheck for programmatic embed. |

Related