refactor(cli): migrate run and cache to new infrastructure (#7996)

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
Kitson Kelly 2020-10-23 11:50:15 +11:00 committed by GitHub
parent 9fa59f0ca8
commit 7e2c7fb6c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1181 additions and 1299 deletions

View file

@ -7,6 +7,7 @@ use deno_core::error::{AnyError, JsError as CoreJsError, JsStackFrame};
use std::error::Error;
use std::fmt;
use std::ops::Deref;
use std::sync::Arc;
const SOURCE_ABBREV_THRESHOLD: usize = 150;
@ -237,7 +238,7 @@ pub struct JsError(CoreJsError);
impl JsError {
pub fn create(
core_js_error: CoreJsError,
source_map_getter: &impl SourceMapGetter,
source_map_getter: Arc<impl SourceMapGetter>,
) -> AnyError {
let core_js_error = apply_source_map(&core_js_error, source_map_getter);
let js_error = Self(core_js_error);