swamp-extension-quality and swamp-extension-publish skills don't guide zod import map resolution for scorer
Opened by bixu · 4/24/2026· Shipped 4/24/2026
Description
When publishing an extension that uses zod with a bare specifier import (import { z } from "zod") mapped via deno.json, the swamp.club scorer fails with:
deno doc failed (code 1): Warning Import "zod" not a dependency
hint: If you want to use the npm package, try running `deno add npm:zod`
error: Failed resolving 'zod' from 'file:<redacted>The root cause is that deno.json is not included in the published tarball by default, so the scorer's deno doc --lint sandbox cannot resolve the bare "zod" specifier.
Expected Skill Guidance
The swamp-extension-quality and swamp-extension-publish skills should explicitly advise:
- If the extension uses zod (which the bundler treats specially — not inlined), add
deno.jsontoadditionalFiles:inmanifest.yamlso the scorer's sandbox has the import map. - Inline
npm:specifiers are blocked by the swamp linter (no-import-prefixrule), so the bare specifier + import map approach is the only valid path — but it only works ifdeno.jsonis in the tarball.
Workaround Applied
Added deno.json to additionalFiles: in manifest.yaml. This resolved the scorer failure.
Environment
- swamp version: 20260424.000956.0-sha.25668e08
- OS: macOS 26.4.1
Shipped
Click a lifecycle step above to view its details.
bixu commented 4/24/2026, 7:57:00 AM
After further investigation: Adding deno.json to additionalFiles: in the manifest does not resolve the issue.
Files in additionalFiles: land at extension/files/ in the tarball, not at the tarball root. When the scorer runs deno doc --lint against the model source files, deno looks for deno.json in the file's directory and parents — but extension/files/deno.json is not in that path, so the import map is never found.
Sign in to post a ripple.