summaryrefslogtreecommitdiff
path: root/tests/testdata
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/testdata
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/testdata')
-rw-r--r--tests/testdata/compile/dynamic_imports/main_unanalyzable.ts4
-rw-r--r--tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out2
-rw-r--r--tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out4
-rw-r--r--tests/testdata/package_json/invalid_value/error.ts.out4
-rw-r--r--tests/testdata/package_json/invalid_value/task.out3
-rw-r--r--tests/testdata/run/with_package_json/with_stop/main.out1
6 files changed, 7 insertions, 11 deletions
diff --git a/tests/testdata/compile/dynamic_imports/main_unanalyzable.ts b/tests/testdata/compile/dynamic_imports/main_unanalyzable.ts
index d87d917c2..34fb76dc4 100644
--- a/tests/testdata/compile/dynamic_imports/main_unanalyzable.ts
+++ b/tests/testdata/compile/dynamic_imports/main_unanalyzable.ts
@@ -14,5 +14,7 @@ const IMPORT_PATH_FILE_PATH = join(
setTimeout(async () => {
console.log("Dynamic importing");
const importPath = (await Deno.readTextFile(IMPORT_PATH_FILE_PATH)).trim();
- import(importPath).then(() => console.log("Dynamic import done."));
+ import(import.meta.resolve(importPath)).then(() =>
+ console.log("Dynamic import done.")
+ );
}, 0);
diff --git a/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out b/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out
index 1154c3256..e5b39a752 100644
--- a/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out
+++ b/tests/testdata/compile/node_modules_symlink_outside/main_compile_file.out
@@ -1,2 +1,2 @@
Compile file:///[WILDCARD]/node_modules_symlink_outside/main.ts to [WILDCARD]
-Warning Symlink target is outside '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules'. Inlining symlink at '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules[WILDCARD]test.txt' to '[WILDCARD]node_modules_symlink_outside[WILDCARD]test.txt' as file.
+Warning Symlink target is outside '[WILDCARD]compile'. Inlining symlink at '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules[WILDCARD]test.txt' to '[WILDCARD]target.txt' as file.
diff --git a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out
index 83db2ef40..2067bf1c6 100644
--- a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out
+++ b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out
@@ -2,5 +2,5 @@ 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
Check file:///[WILDCARD]/node_modules_symlink_outside/main.ts
-Compile file:///[WILDCARD]/node_modules_symlink_outside/main.ts to [WILDCARD]
-Warning Symlink target is outside '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules'. Excluding symlink at '[WILDCARD]node_modules_symlink_outside[WILDCARD]node_modules[WILDCARD]some_folder' with target '[WILDCARD]node_modules_symlink_outside[WILDCARD]some_folder'.
+Compile file:///[WILDCARD]/node_modules_symlink_outside/main.ts to [WILDLINE]
+Warning Symlink target is outside '[WILDLINE]compile'. Excluding symlink at '[WILDLINE]node_modules_symlink_outside[WILDLINE]node_modules[WILDLINE]symlink_dir' with target '[WILDLINE]some_folder'.
diff --git a/tests/testdata/package_json/invalid_value/error.ts.out b/tests/testdata/package_json/invalid_value/error.ts.out
index 2fd0940fe..80893ede0 100644
--- a/tests/testdata/package_json/invalid_value/error.ts.out
+++ b/tests/testdata/package_json/invalid_value/error.ts.out
@@ -1,6 +1,4 @@
-error: Parsing version constraints in the application-level package.json is more strict at the moment.
-
-Invalid npm version requirement. Unexpected character.
+error: Invalid npm version requirement. Unexpected character.
invalid stuff that won't parse
~
at file:///[WILDCARD]/error.ts:2:23
diff --git a/tests/testdata/package_json/invalid_value/task.out b/tests/testdata/package_json/invalid_value/task.out
index dd4a04b0d..79249d175 100644
--- a/tests/testdata/package_json/invalid_value/task.out
+++ b/tests/testdata/package_json/invalid_value/task.out
@@ -1,5 +1,2 @@
-Warning Ignoring dependency '@denotest/cjs-default-export' in package.json because its version requirement failed to parse: Invalid npm version requirement. Unexpected character.
- invalid stuff that won't parse
- ~
Task test echo 1
1
diff --git a/tests/testdata/run/with_package_json/with_stop/main.out b/tests/testdata/run/with_package_json/with_stop/main.out
index b199faf8d..f5eb79ca6 100644
--- a/tests/testdata/run/with_package_json/with_stop/main.out
+++ b/tests/testdata/run/with_package_json/with_stop/main.out
@@ -1,5 +1,4 @@
[WILDCARD]Config file found at '[WILDCARD]with_package_json[WILDCARD]with_stop[WILDCARD]some[WILDCARD]nested[WILDCARD]deno.json'
-[WILDCARD]No package.json file found
[WILDCARD]
error: Relative import path "chalk" not prefixed with / or ./ or ../
at file:///[WILDCARD]with_package_json/with_stop/some/nested/dir/main.ts:3:19