0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00
denoland-deno/cli/args
Bartek Iwańczuk 44f8b05f5b
feat: Expand 'imports' section of deno.json (#22087)
This commit adds automatic expansion of "imports" field in "deno.json"
file.

If "npm:" or "jsr:" imports are encountered we automatically try to add
a "directory" remapping.

Previously users had to specify entries for both `foo` and `foo/` to be
able to import like
`import { symbol1 } from "foo";` and `import { symbol2 } from
"foo/some_file.js"`:
```
{
  "imports": {
    "foo": "npm:@foo/bar",
    "foo/": "npm:/@foo/bar/",
}
```

With this change users can only add entry for `foo`:
```
{
  "imports": {
    "foo": "npm:@foo/bar",
}
```
The entry for `foo/` will be provided automatically.

Similarly if user provides "directory" remapping explicitly, we will not
overwrite it.
2024-01-24 23:44:06 +01:00
..
flags.rs refactor: set removal version for deno bundle (#22062) 2024-01-24 02:36:51 +01:00
flags_net.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
import_map.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
lockfile.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
mod.rs feat: Expand 'imports' section of deno.json (#22087) 2024-01-24 23:44:06 +01:00
package_json.rs feat(lockfile): track JSR and npm dependencies in config file (#22004) 2024-01-22 22:31:12 +01:00