Skip to content

fix(conformance-cli): make @kehto/paja an optional peer - #325

Merged
dskvr merged 2 commits into
mainfrom
fix/conformance-cli-optional-paja
Nov 10, 2026
Merged

dskvr merged 2 commits into
mainfrom
fix/conformance-cli-optional-paja

Conversation

@dskvr

@dskvr dskvr commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #324.

What

@kehto/paja moves from dependencies to an optional peer of @napplet/conformance-cli (and stays a devDependency so the preview test still runs). screenshot-preview.ts now loads it with a dynamic import. If it's missing, you get an install hint ("install a Paja release whose peers accept your core/nap versions, or pass a preview URL"); any other load error is rethrown unchanged.

Why

conformance-cli pins core/nap exactly (0.40.0 / 0.39.0 on main now), but it hard-depended on Paja 0.21.x, whose peers only accept core/nap <0.35. So every install brought in a second core/nap generation (npm) or unmet peers (pnpm).

The fix #324 expects, a Paja range matching the pinned generation, isn't possible yet. The newest Paja (0.32.1, also kehto main) peers on core 0.38 / nap 0.37, and nothing accepts core 0.40 / nap 0.39. I filed that upstream as kehto/web#416.

Paja only backs the local screenshot <dir> preview. Conformance runs and screenshot <preview-url> never touch it. Making it optional means the CLI always installs as one coherent generation, and the preview picks up whichever compatible Paja you install next to it.

No protocol surface changes; this is packaging and an import only.

Behavior change

screenshot <dir> now needs @kehto/paja installed alongside the CLI, so this is a minor changeset. Until kehto/web#416 ships, local previews against core 0.40 need a preview URL from a compatible shell. The standalone napplet screenshot provisions its own pinned @napplet/conformance-cli@0.3.4 runner, so it isn't affected.

Verification

  • pnpm build: 13/13 tasks
  • pnpm type-check: 21/21 tasks
  • pnpm -r test:unit: all suites pass, including the new screenshot-preview-missing.test.ts (install hint + rethrow) and the existing preview test against the dev copy of Paja
  • pnpm install --frozen-lockfile passes. The lockfile diff is only the conformance-cli importer moving Paja to devDependencies. I left out an unrelated re-resolution of security-lab's Kehto peers to the newly published core 0.40.
  • aislop 0.12.0: 99/100 (the known deepmerge advisory, which has no fix)
  • dist/cli.js keeps import("@kehto/paja") external; it isn't bundled.

Known gaps / follow-up

🤖 Generated with Claude Code

dskvr and others added 2 commits November 10, 2026 11:43
conformance-cli pinned core/nap exactly but hard-depended on Paja 0.21.x,
whose peers only accept core/nap <0.35, so every install pulled a second
core/nap generation. Paja only backs local screenshot previews, so load
it with a dynamic import as an optional peer and explain how to install
a compatible release when it's missing.

Fixes #324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dskvr
dskvr merged commit d98eb5e into main Nov 10, 2026
4 checks passed
@dskvr
dskvr deleted the fix/conformance-cli-optional-paja branch November 10, 2026 10:45
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.

conformance-cli 0.6.x depends on @kehto/paja <0.22, whose peers exclude the @napplet/core it pins

1 participant