From 5447a4ed9e59fb80203d694bf46e079551443b2d Mon Sep 17 00:00:00 2001 From: crowlkats Date: Fri, 13 Dec 2024 13:40:44 +0100 Subject: [PATCH] fix --- src/workspace/resolver.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/workspace/resolver.rs b/src/workspace/resolver.rs index 5eef36f..40a8c39 100644 --- a/src/workspace/resolver.rs +++ b/src/workspace/resolver.rs @@ -3,7 +3,8 @@ use crate::deno_json::ConfigFileError; use crate::sync::new_rc; use crate::workspace::Workspace; -use deno_error::{JsError, JsErrorClass}; +use deno_error::JsError; +use deno_error::JsErrorClass; use deno_package_json::PackageJsonDepValue; use deno_package_json::PackageJsonDepValueParseError; use deno_package_json::PackageJsonDepWorkspaceReq; @@ -155,7 +156,8 @@ pub enum MappedResolution<'a> { }, } -#[derive(Debug, Clone, Error)] +#[derive(Debug, Clone, Error, JsError)] +#[class(type)] pub enum WorkspaceResolveError { #[error("Failed joining '{}' to '{}'. {:#}", .sub_path, .base, .error)] InvalidExportPath { @@ -171,12 +173,15 @@ pub enum WorkspaceResolveError { }, } -#[derive(Debug, Error)] +#[derive(Debug, Error, JsError)] pub enum MappedResolutionError { + #[class(inherit)] #[error(transparent)] Specifier(#[from] SpecifierError), + #[class(inherit)] #[error(transparent)] ImportMap(#[from] ImportMapError), + #[class(inherit)] #[error(transparent)] Workspace(#[from] WorkspaceResolveError), }