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

@vizij/node-graph-authoring

v0.1.0

Published

Authoring-time graph builder utilities for Vizij node graphs.

Readme

@vizij/node-graph-authoring

Authoring-time helpers for constructing Vizij graph specifications. The package houses the binding state utilities, expression parser, and graph builder previously embedded in the Vizij authoring app.

Highlights

  • Binding slots now carry an explicit valueType ("scalar" or "vector") so downstream tooling can reason about component width, enforce slot defaults, and persist vector-aware bindings.
  • The expression parser understands comparison and boolean operators (>, <, ==, !=, &&, ||, !) and maps them through shared metadata to the appropriate logic nodes.
  • Graph summaries surface the slot valueType, making it easier to audit vector wiring in generated specs.

IR Inspection

Use the bundled vizij-ir-report CLI whenever you need to peek at or diff the metadata-annotated IR graph for a set of bindings—no GraphSpec export required. The tool rebuilds the IR via buildRigGraphSpec, emits a normalized machine-readable dump (including registry annotations under irGraph.nodes[].annotations.registry), and can compare dumps for CI/regression guards.

# From either vizij-web or vizij-rs worktrees
pnpm --filter @vizij/node-graph-authoring exec vizij-ir-report \
  --input path/to/buildGraphOptions.json \
  --dump ./artifacts/robot-face.ir.json

# Compare against a baseline dump and surface structured differences
pnpm --filter @vizij/node-graph-authoring exec vizij-ir-report \
  --input path/to/buildGraphOptions.json \
  --diff ./artifacts/baseline.ir.json \
  --diff-limit 200

Input files follow the BuildGraphOptions shape (face id, component definitions, binding map, inputs, and optional inputMetadata). The CLI accepts --dump -/--diff - for piping reports between tools, and exits with 1 when a diff finds mismatches—perfect for vizij-web parity tests or vizij-rs metadata checks.

Need the inspection data inside your own scripts? Import the new helpers directly:

import {
  buildMachineReport,
  diffMachineReports,
} from "@vizij/node-graph-authoring";

const report = buildMachineReport(buildRigGraphSpec(options));
const result = diffMachineReports(report, baselineReport);

The normalized report mirrors the CLI output, so the same metadata-rich payloads can back snapshots, drift detection, or custom dashboards.

Development

pnpm install
pnpm --filter @vizij/node-graph-authoring test

ℹ️ Always run the suite through the CLI (pnpm --filter @vizij/node-graph-authoring test or pnpm test from this package). Vitest 3.2.x currently crashes with TypeError: filters.map is not a function when invoked via startVitest('run', …) or other direct programmatic hooks, so avoid those entry points until the upstream fix lands.

Updating IR parity fixtures

Whenever buildRigGraphSpec changes the emitted GraphSpec shape, refresh the frozen fixtures that drive src/__tests__/irParity.test.ts:

  1. Build the package so the script can import the latest graph builder:

    pnpm --filter @vizij/node-graph-authoring build
  2. Generate the updated fixture blobs (derived inputs, reserved-variable binding, vector bindings). The easiest way is to run a small Node snippet from the monorepo root and paste the resulting JSON back into src/__tests__/__fixtures__/graphSpecParity.ts:

    node <<'NODE'
    import {
      buildRigGraphSpec,
      createDefaultBinding,
      createDefaultParentBinding,
      addBindingSlot,
      bindingTargetFromInput,
      updateBindingWithInput,
      updateBindingExpression,
    } from "./packages/@vizij/node-graph-authoring/dist/index.js";
    import { SELF_BINDING_ID } from "@vizij/utils";
    // ...construct bindings/tests exactly as in irParity.test.ts...
    // console.log(JSON for each fixture)
    NODE

    (Copy the constructor logic directly from irParity.test.ts so the fixture inputs stay in sync; the snippet can simply console.log(JSON.stringify({derived, reserved, vector}, null, 2)) and you can paste the values back into the fixture file.)

  3. Update the inline snapshot in the “stacked operators” test if it changes:

    pnpm --filter @vizij/node-graph-authoring vitest run src/__tests__/irParity.test.ts --update

These three steps keep graphSpecParity.ts and the inline snapshot matched to the canonical GraphSpec layout, preventing future regressions from slipping through unnoticed.

Build

pnpm --filter @vizij/node-graph-authoring build