Skip to content

cli: import map support for deno add #24264

@scarf005

Description

@scarf005

Status Quo

using deno add will break existing importMap section in deno.json.

$ deno add @std/fs
// deno.json
{
-  "importMap": "import_map.json"
+  "importMap": "import_map.json",
+  "imports: {
+    "@std/fs": "jsr:@std/fs@^0.229.3",
+  }
}

Suggestion

if importMap exists, attempt to update import map instead.

// import_map.json
{
  "imports: {
+    "@std/fs": "jsr:@std/fs@^0.229.3",
  }
}

Others

I'm interested in opening a PR (pointers on where to look at would be appreciated!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clirelated to cli/ dirsuggestionsuggestions for new features (yet to be agreed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions