diff --git a/Cargo.lock b/Cargo.lock index 4d427e6..f83f9cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -254,9 +254,9 @@ dependencies = [ [[package]] name = "deno_ast" -version = "0.36.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c06f7b0771250e5531bb9f86975b3ec15130d9fa77222674c5be290317221f" +checksum = "da1e05031ec63082cd9eaf103bee347120bf58cf8de5c880ab4c732b661c335f" dependencies = [ "anyhow", "base64", @@ -291,6 +291,7 @@ dependencies = [ "swc_visit", "swc_visit_macros", "text_lines", + "thiserror", "unicode-width", "url", ] @@ -332,9 +333,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.71.0" +version = "0.71.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04768521e4c03e9c2084b9566b73370ae59e3905c0f96cb951183f55b795261a" +checksum = "89621fa4d9b33f67e7a390e07e300ac0979b9817921d63f1a5056d51e2ae932a" dependencies = [ "anyhow", "async-trait", @@ -1756,18 +1757,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index be29d8c..2cc9419 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ [workspace.dependencies] anyhow = "1.0.44" base64 = "0.21.5" -deno_graph = { version = "0.71.0", default-features = false } +deno_graph = { version = "0.71.5", default-features = false } url = { version = "2.3.1" } [profile.release] diff --git a/rs-lib/Cargo.toml b/rs-lib/Cargo.toml index 0013b4d..06be7a5 100644 --- a/rs-lib/Cargo.toml +++ b/rs-lib/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" [dependencies] anyhow = { workspace = true } base64 = { workspace = true } -deno_ast = { version = "0.36.0", features = ["bundler", "codegen", "proposal", "react", "sourcemap", "transforms", "typescript", "visit", "transpiling"] } +deno_ast = { version = "0.36.2", features = ["bundler", "codegen", "proposal", "react", "sourcemap", "transforms", "typescript", "visit", "transpiling"] } deno_graph = { workspace = true } escape8259 = "0.5.2" futures = "0.3.17" diff --git a/rs-lib/src/lib.rs b/rs-lib/src/lib.rs index d7944fb..970618d 100644 --- a/rs-lib/src/lib.rs +++ b/rs-lib/src/lib.rs @@ -90,9 +90,11 @@ pub async fn transpile( let mut map = HashMap::new(); for module in graph.modules().filter_map(|m| m.js()) { - if let Some(parsed_source) = analyzer.get_parsed_source(&module.specifier) { - let transpiled_source = - parsed_source.transpile(transpile_options, emit_options)?; + if let Some(parsed_source) = + analyzer.remove_parsed_source(&module.specifier) + { + let transpiled_source = parsed_source + .transpile_owned_with_fallback(transpile_options, emit_options)?; map.insert(module.specifier.to_string(), transpiled_source.text);