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.79 #183

Merged
merged 1 commit into from
Jun 25, 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
45 changes: 23 additions & 22 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
[workspace.dependencies]
anyhow = "1.0.44"
base64 = "0.21.5"
deno_graph = { version = "0.78.0", default-features = false }
deno_graph = { version = "0.79.0", default-features = false }
url = { version = "2.3.1" }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion rs-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deno_ast = { version = "0.39.0", features = ["bundler", "codegen", "proposal", "
deno_graph = { workspace = true }
escape8259 = "0.5.2"
futures = "0.3.17"
import_map = "0.19.0"
import_map = "0.20.0"
parking_lot = { version = "0.11.2" }
url = { workspace = true }

Expand Down
8 changes: 4 additions & 4 deletions rs-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub async fn bundle(
maybe_import_map: Option<ImportMapInput>,
options: BundleOptions,
) -> Result<BundleEmit> {
let maybe_import_map = get_import_map_from_input(&maybe_import_map)?;
let maybe_import_map = get_import_map_from_input(maybe_import_map)?;
let import_map_resolver = ImportMapResolver(maybe_import_map);
let mut graph = ModuleGraph::new(GraphKind::CodeOnly);
graph
Expand All @@ -67,7 +67,7 @@ pub async fn transpile(
emit_options: &EmitOptions,
) -> Result<HashMap<String, Vec<u8>>> {
let analyzer = CapturingModuleAnalyzer::default();
let maybe_import_map = get_import_map_from_input(&maybe_import_map)?;
let maybe_import_map = get_import_map_from_input(maybe_import_map)?;
let import_map_resolver = ImportMapResolver(maybe_import_map);
let mut graph = ModuleGraph::new(GraphKind::CodeOnly);
graph
Expand Down Expand Up @@ -112,11 +112,11 @@ pub struct ImportMapInput {
}

fn get_import_map_from_input(
maybe_input: &Option<ImportMapInput>,
maybe_input: Option<ImportMapInput>,
) -> Result<Option<ImportMap>> {
if let Some(input) = maybe_input {
let import_map = import_map::parse_from_json_with_options(
&input.base_url,
input.base_url,
&input.json_string,
ImportMapOptions {
address_hook: None,
Expand Down
Loading