Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update hint for deno add <package> #25455

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions cli/graph_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,8 @@ pub fn enhanced_resolution_error_message(error: &ResolutionError) -> String {
} else {
get_import_prefix_missing_error(error).map(|specifier| {
format!(
"If you want to use a JSR or npm package, try running `deno add {}`",
specifier
"If you want to use a JSR or npm package, try running `deno add jsr:{}` or `deno add npm:{}`",
specifier, specifier
)
})
bartlomieju marked this conversation as resolved.
Show resolved Hide resolved
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add foo`
hint: If you want to use a JSR or npm package, try running `deno add jsr:foo` or `deno add npm:foo`
at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add foo`
hint: If you want to use a JSR or npm package, try running `deno add jsr:foo` or `deno add npm:foo`
at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD]
2 changes: 1 addition & 1 deletion tests/specs/run/bare_specifier_without_import/main.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Relative import path "@std/dotenv/load" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add @std/dotenv/load`
hint: If you want to use a JSR or npm package, try running `deno add jsr:@std/dotenv/load` or `deno add npm:@std/dotenv/load`
at [WILDCARD]bare_specifier_without_import/main.ts:1:8
2 changes: 1 addition & 1 deletion tests/testdata/run/error_type_definitions.ts.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[WILDCARD]error: Failed resolving types. Relative import path "baz" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add baz`
hint: If you want to use a JSR or npm package, try running `deno add jsr:baz` or `deno add npm:baz`
at [WILDCARD]/type_definitions/bar.d.ts:[WILDCARD]
2 changes: 1 addition & 1 deletion tests/testdata/run/with_package_json/with_stop/main.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[WILDCARD]Config file found at '[WILDCARD]with_package_json[WILDCARD]with_stop[WILDCARD]some[WILDCARD]nested[WILDCARD]deno.json'
[WILDCARD]
error: Relative import path "chalk" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add chalk`
hint: If you want to use a JSR or npm package, try running `deno add jsr:chalk` or `deno add npm:chalk`
at file:///[WILDCARD]with_package_json/with_stop/some/nested/dir/main.ts:3:19
Loading