summaryrefslogtreecommitdiff
path: root/tests/specs/publish
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-03 20:54:33 -0400
committerGitHub <noreply@github.com>2024-07-04 00:54:33 +0000
commit147411e64b22fe74cb258125acab83f9182c9f81 (patch)
treea1f63dcbf0404c20534986b10f02b649df5a3ad5 /tests/specs/publish
parentdd6d19e12051fac2ea5639f621501f4710a1b8e1 (diff)
feat: npm workspace and better Deno workspace support (#24334)
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
Diffstat (limited to 'tests/specs/publish')
-rw-r--r--tests/specs/publish/byonm_dep/publish.out4
-rw-r--r--tests/specs/publish/workspace/__test__.jsonc19
-rw-r--r--tests/specs/publish/workspace/deno.json2
-rw-r--r--tests/specs/publish/workspace/workspace.out8
-rw-r--r--tests/specs/publish/workspace/workspace_individual.out4
5 files changed, 20 insertions, 17 deletions
diff --git a/tests/specs/publish/byonm_dep/publish.out b/tests/specs/publish/byonm_dep/publish.out
index a7433f86f..64cf90921 100644
--- a/tests/specs/publish/byonm_dep/publish.out
+++ b/tests/specs/publish/byonm_dep/publish.out
@@ -2,6 +2,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]/deno.jsonc (300B)
- file:///[WILDLINE]/mod.ts (129B)
+ file:///[WILDLINE]/deno.jsonc ([WILDLINE])
+ file:///[WILDLINE]/mod.ts ([WILDLINE])
Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/workspace/__test__.jsonc b/tests/specs/publish/workspace/__test__.jsonc
index 7b1c04d56..706b08ccd 100644
--- a/tests/specs/publish/workspace/__test__.jsonc
+++ b/tests/specs/publish/workspace/__test__.jsonc
@@ -1,10 +1,13 @@
{
- "steps": [{
- "args": "publish --token 'sadfasdf'",
- "output": "workspace.out"
- }, {
- "cwd": "./bar",
- "args": "publish --token 'sadfasdf'",
- "output": "workspace_individual.out"
- }]
+ "tests": {
+ "workspace": {
+ "args": "publish --token 'sadfasdf'",
+ "output": "workspace.out"
+ },
+ "individual": {
+ "cwd": "./bar",
+ "args": "publish --token 'sadfasdf'",
+ "output": "workspace_individual.out"
+ }
+ }
}
diff --git a/tests/specs/publish/workspace/deno.json b/tests/specs/publish/workspace/deno.json
index 57602aab5..a23790570 100644
--- a/tests/specs/publish/workspace/deno.json
+++ b/tests/specs/publish/workspace/deno.json
@@ -1,5 +1,5 @@
{
- "workspaces": [
+ "workspace": [
"foo",
"bar"
]
diff --git a/tests/specs/publish/workspace/workspace.out b/tests/specs/publish/workspace/workspace.out
index 8c57bc2dd..3114e36db 100644
--- a/tests/specs/publish/workspace/workspace.out
+++ b/tests/specs/publish/workspace/workspace.out
@@ -1,9 +1,9 @@
Publishing a workspace...
-Check file:///[WILDCARD]/foo/mod.ts
-Check file:///[WILDCARD]/bar/mod.ts
+Check file:///[WILDLINE]/bar/mod.ts
+Check file:///[WILDLINE]/foo/mod.ts
Checking for slow types in the public API...
-Check file:///[WILDCARD]/foo/mod.ts
-Check file:///[WILDCARD]/bar/mod.ts
+Check file:///[WILDLINE]/bar/mod.ts
+Check file:///[WILDLINE]/foo/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
diff --git a/tests/specs/publish/workspace/workspace_individual.out b/tests/specs/publish/workspace/workspace_individual.out
index edb6b53aa..2cb071709 100644
--- a/tests/specs/publish/workspace/workspace_individual.out
+++ b/tests/specs/publish/workspace/workspace_individual.out
@@ -1,6 +1,6 @@
-Check file:///[WILDCARD]/bar/mod.ts
+Check file:///[WILDLINE]/bar/mod.ts
Checking for slow types in the public API...
-Check file:///[WILDCARD]/bar/mod.ts
+Check file:///[WILDLINE]/bar/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