diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-04-11 19:52:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 23:52:35 +0000 |
commit | 98077e4b3ce5bf3fd7378d0c2b711fcd97bcc143 (patch) | |
tree | 2d0689ceba26bef59b74a4df72d275d94e9d4c08 /tests | |
parent | f358ae627843182fb6aad69dae74f6d29788956b (diff) |
fix(publish): do not warn about excluded external modules in node_modules directory (#23173)
Diffstat (limited to 'tests')
8 files changed, 41 insertions, 0 deletions
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 |