Commit Graph

113 Commits

Author SHA1 Message Date
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 687ed8906a ci: add a workflow to deprecate npm packages
Deprecating needs npm credentials, and this project's live in repository
secrets rather than on a laptop. Takes a spec and a message; an empty
message un-deprecates, which is npm's own convention and what makes a
wrong message recoverable.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 12:58:36 +02:00
apk fa1fdeaa0e fix(ci): poll for the basta dist-tag instead of reading it once
The publish step's own output says it: "Your package is being processed and
may take a few minutes to become available." Reading `dist-tags.latest`
seconds later returns the previous tag, so the guard failed a release that
had in fact succeeded — basta@0.1.0 was published, signed and tagged
correctly, and the job went red anyway.

Polls to a five-minute deadline, the same shape as the platform-package gate
directly above it.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 12:19:54 +02:00
apk 78401b3921 fix(ci): let the basta release fall back to a crates.io token
Trusted Publishing is configured per crate and per workflow filename, and
it can only be configured on a crate that already exists — so the first
publish of a new crate cannot use it. The job already had
`secrets.CARGO_REGISTRY_TOKEN` as a fallback, but the auth step failed the
job before anything could reach it. It is now non-fatal, with an explicit
check that at least one credential is present.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 11:18:15 +02:00
apk b718753839 chore(basta): ship basta on its own trigger, separate from the jscpd release
basta is a separate product from jscpd — a different question about the
same tree — so it gets its own version, its own prebuilt packages and its
own trigger. jscpd goes out on every push to master that leaves a version
unpublished; basta goes out only when a `basta-v*` tag is pushed, or by
hand through workflow_dispatch. Neither release can drag the other along
or hold it up.

`basta-release.yml` owns the whole thing: it checks that the crate, the npm
manifest and the tag all name the same version and that the working tree is
already synced, publishes the crate, builds the eight targets and publishes
`basta-<platform>` plus the `basta` wrapper. It ends by asserting that npm's
`latest` really points at this release — the package carries 1.x versions
from an unrelated tool of the same name, and a dist-tag that quietly stayed
on those would hand every `npm i basta` the wrong program.

The one place the two cannot be separated is crates.io: `jscpd` depends on
`basta`, so cargo refuses to publish jscpd until a matching basta exists.
The jscpd crates job therefore still publishes basta when it is missing, and
that is now commented as the dependency requirement it is. Both paths skip a
version already on the registry, so whichever runs first wins.

npm needed the wrapper pattern `jscpd` and `cpd` already use: `rust/basta/`
holds the manifest, a platform map naming `basta-<platform>`, and a launcher
that falls back to a local `cargo build` when no platform package is
installed. `npm-prebuilt-package.mjs` grew a `--product` flag; its output for
jscpd is byte-identical to before. `prebuilt-targets.json` now carries a
platform label rather than a jscpd-specific blurb, so one table serves both
products. `sync-version.mjs` syncs and verifies the basta wrapper against the
basta crate version — the same independent version/pin update the jscpd block
does, for the same reason it does it.

Nothing is published by this commit.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-16 11:01:06 +02:00
dependabot[bot] 8de72db3ac chore(deps): bump taiki-e/install-action from 2.87.3 to 2.87.8
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.3 to 2.87.8.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/0758d235715de2f3551eacc980d9ae8fce9342c3...d438492cf8a250514fa2d34b30bc3c0dc37c65ff)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-11 03:07:10 +00:00
apk afea9b1cc6 feat(release): publish jscpd platform wheels to PyPI
Closes #1037.

Adds rust/scripts/build-pypi-wheels.py, which repacks the eight
jscpd-<platform>.tar.gz release tarballs into platform wheels: the same
binary under <pkg>.data/scripts/ as both `jscpd` and `cpd`, one wheel
per target, stdlib only, no maturin and no recompilation. glibc wheels
take their manylinux floor from the GLIBC_x.y symbols in the binary
(manylinux_2_34 today), musl builds are static so they tag as
musllinux_1_2, macOS and Windows use the Rust minimums. Semver
pre-releases map to PEP 440 (5.3.0-beta.1 -> 5.3.0b1); other labels
fail rather than guess.

