summaryrefslogtreecommitdiff
path: root/tests/testdata/compile
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/compile
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/compile')
-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
3 files changed, 6 insertions, 4 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'.