Expand a package's exact and patterned imports into a Deno
import map.
Serialize an import map as stable JSON with a trailing newline.
Build the two import map entries a package needs to resolve both itself and its subpaths.
Create an import map and write it to disk, creating parent directories as needed.
A deterministic Deno import map generated from package import entries, following the Import Maps Standard.
-
imports: Readonly<Record<string, string>>
Exact specifier-to-target mappings, sorted by specifier, as in Deno's custom path mappings.
-
scopes: Readonly<Record<string,
Readonly<Record<string,
string>>>>
Scope prefixes mapped to sorted, scope-specific import overrides, as in Deno's scoped mappings.