Commit Graph

5 Commits

Author SHA1 Message Date
apk b0c31a4042 chore: apply audit fixes across repo, crates, npm wrapper and pipelines
Rust / crates.io
- report the invoked binary name in --version/--help (jscpd vs cpd)
- add repository, documentation, keywords, categories to all crates
- exclude tests/ from the jscpd crate package; add cargo-binstall metadata
- expand the crates.io README and render it on docs.rs

npm
- add funding field to jscpd, cpd and jscpd@4 packages
- add jscpd-linux-arm64-musl platform package and clearer unsupported-platform error
- enable provenance for the v4 changeset publish

Pipelines
- rust.yml: windows-latest in the matrix, drop dead schedule guard
- release.yml: cosign-sign release assets, floating v5 tag, LICENSE in tarballs,
  invoke the new docker.yml (GHCR multi-arch image) after each release
- audit.yml: nightly cargo audit, cargo deny and pnpm audit
- Dockerfile: multi-stage image from release binaries (distroless), mcp target for Glama

Docs / community
- README: shields badges, single primary install per OS, GitHub Action snippet,
  link to jscpd.dev, v5.1 features, 15 reporters, 224 formats, 8 platforms
- docs: @v5 action tag, Docker usage, baseline section, current crate versions
- YAML issue forms with engine selector, config.yml, CODEOWNERS
- remove stale .github/CONTRIBUTING.md stub, custom.md, TODO.md; untrack rust/jscpd-report.json
- examples: mark as v4 API, add a Rust cpd-finder example
2026-09-02 09:57:06 +02:00
Andrey Kucherenko ff1ae361fb fix(rust): rename cpd binary and npm platform packages to jscpd
Renames the compiled binary from cpd(.exe) to jscpd(.exe) and the
platform-specific optional-dependency npm packages from cpd-* to
jscpd-* to avoid collision with an antivirus-flagged executable name.

Fixes #826
2026-07-08 17:38:18 +02:00
apk d330dda66d fix(#816): resolve platform package in nested node_modules 2026-06-13 06:56:00 +02:00
apk e5645ea15e feat(v5): add .jscpd.json path config support and update performance benchmarks
- Add path field to ConfigFile struct so v5 reads scan directories
  from .jscpd.json like v4 does, resolving relative paths against
  the config file's directory
- Use config path when no CLI paths are provided (Options::from_cli_and_config)
- Fix benchmark methodology: v4 was silently scanning only ./fixtures
  due to .jscpd.json path override; re-ran from /tmp with proper isolation
- Add docs/performance-comparison.md with full benchmark report
- Update performance claims across all READMEs (24-37x, was 10-30x):
  - fixtures (548 files): 34.3x faster
  - svelte (9K files): 36.9x faster
  - CopilotKit (17K files): 24.1x faster
- Un-ignore docs/ folder in .gitignore (was ignoring all docs)
2026-06-08 16:50:23 +02:00
apk 2dabdc766a feat: add publish pipelines for Rust jscpd (npm + crates.io)
- Add npm package scaffold for cpd@5.0.0 with prebuilt binary distribution
  - rust/package.json: main cpd package with optionalDependencies for 6 platforms
  - rust/run-cpd.js: CLI shim with platform detection and binary resolution
  - rust/platform-map.js: platform detection (6 targets including musl)
  - rust/npm/prebuilt-targets.json: platform matrix configuration
  - rust/npm/cpd-*/package.json: platform package templates
  - rust/scripts/npm-prebuilt-package.mjs: assembles platform packages from binaries

- Add GitHub Actions workflows
  - .github/workflows/crates-publish.yml: publishes all 5 crates to crates.io
    in dependency order with OIDC Trusted Publishing and index-wait polling
  - .github/workflows/npm-rust-publish.yml: cross-compiles for 6 platforms,
    publishes platform packages with idempotency checks, then main cpd package
  - .github/workflows/release-rust.yml: orchestrator triggered by push to
    release/rust branch, creates GitHub Release with cpd-v<version> tag

- Configure Rust crates for publishing
  - Change binary name from jscpd to cpd (crate name stays jscpd)
  - Convert inter-crate deps to dual version+path format for crates.io
  - Update integration tests for cpd binary name

- Add build and release scripts
  - rust/scripts/sync-version.mjs: syncs version from package.json to Cargo.toml
  - rust/scripts/publish-crates.sh: manual crates.io publish with dependency ordering

- Document pnpm workspace exclusion for rust/ directory
2026-06-05 11:37:08 +02:00