Skip to content

build(deps): bump knip from 5 to 6 - #68

Merged
stuffbucket merged 1 commit into
mainfrom
chore/knip-6
Sep 7, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
chore/knip-6

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

Held out of #55 because it fails in two packages and both needed decisions
rather than a bump. Both turned out to be knip 6 behaviour changes, not debt
this repo had accumulated.

maximal-core

Five system binaries newly reported unlisted — qemu-system-aarch64,
pgrep, swtpm, schtasks. OS-provided, not npm binaries, so they join
trufflehog in ignoreBinaries.

Five TokenUsage* types newly reported unused — and they are. This was the
one that looked risky, since maximal-core publishes to GitHub Package
Registry. It isn't:

  • the package's surface is the six entries in its exports map
    (client, contract, control-contract, provider-host, settings-types,
    supervisor) — the token-usage barrel is not one of them;
  • a declaration build confirms it: zero TokenUsage* names anywhere in
    dist/lib/*.d.ts;
  • nor is the shape inlined structurally — no byModel, byProvider, buckets,
    inputTokens or cacheRead either;
  • the one file referencing the summary type (lib/live/resources.ts, via
    Awaited<ReturnType<...>>) is not reachable from contract.ts, client.ts
    or supervisor.ts.

Nothing outside could have imported them, because nothing outside could reach
them. The types themselves stay in store.ts, where they are genuinely used
— TokenUsageTotals is extended by three of the others. Only the dead
re-export goes.

Stale ignores removed — src/lib/auth/token.ts,
@stuffbucket/eslint-config, @stuffbucket/maximal-provider-contract. knip 6
detects all three as used, so the ignores were hiding nothing.

maximal

knip 6 descends into the nested client/ workspace; knip 5 did not.
client/ has its own manifest declaring vitest, react and
@playwright/test, so resolving its imports against maximal's manifest
produced 14 phantom "unlisted dependencies". client/ is ignored here and
analysed on its own terms.

Three workspace dependencies plus prettier-plugin-packagejson are detected as
used now, so those ignoreDependencies entries go. lint-staged replaces them
— it is configured through a package.json block rather than imported, which
knip does not count as usage. Same entry maximal-core already carries.

Verification

  • knip 6 passes in both packages.
  • maximal-core check:deep:host passes end to end.
  • Container suite 15/15 tasks; verify:workspace clean; lockfile
    re-resolved and stripped of rotating shard hosts.

Replaces the last held item from #37 that was actually actionable.
@electron/fuses 2 stays blocked upstream on Electron Forge 8 (see #57).

Held out of the tooling group because it fails in two packages and both
needed decisions rather than a bump. Both turned out to be knip 6
behaviour changes rather than debt this repo had accumulated.

maximal-core

  Five system binaries are newly reported unlisted: qemu-system-aarch64,
  pgrep, swtpm and schtasks. They are OS-provided, not npm binaries, so
  they join trufflehog in ignoreBinaries.

  Five TokenUsage* types re-exported from src/lib/token-usage/index.ts
  are newly reported unused, and they are: removed. The concern was that
  maximal-core is published, so dropping them could break a consumer.
  It cannot. The package's surface is the six entries in its `exports`
  map, the token-usage barrel is not one of them and is not reachable
  from any of them, and a declaration build confirms it: no TokenUsage*
  name appears anywhere in dist/lib/*.d.ts, and neither does the shape
  inlined structurally -- no byModel, byProvider, buckets, inputTokens
  or cacheRead. The one file referencing the summary type
  (lib/live/resources.ts, via Awaited<ReturnType<...>>) is not reachable
  from contract.ts, client.ts or supervisor.ts.

  The types themselves stay in store.ts, where they are used --
  TokenUsageTotals is extended by three of the others. Only the dead
  re-export goes.

  Stale ignore entries for src/lib/auth/token.ts, @stuffbucket/eslint-config
  and @stuffbucket/maximal-provider-contract are removed: knip 6 detects
  all three as used, so the ignores were hiding nothing.

maximal

  knip 6 descends into the nested client/ workspace, which knip 5 did
  not. client/ has its own manifest declaring vitest, react and
  @playwright/test, so resolving its imports against maximal's manifest
  produced 14 phantom unlisted dependencies. client/ is ignored here and
  analysed on its own terms.

  Three workspace dependencies and prettier-plugin-packagejson are
  detected as used now, so those ignoreDependencies entries go.
  lint-staged replaces them: it is configured through a package.json
  block rather than imported, which knip does not count as usage --
  the same entry maximal-core already carries.

Verified: knip 6 passes in both packages, maximal-core check:deep:host
passes end to end, the container suite is 15/15, and verify:workspace
passes with the lockfile re-resolved and stripped of rotating shard
hosts.
@stuffbucket
stuffbucket merged commit ab7eb09 into main Sep 7, 2026
6 checks passed
@stuffbucket
stuffbucket deleted the chore/knip-6 branch September 7, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant