mirror of
https://github.com/kucherenko/jscpd.git
synced 2026-09-19 08:11:03 +08:00
4c3f007d0b
`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
cpd-tokenizer
Source code tokenizers for cpd — a fast copy/paste detector for code.
This crate provides language-aware tokenization for 200+ programming languages, producing token streams suitable for duplicate detection. It includes:
- Generic tokenizer (comments, strings, keywords, punctuation)
- JavaScript/TypeScript/JSX/TSX tokenizer (Oxc-based)
- Markdown tokenizer (code fences, front matter, embedded languages)
- SFC tokenizer (Vue, Svelte, Astro)
- Embedded language detection and cross-format tokenization
This crate is not intended to be used directly; see the jscpd crate for the full CLI.
License
MIT