summaryrefslogtreecommitdiff
path: root/tests/specs/run/workspaces/nested_member
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/run/workspaces/nested_member
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/run/workspaces/nested_member')
-rw-r--r--tests/specs/run/workspaces/nested_member/__test__.jsonc2
-rw-r--r--tests/specs/run/workspaces/nested_member/bar/deno.json3
-rw-r--r--tests/specs/run/workspaces/nested_member/deno.json2
-rw-r--r--tests/specs/run/workspaces/nested_member/foo/bar/deno.json3
-rw-r--r--tests/specs/run/workspaces/nested_member/foo/deno.json3
-rw-r--r--tests/specs/run/workspaces/nested_member/main.out5
6 files changed, 12 insertions, 6 deletions
diff --git a/tests/specs/run/workspaces/nested_member/__test__.jsonc b/tests/specs/run/workspaces/nested_member/__test__.jsonc
index a7669c1ec..fe02eacbc 100644
--- a/tests/specs/run/workspaces/nested_member/__test__.jsonc
+++ b/tests/specs/run/workspaces/nested_member/__test__.jsonc
@@ -2,5 +2,5 @@
"args": "run -A main.ts",
"output": "main.out",
"tempDir": true,
- "exitCode": 1
+ "exitCode": 0
}
diff --git a/tests/specs/run/workspaces/nested_member/bar/deno.json b/tests/specs/run/workspaces/nested_member/bar/deno.json
index ef3bfc37a..3bc0e52ec 100644
--- a/tests/specs/run/workspaces/nested_member/bar/deno.json
+++ b/tests/specs/run/workspaces/nested_member/bar/deno.json
@@ -4,5 +4,6 @@
"imports": {
"@/": "./",
"secret_mod/": "./some_mod/"
- }
+ },
+ "exports": "./mod.ts"
}
diff --git a/tests/specs/run/workspaces/nested_member/deno.json b/tests/specs/run/workspaces/nested_member/deno.json
index 6d9c09d4d..8108d54fc 100644
--- a/tests/specs/run/workspaces/nested_member/deno.json
+++ b/tests/specs/run/workspaces/nested_member/deno.json
@@ -1,5 +1,5 @@
{
- "workspaces": [
+ "workspace": [
"foo",
"foo/bar"
]
diff --git a/tests/specs/run/workspaces/nested_member/foo/bar/deno.json b/tests/specs/run/workspaces/nested_member/foo/bar/deno.json
index d40328b36..d4948ddbb 100644
--- a/tests/specs/run/workspaces/nested_member/foo/bar/deno.json
+++ b/tests/specs/run/workspaces/nested_member/foo/bar/deno.json
@@ -3,5 +3,6 @@
"version": "0.0.0",
"imports": {
"chalk": "npm:chalk"
- }
+ },
+ "exports": "./hello.ts"
}
diff --git a/tests/specs/run/workspaces/nested_member/foo/deno.json b/tests/specs/run/workspaces/nested_member/foo/deno.json
index 68e053b02..6bc959c4d 100644
--- a/tests/specs/run/workspaces/nested_member/foo/deno.json
+++ b/tests/specs/run/workspaces/nested_member/foo/deno.json
@@ -3,5 +3,6 @@
"version": "0.0.0",
"imports": {
"~/": "./"
- }
+ },
+ "exports": "./mod.ts"
}
diff --git a/tests/specs/run/workspaces/nested_member/main.out b/tests/specs/run/workspaces/nested_member/main.out
index 98598a306..ec46186a7 100644
--- a/tests/specs/run/workspaces/nested_member/main.out
+++ b/tests/specs/run/workspaces/nested_member/main.out
@@ -1 +1,4 @@
-error: Workspace member 'foo/bar' is nested within other workspace member 'foo'
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chalk/chalk-5.0.1.tgz
+buzz from foo
+[Function: chalk] createChalk { level: 0 }