From cc406c8360b4ba559d7f13e14d2a32e1ab761b0d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 May 2023 18:39:27 -0400 Subject: feat(vendor): support for npm specifiers (#19186) We never properly added support for this. This fixes vendoring when it has npm or node specifiers. Vendoring occurs by adding a `"nodeModulesDir": true` property to deno.json then it uses a local node_modules directory. This can be opted out by setting `"nodeModulesDir": false` or running with `--node-modules-dir=false`. Closes #18090 Closes #17210 Closes #17619 Closes #16778 --- test_util/src/temp_dir.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test_util/src') diff --git a/test_util/src/temp_dir.rs b/test_util/src/temp_dir.rs index dc638c7ea..f0f866d88 100644 --- a/test_util/src/temp_dir.rs +++ b/test_util/src/temp_dir.rs @@ -58,6 +58,10 @@ impl TempDir { fs::create_dir_all(self.path().join(path)).unwrap(); } + pub fn remove_file(&self, path: impl AsRef) { + fs::remove_file(self.path().join(path)).unwrap(); + } + pub fn remove_dir_all(&self, path: impl AsRef) { fs::remove_dir_all(self.path().join(path)).unwrap(); } -- cgit v1.2.3