Skip to content

Commit 03bfaf4

Browse files
authored
chore: fix deprecation warning when running reinstall or clean:all monorepo script (#15535)
Previously, the following warning would be thrown: `(node:82543) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead`
1 parent a7beeca commit 03bfaf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/delete-recursively.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function deleteRecursively(targetPath, fullDelete = false) {
3535
try {
3636
if (fullDelete && existsSync(targetPath)) {
3737
const size = await calculateSize(targetPath)
38-
await fs.rmdir(targetPath, { recursive: true }) // Use async version of rmdir
38+
await fs.rm(targetPath, { recursive: true, force: true })
3939
return size
4040
}
4141

0 commit comments

Comments
 (0)