Commit Graph

85 Commits

Author SHA1 Message Date
apk de66dff9a9 chore(basta): bump to 0.1.2
Single-file component support (Vue/Svelte/Astro), bundler alias
resolution (vite.config, svelte.config, tsconfig paths) and monorepo
workspace package-name resolution landed on master after basta 0.1.1
was tagged (#1062); the published crate and npm packages don't have
them yet.
2026-09-18 15:28:02 +02:00
apk 92576864e2 release: cpd-v5.3.0 2026-09-18 14:39:05 +02:00
apk d8ecec4f90 chore(deps): bump oxc crates to 0.150 in basta
Dependabot opened five separate PRs bumping oxc_syntax, oxc_parser,
oxc_allocator, oxc_semantic and oxc_ast individually (#1066-#1070), but the
oxc crates share AST/Visitor trait definitions across the family and only
compile against matching versions of each other — bumping one alone breaks
the build (Visit trait signature mismatches, missing .span() methods) on
every CI job. oxc_ast_visit and oxc_span also needed the same bump, but
dependabot had not opened PRs for those two.

Bumps all seven together instead, and fixes the one real API change
between 0.147 and 0.150: ParserReturn::panicked was renamed to
::fatal_error (same meaning, confirmed against oxc_parser's source).

cpd-tokenizer's own oxc_parser/oxc_ast pins stay at 0.147, coexisting
fine as a separate resolution in the same Cargo.lock (no basta/
cpd-tokenizer API overlap), so this stays scoped to basta.
2026-09-18 12:54:08 +02:00
apk 3a68736578 chore: drop unused dependencies
serde, anyhow, thiserror and log from cpd-finder; thiserror from
cpd-reporter; xxhash-rust and dev serde_json from cpd-tokenizer; anyhow,
log and env_logger from cpd. None of them is referenced in code.
2026-09-17 15:37:40 +02:00
apk 4c3f007d0b fix(ci): let the basta release publish the dependencies it needs
`cargo publish` verifies by building the packaged crate against the
*published* versions of its dependencies, not the local paths. basta uses
`cpd_core::deadcode`, `cpd_reporter::deadcode` and a public `LineIndex` —
none of which exist in the versions on crates.io — so every attempt failed
with "failed to verify package tarball", and basta could not reach crates.io
until a jscpd release happened to carry those three crates along.

That is the coupling this workflow exists to avoid. It now walks basta's own
dependency graph, publishes in topological order whatever is missing, and
waits for the index between crates. jscpd is excluded by construction: it is
a sibling, not a dependency, and releasing it is not this workflow's job.

Bumps the three crates that actually changed: cpd-core 0.1.13 -> 0.1.14
(the `deadcode` module), cpd-tokenizer 0.1.15 -> 0.1.16 (`LineIndex` made
public, `.pyi`), cpd-reporter 0.1.14 -> 0.1.15 (the dead-code reporters).
cpd-finder is untouched and stays where it is.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 13:03:37 +02:00
apk 6229a1f21d docs(basta): ship a README with the npm package, and bump to 0.1.1
`basta@0.1.0` published with `files: ["run-basta.js", "platform-map.js"]`,
so npmjs.com/package/basta shows an empty page — the one place most people
will look before installing anything. npm takes the README from the
published tarball, so a version bump is the only way to put one there.

The README is npm-facing rather than a copy of the crate's: it leads with
`npm install -g basta` and `npx basta src`, and it names the known gaps —
no Vue/Svelte/Astro, class members matched by name, PEP 420 namespace
packages — so a reader can judge whether the tool fits before running it.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 13:00:25 +02:00
apk df7b27c793 feat(dead-code): find code nothing runs, via the new basta engine
Adds a second question about the same tree: not "what is duplicated" but
"what does nothing reach". A new `basta` crate builds the import graph from
the project's entry points and walks it, reporting unused files, unused
exports, unused module-private declarations, unused imports and — opt-in —
unused class members, across JavaScript, TypeScript, JSX, TSX and Python.

It ships two ways: `jscpd --dead-code` inside the existing binary, and a
standalone `basta` command. Both reuse the walker, the filters, all fifteen
reporters and the `--threshold` / `--exit-code` gates, so nothing new has to
be learned to run it.

Because it is a graph traversal rather than a reference count, dead code
cascades: a helper whose only caller is itself dead is reported too. Every
finding carries a confidence score and, below 100, the reasons it might be
wrong — `eval`, an unrecognised decorator, a wildcard re-export, a name seen
only in a string, a file in the scan that did not parse. `--min-confidence`
sets the floor at 60.

Entry points come from `package.json`, `pyproject.toml`, framework and
file-name conventions, and anything a shell script, CI workflow, Makefile or
Dockerfile names by path. CommonJS is read alongside ESM. A project that
renames its own import paths is read on its own terms: `paths` and `baseUrl`
from `tsconfig.json` and `jsconfig.json` are resolved, through a relative
`extends` chain and per package in a monorepo. A file named only by a path
string — a worker spawned through `new URL`, a build entry, a vitest setup
file — counts as used.

Languages plug in through one trait, `basta::lang::Analyzer`, which owns
parsing, specifier resolution, entry-point conventions, manifests, alias
configs and path traits. Nothing outside `lang/` is language-specific;
`docs/basta-extending.md` walks through adding one.

Validated against knip, fallow, vulture, skylos, fossil-mcp and repowise on
trending repositories. On a corpus of ten of them — 11k files, 3.3M lines —
every one of basta's 1,806 findings was checked against an import graph
rebuilt independently of it: no unused-file, unused-import or unused-symbol
claim survived as wrong.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 09:23:13 +02:00
apk 7d6b4050e2 release: cpd-v5.2.1
Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-15 08:24:41 +02:00
dependabot[bot] 3824ea9ac0 chore(deps): bump askama from 0.16.0 to 0.16.1 in /rust
Bumps [askama](https://github.com/askama-rs/askama) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/askama-rs/askama/releases)
- [Commits](https://github.com/askama-rs/askama/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: askama
  dependency-version: 0.16.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-11 03:05:51 +00:00
apk b4cdcc250d release: cpd-v5.2.0
Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-08 11:47:08 +02:00
apk 1bf222e9af fix: apply config-file ignorePattern regexes verbatim, warn on invalid ones
`resolve_config_paths` treated `ignorePattern` entries without `*` or `?`
as relative paths and joined them onto the config directory, a leftover
from when `ignore` and `ignorePattern` were conflated. A plain regex such
as `"Copyright 2026 Example Authors"` in `.jscpd.json` therefore matched
nothing, while the same string via `--ignore-pattern` worked. Config
entries are now passed through untouched.

Regexes that fail to compile were also dropped silently by the tokenizer;
the CLI now prints a `Warning: --ignore-pattern: invalid regex ...` line
for each one so a typo no longer disables a pattern without feedback.

Adds integration tests for both behaviors.
2026-09-05 09:15:07 +02:00
apk 6b25b3a6b8 release: cpd-v5.1.2
First release from the v5-only master. Bumps jscpd to 5.1.2 and every
sub-crate (cpd-core 0.1.11, cpd-tokenizer 0.1.13, cpd-finder 0.1.14,
cpd-reporter 0.1.12) so the new crates.io metadata from #988 and the
Windows drive-path fix in cpd-finder are republished. Adds the 5.1.2
changelog section (linux-arm64-musl package, cargo-binstall, Docker
image, jscpd --version naming, pre-commit hook args, repository split)
and refreshes the version examples in docs/.

Pre-release checks: cargo fmt, clippy -D warnings, cargo test --locked
(22 suites), cargo check --all-targets --target x86_64-pc-windows-msvc,
release-notes extraction dry-run against rust/CHANGELOG.md.
2026-09-03 10:25:02 +02:00
dependabot[bot] e3e8ab0b85 chore(deps): bump quick-xml from 0.41.0 to 0.42.0 in /rust
Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/tafia/quick-xml/releases)
- [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md)
- [Commits](https://github.com/tafia/quick-xml/compare/v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: quick-xml
  dependency-version: 0.42.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 08:54:56 +00:00
apk 9db945c399 release: cpd-v5.1.1
Republishes the jscpd npm wrapper with platform pins that match the
release. jscpd@5.1.0 shipped optionalDependencies pinned to the 5.0.16
binaries, so `npm i jscpd@5.1.0` resolved an engine one release behind
and `jscpd --version` printed `cpd 5.0.16` — every 5.1.0 fix, including
the Windows --baseline-from-ref fix, was absent for jscpd users. The cpd
package, the platform packages and the crates.io release were all correct;
only the wrapper's pins were stale.

Root cause in scripts/sync-version.mjs: the wrapper's version and its
platform pins were written behind one `version !== npmVersion` guard, so
once anything set version before the script ran, the guard read "already
up to date" and skipped the pins. Version and pins are now updated
independently, and the script ends by verifying that every npm version and
platform pin equals the release version, exiting non-zero otherwise.
release.yml runs this script, so the same mismatch now fails the release
rather than publishing. This is the 5.0.13 defect again — that fix covered
the cpd package but not the jscpd wrapper.

Sub-crates bumped for the code that changed since the published 5.1.0
(cpd-tokenizer 0.1.12, cpd-finder 0.1.13, cpd-reporter 0.1.11); cpd-core
is unchanged at 0.1.10. The only source delta is the clippy collapsible_if
rewrites unmasked by the MSRV correction, which are behaviour-preserving.

Pre-release verification: cargo fmt --check, clippy --workspace
--all-targets -D warnings, 847 tests, cargo +1.96 check at the declared
MSRV, and — per the Windows-only blind spot that blocked 5.0.15, 5.0.16
and 5.1.0 — cargo check --workspace --all-targets --target
x86_64-pc-windows-msvc, all clean. Release-notes extraction for 5.1.1
dry-run against rust/CHANGELOG.md returns the right section.
2026-08-31 17:29:08 +02:00
apk a2f4827b14 release: resume cpd-v5.1.0 with line-ending-agnostic fingerprints
Revert the 5.1.1 bump (its release run was cancelled before publishing
anything; crates.io already has 5.1.0 and npm has nothing newer than
5.0.16, so the registry-based detect resumes the 5.1.0 release on this
push) and fold the fingerprint fix into the 5.1.0 changelog section.

Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-30 12:22:40 +02:00
apk 892810a1a4 release: cpd-v5.1.1
Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-30 12:21:01 +02:00
apk 74ea908042 release: cpd-v5.1.0
Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-30 12:08:54 +02:00
apk d1d424cd8c chore(deps): bump remaining oxc crates to 0.147 in lockstep
oxc_span alone at 0.147 left the other oxc crates at 0.144, so the
GetSpan trait no longer matched the AST types and cpd-tokenizer failed
to compile. The oxc crates only work when versioned together.

Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-29 14:50:46 +02:00
apk 82111da4de Merge remote-tracking branch 'origin/master' into dependabot/cargo/rust/oxc_span-0.147.0 2026-08-29 14:49:23 +02:00
Andrey Kucherenko 3c270ea153 Merge pull request #972 from kucherenko/dependabot/cargo/rust/log-0.4.34
chore(deps): bump log from 0.4.33 to 0.4.34 in /rust
2026-08-29 13:29:33 +02:00
dependabot[bot] bd3514adbe chore(deps): bump log from 0.4.33 to 0.4.34 in /rust
Bumps [log](https://github.com/rust-lang/log) from 0.4.33 to 0.4.34.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.33...0.4.34)

---
updated-dependencies:
- dependency-name: log
  dependency-version: 0.4.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-28 03:06:11 +00:00
dependabot[bot] 81a97e0dbe chore(deps): bump oxc_span from 0.144.0 to 0.147.0 in /rust
Bumps [oxc_span](https://github.com/oxc-project/oxc) from 0.144.0 to 0.147.0.
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/compare/crates_v0.144.0...crates_v0.147.0)

---
updated-dependencies:
- dependency-name: oxc_span
  dependency-version: 0.147.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-28 03:06:01 +00:00
apk 3d5a91be62 feat(reporter): add CodeClimate / GitLab Code Quality reporter (#958)
New `codeclimate` reporter (alias: `gitlab`) writes
gl-code-quality-report.json in the CodeClimate issue format, restricted
to the subset GitLab defines as its Code Quality report format, ready to
be declared as an `artifacts:reports:codequality` artifact. Unlike the
SARIF reporter, which GitLab ingests as security vulnerability findings,
this surfaces duplicates as code quality issues in merge requests.

Each clone yields one issue per fragment (each describing the other
location, plus the CodeClimate `other_locations` field), with a
deterministic fingerprint derived from the clone's content hash — the
same snippet_pair_hash identity used by SARIF partialFingerprints and
the baseline file, now shared via `shared::clone_pair_hash`. Severity is
"minor", escalating to "major" for clones absent from a configured
baseline or when the run exceeds --threshold.

Closes #958

Claude-Session: https://claude.ai/code/session_01UkyKpExH2hcHawXqGp2geA
2026-08-24 16:41:27 +02:00
Andrey Kucherenko 5780c54b20 Merge pull request #951 from kucherenko/dependabot/cargo/rust/ignore-0.4.33
chore(deps): bump ignore from 0.4.32 to 0.4.33 in /rust
2026-08-21 07:40:25 +02:00
Andrey Kucherenko a477208fde Merge pull request #950 from kucherenko/dependabot/cargo/rust/globset-0.4.20
chore(deps): bump globset from 0.4.19 to 0.4.20 in /rust
2026-08-21 07:40:09 +02:00
dependabot[bot] f8b9c16c8a chore(deps): bump ignore from 0.4.32 to 0.4.33 in /rust
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.32 to 0.4.33.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.32...ignore-0.4.33)

---
updated-dependencies:
- dependency-name: ignore
  dependency-version: 0.4.33
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:06:37 +00:00
dependabot[bot] 590a8e8d00 chore(deps): bump globset from 0.4.19 to 0.4.20 in /rust
Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.19 to 0.4.20.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.19...globset-0.4.20)

---
updated-dependencies:
- dependency-name: globset
  dependency-version: 0.4.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:06:31 +00:00
dependabot[bot] ab98ebf442 chore(deps): bump thiserror from 2.0.18 to 2.0.20 in /rust
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.18 to 2.0.20.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.18...2.0.20)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-version: 2.0.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:06:24 +00:00
apk 2b08d13a05 release: cpd-v5.0.16 2026-08-17 22:38:00 +02:00
Andrey Kucherenko 1eb803ae75 Merge pull request #936 from kucherenko/feat/891-mcp-stdio
feat(rust): MCP server over stdio transport (--mcp)
2026-08-17 18:58:34 +02:00
apk 390f360c2f Merge remote-tracking branch 'origin/master' into feat/891-mcp-stdio
# Conflicts:
#	README.md
#	docs/rust.md
#	rust/CHANGELOG.md
#	rust/crates/cpd/src/cli.rs
2026-08-15 22:38:19 +02:00
apk 329c8a78b4 chore(deps): bump oxc crates from 0.133 to 0.144 in /rust
Coordinated bump of all six oxc crates (parser, allocator, span, ast,
ast_visit, syntax) — supersedes #920, which bumped only oxc_parser and
failed CI because oxc 0.144 requires rustc >= 1.95.

Adaptations for oxc 0.144 breaking changes:
- ParserReturn.errors renamed to .diagnostics
- TSModuleDeclaration split into TSExternalModuleDeclaration and
  TSNamespaceDeclaration (oxc-project/oxc#25284); ts_strip visitor
  updated to handle both with the same erasure semantics
2026-08-15 20:55:24 +02:00
apk ea3599fc0d feat(rust): MCP server over stdio transport (--mcp)
Closes the gap reported in #891: the HTTP-only jscpd-server cannot be
used by MCP clients that spawn and manage a stdio process themselves
(Claude Desktop/Code, Cursor, APM, ...). The Rust binary now serves the
Model Context Protocol directly:

    cpd --mcp /path/to/project

Transport & protocol:
- newline-delimited JSON-RPC 2.0 on stdin/stdout; stdout carries
  protocol messages only, logging goes to stderr; exits 0 on stdin EOF
- protocol revision 2025-06-18, accepting 2025-03-26 and 2024-11-05
  clients via version negotiation; ping, tools/list, tools/call;
  notifications ignored; parse errors reported (-32700) without
  killing the session

Tools (mirroring the HTTP jscpd-server):
- check_duplication(code, format) — checks a snippet against the
  scanned project; results are compact JSON in a text content block
  with file/snippet line ranges; unknown formats and sub-threshold
  snippets produce informative results
- get_statistics() — files, clones, full Statistics of the last scan
- check_current_directory() — re-scan the configured paths

Performance: the project is scanned once at startup and cached as
detection-ready token hashes (PreparedSource pools per format /
cross-format group), so snippet checks only tokenize the snippet and
run one pool detection — milliseconds even on large codebases. All
standard detection options (--min-tokens, --format, --cross-formats,
--ignore, ...) apply to the scan and to snippet checks.

Supporting refactor in cpd-finder: orchestrate::run() split into
build_thread_pool() + prepare_scan_in() (walk + tokenize, returning
PreparedScan) so the MCP server can keep prepared sources around;
run() behavior is unchanged and detect_prepared is untouched.
strip_types_formats made pub for snippet tokenization parity;
PreparedSource now derives Clone. hyperfine A/B vs a master-built
baseline shows no regression on the normal CLI path (39.0ms vs
41.2ms, within noise).

Tests: 12 unit tests for the protocol handler and tools, plus 2
end-to-end tests that spawn the real binary and drive a full stdio
session (initialize → tools/list → tools/call → EOF), asserting
stdout is protocol-only. Full workspace suite green.

Docs: docs/ai-ready.md MCP section restructured into stdio (Rust v5)
and Streamable HTTP (Node v4) transports with client config examples;
docs/rust.md options table; root README; rust/CHANGELOG.md 5.0.16.

The jscpd-server (Node) stdio subcommand asked for literally in #891
can follow separately; this provides the stdio transport via the v5
binary that ships with jscpd@5.

Refs #891
2026-08-14 19:56:52 +02:00
Andrey Kucherenko de8f107373 Merge pull request #921 from kucherenko/dependabot/cargo/rust/clap-4.6.6
chore(deps): bump clap from 4.6.1 to 4.6.6 in /rust
2026-08-14 13:22:46 +02:00
Andrey Kucherenko 5ae4a04acf Merge pull request #927 from kucherenko/dependabot/cargo/rust/memchr-2.8.3
chore(deps): bump memchr from 2.8.2 to 2.8.3 in /rust
2026-08-14 12:48:09 +02:00
dependabot[bot] d739021743 chore(deps): bump memchr from 2.8.2 to 2.8.3 in /rust
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.8.2 to 2.8.3.
- [Commits](https://github.com/BurntSushi/memchr/compare/2.8.2...2.8.3)

---
updated-dependencies:
- dependency-name: memchr
  dependency-version: 2.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:14 +00:00
dependabot[bot] c8460c55a5 chore(deps): bump xxhash-rust from 0.8.16 to 0.8.18 in /rust
Bumps [xxhash-rust](https://github.com/DoumanAsh/xxhash-rust) from 0.8.16 to 0.8.18.
- [Commits](https://github.com/DoumanAsh/xxhash-rust/commits)

---
updated-dependencies:
- dependency-name: xxhash-rust
  dependency-version: 0.8.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:11 +00:00
dependabot[bot] 93c6b1eda0 chore(deps): bump clap from 4.6.1 to 4.6.6 in /rust
Bumps [clap](https://github.com/clap-rs/clap) from 4.6.1 to 4.6.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.1...clap_complete-v4.6.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.6.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 06:26:45 +00:00
dependabot[bot] e0edcde3c0 chore(deps): bump serde from 1.0.228 to 1.0.229 in /rust
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.228 to 1.0.229.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.228...v1.0.229)

---
updated-dependencies:
- dependency-name: serde
  dependency-version: 1.0.229
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 03:07:13 +00:00
apk b03abdad3e release: cpd-v5.0.15 2026-08-13 13:32:51 +02:00
dependabot[bot] 89f6c9b47b chore(deps): bump ignore from 0.4.31 to 0.4.32 in /rust
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.31 to 0.4.32.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.31...ignore-0.4.32)

---
updated-dependencies:
- dependency-name: ignore
  dependency-version: 0.4.32
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-07 03:08:43 +00:00
Andrey Kucherenko 8d87895be0 Merge pull request #896 from kucherenko/dependabot/cargo/rust/serde_json-1.0.151
chore(deps): bump serde_json from 1.0.150 to 1.0.151 in /rust
2026-07-31 09:48:55 +02:00
Andrey Kucherenko bcff13fe1d Merge pull request #895 from kucherenko/dependabot/cargo/rust/ignore-0.4.31
chore(deps): bump ignore from 0.4.28 to 0.4.31 in /rust
2026-07-31 09:43:04 +02:00
dependabot[bot] c7e94df0c5 chore(deps): bump serde_json from 1.0.150 to 1.0.151 in /rust
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.150 to 1.0.151.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.150...v1.0.151)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-version: 1.0.151
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-31 03:06:15 +00:00
dependabot[bot] 8d57a83b6c chore(deps): bump ignore from 0.4.28 to 0.4.31 in /rust
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.28 to 0.4.31.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.28...ignore-0.4.31)

---
updated-dependencies:
- dependency-name: ignore
  dependency-version: 0.4.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-31 03:06:08 +00:00
dependabot[bot] 196cbbe35c chore(deps): bump anyhow from 1.0.103 to 1.0.104 in /rust
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.103...1.0.104)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.104
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-31 03:06:00 +00:00
apk 2a6a1a406a release: cpd-v5.0.14
Bump cpd/jscpd to 5.0.14 and changed sub-crates (cpd-core 0.1.7,
cpd-tokenizer 0.1.8, cpd-finder 0.1.9). Includes --cross-formats (#810)
and the prose-only markdown fix (#883).

sync-version.mjs now also syncs the cpd package optionalDependencies
(cpd@5.0.12 shipped pointing at the 5.0.11 binaries, which forced the
manual npm-only cpd@5.0.13) and its inter-crate dependency regex now
matches the actual Cargo.toml formatting (space before closing brace),
so dependency refs are bumped along with crate versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 11:49:23 +02:00
Andrey Kucherenko 9ec641d27e Merge pull request #874 from kucherenko/dependabot/cargo/rust/globset-0.4.19
chore(deps): bump globset from 0.4.18 to 0.4.19 in /rust
2026-07-24 08:46:47 +02:00
apk 030f38aa1b feat(rust): add --cross-formats for cross-format clone detection (#810)
Detect duplicates across related formats via format equivalence groups
sharing one comparison pool, e.g. --cross-formats "javascript,typescript"
or the js-ts preset (javascript,jsx,typescript,tsx).

When a group mixes TypeScript with JavaScript, TS files are compared with
erasable type-only syntax stripped from the detection token stream (type
annotations, generics, interface/type declarations, as/satisfies, ?/!
markers, access modifiers, implements clauses, type-only imports/exports,
overload signatures, declare statements) so that
`function f(a: number): void` matches `function f(a)`. Stripping is
AST-driven (oxc_ast_visit over the already-parsed program) and only drops
tokens, so reported clone positions always reference the original source.

- cpd-tokenizer: new ts_strip module, tokenize_js_stripped,
  TokenizeOptions.strip_types_formats (empty by default)
- cpd-finder: RunConfig.cross_formats, build_pools() pool grouping,
  strip-set computation for TS-family formats grouped with JS
- cpd: --cross-formats flag, crossFormats config field (string,
  array-of-strings, or array-of-arrays), js-ts preset, overlap merging,
  unknown-format warnings, --debug output
- docs: rust.md option + Cross-Format Groups section, CHANGELOG entry
- tests: tokenizer strip tests, pool unit tests, cross-pool core test,
  cpd-finder integration tests, CLI parse/config tests, e2e binary tests
  with fixtures; default behavior unchanged (golden parity intact)

Non-erasable TS syntax with runtime semantics (enum, non-declare
namespace, parameter properties, import =, export =) is left intact and
will not cross-match. Cross-format clones are attributed to one member
format in per-format statistics.

Closes #810

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 08:44:08 +02:00
dependabot[bot] 76dddf009d chore(deps): bump regex from 1.13.0 to 1.13.1 in /rust
Bumps [regex](https://github.com/rust-lang/regex) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.13.0...1.13.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-version: 1.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-17 03:06:52 +00:00