diff --git a/cli/tests/integration/publish_tests.rs b/cli/tests/integration/publish_tests.rs index 6b6fac70d7..dbbbe19120 100644 --- a/cli/tests/integration/publish_tests.rs +++ b/cli/tests/integration/publish_tests.rs @@ -101,6 +101,17 @@ itest!(successful { http_server: true, }); +itest!(node_specifier { + args: "publish --token 'sadfasdf'", + output: "publish/node_specifier.out", + cwd: Some("publish/node_specifier"), + envs: env_vars_for_registry() + .into_iter() + .chain(env_vars_for_npm_tests().into_iter()) + .collect(), + http_server: true, +}); + itest!(config_file_jsonc { args: "publish --token 'sadfasdf'", output: "publish/deno_jsonc.out", diff --git a/cli/tests/testdata/publish/node_specifier.out b/cli/tests/testdata/publish/node_specifier.out new file mode 100644 index 0000000000..7acb5b5ba1 --- /dev/null +++ b/cli/tests/testdata/publish/node_specifier.out @@ -0,0 +1,8 @@ +Checking fast check type graph for errors... +Ensuring type checks... +Download http://localhost:4545/npm/registry/@types/node +Download http://localhost:4545/npm/registry/@types/node/node-[WILDCARD].tgz +Check file:///[WILDCARD]/publish/node_specifier/mod.ts +Publishing @foo/bar@1.0.0 ... +Successfully published @foo/bar@1.0.0 +Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/cli/tests/testdata/publish/node_specifier/deno.json b/cli/tests/testdata/publish/node_specifier/deno.json new file mode 100644 index 0000000000..213a7cec63 --- /dev/null +++ b/cli/tests/testdata/publish/node_specifier/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + } +} diff --git a/cli/tests/testdata/publish/node_specifier/mod.ts b/cli/tests/testdata/publish/node_specifier/mod.ts new file mode 100644 index 0000000000..9d8263709b --- /dev/null +++ b/cli/tests/testdata/publish/node_specifier/mod.ts @@ -0,0 +1,5 @@ +import "node:http"; + +export function foobar(): string { + return "string"; +} diff --git a/cli/tools/registry/graph.rs b/cli/tools/registry/graph.rs index 0bee5fe8a9..d9fb665c4e 100644 --- a/cli/tools/registry/graph.rs +++ b/cli/tools/registry/graph.rs @@ -79,7 +79,7 @@ pub fn collect_invalid_external_imports( |skip_specifiers: &mut HashSet, resolution: &ResolutionResolved| { if visited.insert(resolution.specifier.clone()) { match resolution.specifier.scheme() { - "file" | "data" => {} + "file" | "data" | "node" => {} "jsr" | "npm" => { skip_specifiers.insert(resolution.specifier.clone()); }