diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-11-26 18:14:04 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-11-26 09:14:04 -0800 |
commit | 9712e0c31582b5052e7e647f694af1f7bccad0b9 (patch) | |
tree | 620b15fbcdfe69a4e3b2d83135428ddc806aec99 /cli | |
parent | 2a348144c6932f749dfa28b6b8590d6df1c083f2 (diff) |
better error messages for 'relative import path not prefixed with / or ./ or ../' (#3405)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/deno_error.rs | 2 | ||||
-rw-r--r-- | cli/tests/error_011_bad_module_specifier.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/error_012_bad_dynamic_import_specifier.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/error_014_catch_dynamic_import_error.js.out | 4 | ||||
-rw-r--r-- | cli/tests/error_type_definitions.ts.out | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/cli/deno_error.rs b/cli/deno_error.rs index 346149cd1..b16fb3fa6 100644 --- a/cli/deno_error.rs +++ b/cli/deno_error.rs @@ -140,7 +140,7 @@ impl GetErrorKind for ModuleResolutionError { match self { InvalidUrl(ref err) | InvalidBaseUrl(ref err) => err.kind(), InvalidPath(_) => ErrorKind::InvalidPath, - ImportPrefixMissing(_) => ErrorKind::ImportPrefixMissing, + ImportPrefixMissing(_, _) => ErrorKind::ImportPrefixMissing, } } } diff --git a/cli/tests/error_011_bad_module_specifier.ts.out b/cli/tests/error_011_bad_module_specifier.ts.out index 0a90cd32c..276443e5b 100644 --- a/cli/tests/error_011_bad_module_specifier.ts.out +++ b/cli/tests/error_011_bad_module_specifier.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "bad-module.ts" not prefixed with / or ./ or ../ +[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "bad-module.ts" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/error_011_bad_module_specifier.ts" [WILDCARD]dispatch_json.ts:[WILDCARD] at DenoError ([WILDCARD]errors.ts:[WILDCARD]) at unwrapResponse ([WILDCARD]dispatch_json.ts:[WILDCARD]) diff --git a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out index 0a90cd32c..52e5b913e 100644 --- a/cli/tests/error_012_bad_dynamic_import_specifier.ts.out +++ b/cli/tests/error_012_bad_dynamic_import_specifier.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "bad-module.ts" not prefixed with / or ./ or ../ +[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "bad-module.ts" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/error_012_bad_dynamic_import_specifier.ts" [WILDCARD]dispatch_json.ts:[WILDCARD] at DenoError ([WILDCARD]errors.ts:[WILDCARD]) at unwrapResponse ([WILDCARD]dispatch_json.ts:[WILDCARD]) diff --git a/cli/tests/error_014_catch_dynamic_import_error.js.out b/cli/tests/error_014_catch_dynamic_import_error.js.out index c18b680a1..1a2ab2fd8 100644 --- a/cli/tests/error_014_catch_dynamic_import_error.js.out +++ b/cli/tests/error_014_catch_dynamic_import_error.js.out @@ -1,8 +1,8 @@ Caught direct dynamic import error. -TypeError: relative import path "does not exist" not prefixed with / or ./ or ../ +TypeError: relative import path "does not exist" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/error_014_catch_dynamic_import_error.js" Caught indirect direct dynamic import error. -TypeError: relative import path "does not exist either" not prefixed with / or ./ or ../ +TypeError: relative import path "does not exist either" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/indirect_import_error.js" Caught error thrown by dynamically imported module. Error: An error diff --git a/cli/tests/error_type_definitions.ts.out b/cli/tests/error_type_definitions.ts.out index d0b599862..e21b6d794 100644 --- a/cli/tests/error_type_definitions.ts.out +++ b/cli/tests/error_type_definitions.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "baz" not prefixed with / or ./ or ../ +[WILDCARD]error: Uncaught ImportPrefixMissing: relative import path "baz" not prefixed with / or ./ or ../ Imported from "[WILDCARD]/type_definitions/bar.d.ts" [WILDCARD]dispatch_json.ts:[WILDCARD] at DenoError ([WILDCARD]errors.ts:[WILDCARD]) at unwrapResponse ([WILDCARD]dispatch_json.ts:[WILDCARD]) |