From 84b7504d0fdccc07b9f7412408c954ae07765ccb Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 24 Jul 2024 21:43:30 -0400 Subject: fix(workspaces/publish): include the license file from the workspace root if not in pkg (#24714) --- tests/specs/publish/workspace/LICENSE | 0 tests/specs/publish/workspace/__test__.jsonc | 9 +++++++++ tests/specs/publish/workspace/foo/LICENSE | 0 tests/specs/publish/workspace/foo_dry_run.out | 9 +++++++++ tests/specs/publish/workspace/workspace_dry_run.out | 17 +++++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 tests/specs/publish/workspace/LICENSE delete mode 100644 tests/specs/publish/workspace/foo/LICENSE create mode 100644 tests/specs/publish/workspace/foo_dry_run.out create mode 100644 tests/specs/publish/workspace/workspace_dry_run.out (limited to 'tests/specs') diff --git a/tests/specs/publish/workspace/LICENSE b/tests/specs/publish/workspace/LICENSE new file mode 100644 index 000000000..e69de29bb diff --git a/tests/specs/publish/workspace/__test__.jsonc b/tests/specs/publish/workspace/__test__.jsonc index 706b08ccd..0ac5c2718 100644 --- a/tests/specs/publish/workspace/__test__.jsonc +++ b/tests/specs/publish/workspace/__test__.jsonc @@ -4,6 +4,15 @@ "args": "publish --token 'sadfasdf'", "output": "workspace.out" }, + "workspace_dry_run": { + "args": "publish --token 'sadfasdf' --dry-run", + "output": "workspace_dry_run.out" + }, + "individual_dry_run": { + "cwd": "./foo", + "args": "publish --token 'sadfasdf' --dry-run", + "output": "foo_dry_run.out" + }, "individual": { "cwd": "./bar", "args": "publish --token 'sadfasdf'", diff --git a/tests/specs/publish/workspace/foo/LICENSE b/tests/specs/publish/workspace/foo/LICENSE deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/specs/publish/workspace/foo_dry_run.out b/tests/specs/publish/workspace/foo_dry_run.out new file mode 100644 index 000000000..20759c180 --- /dev/null +++ b/tests/specs/publish/workspace/foo_dry_run.out @@ -0,0 +1,9 @@ +Check file:///[WILDLINE]/foo/mod.ts +Checking for slow types in the public API... +Check file:///[WILDLINE]/foo/mod.ts +Simulating publish of @foo/foo@1.0.0 with files: +[# notice how this line is including the LICENSE from the root directory] + file:///[WILDLINE]/workspace/LICENSE (0B) + file:///[WILDLINE]/workspace/foo/deno.json (135B) + file:///[WILDLINE]/workspace/foo/mod.ts (118B) +Warning Aborting due to --dry-run diff --git a/tests/specs/publish/workspace/workspace_dry_run.out b/tests/specs/publish/workspace/workspace_dry_run.out new file mode 100644 index 000000000..dd8eff0ff --- /dev/null +++ b/tests/specs/publish/workspace/workspace_dry_run.out @@ -0,0 +1,17 @@ +Publishing a workspace... +Check file:///[WILDLINE]/workspace/bar/mod.ts +Check file:///[WILDLINE]/workspace/foo/mod.ts +Checking for slow types in the public API... +Check file:///[WILDLINE]/workspace/bar/mod.ts +Check file:///[WILDLINE]/workspace/foo/mod.ts +[UNORDERED_START] +Simulating publish of @foo/foo@1.0.0 with files: + file:///[WILDLINE]/workspace/LICENSE (0B) + file:///[WILDLINE]/workspace/foo/deno.json (135B) + file:///[WILDLINE]/workspace/foo/mod.ts (118B) +Simulating publish of @foo/bar@1.0.0 with files: + file:///[WILDLINE]/workspace/bar/LICENSE (0B) + file:///[WILDLINE]/workspace/bar/deno.json (87B) + file:///[WILDLINE]/workspace/bar/mod.ts (70B) +[UNORDERED_END] +Warning Aborting due to --dry-run -- cgit v1.2.3