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

@driftabot/engine

v5.3.0

Published

API schema diff engine — detect breaking changes in OpenAPI, GraphQL, and gRPC schemas

Readme

@driftabot/engine

API schema diff engine — detect breaking changes in OpenAPI, GraphQL, and gRPC schemas.

Thin npm wrapper around the driftabot Go binary. On install, the correct pre-built binary for your platform is downloaded automatically.

Installation

npm install @driftabot/engine

Requires Node.js ≥ 16. The binary is downloaded for your platform (macOS arm64/amd64, Linux arm64/amd64, Windows amd64) during npm install.

CLI

After installing, the driftabot binary is available as an npm bin:

npx driftabot --help

OpenAPI

driftabot openapi --base old.yaml --head new.yaml
driftabot openapi --base old.yaml --head new.yaml --format json
driftabot openapi --base old.yaml --head new.yaml --fail-on-breaking

GraphQL

driftabot graphql --base old.graphql --head new.graphql
driftabot graphql --base old.graphql --head new.graphql --format markdown

gRPC / Protobuf

driftabot grpc --base old.proto --head new.proto
driftabot grpc --base old.proto --head new.proto --format json

Impact analysis

Scan source code for references to each breaking change:

# From a saved diff JSON
driftabot openapi --base old.yaml --head new.yaml --format json > diff.json
driftabot impact --diff diff.json --scan ./src

# Pipe mode
driftabot openapi --base old.yaml --head new.yaml --format json \
  | driftabot impact --scan ./src

# Output as markdown
driftabot impact --diff diff.json --scan ./src --format markdown

# GitHub Actions annotations (::error / ::warning workflow commands)
driftabot impact --diff diff.json --scan ./src --format github

Node.js / TypeScript API

import { compareOpenAPI, compareGraphQL, compareGRPC, impact } from "@driftabot/engine";

// Diff two OpenAPI schemas
const result = compareOpenAPI("old.yaml", "new.yaml");
console.log(result.summary);
// { total: 3, breaking: 1, non_breaking: 2, info: 0 }

// Diff two GraphQL schemas
const gqlResult = compareGraphQL("old.graphql", "new.graphql");

// Diff two Protobuf schemas
const grpcResult = compareGRPC("old.proto", "new.proto");

// Scan source for references to breaking changes
const hits = impact(result, "./src");
// Returns Hit[] — file paths and line numbers that reference each breaking change

// Text, markdown, or GitHub Actions annotations
const report = impact(result, "./src", { format: "markdown" });
const ghAnnotations = impact(result, "./src", { format: "github" });

CommonJS

const { compareOpenAPI, impact } = require("@driftabot/engine");

TypeScript types

type Severity = "breaking" | "non-breaking" | "info";

interface Change {
  type: string;       // e.g. "endpoint_removed", "field_type_changed"
  severity: Severity;
  path: string;       // e.g. "/users/{id}"
  method: string;     // e.g. "DELETE"
  location: string;
  description: string;
  before?: string;
  after?: string;
}

interface Summary {
  total: number;
  breaking: number;
  non_breaking: number;
  info: number;
}

interface DiffResult {
  base_file: string;
  head_file: string;
  changes: Change[];
  summary: Summary;
}

interface Hit {
  file: string;
  line_num: number;
  line: string;
  change_type: string;  // e.g. "endpoint_removed"
  change_path: string;  // e.g. "DELETE /users/{id}"
}

interface ImpactOptions {
  format?: "text" | "json" | "markdown" | "github";
}

License

MIT