release.yml gains a rust-publish-pypi job after the npm publish: it
takes the binary artifacts from this run, refills any missing target
from the published npm platform package (resumed releases, or a version
already on npm), builds the wheels, pip-installs the matching one and
checks `jscpd --version` and `cpd --version`, then uploads with PyPI
trusted publishing (environment `pypi`, no token, skip-existing). The
detect job treats a version missing from PyPI as pending, so the wheels
for the current release publish on the next push to master without a
new release commit. The GitHub release lists the PyPI package and waits
on the upload the same way it waits on crates.io and npm.

Docs: PyPI in the README install table and packages table, rust/README
and docs/rust.md install sections, and a `language: python` pre-commit
option in docs/ci-and-hooks.md so the hook no longer needs Node.js.

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-10 13:56:08 +02:00
apk ac67c66c7c ci(npm): poll the platform-package gate against a 5-minute deadline
The "Verify all platform packages are published" gate checked npm once,
seconds after the matrix jobs published. npm reads are eventually
consistent, and jscpd-windows-x64-msvc took about three minutes to become
visible on both 5.1.2 and 5.2.0, failing the gate and needing a manual
rerun each time. Re-check only the packages still missing against one
shared 5-minute deadline, as the release-notes step already does (#982).

Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
2026-09-08 12:15:29 +02:00
dependabot[bot] d16c0ff2a8 chore(deps): bump taiki-e/install-action from 2.87.2 to 2.87.3
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.87.2 to 2.87.3.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/1ed6d7be6168f6c9046541087ff549b6bc581fdf...0758d235715de2f3551eacc980d9ae8fce9342c3)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:08:13 +00:00
dependabot[bot] ce66b1af18 chore(deps): bump taiki-e/install-action from 2.86.7 to 2.87.2
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.86.7 to 2.87.2.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/b6ff580856c41316412a0b9b60540fbc6f8c82cc...1ed6d7be6168f6c9046541087ff549b6bc581fdf)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.87.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 08:56:24 +00:00
apk d790c6c1d3 chore: make master v5-only
Everything belonging to the v4 TypeScript engine moves to the master-v4
branch: apps/, packages/, build-utils/, changesets, pnpm workspace, turbo,
the Node.js CI workflow and the ts-* release jobs. What remains is the
Rust workspace under rust/, the npm wrapper and platform packages, the
GitHub Action, Docker image, flake, skills, benchmark and fixtures/.

- rust.yml gains a smoke job that runs the release binary against
  fixtures/ (json, sarif, html) and asserts clones and reporters
- release.yml keeps only the Rust jobs; pnpm removed from every workflow;
  audit.yml keeps cargo audit + cargo deny; dependabot drops the root npm entry
- root package.json becomes a thin private package depending on the exact
  jscpd@5 version so the pre-commit hook keeps installing the binary;
  sync-version.mjs keeps it in step
- .pre-commit-hooks.yaml used v4-only flags that the v5 CLI rejects; fixed
- FORMATS.md is now generated from the Rust tokenizer (224 formats)
- README, docs, CONTRIBUTING, SECURITY, package and crate descriptions,
  benchmark and skills rewritten for v5 on its own terms: no v5-vs-v4 speed
  multipliers anywhere, a single "Looking for v4?" pointer to master-v4
2026-09-02 10:15:10 +02:00
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
apk bebfb49288 fix(rust): correct the declared MSRV to 1.96 and enforce it in CI
The workspace declared rust-version = "1.87", set once when the Rust
workspace was added (0ddf611, June 2026) and never revisited. crates.io
publishes that field verbatim, so the jscpd crate page advertised a floor
the crate cannot actually build on:

  $ cargo +1.93 check -p jscpd
  error: rustc 1.93.1 is not supported by the following packages:
    oxc_allocator@0.147.0 requires rustc 1.96.0
    ...

