diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 89ecc8da7d..030b19d80f 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1902,8 +1902,7 @@ pub fn config_to_deno_graph_workspace_member( }; let version = match &config.json.version { Some(name) => Some(deno_semver::Version::parse_standard(name)?), - // todo(#25230): remove - None => bail!("Missing 'version' field in config file."), + None => None, }; Ok(deno_graph::WorkspaceMember { base: config.specifier.join("./").unwrap(), diff --git a/tests/specs/lint/jsr_pkg_no_version/__test__.jsonc b/tests/specs/lint/jsr_pkg_no_version/__test__.jsonc new file mode 100644 index 0000000000..d1783f1dcf --- /dev/null +++ b/tests/specs/lint/jsr_pkg_no_version/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "lint", + "output": "lint.out", + "exitCode": 1 +} diff --git a/tests/specs/lint/jsr_pkg_no_version/deno.json b/tests/specs/lint/jsr_pkg_no_version/deno.json new file mode 100644 index 0000000000..50d49ffb64 --- /dev/null +++ b/tests/specs/lint/jsr_pkg_no_version/deno.json @@ -0,0 +1,4 @@ +{ + "name": "@scope/pkg", + "exports": "./mod.ts" +} diff --git a/tests/specs/lint/jsr_pkg_no_version/lint.out b/tests/specs/lint/jsr_pkg_no_version/lint.out new file mode 100644 index 0000000000..2084995902 --- /dev/null +++ b/tests/specs/lint/jsr_pkg_no_version/lint.out @@ -0,0 +1,14 @@ +error[no-slow-types]: missing explicit return type in the public API + --> [WILDLINE]:1:17 + | +1 | export function test() { + | ^^^^ 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 + docs: https://jsr.io/go/slow-type-missing-explicit-return-type + + +Found 1 problem +Checked 1 file diff --git a/tests/specs/lint/jsr_pkg_no_version/mod.ts b/tests/specs/lint/jsr_pkg_no_version/mod.ts new file mode 100644 index 0000000000..02abbfe2fd --- /dev/null +++ b/tests/specs/lint/jsr_pkg_no_version/mod.ts @@ -0,0 +1,3 @@ +export function test() { + return 1 + 2; +}