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

@astra-spec/sdk

v0.1.2

Published

TypeScript SDK for validating ASTRA projects and opening them as resolved data.

Readme

ASTRA TypeScript SDK

Native TypeScript validation, resolution, and provenance checking for ASTRA 0.1. The SDK is published as @astra-spec/sdk. This branch prepares 0.2.0-rc.1; pre-0.1 analyses and the SDK's former recursive model are unsupported.

The implementation is independent of Python. Python is used only by the explicit conformance job to compare results against the pinned astra-tools reference.

Node workflows

Node.js 20+ and Git are required for repository-backed workflows.

import { validate, resolve, status, readResult } from "@astra-spec/sdk/node";
import { indexResolvedAnalysis, selectResult } from "@astra-spec/sdk";

const validation = await validate("/path/to/analysis");
if (!validation.valid) console.error(validation.diagnostics);

const analysis = await resolve("/path/to/analysis", { offline: true });
const index = indexResolvedAnalysis(analysis);
const result = selectResult(index, "outputs.fit", "universes.baseline");
const report = await status("/path/to/analysis", { offline: true });
if (result) {
  console.log(report.statuses[result.id]);
  const bytes = await readResult("/path/to/analysis", result.id, { offline: true });
}

A path names the folder containing astra.yaml; the current folder is the default. resolve and status validate internally and throw InvalidAnalysisError carrying its report when a MUST rule is broken. Missing analyses and Git/cache failures have distinct error classes. Recipes are never executed.

One public report contract

Types and JSON match astra-tools: snake_case fields, omitted optional values, explicit empty collections, and fixed report-format versions. ResolvedAnalysis contains the declaration graph and all planned results across universes. StatusReport separates provenance state from byte availability. A result's owner can differ from its output's declaring analysis.

import { parseResolvedAnalysis, indexResolvedAnalysis } from "@astra-spec/sdk/reports";
const analysis = parseResolvedAnalysis(JSON.parse(serializedReport));
const index = indexResolvedAnalysis(analysis);

The root entry point exports report types, decoders, selectors, and host-neutral workflows. /reports provides report-only access; /resolver exposes workflows for an injected AnalysisSource. /node supplies filesystem/Git access. Browser hosts can implement SourceProvider without a Python service.

Numbers use JavaScript number. Integer values beyond Number.MAX_SAFE_INTEGER can lose precision, as with JSON.parse; no bigint or string representation is introduced into the shared JSON contract.

See the API, validation, resolution/status, source interfaces, and report contract guides.

Development and conformance

git clone --recurse-submodules https://github.com/astra-project/astra-typescript.git
cd astra-typescript
npm ci
npm run reports:check
npm run spec:check
npm run typecheck
npm test
npm run test:reports:package
npm pack

For an existing checkout, initialize both pinned sources with git submodule update --init. Generated runtime schema data is committed; the npm tarball excludes both upstream repositories.

Git dependencies build through prepare using the committed schema data, so consumers can pin an SDK commit before its npm release. Source conformance and release packaging still check both initialized upstream repositories.

Normal tests run without Python. The full spec analysis suite, document fixtures, portable report goldens, Git/source tests, and status transitions run in Node. The separate differential check requires an environment with the pinned Python reference (astra-tools 0.3.0rc3) installed:

uv sync --frozen --project upstream/astra-tools
ASTRA_PYTHON="$PWD/upstream/astra-tools/.venv/bin/python" npm run test:conformance

It compares validation diagnostics and resolved/status data against Python on the same temporary repositories. Human diagnostic wording and diagnostic ordering are normalized; semantically ordered arrays and report contents are retained. It also reuses the pinned Python resolution, switch, and status scenarios, comparing their public reports with the built TypeScript SDK. Those scenarios read fixtures from the pinned spec submodule rather than a downloaded archive.

To review this candidate before publication, install the tarball produced by npm pack into a separate project. No package is published by these commands.

BSD-3-Clause. See LICENSE.