Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

[Graphite MQ] Draft PR GROUP:89205c (PRs 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599) #600

Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: fix searching for deno lockfile (#598)
NathanFlurry committed Dec 1, 2024
commit 0545d9037484301cf1a636a5f8120b934d6514a7
17 changes: 7 additions & 10 deletions packages/toolchain/src/tasks/deploy/js.rs
Original file line number Diff line number Diff line change
@@ -54,14 +54,12 @@ pub async fn build_and_upload(
});

// Search for a Deno lockfile
let deno_lockfile_path = ["deno.lock"].iter().find_map(|file_name| {
let path = project_root.join(file_name);
if path.exists() {
Some(path.display().to_string())
} else {
None
}
});
let project_deno_lockfile_path = project_root.join("deno.lock");
let deno_lockfile_path = if project_deno_lockfile_path.exists() {
Some(project_deno_lockfile_path.display().to_string())
} else {
opts.build_config.deno.lock_path.clone()
};

// Build the bundle to the output dir. This will bundle all Deno dependencies into a
// single JS file.
@@ -84,8 +82,7 @@ pub async fn build_and_upload(
.map(|x| project_root.join(x).display().to_string())
}),
import_map_url: opts.build_config.deno.import_map_url.clone(),
lock_path: deno_lockfile_path
.or_else(|| opts.build_config.deno.lock_path.clone()),
lock_path: deno_lockfile_path,
},
bundle: js_utils::schemas::build::Bundle {
minify: opts.build_config.unstable.minify(),