Skip to content

Modernize: dedupe verify test run, add knip, docs routing - #43

Merged
altaywtf merged 5 commits into
mainfrom
chore/modernize-verify-knip-docs
Aug 19, 2026
Merged

Modernize: dedupe verify test run, add knip, docs routing#43
altaywtf merged 5 commits into
mainfrom
chore/modernize-verify-knip-docs

Conversation

@altaywtf

Copy link
Copy Markdown
Member

Fixes #42. Part of the repo modernization program.

Problem

  • verify ran the unit suite twice: vp test, then vp test run --coverage.
  • No unused-code gate; vite-plus was pinned directly while the workspace catalog entry sat unused.
  • docs/DISTRIBUTION.md was unreachable from the README.
  • Tracked .worktreeinclude and the clean script were undocumented in AGENTS.md.
  • The release workflow resolved the bot user via URL-encoded /users/${APP_SLUG}%5Bbot%5D with a user_id output key, diverging from putio-sdk-typescript.

Solution

  • verify is now vp check . && vp pack && knip && knip --production --no-gitignore && vp test run --coverage; added lint:unused and lint:unused:prod mirroring putio-sdk-typescript.
  • knip.json mirrors putio-sdk-typescript's config adapted to this repo's layout. Findings handled:
    • 4 unused exported types (IPutioAnalyticsAPIRetryItem, IPutioAnalyticsCacheOptions, IPutioAnalyticsUserAttributes, IPutioAnalyticsUser): un-exporting them breaks declaration emit with TS4023 because they leak into the inferred public types, so they are covered by ignoreExportsUsedInFile (each is consumed in its own module) instead of removal.
    • 1 unused catalog entry: vite-plus devDependency now uses catalog: instead of a direct pin.
  • README Docs section routes docs/DISTRIBUTION.md.
  • AGENTS.md gains a Worktrees section (mirroring putio-sdk-typescript) and lists vp run clean.
  • Release bot identity step now matches putio-sdk-typescript exactly: unencoded [bot] path, user-id output key, no shell override. No other release trust-boundary changes.

Proof

  • vp run verify green locally: check, pack, knip x2, coverage 100% (71/71 statements).
  • vp run test:consumer 4/4 pass with the pinned node 24.18.0.

altaywtf and others added 3 commits August 19, 2026 22:49
verify ran the suite twice (vp test, then vp test run --coverage); keep
only the coverage run. Add knip in default and production mode, mirroring
putio-sdk-typescript. ignoreExportsUsedInFile covers the four internal
interfaces that declaration emit (TS4023) requires to stay exported.
Pin vite-plus through the workspace catalog to clear the unused catalog
entry knip found.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README Docs now links docs/DISTRIBUTION.md, previously unreachable from
any doc entrypoint. AGENTS.md documents the tracked .worktreeinclude and
lists the clean script.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the unencoded /users/<app-slug>[bot] path, the user-id output key,
and drop the redundant shell override, matching putio-sdk-typescript
ci.yml exactly. No trust-boundary changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 19, 2026 19:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the repo’s verification and maintenance workflow by removing duplicated test runs, introducing an unused-code gate via Knip, and improving documentation routing and release automation consistency.

Changes:

  • Update verify to run a single coverage test pass and add knip checks (dev + production modes), plus new lint:unused* scripts.
  • Add knip.json configuration and align vite-plus dependency management with the workspace catalog.
  • Route distribution docs from README, document worktree behavior/commands in AGENTS, and normalize the release bot identity resolution in CI.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Adds a Docs link to docs/DISTRIBUTION.md.
pnpm-lock.yaml Adds Knip + catalog entry updates (incl. vite-plus).
package.json Adds unused-code lint scripts and updates verify pipeline to include Knip and avoid duplicate tests.
knip.json Introduces Knip config for entry/project globs and export-ignore behavior.
AGENTS.md Documents clean and adds Worktrees guidance.
.github/workflows/ci.yml Adjusts release bot identity lookup/output naming to match the intended shape.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Comment thread AGENTS.md Outdated
altaywtf and others added 2 commits August 19, 2026 22:57
vite-plus now resolves through catalog: in package.json, so setup-vp
must read the concrete version from pnpm-workspace.yaml, matching
putio-sdk-typescript's action.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@altaywtf
altaywtf merged commit 14b0cdb into main Aug 19, 2026
3 checks passed
@altaywtf
altaywtf deleted the chore/modernize-verify-knip-docs branch August 19, 2026 20:01
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize: dedupe verify test run, add knip, docs routing

2 participants