jscpd 5.2.0 released
Published on September 8, 2026 by Andrey Kucherenko
jscpd 5.2.0 is out. This release is about finding the duplicates that an exact token match cannot see.
- Type-2 clones. --ignore-identifiers, --ignore-literals and --ignore-annotations find blocks that differ only in names, values or annotations. Every clone now carries a kind: exact or renamed.
- Near-miss clones. --max-gap-lines N merges a copy with a few inserted or changed lines into one clone with a similarity score, instead of reporting two halves.
- Function-level similarity for JavaScript and TypeScript. --similarity 0.85 compares whole functions by their syntax-tree structure, so edits spread through a function are still caught. The MCP server takes the same argument.
- Every reporter shows the clone kind, including SARIF and CodeClimate, and the MCP tools are fully described so agents know when to use each one.
- Fixes: config-file ignorePattern entries without glob characters now work, JavaScript files with a recoverable syntax error match clean files again, Markdown no longer loses everything after a /* or //, Vue template clones get the template's own line range, and the tips are printed only on an interactive terminal.
Thanks to @7487, @zero-stroke, @kwesolowski and @w3lld1 for their contributions, and to every backer who keeps this work funded.
Release notes: https://github.com/kucherenko/jscpd/releases/tag/v5.2.0
Install: npm i -g jscpd or cargo binstall jscpd