Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: deno_graph 0.78 #188

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT"
members = ["lib"]

[workspace.dependencies]
deno_graph = "0.77.0"
deno_graph = "0.78.0"
import_map = "0.19.1"
serde = "1"

Expand Down Expand Up @@ -45,7 +45,7 @@ default = ["sha256"]
[dependencies]
anyhow = "1"
base64 = "0.21.0"
deno_ast = { version = "0.38.0", features = ["transpiling"] }
deno_ast = { version = "0.39.0", features = ["transpiling"] }
deno_graph = { workspace = true }
deno_npm = "0.21.0"
deno_semver = "0.5.4"
Expand Down
10 changes: 3 additions & 7 deletions src/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::task::Poll;
use std::task::Waker;

use deno_ast::EmitOptions;
use deno_ast::EmittedSource;
use deno_ast::SourceMapOption;
use deno_ast::TranspileOptions;
use deno_graph::CapturingModuleParser;
Expand Down Expand Up @@ -972,12 +971,9 @@ impl EszipV2 {
media_type: module.media_type,
scope_analysis: false,
})?;
let EmittedSource {
text,
source_map: maybe_source_map,
} = parsed_source.transpile(transpile_options, emit_options)?.into_source();
source = Arc::from(text.into_bytes());
source_map = Arc::from(maybe_source_map.unwrap_or_default().into_bytes());
let emit = parsed_source.transpile(transpile_options, emit_options)?.into_source();
source = emit.source.into();
source_map = Arc::from(emit.source_map.unwrap_or_default());
}
_ => {
return Err(anyhow::anyhow!(
Expand Down
Loading