⬆️ Update dependency jscpd to v5.1.1 - #1050
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/jscpd-5.x
branch
3 times, most recently
from
September 3, 2026 03:27
147df57 to
5a3e96f
Compare
renovate
Bot
force-pushed
the
renovate/jscpd-5.x
branch
from
September 4, 2026 00:44
5a3e96f to
ca90f95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.0.16→5.1.1Release Notes
kucherenko/jscpd (jscpd)
v5.1.1Compare Source
Bug Fixes
jscpdon npm installed the 5.0.16 engine instead of 5.1.0 — thejscpdwrapper package published itsoptionalDependenciespinned to the5.0.16platform binaries, sonpm i jscpd@5.1.0resolved a native binary one release behind andjscpd --versionreportedcpd 5.0.16. Everything 5.1.0 fixed was therefore absent forjscpdusers, including the Windows--baseline-from-reffix. Thecpdpackage was pinned correctly and is unaffected, as are the platform packages themselves — only the wrapper's pins were stale.The cause was in
scripts/sync-version.mjs: the wrapper's version and its platform pins were updated together behind a singleversion !== npmVersionguard, so once anything setversionbefore the script ran, the guard read "already up to date" and left the pins untouched. The two are now updated independently, and the script ends by verifying that every npm version and platform pin matches the release version, exiting non-zero if any disagree — the release workflow runs this script, so a repeat of this mismatch now fails the release instead of publishing. This is the same defect that produced the 5.0.13 republish; the earlier fix covered thecpdpackage but not thejscpdwrapper.Other
rust-version = "1.87"on crates.io, a floor the crate could not build on: theoxcparser crates require 1.96.0, andignore,globsetandaskamarequire 1.88. The value had been set when the Rust workspace was created and never revisited, and no CI job built at the declared MSRV, so the drift went unnoticed. CI now derives the toolchain fromrust-versionand checks against exactly that version.Published Packages
cpd-core@0.1.10on crates.iocpd-finder@0.1.13on crates.iocpd-reporter@0.1.11on crates.iocpd-tokenizer@0.1.12on crates.iojscpd@5.1.1on crates.iocpd@5.1.1on npmjscpd@5.1.1on npmjscpd-darwin-arm64@5.1.1on npmjscpd-darwin-x64@5.1.1on npmjscpd-linux-x64-gnu@5.1.1on npmjscpd-linux-arm64-gnu@5.1.1on npmjscpd-linux-x64-musl@5.1.1on npmjscpd-windows-x64-msvc@5.1.1on npmjscpd-windows-arm64-msvc@5.1.1on npmv5.1.0Compare Source
New Features
Windows on ARM support — npm installs now select a native
aarch64-pc-windows-msvcbinary from thejscpd-windows-arm64-msvcplatform package on Windows ARM64.Clone baseline (
--baseline,--update-baseline,--fail-on-new-clones) — gate CI on new duplication only. A committed baseline file (e.g..jscpd-baseline.json) records content-hash fingerprints of accepted clones (the same hash the SARIF reporter emits aspartialFingerprints["jscpdCloneHash/v1"], with a multiplicity count per fingerprint); clones absent from it are reported as new, and--fail-on-new-clones[=N]exits 1 when more than N (default 0) new clones are found — independently of--threshold, so legacy duplication is tolerated while regressions fail the build.--update-baselinerewrites the file from the current run (creating it if missing) and prints added/removed fingerprint counts so baseline growth stays visible in CI logs and PR review. The baseline file is versioned, sorted one fingerprint per line for reviewable diffs and trivial merges, and configurable via thebaseline/failOnNewClonesconfig keys. New-clone info flows through the reporters:[NEW]markers and a "(N new)" found-count inconsole/console-full, per-cloneisNewplus thenewClones/newDuplicatedLinesstatistics injson, levelerrorinsarif, andjscpd_new_clones/jscpd_new_duplicated_linesgauges inopenmetrics. (#944)Ephemeral baseline from a git ref (
--baseline-from-ref) — stateless variant of the clone baseline for PR gates without a committed file:cpd --baseline-from-ref origin/main --fail-on-new-clones .checks the base ref's tree out into a temporary detached git worktree (removed afterwards; shells out togitlike blame does), scans it with the same detection configuration, and compares the current run against that in-memory fingerprint set — clones absent from the base ref are new. Costs a second scan of the corpus, where the committed--baselinefile needs only one. When the ref is missing (shallow CI checkout) it fails with a clear hint togit fetch origin mainor usefetch-depth: 0. Config keybaselineFromRef; conflicts with--baseline/--update-baseline. (#944)OpenMetrics reporter (
--reporters openmetrics) — writesjscpd-metrics.txtin the OpenMetrics text exposition format, ready to be declared as a GitLab CIartifacts:reports:metricsartifact so merge requests show duplication metric changes against the target branch. Exposes gauges for files/lines/tokens analyzed, clones found, duplicated lines/tokens with percentages (project total plus aformat-labeled sample per format), and detection duration in seconds. (#422)CodeClimate / GitLab Code Quality reporter (
--reporters codeclimate, aliasgitlab) — writesgl-code-quality-report.json(the filename GitLab's docs use) in the CodeClimate issue format, restricted to the subset GitLab defines as its Code Quality report format, ready to be declared as anartifacts:reports:codequalityartifact so duplicates appear as code quality issues in merge requests — unlike the SARIF reporter, which GitLab ingests as security vulnerability findings. Each clone yields an issue per fragment (each describing the other location, plus the CodeClimateother_locationsfield), with a deterministic fingerprint derived from the clone's content hash so GitLab can tell new issues from pre-existing ones across pipeline runs. Severity isminor, escalating tomajorfor clones absent from a configured baseline or when the run exceeds--threshold. (#958)Config discovery in
.config/(dot-config convention) — auto-discovery now also checks.config/jscpd.json(and.config/.jscpd.json) per the dot-config convention, between the root.jscpd.jsonand thepackage.jsonjscpdkey. A root.jscpd.jsonstill wins, so existing setups are unaffected; paths inside the config resolve against the working directory, as with other auto-discovered sources. (#979)Bug Fixes
--formatvalues warn instead of silently matching nothing — a typo like--format cs(instead ofcsharp) used to scan 0 files and exit 0, indistinguishable from a clean codebase in CI. The CLI now prints a stderr warning naming the unsupported value and pointing to--list; custom formats declared via--formats-extsstay accepted. (#964)channel-rust-1.97.tomlmanifest, which broke with a fixed-output hash mismatch when Rust 1.97.1 was published. The toolchain is now pinned to the exact patch version (immutable manifest), so the hash can no longer drift. (#976)--baseline-from-refno longer reports every clone as new — the format-suffix stripper treated the drive colon in Windows verbatim paths (\\?\C:\..., the formcanonicalizereturns) as a:formatsuffix and truncated the base scan's source ids to\\?\C, so every snippet read behind the fingerprint computation failed silently and the ephemeral baseline never matched. A colon followed by a path separator is now recognized as structural. Clone fingerprints are also line-ending agnostic now (CR stripped before hashing), so committed baselines survive CRLF/LF differences between platforms.Other
glama.jsonmaintainer manifest and aDockerfilethat runs the stdio MCP server (jscpd --mcp), used by Glama to build and score the server listingDependencies
oxccrates to 0.147 in/rustthiserrorto 2.0.20,globsetto 0.4.20,ignoreto 0.4.33,logto 0.4.34 in/rustThank You ❤️
.config/subfolder (#979)--formatbehavior (#964)Published Packages
cpd-core@0.1.10on crates.iocpd-finder@0.1.12on crates.iocpd-reporter@0.1.10on crates.iocpd-tokenizer@0.1.11on crates.iojscpd@5.1.0on crates.iocpd@5.1.0on npmjscpd@5.1.0on npmjscpd-darwin-arm64@5.1.0on npmjscpd-darwin-x64@5.1.0on npmjscpd-linux-x64-gnu@5.1.0on npmjscpd-linux-arm64-gnu@5.1.0on npmjscpd-linux-x64-musl@5.1.0on npmjscpd-windows-x64-msvc@5.1.0on npmjscpd-windows-arm64-msvc@5.1.0on npmConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.