summaryrefslogtreecommitdiff
path: root/tests/specs/install
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/install
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/install')
-rw-r--r--tests/specs/install/future_install_global/__test__.jsonc2
-rw-r--r--tests/specs/install/future_install_global/install.out1
-rw-r--r--tests/specs/install/future_install_global/main.js3
-rw-r--r--tests/specs/install/future_install_global/pkg/main.js (renamed from tests/specs/install/no_future_install_global/main.js)0
-rw-r--r--tests/specs/install/future_install_global/pkg/package.json (renamed from tests/specs/install/future_install_global/package.json)1
-rw-r--r--tests/specs/install/no_future_install_global/__test__.jsonc2
-rw-r--r--tests/specs/install/no_future_install_global/install.out1
-rw-r--r--tests/specs/install/no_future_install_global/pkg/main.js3
-rw-r--r--tests/specs/install/no_future_install_global/pkg/package.json (renamed from tests/specs/install/no_future_install_global/package.json)0
9 files changed, 6 insertions, 7 deletions
diff --git a/tests/specs/install/future_install_global/__test__.jsonc b/tests/specs/install/future_install_global/__test__.jsonc
index be6fcab97..e646164c6 100644
--- a/tests/specs/install/future_install_global/__test__.jsonc
+++ b/tests/specs/install/future_install_global/__test__.jsonc
@@ -5,7 +5,7 @@
},
"steps": [
{
- "args": "install --global --root ./bins --name deno-test-bin ./main.js",
+ "args": "install --global --root ./bins --name deno-test-bin ./pkg/main.js",
"output": "install.out"
},
{
diff --git a/tests/specs/install/future_install_global/install.out b/tests/specs/install/future_install_global/install.out
index adb8b4598..58cd88ada 100644
--- a/tests/specs/install/future_install_global/install.out
+++ b/tests/specs/install/future_install_global/install.out
@@ -1,5 +1,4 @@
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
-Initialize @denotest/esm-basic@1.0.0
✅ Successfully installed deno-test-bin[WILDCARD]
[WILDCARD]
diff --git a/tests/specs/install/future_install_global/main.js b/tests/specs/install/future_install_global/main.js
deleted file mode 100644
index 2ba55540b..000000000
--- a/tests/specs/install/future_install_global/main.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { setValue } from "@denotest/esm-basic";
-
-setValue(5);
diff --git a/tests/specs/install/no_future_install_global/main.js b/tests/specs/install/future_install_global/pkg/main.js
index 6268d7136..6268d7136 100644
--- a/tests/specs/install/no_future_install_global/main.js
+++ b/tests/specs/install/future_install_global/pkg/main.js
diff --git a/tests/specs/install/future_install_global/package.json b/tests/specs/install/future_install_global/pkg/package.json
index f3b6cb7be..57493f556 100644
--- a/tests/specs/install/future_install_global/package.json
+++ b/tests/specs/install/future_install_global/pkg/package.json
@@ -1,7 +1,6 @@
{
"name": "deno-test-bin",
"dependencies": {
- "@denotest/esm-basic": "*"
},
"type": "module"
}
diff --git a/tests/specs/install/no_future_install_global/__test__.jsonc b/tests/specs/install/no_future_install_global/__test__.jsonc
index ca351ee0d..657cdab80 100644
--- a/tests/specs/install/no_future_install_global/__test__.jsonc
+++ b/tests/specs/install/no_future_install_global/__test__.jsonc
@@ -2,7 +2,7 @@
"tempDir": true,
"steps": [
{
- "args": "install --root ./bins --name deno-test-bin ./main.js",
+ "args": "install --root ./bins --name deno-test-bin ./pkg/main.js",
"output": "install.out"
},
{
diff --git a/tests/specs/install/no_future_install_global/install.out b/tests/specs/install/no_future_install_global/install.out
index f3a394c6f..b1933f536 100644
--- a/tests/specs/install/no_future_install_global/install.out
+++ b/tests/specs/install/no_future_install_global/install.out
@@ -1,5 +1,6 @@
⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag.
Download http://localhost:4260/@denotest/esm-basic
Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz
+[# there shouldn't be a line saying it initialized the node_modules folder here because this is a global install]
✅ Successfully installed deno-test-bin[WILDCARD]
[WILDCARD]
diff --git a/tests/specs/install/no_future_install_global/pkg/main.js b/tests/specs/install/no_future_install_global/pkg/main.js
new file mode 100644
index 000000000..6268d7136
--- /dev/null
+++ b/tests/specs/install/no_future_install_global/pkg/main.js
@@ -0,0 +1,3 @@
+import { setValue } from "npm:@denotest/esm-basic";
+
+setValue(5);
diff --git a/tests/specs/install/no_future_install_global/package.json b/tests/specs/install/no_future_install_global/pkg/package.json
index 9f465ad50..9f465ad50 100644
--- a/tests/specs/install/no_future_install_global/package.json
+++ b/tests/specs/install/no_future_install_global/pkg/package.json