Skip to content

Commit 2dbd27e

Browse files
authored
feat(BREAKING): remove import map dependency from deno_graph (#617)
1 parent 200a22d commit 2dbd27e

File tree

36 files changed

+65
-308
lines changed

36 files changed

+65
-308
lines changed

Cargo.lock

Lines changed: 2 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[package]
22
name = "deno_graph"
33
version = "0.105.0"
4+
authors = ["the Deno authors"]
5+
documentation = "https://docs.rs/deno_graph"
46
edition = "2024"
5-
description = "Module graph analysis for deno"
67
homepage = "https://deno.land/"
7-
repository = "https://github.com/denoland/deno_graph"
8-
documentation = "https://docs.rs/deno_graph"
9-
authors = ["the Deno authors"]
108
license = "MIT"
9+
repository = "https://github.com/denoland/deno_graph"
10+
description = "Module graph analysis for deno"
1111

1212
[workspace]
1313
members = ["lib"]
1414

1515
[workspace.dependencies]
16+
deno_error = { version = "0.7.0", features = ["serde", "serde_json"] }
1617
deno_unsync = { version = "0.4.4", default-features = false }
17-
thiserror = "2"
18-
deno_error = "0.7.0"
1918
sys_traits = "0.1.16"
19+
thiserror = "2"
2020

2121
[lib]
2222
name = "deno_graph"
@@ -49,16 +49,12 @@ chrono = { version = "0.4.42", default-features = false, features = ["serde"] }
4949
data-url = "0.3.0"
5050
# this is optional in order to support using parsers other than swc
5151
deno_ast = { version = "0.52.0", features = ["emit"], optional = true }
52-
deno_media_type = { version = "0.3.0", features = [
53-
"decoding",
54-
"data_url",
55-
"module_specifier",
56-
] }
57-
deno_unsync.workspace = true
58-
deno_path_util = "0.6.0"
52+
deno_error.workspace = true
53+
deno_media_type = { version = "0.3.0", features = ["decoding", "data_url", "module_specifier"] }
54+
deno_path_util = "0.6.4"
5955
deno_semver = "0.9.0"
56+
deno_unsync.workspace = true
6057
futures = "0.3.26"
61-
import_map = "0.24.0"
6258
indexmap = { version = "2", features = ["serde"] }
6359
log = "0.4.20"
6460
monch = "0.5.0"
@@ -70,7 +66,6 @@ serde_json = { version = "1.0.67", features = ["preserve_order"] }
7066
sha2 = "^0.10.0"
7167
sys_traits.workspace = true
7268
thiserror.workspace = true
73-
deno_error.workspace = true
7469
twox-hash = { version = "1.6.3", optional = true }
7570
url = { version = "2.5.4", features = ["serde"] }
7671
wasm_dep_analyzer = "0.4.0"
@@ -80,18 +75,14 @@ deno_unsync = { workspace = true, features = ["tokio"] }
8075

8176
[dev-dependencies]
8277
bincode = "1.3.3"
78+
deno_terminal = "0.2.0"
79+
env_logger = "0.11.3"
8380
file_test_runner = "0.7.0"
8481
pretty_assertions = "1.0.0"
85-
reqwest = { version = "0.12.4", default-features = false, features = [
86-
"http2",
87-
"charset",
88-
"rustls-tls-webpki-roots",
89-
] }
82+
reqwest = { version = "0.12.4", default-features = false, features = ["http2", "charset", "rustls-tls-webpki-roots"] }
83+
sys_traits = { workspace = true, features = ["memory"] }
9084
tempfile = "3.4.0"
9185
tokio = { version = "1.10.1", features = ["macros", "rt-multi-thread", "sync"] }
92-
deno_terminal = "0.2.0"
93-
env_logger = "0.11.3"
94-
sys_traits = { workspace = true, features = ["memory"] }
9586

9687
[profile.release]
9788
codegen-units = 1

src/module_specifier.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
pub type ModuleSpecifier = url::Url;
44

5-
pub use import_map::specifier::SpecifierError;
6-
pub use import_map::specifier::resolve_import;
5+
pub use deno_path_util::SpecifierError;
6+
pub use deno_path_util::resolve_import;
77

88
pub fn is_fs_root_specifier(url: &ModuleSpecifier) -> bool {
99
if url.scheme() != "file" {

src/source/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,6 @@ pub enum ResolveError {
469469
Specifier(#[from] SpecifierError),
470470
#[class(inherit)]
471471
#[error(transparent)]
472-
ImportMap(#[from] import_map::ImportMapError),
473-
#[class(inherit)]
474-
#[error(transparent)]
475472
Other(#[from] deno_error::JsErrorBox),
476473
}
477474

tests/specs/ecosystem/ayonli/jsext/0_7_10.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:78:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

tests/specs/ecosystem/ayonli/jsext/0_7_11.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:78:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

tests/specs/ecosystem/ayonli/jsext/0_7_7.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:66:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

tests/specs/ecosystem/ayonli/jsext/0_7_8.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:78:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

tests/specs/ecosystem/ayonli/jsext/0_8_0.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:78:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

tests/specs/ecosystem/ayonli/jsext/0_8_1.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ TS4114 [ERROR]: This member must have an 'override' modifier because it override
5656
~~~~~~~~~~~~~~~~~
5757
at file://<tmpdir>/collections/CiMap.ts:30:3
5858

59-
TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
60-
*/ export default function read<T>(target: NodeJS.EventEmitter, eventMap?: {
61-
~~~~~~
62-
at file://<tmpdir>/read.ts:78:45
63-
64-
Found 8 errors.
59+
Found 7 errors.
6560

6661
error: Type checking failed.
6762

0 commit comments

Comments
 (0)