Skip to content

Commit e4a8574

Browse files
authored
Merge pull request #1113 from nbogie/fix-1111-for-main-dirent-path
replace deprecated dirent.path with dirent.parentPath (on main). fixes #1111
2 parents 5f8b639 + f8d0b03 commit e4a8574

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)