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

compat-finder

v2.1.0

Published

Find incompatible targets through guided compatibility checks.

Readme

兼容性问题排查器

Open on npmx npm downloads CI

English | 简体中文

compat-finder 是一个用于排查多个目标之间兼容性问题的库和命令行工具。

它帮助你用更少的测试轮次找出一个或多个不兼容目标。

为什么用 compat-finder

  • 零运行时依赖:安装更轻量,也能降低供应链风险。
  • 高效排查算法:默认算法采用二分法结合分治法的策略,通常只需较少测试轮次即可得出结果。
  • 不只简单二分:排查结果目标可以是一个或多个。
  • 多种接入形式:提供引导式 CLI、开箱即用的会话 API,以及适合自定义流程的高级 API。
  • 适合多种运行环境:发布产物为 ESM,可用于浏览器和其他兼容 ESM 的运行时。
  • 本地化 CLI:支持英文和简体中文。

文档

完整文档见 howiehz.top/misc/compat-finder

在线体验

无需安装,打开即可使用:兼容性问题排查器

安装

npm install compat-finder

然后即可导入使用:

import { createCompatibilitySession } from "compat-finder";

const session = createCompatibilitySession(["A", "B"]);

如果你只是想快速试用 CLI,也可以不安装直接运行:

npx compat-finder --help

用法

库使用示例:

import { createCompatibilitySession } from "compat-finder";

const session = createCompatibilitySession(["A", "B", "C", "D"]);

let step = session.current();

while (step.status === "testing") {
  const result = askUser(step.targets);

  if (result === "undo") {
    step = session.undo();
    continue;
  }

  step = session.answer(result === "issue");
}

console.log("最终结果:", step.targets);

function askUser(targets: readonly string[]): "issue" | "pass" | "undo" {
  console.log("当前需要测试:", targets);
  // 浏览器里可以来自 prompt()、按钮或表单。
  // Node.js 里可以来自 readline、测试脚本或你自己的 CLI。
  return "issue"; // 复现返回 "issue",未复现返回 "pass",撤销返回 "undo"。
}

命令行示例:

启动一轮引导式排查:

npx compat-finder interactive --count 4

根据已有回答计算下一步要测试的目标:

npx compat-finder next -c 3 -n "Alpha,Beta,Gamma" -a "y,n"

预期会输出如下 JSON:

{
  "status": "testing",
  "targetCount": 3,
  "targets": ["Beta"]
}

如果你需要完整命令和 API 说明,可以继续阅读完整文档

与 AI 协作

如果你想让 AI 智能体帮你继续推进排查流程,或把 compat-finder 集成进自己的项目,可以安装 compat-finder 智能体技能:

npx skills add HowieHz/howiehz-misc --skill compat-finder

更多提示词和说明,见与 AI 协作

相关项目

HowieHz/plugin-compatibility-checking-tool 重构而来。

许可证

本项目基于 MIT License 发布。