1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(publish): add node specifiers (#22213)

This commit is contained in:
Leo Kettmeir 2024-02-01 05:18:44 +01:00 committed by GitHub
parent 66e6ed65e9
commit e58b1900a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 1 deletions

View file

@ -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",

View file

@ -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

View file

@ -0,0 +1,7 @@
{
"name": "@foo/bar",
"version": "1.0.0",
"exports": {
".": "./mod.ts"
}
}

View file

@ -0,0 +1,5 @@
import "node:http";
export function foobar(): string {
return "string";
}

View file

@ -79,7 +79,7 @@ pub fn collect_invalid_external_imports(
|skip_specifiers: &mut HashSet<Url>, 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());
}