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

semantic-change-tracker

v0.3.0

Published

Experimental CLI tool that analyzes Git code changes to help engineers understand potential risks

Readme

Semantic Change Tracker (SCT)

Version 0.x (Experimental)

An experimental CLI tool that analyzes Git code changes to help engineers quickly understand potential risks in TypeScript/JavaScript codebases.

⚠️ This is an early-stage experimental tool. Output requires human interpretation and should not replace engineering judgment.

What This Tool Is

SCT reads git diff, parses TypeScript/JavaScript AST structures, and applies rule-based heuristics to identify:

  • Changes to exported functions (potential API surface changes)
  • Changes to control flow or return logic (potential behavior changes)
  • Functions modified without corresponding test updates

What This Tool Is NOT

  • Not a linter — Does not enforce code style or quality standards
  • Not a gatekeeper — Should not be used to block commits or deployments
  • Not a CI blocker — Output is advisory, not prescriptive
  • Not guaranteed correct — Heuristic-based analysis may produce false positives or miss changes
  • Not a replacement for code review — Human engineering judgment is required

Version Status

This tool is version 0.x and is under active development:

  • APIs, output format, and behavior may change without notice
  • Backward compatibility is not guaranteed
  • Configuration schema may evolve

Installation

npm install
npm run build
npm link  # Optional: to use `sct` globally

Requirements:

  • Node.js ≥ 18
  • Git repository
  • TypeScript/JavaScript codebase

Usage

Initialize Configuration

sct init

This creates a basic sct.config.json file.

Analyze Changes

sct analyze

Outputs a JSON object to stdout with detected changes and estimated risk level.

Output Structure (Example)

{
  "changeType": "ApiChange",
  "behaviorChanged": true,
  "riskLevel": "High",
  "reasons": [
    "Return behavior of HTTP methods 'get', 'post' changed",
    "No test changes detected for 'get', 'post'"
  ],
  "touchedFunctions": ["get", "post"],
  "suggestedTests": [
    "No test updates detected for API surface changes ('get', 'post')"
  ]
}

Fields:

  • changeType — Detected change category (ApiChange, BehaviorChange, Refactor)
  • behaviorChanged — Boolean indicating potential behavior modification
  • riskLevel — Heuristic risk assessment (Low, Medium, High)
  • reasons — List of detected change patterns
  • touchedFunctions — Functions modified in the diff
  • suggestedTests — Advisory test suggestions (may be empty)

Configuration (Optional)

Basic sct.config.json:

{
  "languages": ["ts", "js"],
  "exclude": ["**/*.spec.ts", "**/*.test.ts"],
  "domains": {
    "Order": ["order", "checkout"]
  }
}

How It Works

  1. Reads git diff HEAD to find changed files
  2. Parses TypeScript AST for function signatures, control flow, and export status
  3. Compares before/after AST structures
  4. Applies rule-based heuristics to classify changes
  5. Aggregates similar changes and assigns risk scores

Detection rules are deterministic and AST-based. No AI or network calls are made.

Limitations

  • Only supports TypeScript and JavaScript
  • Only analyzes function-level changes (does not track variable usage, call graphs, etc.)
  • Export detection may be incomplete for complex module patterns
  • Risk scoring is heuristic-based and may not align with actual project risk
  • No analysis of runtime behavior or type-checking correctness

License

MIT