summaryrefslogtreecommitdiff
path: root/tests/specs/publish
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-06-05 11:04:16 -0400
committerGitHub <noreply@github.com>2024-06-05 17:04:16 +0200
commit7ed90a20d04982ae15a52ae2378cbffd4b6839df (patch)
tree3297d6f7227fbf1cf80e17a2a376ef4dfa52e6ad /tests/specs/publish
parent0544d60012006b1c7799d8b6eafacec9567901ad (diff)
fix: better handling of npm resolution occurring on workers (#24094)
Closes https://github.com/denoland/deno/issues/24063
Diffstat (limited to 'tests/specs/publish')
-rw-r--r--tests/specs/publish/banned_triple_slash_directives/publish.out2
-rw-r--r--tests/specs/publish/has_slow_types/has_slow_types.out1
-rw-r--r--tests/specs/publish/invalid_import/invalid_import.out2
-rw-r--r--tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out2
-rw-r--r--tests/specs/publish/missing_constraint/publish.out3
-rw-r--r--tests/specs/publish/prefer_fast_check_graph/main.out1
-rw-r--r--tests/specs/publish/unanalyzable_dynamic_import/unanalyzable_dynamic_import.out1
7 files changed, 12 insertions, 0 deletions
diff --git a/tests/specs/publish/banned_triple_slash_directives/publish.out b/tests/specs/publish/banned_triple_slash_directives/publish.out
index a67736bc2..f1827538a 100644
--- a/tests/specs/publish/banned_triple_slash_directives/publish.out
+++ b/tests/specs/publish/banned_triple_slash_directives/publish.out
@@ -6,6 +6,7 @@ error[banned-triple-slash-directives]: triple slash directives that modify globa
|
1 | /// <reference lib="deno.ns" />
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the triple slash directive
+ |
= hint: remove the triple slash directive
info: instead instruct the user of your package to specify these directives
@@ -17,6 +18,7 @@ error[banned-triple-slash-directives]: triple slash directives that modify globa
|
2 | /// <reference no-default-lib="true" />
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the triple slash directive
+ |
= hint: remove the triple slash directive
info: instead instruct the user of your package to specify these directives
diff --git a/tests/specs/publish/has_slow_types/has_slow_types.out b/tests/specs/publish/has_slow_types/has_slow_types.out
index 43ac86658..b77134902 100644
--- a/tests/specs/publish/has_slow_types/has_slow_types.out
+++ b/tests/specs/publish/has_slow_types/has_slow_types.out
@@ -5,6 +5,7 @@ error[missing-explicit-return-type]: missing explicit return type in the public
|
2 | export function getRandom() {
| ^^^^^^^^^ this function is missing an explicit return type
+ |
= hint: add an explicit return type to the function
info: all functions in the public API must have an explicit return type
diff --git a/tests/specs/publish/invalid_import/invalid_import.out b/tests/specs/publish/invalid_import/invalid_import.out
index 1f95290dc..929fc72cd 100644
--- a/tests/specs/publish/invalid_import/invalid_import.out
+++ b/tests/specs/publish/invalid_import/invalid_import.out
@@ -10,6 +10,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier
|
1 | import "http://localhost:4545/welcome.ts";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier
+ |
= hint: replace this import with one from jsr or npm, or vendor the dependency into your package
info: the import was resolved to 'http://localhost:4545/welcome.ts'
@@ -22,6 +23,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier
|
2 | import "$echo";
| ^^^^^^^ the specifier
+ |
= hint: replace this import with one from jsr or npm, or vendor the dependency into your package
info: the import was resolved to 'http://localhost:4545/echo.ts'
diff --git a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
index a014f3de6..a7235cbf1 100644
--- a/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
+++ b/tests/specs/publish/invalid_import_esm_sh_suggestion/invalid_import_esm_sh_suggestion.out
@@ -7,10 +7,12 @@ error[invalid-external-import]: invalid import to a non-JSR 'http' specifier
|
1 | import "http://esm.sh/react-dom@18.2.0/server";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier
+ |
= hint: replace this import with one from jsr or npm, or vendor the dependency into your package
|
1 | "npm:react-dom@18.2.0"
| ---------------------- try this specifier
+ |
info: the import was resolved to 'http://esm.sh/react-dom@18.2.0/server'
info: this specifier is not allowed to be imported on jsr
diff --git a/tests/specs/publish/missing_constraint/publish.out b/tests/specs/publish/missing_constraint/publish.out
index 846612979..601035b05 100644
--- a/tests/specs/publish/missing_constraint/publish.out
+++ b/tests/specs/publish/missing_constraint/publish.out
@@ -6,6 +6,7 @@ error[missing-constraint]: specifier 'jsr:@denotest/add' is missing a version co
|
1 | import { add } from "add";
| ^^^^^ the specifier
+ |
= hint: specify a version constraint for the specifier in the import map
info: the specifier resolved to version 1.0.0 today, but will resolve to a different
@@ -17,6 +18,7 @@ error[missing-constraint]: specifier 'npm:@denotest/esm-basic' is missing a vers
|
2 | import * as basic from "basic";
| ^^^^^^^ the specifier
+ |
= hint: specify a version constraint for the specifier in the import map
info: the specifier resolved to version 1.0.0 today, but will resolve to a different
@@ -28,6 +30,7 @@ error[missing-constraint]: specifier 'jsr:@denotest/deps' is missing a version c
|
3 | import * as deps from "jsr:@denotest/deps";
| ^^^^^^^^^^^^^^^^^^^^ the specifier
+ |
= hint: specify a version constraint for the specifier
info: the specifier resolved to version 1.0.0 today, but will resolve to a different
diff --git a/tests/specs/publish/prefer_fast_check_graph/main.out b/tests/specs/publish/prefer_fast_check_graph/main.out
index a68fac83a..6c68dde8a 100644
--- a/tests/specs/publish/prefer_fast_check_graph/main.out
+++ b/tests/specs/publish/prefer_fast_check_graph/main.out
@@ -7,6 +7,7 @@ error[invalid-external-import]: invalid import to a non-JSR 'https' specifier
|
1 | export * from "https://deno.land/std/assert/assert.ts";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier
+ |
= hint: replace this import with one from jsr or npm, or vendor the dependency into your package
info: the import was resolved to 'https://deno.land/std/assert/assert.ts'
diff --git a/tests/specs/publish/unanalyzable_dynamic_import/unanalyzable_dynamic_import.out b/tests/specs/publish/unanalyzable_dynamic_import/unanalyzable_dynamic_import.out
index 7f3ca5555..af92d46b9 100644
--- a/tests/specs/publish/unanalyzable_dynamic_import/unanalyzable_dynamic_import.out
+++ b/tests/specs/publish/unanalyzable_dynamic_import/unanalyzable_dynamic_import.out
@@ -6,6 +6,7 @@ warning[unanalyzable-dynamic-import]: unable to analyze dynamic import
|
2 | await import("asd " + asd);
| ^^^^^^^^^^^^ the unanalyzable dynamic import
+ |
info: after publishing this package, imports from the local import map / package.json do not work
info: dynamic imports that can not be analyzed at publish time will not be rewritten automatically