diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-03 20:54:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 00:54:33 +0000 |
commit | 147411e64b22fe74cb258125acab83f9182c9f81 (patch) | |
tree | a1f63dcbf0404c20534986b10f02b649df5a3ad5 /tests/specs/compile | |
parent | dd6d19e12051fac2ea5639f621501f4710a1b8e1 (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/compile')
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/.npmrc (renamed from tests/specs/compile/npmrc/.npmrc) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/__test__.jsonc | 22 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/deno.json | 3 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/main.js (renamed from tests/specs/compile/npmrc/main.js) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/main.out (renamed from tests/specs/compile/npmrc/main.out) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_auto_install/package.json (renamed from tests/specs/compile/npmrc/package.json) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/.npmrc | 4 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/__test__.jsonc (renamed from tests/specs/compile/npmrc/__test__.jsonc) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/install.out (renamed from tests/specs/compile/npmrc/install.out) | 0 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/main.js | 8 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/main.out | 3 | ||||
-rw-r--r-- | tests/specs/compile/npmrc_byonm/package.json | 8 |
12 files changed, 48 insertions, 0 deletions
diff --git a/tests/specs/compile/npmrc/.npmrc b/tests/specs/compile/npmrc_auto_install/.npmrc index 13552ad61..13552ad61 100644 --- a/tests/specs/compile/npmrc/.npmrc +++ b/tests/specs/compile/npmrc_auto_install/.npmrc diff --git a/tests/specs/compile/npmrc_auto_install/__test__.jsonc b/tests/specs/compile/npmrc_auto_install/__test__.jsonc new file mode 100644 index 000000000..f4ba8ee28 --- /dev/null +++ b/tests/specs/compile/npmrc_auto_install/__test__.jsonc @@ -0,0 +1,22 @@ +{ + "tempDir": true, + "steps": [{ + "if": "unix", + "args": "compile --output main main.js", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "main.out" + }, { + "if": "windows", + "args": "compile --output main.exe main.js", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "main.out" + }] +} diff --git a/tests/specs/compile/npmrc_auto_install/deno.json b/tests/specs/compile/npmrc_auto_install/deno.json new file mode 100644 index 000000000..176354f98 --- /dev/null +++ b/tests/specs/compile/npmrc_auto_install/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": true +} diff --git a/tests/specs/compile/npmrc/main.js b/tests/specs/compile/npmrc_auto_install/main.js index 66b393636..66b393636 100644 --- a/tests/specs/compile/npmrc/main.js +++ b/tests/specs/compile/npmrc_auto_install/main.js diff --git a/tests/specs/compile/npmrc/main.out b/tests/specs/compile/npmrc_auto_install/main.out index bbe210bdb..bbe210bdb 100644 --- a/tests/specs/compile/npmrc/main.out +++ b/tests/specs/compile/npmrc_auto_install/main.out diff --git a/tests/specs/compile/npmrc/package.json b/tests/specs/compile/npmrc_auto_install/package.json index 274d1ed7f..274d1ed7f 100644 --- a/tests/specs/compile/npmrc/package.json +++ b/tests/specs/compile/npmrc_auto_install/package.json diff --git a/tests/specs/compile/npmrc_byonm/.npmrc b/tests/specs/compile/npmrc_byonm/.npmrc new file mode 100644 index 000000000..13552ad61 --- /dev/null +++ b/tests/specs/compile/npmrc_byonm/.npmrc @@ -0,0 +1,4 @@ +@denotest:registry=http://localhost:4261/ +//localhost:4261/:_authToken=private-reg-token +@denotest2:registry=http://localhost:4262/ +//localhost:4262/:_authToken=private-reg-token2 diff --git a/tests/specs/compile/npmrc/__test__.jsonc b/tests/specs/compile/npmrc_byonm/__test__.jsonc index 470e5299c..470e5299c 100644 --- a/tests/specs/compile/npmrc/__test__.jsonc +++ b/tests/specs/compile/npmrc_byonm/__test__.jsonc diff --git a/tests/specs/compile/npmrc/install.out b/tests/specs/compile/npmrc_byonm/install.out index 5c2ff3562..5c2ff3562 100644 --- a/tests/specs/compile/npmrc/install.out +++ b/tests/specs/compile/npmrc_byonm/install.out diff --git a/tests/specs/compile/npmrc_byonm/main.js b/tests/specs/compile/npmrc_byonm/main.js new file mode 100644 index 000000000..66b393636 --- /dev/null +++ b/tests/specs/compile/npmrc_byonm/main.js @@ -0,0 +1,8 @@ +import { getValue, setValue } from "@denotest/basic"; +import * as test from "@denotest2/basic"; + +console.log(getValue()); +setValue(42); +console.log(getValue()); + +console.log(test.getValue()); diff --git a/tests/specs/compile/npmrc_byonm/main.out b/tests/specs/compile/npmrc_byonm/main.out new file mode 100644 index 000000000..bbe210bdb --- /dev/null +++ b/tests/specs/compile/npmrc_byonm/main.out @@ -0,0 +1,3 @@ +0 +42 +0 diff --git a/tests/specs/compile/npmrc_byonm/package.json b/tests/specs/compile/npmrc_byonm/package.json new file mode 100644 index 000000000..274d1ed7f --- /dev/null +++ b/tests/specs/compile/npmrc_byonm/package.json @@ -0,0 +1,8 @@ +{ + "name": "npmrc_test", + "version": "0.0.1", + "dependencies": { + "@denotest/basic": "1.0.0", + "@denotest2/basic": "1.0.0" + } +} |