The real floor is 1.96.0, forced by the 13 oxc_* crates that reach the
published crate through the mandatory oxc_parser -> cpd-tokenizer -> jscpd
chain. ignore, globset and askama independently require 1.88. The number
was probably accurate at the time — oxc was pinned to 0.133 then — and
drifted silently as oxc raised its own MSRV across later bumps.

Nothing caught the drift because every workflow pins the toolchain to
1.97.1, so no job ever built at the declared MSRV. This adds an `msrv` job
that reads rust-version straight out of Cargo.toml and runs cargo check
against exactly that toolchain, so the next oxc bump fails loudly instead
of quietly falsifying published metadata.

The check uses `cargo +<version>` rather than relying on the toolchain
installed by the action: rust-toolchain.toml pins 1.97.1 for development
and would otherwise take precedence, making the job test the wrong
compiler.

rust/README.md claimed 1.87+ and pointed at rust-toolchain.toml, which
actually pins 1.97.1 — the two never agreed. It now states the MSRV and
explains what the pin is for.

Verified: cargo +1.96 check --workspace --all-targets --locked passes, so
1.96 is achievable including dev-dependencies.
2026-08-31 16:11:57 +02:00
Andrey Kucherenko 13b176f43a Merge pull request #983 from kucherenko/chore/npm-metadata-cleanup
chore(ci): run npm metadata cleanup from CI (2FA-exempt token)
2026-08-30 16:08:01 +02:00
apk 47c574d2f9 chore(ci): add npm metadata cleanup inputs to dist-tags workflow
The npm account enforces 2FA on writes, so dist-tag removal and version
deprecation fail with EOTP from a laptop and need an interactive OTP per
operation. The CI automation token is exempt, so run them here instead.

Adds two optional workflow_dispatch inputs: remove_tags (comma-separated
dist-tags to delete, with latest/latest-4 refused as a guard) and
deprecate_range (semver range plus message). Both skip when empty, so
the existing retag-only behaviour is unchanged.
2026-08-30 16:03:20 +02:00
apk 5a125dad51 fix(release): don't report just-published packages as 'Not Yet Published'
The release-notes package check ran a single 'npm view' per package
immediately after publishing. npm reads are eventually consistent, so a
package published seconds earlier can still be invisible — v5.1.0 shipped
with a stale 'Not Yet Published: jscpd@5.1.0 (published: 5.0.16)' section
even though the publish had succeeded.

Re-check only the packages still missing, against one shared deadline
(5 min) so a genuinely unpublished package can't stretch the wait, and
report the results in stable package order. Same fix in the TypeScript
release job, which had the identical single-shot check.
2026-08-30 15:09:09 +02:00
apk 3aee6c4c58 fix(ci): install clippy/rustfmt for pinned 1.97.1 toolchain
Pinning rust-toolchain.toml to 1.97.1 made rustup auto-install a bare
1.97.1 toolchain in CI instead of using the dtolnay-installed 1.97 one
that carried clippy and rustfmt, failing the Clippy step. Declare the
components in the toolchain file so any auto-install includes them, and
align the workflow toolchain pins to 1.97.1 so CI installs the exact
toolchain cargo resolves.

Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-29 13:34:21 +02:00
Andrey Kucherenko 269f5b8e81 Merge pull request #963 from luchsamapparat/master
feat: add support for Windows on ARM
2026-08-29 13:26:31 +02:00
dependabot[bot] 85807f7c2f chore(deps): bump taiki-e/install-action from 2.86.3 to 2.86.7
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.86.3 to 2.86.7.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/5b4d68e2e660441203ab128a23676f1e4faf1532...b6ff580856c41316412a0b9b60540fbc6f8c82cc)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.86.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-28 03:06:46 +00:00
Marvin Luchs b01910ddc2 feat: add support for Windows on ARM 2026-08-26 16:47:39 +02:00
apk f23f39ea03 ci: sign releases with SLSA provenance, pin download pipes (Scorecard)
Improves the OpenSSF Scorecard results (currently 7.2):

