Skip to content

Commit 0bf20b1

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Remove common -> deno_core dependency (#27274)
It's only used for parsing frames - and it's really under the hood just a type alias to Url. Technically this could regress in the future, but I think it's fine. Alternative would be to move JsError or to type parameterize from_frames, but that sounds way harder/more confusing. GitOrigin-RevId: b693becc2f5ff1852448fcd13182b47e2b092e12
1 parent 8b0bdcd commit 0bf20b1

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/common/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ cmd_util = { path = "../cmd_util" }
2323
crossbeam-channel = { workspace = true }
2424
csf = { workspace = true }
2525
cstr = { workspace = true }
26-
deno_core = { workspace = true }
2726
derive_more = { workspace = true }
2827
enum-iterator = { workspace = true }
2928
errors = { path = "../errors" }

crates/common/src/errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::{
88
sync::LazyLock,
99
};
1010

11-
use deno_core::ModuleSpecifier;
1211
use errors::{
1312
ErrorMetadata,
1413
ErrorMetadataAnyhowExt,
@@ -28,6 +27,7 @@ use regex::Regex;
2827
use serde::Deserialize;
2928
use serde_json::Value as JsonValue;
3029
use sourcemap::SourceMap;
30+
use url::Url;
3131
use value::{
3232
heap_size::{
3333
HeapSize,
@@ -500,7 +500,7 @@ impl JsError {
500500
message: String,
501501
frame_data: Vec<FrameData>,
502502
custom_data: Option<ConvexValue>,
503-
mut lookup_source_map: impl FnMut(&ModuleSpecifier) -> anyhow::Result<Option<SourceMap>>,
503+
mut lookup_source_map: impl FnMut(&Url) -> anyhow::Result<Option<SourceMap>>,
504504
) -> Self {
505505
let mut source_maps = BTreeMap::new();
506506
let mut mapped_frames = Vec::with_capacity(frame_data.len());
@@ -512,7 +512,7 @@ impl JsError {
512512
..
513513
} = frame
514514
{
515-
let Ok(specifier) = ModuleSpecifier::parse(f) else {
515+
let Ok(specifier) = Url::parse(f) else {
516516
// We expect the file_name to be fully qualified URL but seems
517517
// this is not always the case. Lets log warning here.
518518
tracing::warn!("Skipping frame with invalid file_name: {f}");

0 commit comments

Comments
 (0)