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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@baseline-suite/cli

v1.0.5

Published

Command-line interface for Baseline compatibility checking

Readme

@baseline-suite/cli

Command-line interface for Baseline web feature compatibility checking.

Installation

# Global installation
npm install -g @baseline-suite/cli

# Or use with npx
npx @baseline-suite/cli scan

Usage

Scan Command

Scan files for baseline compatibility issues:

# Scan current directory
baseline scan

# Scan specific files or directories
baseline scan src/ lib/

# Specify target year
baseline scan --year 2022

# Allow newly available features
baseline scan --allow-newly

# Output as JSON
baseline scan --format json

# Save to file
baseline scan --output report.json --format json

# SARIF format (for GitHub Code Scanning)
baseline scan --format sarif --output results.sarif

Options:

  • -y, --year <year> - Target baseline year (default: 2023)
  • --allow-newly - Allow newly available features
  • --allow-limited - Allow features with limited support
  • -f, --format <format> - Output format: json, pretty, or sarif (default: pretty)
  • -o, --output <file> - Output file (default: stdout)
  • --ignore <patterns...> - Patterns to ignore

Report Command

Generate a detailed compatibility report:

# Generate HTML report
baseline report

# Generate as JSON
baseline report --format json --output report.json

# Generate as Markdown
baseline report --format markdown --output REPORT.md

# Specify target year
baseline report --year 2020

Options:

  • -y, --year <year> - Target baseline year (default: 2023)
  • -f, --format <format> - Output format: html, json, or markdown (default: html)
  • -o, --output <file> - Output file (default: ./baseline-report.html)

Output Formats

Pretty (Default)

Human-readable console output with colors:

📊 Baseline Compatibility Report

Files scanned: 10
Files with issues: 3
Total violations: 7

src/app.js

  ❌ 2 error(s)
    5:12 navigator.share is newly available (since 2023)
      💡 Add feature detection or use a polyfill

  Compatibility Score: 85%

JSON

Structured JSON for programmatic use:

{
  "version": "1.0.0",
  "timestamp": "2025-10-04T05:00:00.000Z",
  "summary": {
    "totalFiles": 10,
    "filesWithIssues": 3,
    "totalViolations": 7
  },
  "results": [...]
}

SARIF

Static Analysis Results Interchange Format - compatible with GitHub Code Scanning:

{
  "version": "2.1.0",
  "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
  "runs": [...]
}

HTML Report

Beautiful, interactive HTML report with charts and detailed analysis.

Markdown Report

Markdown format suitable for documentation or README files.

Examples

CI/CD Integration

# .github/workflows/baseline.yml
name: Baseline Check
on: [push, pull_request]

jobs:
  baseline:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
      - run: npm install -g @baseline-suite/cli
      - run: baseline scan --format sarif --output results.sarif
      - uses: github/codeql-action/upload-sarif@v2
        with:
          sarif_file: results.sarif

Package.json Script

{
  "scripts": {
    "baseline": "baseline scan",
    "baseline:report": "baseline report --output docs/baseline.html"
  }
}

Pre-commit Hook

#!/bin/sh
baseline scan --year 2023 || exit 1

Exit Codes

  • 0 - No violations found
  • 1 - Violations found or error occurred

Configuration

Currently, all configuration is done via CLI flags. A .baselinerc configuration file is planned for future releases.

Development

# Build
pnpm build

# Test
pnpm test

# Watch mode
pnpm dev

License

MIT