Skip to content

Commit

Permalink
refactor(scripts): Formatting in readAllMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfennis committed Feb 19, 2025
1 parent 34dfc63 commit 97f2149
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/build-helpers/src/readAllMetadata.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import { readMetadata } from './readMetadata.mjs';
export const readAllMetadata = async (directory) => {
const directoryContent = await fs.readdir(directory);

const metaDataPromises =
directoryContent
.filter((file) => path.extname(file) === '.json')
.map(async(file) => [path.basename(file, '.json'), await readMetadata(file, directory)]);
const metaDataPromises = directoryContent
.filter((file) => path.extname(file) === '.json')
.map(async (file) => [path.basename(file, '.json'), await readMetadata(file, directory)]);

const metadata = await Promise.all(metaDataPromises)
const metadata = await Promise.all(metaDataPromises);

return Object.fromEntries(metadata);
};

0 comments on commit 97f2149

Please sign in to comment.