Skip to content

Commit

Permalink
Use fs.promises.rm to remove node deprecation warning (#5119)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Oct 19, 2022
1 parent ff2c345 commit 430e034
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eight-swans-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Use `fs.promises.rm` to remove node deprecation warning
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async function cleanSsrOutput(opts: StaticBuildOptions) {
const url = new URL(filename, out);
const folder = await fs.promises.readdir(url);
if (!folder.length) {
await fs.promises.rmdir(url, { recursive: true });
await fs.promises.rm(url, { recursive: true, force: true });
}
})
);
Expand Down

0 comments on commit 430e034

Please sign in to comment.