Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Nov 7, 2023
1 parent 2c63f42 commit 5822c87
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/shared-lib-blitz-next/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node 16
node 18
supports es6-module
not dead
2 changes: 1 addition & 1 deletion packages/shared-lib-node/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node 16
node 18
8 changes: 7 additions & 1 deletion packages/shared-lib-node/src/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ export async function calculateHashFromFiles(...paths: string[]): Promise<string
const dirents = await fs.promises.readdir(fileOrDirPath, { withFileTypes: true, recursive: true });
for (const dirent of dirents.sort((d1, d2) => d1.name.localeCompare(d2.name))) {
if (dirent.isFile()) {
hash.update(await fs.promises.readFile(path.join(fileOrDirPath, dirent.name), 'utf8'));
// Node.js 18.17.0 or later has `dirent.path`
hash.update(
await fs.promises.readFile(
path.join((dirent as unknown as Record<'path', string>).path, dirent.name),
'utf8'
)
);
}
}
} else if (stat.isFile()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-lib/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node 16
node 18
supports es6-module
not dead
2 changes: 1 addition & 1 deletion packages/wb/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node 16
node 18

0 comments on commit 5822c87

Please sign in to comment.