Repository navigation
fix(conformance-cli): make @kehto/paja an optional peer - #325
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #324.
What
@kehto/pajamoves fromdependenciesto an optional peer of@napplet/conformance-cli(and stays a devDependency so the preview test still runs).screenshot-preview.tsnow 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 andscreenshot <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/pajainstalled alongside the CLI, so this is aminorchangeset. Until kehto/web#416 ships, local previews against core 0.40 need a preview URL from a compatible shell. The standalonenapplet screenshotprovisions its own pinned@napplet/conformance-cli@0.3.4runner, so it isn't affected.Verification
pnpm build: 13/13 taskspnpm type-check: 21/21 taskspnpm -r test:unit: all suites pass, including the newscreenshot-preview-missing.test.ts(install hint + rethrow) and the existing preview test against the dev copy of Pajapnpm install --frozen-lockfilepasses. 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.deepmergeadvisory, which has no fix)dist/cli.jskeepsimport("@kehto/paja")external; it isn't bundled.Known gaps / follow-up
screenshot <dir>capture in Chromium on this branch. The preview path is covered by the unit test.>=0.21.0to the matching Paja line, and bump the devDependency.🤖 Generated with Claude Code