- Signed-Releases (0/10): release jobs now generate a sha256
  checksums.txt and signed SLSA build provenance for the binary
  tarballs via actions/attest-build-provenance (keyless, OIDC), and
  upload the Sigstore bundle as a multiple.intoto.jsonl release asset.
  Users can verify assets with
  `gh attestation verify <asset> --repo kucherenko/jscpd`.
- Pinned-Dependencies (8/10): the five `curl | node -e` pipelines that
  parse the crates.io API response are `curl | jq` now — jq consumes
  the download as data, so nothing downloaded is piped into an
  interpreter. The remaining npm warning is the post-publish smoke
  test installing the just-published exact version from the live
  registry, which is the point of that step.
- README: add Socket.dev and OpenSSF Scorecard badges.

release-rust.yml is currently uncalled (release.yml creates the
releases) but gets the same signing steps so it stays correct if
revived.
2026-08-21 08:02:20 +02:00
Andrey Kucherenko d397b60910 Merge pull request #955 from kucherenko/dependabot/github_actions/taiki-e/install-action-2.86.3
chore(deps): bump taiki-e/install-action from 2.85.13 to 2.86.3
2026-08-21 07:41:57 +02:00
Andrey Kucherenko 780279dce7 Merge pull request #954 from kucherenko/dependabot/github_actions/actions/checkout-7.0.1
chore(deps): bump actions/checkout from 5.1.0 to 7.0.1
2026-08-21 07:41:39 +02:00
dependabot[bot] 75f578815e chore(deps): bump taiki-e/install-action from 2.85.13 to 2.86.3
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.85.13 to 2.86.3.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/82cd3e7658a6f96c86c0234aeeda1748937cb0a1...5b4d68e2e660441203ab128a23676f1e4faf1532)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.86.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:08:12 +00:00
dependabot[bot] 4a3218d4d1 chore(deps): bump actions/checkout from 5.1.0 to 7.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.1.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09...3d3c42e5aac5ba805825da76410c181273ba90b1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:07:39 +00:00
dependabot[bot] 8a740706e7 chore(deps): bump rust-lang/crates-io-auth-action from 1.0.4 to 1.0.5
Bumps [rust-lang/crates-io-auth-action](https://github.com/rust-lang/crates-io-auth-action) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/rust-lang/crates-io-auth-action/releases)
- [Commits](https://github.com/rust-lang/crates-io-auth-action/compare/bbd81622f20ce9e2dd9622e3218b975523e45bbe...c6f97d42243bad5fab37ca0427f495c86d5b1a18)

---
updated-dependencies:
- dependency-name: rust-lang/crates-io-auth-action
  dependency-version: 1.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-21 03:07:23 +00:00
apk 35d287e9f4 chore(rust): bump toolchain to 1.97, fix new clippy lints 2026-08-15 20:52:56 +02:00
Andrey Kucherenko 9c36be5535 Merge pull request #928 from kucherenko/dependabot/github_actions/actions/setup-node-7.0.0
chore(deps): bump actions/setup-node from 5.0.0 to 7.0.0
2026-08-14 12:48:25 +02:00
Andrey Kucherenko 326c72e652 Merge pull request #926 from kucherenko/dependabot/github_actions/actions/download-artifact-8.0.1
chore(deps): bump actions/download-artifact from 4.3.0 to 8.0.1
2026-08-14 12:47:55 +02:00
Andrey Kucherenko 6ad657eb33 Merge pull request #924 from kucherenko/dependabot/github_actions/dorny/test-reporter-3
chore(deps): bump dorny/test-reporter from 1 to 3
2026-08-14 12:47:17 +02:00
Andrey Kucherenko 780a13c835 Merge pull request #923 from kucherenko/dependabot/github_actions/pnpm/action-setup-6.0.10
chore(deps): bump pnpm/action-setup from 4.3.0 to 6.0.10
2026-08-14 12:47:01 +02:00
dependabot[bot] 0a5d76ccfd chore(deps): bump actions/setup-node from 5.0.0 to 7.0.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:21 +00:00
dependabot[bot] 451838f549 chore(deps): bump actions/download-artifact from 4.3.0 to 8.0.1
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.3.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/d3f86a106a0bac45b974a628896c90dbdf5c8093...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:13 +00:00
dependabot[bot] 506d68fb70 chore(deps): bump dorny/test-reporter from 1 to 3
Bumps [dorny/test-reporter](https://github.com/dorny/test-reporter) from 1 to 3.
- [Release notes](https://github.com/dorny/test-reporter/releases)
- [Changelog](https://github.com/dorny/test-reporter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dorny/test-reporter/compare/3eeb9fc888e82e8be2fb356bbeec2750231672bc...a43b3a5f7366b97d083190328d2c652e1a8b6aa2)

---
updated-dependencies:
- dependency-name: dorny/test-reporter
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:08 +00:00
dependabot[bot] 209ddd3e17 chore(deps): bump pnpm/action-setup from 4.3.0 to 6.0.10
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 4.3.0 to 6.0.10.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/b906affcce14559ad1aafd4ab0e942779e9f58b1...0977fd99725f1db4007ccb2928dbb4e90d06cc86)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-version: 6.0.10
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:05:02 +00:00
dependabot[bot] 1d9314e6b5 chore(deps): bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 09:04:57 +00:00
apk 968c2af122 sec: harden supply chain per OpenSSF Scorecard findings
- pin every GitHub Action to a full commit SHA (with version comments);
  add github-actions ecosystem to Dependabot to keep the pins fresh
- follow least privilege for workflow tokens: top-level contents:read
  everywhere, checks/id-token/contents write grants scoped to the jobs
  that need them (test-reporter, npm/crates trusted publishing,
  gh release create)
- add SECURITY.md with private disclosure channels and supported versions

Also enabled outside the repo: master branch ruleset (no force-push or
deletion) and GitHub private vulnerability reporting.
2026-08-14 11:04:03 +02:00
apk 7a01672634 chore: pin GitHub 'Latest' badge to v5 releases, polish npm package page
- release.yml: mark the Rust v5 release --latest, the legacy TS v4 and
  cpd releases --latest=false so v4 tags never steal the Latest badge
- rust/jscpd/README.md: use absolute GitHub URLs so links work on npmjs.com
- rust/jscpd/package.json: richer description and search keywords
2026-08-14 10:57:36 +02:00
apk 8d83e984ef fix(ci): npm rejects 'v4' as a dist-tag (valid semver range); use latest-4 2026-08-13 18:23:24 +02:00
apk 494602ed50 fix(ci): keep the jscpd npm latest tag on the v5 line
The jscpd package ships from two release lines: 4.x (TypeScript) and
5.x (Rust wrapper). changeset publish always passes --tag latest (it
ignores publishConfig.tag), so the v4.3.0 maintenance release moved
'latest' from 5.0.15 back to 4.3.0 and 'npx jscpd' started installing
v4 again.

Add a guard step after the TS publish that re-points 'latest' at the
newest 5.x and keeps a 'v4' dist-tag on the newest 4.x, plus a
manually-dispatchable npm-dist-tags workflow with the same logic for
one-off repairs.
2026-08-13 18:21:21 +02:00
apk ae67e679e4 fix(ci): keep release assets complete on resumed releases
When a release run partially fails (e.g. v5.0.15's Windows build), the
retry skips platforms whose npm packages already published — but that
skipped the release-asset archive/upload steps too, and the GitHub
release job only attaches artifacts from its own run. v5.0.15 shipped
with 1 of 6 binaries attached (recovered manually from the first run's
artifacts, which expire after 1 day).

On resumed runs, repack the release-asset tarball from the already
published npm platform package — it contains the exact shipped binary —
so the release job always sees a complete artifact set.
2026-08-13 14:21:52 +02:00
apk 1b03f0e9b4 fix(security): resolve all 27 open Dependabot alerts; restore pnpm overrides
The security overrides lived in package.json's "pnpm.overrides", which
pnpm 10 silently stopped reading (settings moved to pnpm-workspace.yaml)
— so none of them applied and transitive-dependency alerts piled up.

- Move all overrides to pnpm-workspace.yaml and update them to the
  patched minimums for every open alert: fast-uri >=3.1.5, hono
  >=4.12.34, @hono/node-server >=1.19.15, js-yaml >=3.15.1/4.3.1,
  brace-expansion >=1.1.16/5.0.9, nanoid >=3.3.17, postcss >=8.5.23,
  ip-address >=10.3.1, body-parser >=2.3.0 (each annotated with its
  GHSA id).
- Regenerate pnpm-lock.yaml; pnpm dedupe cleared a stale postcss peer
  resolution. All affected packages now resolve to patched versions and
  --frozen-lockfile passes.
- Drop the now-ignored pnpm block from package.json so dead config
  can't mask itself as protection again.
- CI: install with --frozen-lockfile in nodejs.yml and release.yml so
  lockfile corruption or drift fails loudly instead of silently
  re-resolving dependencies from the registry (follow-up from #901).

Verified: pnpm build (10/10 tasks), pnpm test (5/5 suites), and
jscpd-server tests (43/43) all pass on the updated resolutions.
2026-08-13 11:46:32 +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 151725602f chore: update release pipelline, wait for cpd before publish jscpd 2026-06-21 07:40:22 +02:00
apk 4d652c3b88 fix(ci): wait for npm propagation before installing cpd for fixture check
The publish-jscpd job failed on first run and passed on re-run because
npm install -g cpd@${version} ran before the registry CDN had propagated
the freshly published version. Poll npm view for up to 5 minutes before
installing.
2026-06-20 11:07:16 +02:00
apk 65e4b26abb ci: quote multiline package-list outputs to avoid backtick command substitution
Fixes release note step failing with "cpd-core@0.1.5: command not found" because markdown backticks in the published/failed package lists were interpreted as command substitution when assigned inside double quotes.
2026-06-17 20:09:56 +02:00
apk 89730b56ad fix(ci): resilient action install + release binary assets
- action.yml: retry install script 3x with 10s delay between attempts
- action.yml: fallback to npm install when install script fails
- action.yml: Windows install retries with jscpd then cpd fallback
- action.yml: add skip-install input for pre-installed binaries
- action.yml: add exit-code output from jscpd run step
- action.yml: parse-output step uses always() instead of success() || failure()
- action.yml: Run step captures exit code instead of failing workflow
- release.yml: download binary artifacts and upload as release assets
- release.yml: replace awk/sed with node for changelog extraction (exit 127 fix)
- release-rust.yml: same binary asset + node changelog fixes
- npm-rust-publish.yml: archive and upload platform binaries as artifacts
2026-06-13 08:48:01 +02:00
apk 9002cf50b7 fix(ci): replace awk/sed with node for changelog extraction
awk was failing with exit code 127 on the GitHub Actions runner.
Use node -e (guaranteed available) for CHANGELOG parsing instead.
2026-06-13 08:04:00 +02:00
apk b3ed51adb0 feat(ci): add published packages info to GitHub releases
- Rust releases now list crates.io and npm packages with publish status
- TypeScript releases now list all workspace npm packages with publish status
- Fix crates.io User-Agent from kucheren/jscpd to kucherenko/jscpd
2026-06-12 10:26:47 +02:00
apk 58315e0dfd ci: add continue-on-error to test-reporter steps for fork PRs
dorny/test-reporter@v1 calls the GitHub check-runs write API which
is restricted when running from a fork PR. fail-on-error: false only
guards against test-result failures, not API errors. Adding
continue-on-error: true at the step level prevents the 403
HttpError from failing the job on fork PRs while keeping the
reporter fully functional on pushes to master.
2026-06-10 09:27:45 +02:00