Skip to content

Commit 7ff1568

Browse files
authored
Merge pull request #1112 from nbogie/fix-1111-dirent-path-usage
replace deprecated dirent.path with dirent.parentPath (on 2.0 branch)
2 parents c317f74 + 3646e88 commit 7ff1568

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/scripts/utils.ts

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

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

0 commit comments

Comments
 (0)