semver-checks

v0.17.1
io.github.kyungseopk1m/semver-checks Checked 8 hours ago Published 21 days ago

Detect breaking changes in your TypeScript library's public API and recommend the SemVer bump.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

semver_compare

Compare two versions of a TypeScript library and detect breaking API changes. Use it to decide or check a SemVer bump; use semver_snapshot to list what one version exports without comparing it. Either side can be a filesystem path, a git ref, or an npm spec, so a working tree can be compared against the published release without checking anything out. npm specs and git refs need network access and are unpacked into temp directories that are removed afterwards; nothing in a local path is written unless "installDeps" is set. Returns the recommended SemVer bump (major/minor/patch) and a list of…

ParameterTypeDescription
old *stringOld version: a filesystem path, a git ref (tag, branch, commit SHA), or an npm spec. A "name@version" that is not an existing path is read as npm (e.g. "lodash@4.17.21", "lodash@latest"); prefix with…
declaredstringThe bump this release declares, or "auto" to read it from .changeset/*.md and then the two package.json versions. Adds a "declaration" verdict to the report: "mismatch" when a proven break outranks th…
entryEntry file relative to project root (e.g. "src/index.ts"). Pass an array or a comma-separated string for a package with several entry points. Auto-detected from package.json if omitted.
installDepsbooleanInstall dependencies before analysis. In a local path with no node_modules this runs "npm install --ignore-scripts" in that directory, and adds @types/node there if it is missing. Only a local path ne…
maxChangesintegerHow many changes to include (default 50). They are ordered proven breaks first, then additions, then review-only ones, so the cap drops the least actionable end. "summary" always counts every change,…
newstringNew version: a filesystem path, a git ref, or an npm spec. Defaults to current directory.
newAsstringForce "new" to be treated as a filesystem path, a git ref, or an npm spec. "ref" is an accepted spelling of "git".
oldAsstringForce "old" to be treated as a filesystem path, a git ref, or an npm spec. "ref" is an accepted spelling of "git". Only needed when auto-detection would read the input as the wrong kind, which is what…

semver_snapshot

Extract the public API surface of a TypeScript project as JSON, without comparing it to anything. Use it to see what a package exports; use semver_compare to decide a bump. The source can be a filesystem path, a git ref, or an npm spec, the same three forms semver_compare takes, with the same network and temp-directory behaviour. Returns {"entrypoints": {<subpath>: {<symbol>: <kind>}}}, with each symbol's full type shape in place of its kind when "detail" is set. Symbols stop at the "maxBytes" budget, and an "omitted" field then gives the number left out and the total. A source whose surface c…

ParameterTypeDescription
detailbooleanInclude each symbol's full type shape instead of just its kind. A shape runs a median of about 370 bytes and a wide interface tens of kilobytes, against about 35 for a name and a kind, so a large pack…
entryEntry file relative to project root (e.g. "src/index.ts"). Pass an array or a comma-separated string for a package with several entry points.
installDepsbooleanInstall dependencies before analysis. In a local path with no node_modules this runs "npm install --ignore-scripts" in that directory, and adds @types/node there if it is missing. Only a local path ne…
maxBytesintegerByte budget for the symbols in the response (default 40000). Symbols are included while it lasts, and an "omitted" field then reports how many were left out along with the total. No symbol is exempt:…
pathstringProject source: a filesystem path, a git ref, or an npm spec such as "lodash@4.17.21". Defaults to current directory.
pathAsstringForce "path" to be treated as a filesystem path, a git ref, or an npm spec. "ref" is an accepted spelling of "git". Only needed when auto-detection would read the input as the wrong kind.