0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

Use fs.promises.rm to remove node deprecation warning (#5119)

This commit is contained in:
Bjorn Lu 2022-10-19 22:03:56 +08:00 committed by GitHub
parent ff2c34553b
commit 430e0346c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Use `fs.promises.rm` to remove node deprecation warning

View file

@ -270,7 +270,7 @@ async function cleanSsrOutput(opts: StaticBuildOptions) {
const url = new URL(filename, out); const url = new URL(filename, out);
const folder = await fs.promises.readdir(url); const folder = await fs.promises.readdir(url);
if (!folder.length) { if (!folder.length) {
await fs.promises.rmdir(url, { recursive: true }); await fs.promises.rm(url, { recursive: true, force: true });
} }
}) })
); );