Skip to content

Commit f8d0b03

Browse files
committed
replace deprecated dirent.path with dirent.parentPath
* dirent.path is removed in node v24 * Per deprecation warning: https://nodejs.org/docs/latest-v20.x/api/fs.html#direntpath * dirent.path has been an alias for dirent.parentPath since node v20
1 parent 05feac8 commit f8d0b03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scripts/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const sanitizeName = (name: string) =>
232232
* @returns full path to the entry
233233
*/
234234
export const fullPathFromDirent = (dirent: Dirent): string =>
235-
path.join(dirent.path, dirent.name);
235+
path.join(dirent.parentPath, dirent.name);
236236

237237
/**
238238
* Returns the absolute path of the files within a directory
@@ -253,7 +253,7 @@ export const getFilepathsWithinDir = async (
253253
[dirAbsolutePath]
254254
: // readdir returns relative filepaths 🥴
255255
(await readdir(dirAbsolutePath)).map((p) =>
256-
path.join(dir.path, dir.name, p),
256+
path.join(dir.parentPath, dir.name, p),
257257
);
258258
};
259259

0 commit comments

Comments
 (0)