diff options
-rw-r--r-- | cli/tools/registry/mod.rs | 11 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/__test__.jsonc | 4 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/deno.jsonc | 11 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/mod.ts | 7 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/node_modules/package/index.d.ts | 1 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/node_modules/package/index.js | 3 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/node_modules/package/package.json | 4 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/package.json | 5 | ||||
-rw-r--r-- | tests/specs/publish/byonm_dep/publish.out | 6 |
9 files changed, 50 insertions, 2 deletions
diff --git a/cli/tools/registry/mod.rs b/cli/tools/registry/mod.rs index 3d13a52b7..de319281b 100644 --- a/cli/tools/registry/mod.rs +++ b/cli/tools/registry/mod.rs @@ -212,8 +212,15 @@ fn collect_excluded_module_diagnostics( return; }; let specifiers = graph - .specifiers() - .map(|(s, _)| s) + .modules() + .filter_map(|m| match m { + deno_graph::Module::Js(_) | deno_graph::Module::Json(_) => { + Some(m.specifier()) + } + deno_graph::Module::Npm(_) + | deno_graph::Module::Node(_) + | deno_graph::Module::External(_) => None, + }) .filter(|s| s.as_str().starts_with(root.as_str())); for specifier in specifiers { if !file_patterns.matches_specifier(specifier) { diff --git a/tests/specs/publish/byonm_dep/__test__.jsonc b/tests/specs/publish/byonm_dep/__test__.jsonc new file mode 100644 index 000000000..303718c99 --- /dev/null +++ b/tests/specs/publish/byonm_dep/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "publish --dry-run --allow-dirty", + "output": "publish.out" +} diff --git a/tests/specs/publish/byonm_dep/deno.jsonc b/tests/specs/publish/byonm_dep/deno.jsonc new file mode 100644 index 000000000..37a237730 --- /dev/null +++ b/tests/specs/publish/byonm_dep/deno.jsonc @@ -0,0 +1,11 @@ +{ + "name": "@scope/package", + "version": "0.0.0", + "exports": "./mod.ts", + "publish": { + // this was previously causing issues because it would cause + // external modules in the node_modules directory to be ignored + "include": ["mod.ts"] + }, + "unstable": ["byonm", "sloppy-imports"] +} diff --git a/tests/specs/publish/byonm_dep/mod.ts b/tests/specs/publish/byonm_dep/mod.ts new file mode 100644 index 000000000..b7c276fd4 --- /dev/null +++ b/tests/specs/publish/byonm_dep/mod.ts @@ -0,0 +1,7 @@ +import { add } from "package"; + +export function myAdd(a: number, b: number): number { + return add(a, b); +} + +export { add }; diff --git a/tests/specs/publish/byonm_dep/node_modules/package/index.d.ts b/tests/specs/publish/byonm_dep/node_modules/package/index.d.ts new file mode 100644 index 000000000..9b197eb1e --- /dev/null +++ b/tests/specs/publish/byonm_dep/node_modules/package/index.d.ts @@ -0,0 +1 @@ +export function add(a: number, b: number): number; diff --git a/tests/specs/publish/byonm_dep/node_modules/package/index.js b/tests/specs/publish/byonm_dep/node_modules/package/index.js new file mode 100644 index 000000000..0ecf3b875 --- /dev/null +++ b/tests/specs/publish/byonm_dep/node_modules/package/index.js @@ -0,0 +1,3 @@ +export function add(a, b) { + return a + b; +}
\ No newline at end of file diff --git a/tests/specs/publish/byonm_dep/node_modules/package/package.json b/tests/specs/publish/byonm_dep/node_modules/package/package.json new file mode 100644 index 000000000..07fe06228 --- /dev/null +++ b/tests/specs/publish/byonm_dep/node_modules/package/package.json @@ -0,0 +1,4 @@ +{ + "main": "index.js", + "type": "module" +}
\ No newline at end of file diff --git a/tests/specs/publish/byonm_dep/package.json b/tests/specs/publish/byonm_dep/package.json new file mode 100644 index 000000000..f0b3ee21d --- /dev/null +++ b/tests/specs/publish/byonm_dep/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "package": "*" + } +} diff --git a/tests/specs/publish/byonm_dep/publish.out b/tests/specs/publish/byonm_dep/publish.out new file mode 100644 index 000000000..f3b8a0dcc --- /dev/null +++ b/tests/specs/publish/byonm_dep/publish.out @@ -0,0 +1,6 @@ +Check file:///[WILDLINE]/mod.ts +Checking for slow types in the public API... +Check file:///[WILDLINE]/mod.ts +Simulating publish of @scope/package@0.0.0 with files: + file:///[WILDLINE]/mod.ts (129B) +Warning Aborting due to --dry-run |