Relationships
#3612 extension push resolves the Deno config and import map the way Deno does: deno.jsonc, importMap file references and scopes
Opened by skunk-ape · 10/19/2026· Shipped 10/22/2026
Merged 2026-10-20 (Seth): this issue now covers swamp-club#3676 and the deno.json-mode case of swamp-club#3669. All three have one root cause: push reads the Deno config and import map less completely than Deno does. Push's resolver (readImportMap / resolveBareImport), used by the bundle, by #3637's bare-import rewrite and by the dependency audit, reads only the top-level imports object of a file named deno.json. Deno also reads deno.jsonc, an importMap file reference, and scopes. When the two disagree, push either ships and audits a different version than the one the author built and tested against, or ships a bare import that later fails.
Cases
deno.jsoncis ignored (original #3612).findDenoConfig(src/cli/resolve_extension_files.ts:414) walks up from the manifest looking only fordeno.json. Adeno.jsoncproject is bundled with--no-lockand no import map (bundle.ts denoProjectArgs). Yetsrc/domain/extensions/archive_root_sources.tsalready namesdeno.jsoncin its archive refusal list. No current extension usesdeno.jsonc, so this one is latent.scopesis ignored (was #3676; correctness). Say the top-levelimportsmapsmstonpm:ms@2.1.3, and a scope coveringextensions/maps it tonpm:ms@3.0.0. Deno bundles and tests against 3.0.0, but the archive source shipsnpm:ms@2.1.3, and push audits that version, with no warning. Found by the #3637 adversarial review (verify-reviews on 52026da1).- An
importMapfile reference is ignored (deno.json case of #3669). Deno resolves the bare import through the referenced map, but push's resolver doesn't see it, so the import ships bare.extension quality's local scorer then crashes withdeno doc --json failed ... Failed resolving '<name>'(expected from the code; not yet reproduced).
Expected
Push never ships or audits a different version than the one the extension resolves. Resolve the config as Deno does:
deno.json, thendeno.jsoncimportMapfile references- the scope covering the importing module
Where push can't follow Deno exactly, treat the name as unresolved: it ships as written and the bare-specifiers finding names it. It must never resolve silently to a different target.
Acceptance
- Unit tests for each case.
- A UAT item, at least for the scopes case, extending the #3637 bare-import UAT.
- The package.json-mode crash in #3669 isn't covered here; it stays in #3669 with #3630/#3632.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.