New Features
- Linux ARM64 musl prebuilt binaries — npm installs on Alpine and other musl-based ARM64 Linux systems now select a native binary from the new
jscpd-linux-arm64-muslplatform package, bringing the prebuilt platform count to 8. The GitHub release ships the matchingjscpd-linux-arm64-musl.tar.gzasset. (#988) cargo binstall jscpd— the crate now carriescargo-binstallmetadata pointing at the release tarballs for every supported target, socargo binstall jscpddownloads a prebuilt binary instead of compiling theoxcparser stack from source. (#988)- Docker image
ghcr.io/kucherenko/jscpd— a multi-arch (amd64/arm64) distroless image built from the release binaries is published with every release, taggedlatest,5,5.1and the exact version, with SLSA provenance and an SBOM attached. Run it asdocker run --rm -v "$PWD:/src" ghcr.io/kucherenko/jscpd; see docs/ci-and-hooks.md. (#988)
Bug Fixes
jscpd --versionandjscpd --helpnow sayjscpd— both binaries are built from the same source and the command name was the literalcpd, sojscpd --versionprintedcpd 5.1.1and the usage line readUsage: cpd. The name is now taken from the invoked executable (jscpdorcpd). (#988)- Windows: drive-anchored
--patternvalues are treated as absolute — the Windows-only check for patterns likeC:\src\**\*.tscompared the first character against:and\after already requiring it to be a letter, so it could never match and such patterns were also given the relative**/variant. The check is now a platform-independent helper with a unit test that runs everywhere. (#988) - pre-commit hook passed v4-only flags —
.pre-commit-hooks.yamlstill invoked--gitignore --exitCode '1', which the v5 CLI rejects, sorepo: https://github.com/kucherenko/jscpdhooks failed on every run. The hook now passes--exit-code 1. (#989) - Unsupported-platform error is actionable — when no prebuilt binary matches, the
jscpdandcpdnpm launchers now name the host (os/arch (libc)), list the supported platform keys and point tocargo install jscpdinstead of printing a bare "Unsupported platform". (#988)
Other
- Repository split:
masteris v5-only — the TypeScript v4 engine (apps/,packages/, changesets, Node.js CI) moved to the long-livedmaster-v4branch and releases from there under thelatest-4npm dist-tag.masterkeeps the Rust workspace, the sharedfixtures/corpus, the GitHub Action, Dockerfile and flake.README-v4.mddescribes the TypeScript version in one page;FORMATS.mdis now generated from the Rust tokenizer (224 formats). (#989, #990) - Floating
v5tag for the GitHub Action —uses: kucherenko/jscpd@v5follows the latest 5.x release; the release workflow moves the tag on every stable release. (#988) - crates.io metadata — every crate now declares
repository,documentation,keywordsandcategories; thejscpdcrate excludestests/from the published package, ships an expanded README rendered on docs.rs, and npm packages carry afundingfield. (#988) - Signed release assets — in addition to SLSA provenance, each release archive and
checksums.txtnow has a Sigstore keyless signature (<asset>.sigstore.json) verifiable withcosign verify-blob; the release notes include the exact commands. (#988) - CI — Windows joined the pull-request build matrix, a smoke test runs the release binary against the
fixtures/corpus on every push, and a nightly job runscargo auditandcargo deny. (#988, #989)
Dependencies
- Bump
quick-xmlto 0.42.0 in/rust(#991)
Published Packages
cpd-core@0.1.11on crates.iocpd-finder@0.1.14on crates.iocpd-reporter@0.1.12on crates.iocpd-tokenizer@0.1.13on crates.iojscpd@5.1.2on crates.iocpd@5.1.2on npmjscpd@5.1.2on npmjscpd-darwin-arm64@5.1.2on npmjscpd-darwin-x64@5.1.2on npmjscpd-linux-x64-gnu@5.1.2on npmjscpd-linux-arm64-gnu@5.1.2on npmjscpd-linux-x64-musl@5.1.2on npmjscpd-linux-arm64-musl@5.1.2on npmjscpd-windows-x64-msvc@5.1.2on npmjscpd-windows-arm64-msvc@5.1.2on npm
Verify
Archives are signed with Sigstore (keyless, <asset>.sigstore.json)
and carry SLSA build provenance. Replace jscpd-linux-x64-gnu.tar.gz with your asset:
cosign verify-blob \
--bundle jscpd-linux-x64-gnu.tar.gz.sigstore.json \
--certificate-identity-regexp '^https://github\.com/kucherenko/jscpd/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
jscpd-linux-x64-gnu.tar.gz
gh attestation verify jscpd-linux-x64-gnu.tar.gz --repo kucherenko/jscpd
sha256sum --check --ignore-missing checksums.txt