diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-19 18:39:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 22:39:27 +0000 |
commit | cc406c8360b4ba559d7f13e14d2a32e1ab761b0d (patch) | |
tree | a2cfae5c7f082261aa504b2f00fe6f53f4626dfe /test_util/src/temp_dir.rs | |
parent | 7f5290b6946fececec5ec3acd85e67cd16960b8e (diff) |
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
Diffstat (limited to 'test_util/src/temp_dir.rs')
-rw-r--r-- | test_util/src/temp_dir.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<Path>) { + fs::remove_file(self.path().join(path)).unwrap(); + } + pub fn remove_dir_all(&self, path: impl AsRef<Path>) { fs::remove_dir_all(self.path().join(path)).unwrap(); } |