mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Node 22 housekeeping (#12559)
This commit is contained in:
parent
3a76353248
commit
1dc8f5eb7c
2 changed files with 7 additions and 2 deletions
5
.changeset/tasty-snails-protect.md
Normal file
5
.changeset/tasty-snails-protect.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@astrojs/internal-helpers": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes usage of `fileURLToPath()` to anticipate the changed signature of this method in Node 22.1.0
|
|
@ -45,8 +45,8 @@ export async function copyFilesToFolder(
|
||||||
outDir: URL,
|
outDir: URL,
|
||||||
exclude: URL[] = [],
|
exclude: URL[] = [],
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const excludeList = exclude.map(fileURLToPath);
|
const excludeList = exclude.map((url) => fileURLToPath(url));
|
||||||
const fileList = files.map(fileURLToPath).filter((f) => !excludeList.includes(f));
|
const fileList = files.map((url) => fileURLToPath(url)).filter((f) => !excludeList.includes(f));
|
||||||
|
|
||||||
if (files.length === 0) throw new Error('No files found to copy');
|
if (files.length === 0) throw new Error('No files found to copy');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue