Skip to content

Commit

Permalink
simplify update-version
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 13, 2023
1 parent eafde5c commit 633efcc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/update-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ const builderConfig = await readFile(BUILDER_CONFIG, 'utf8');
await writeFile(BUILDER_CONFIG, builderConfig.replaceAll(OLD_YEAR, CURRENT_YEAR));

const packagesFolder = await readdir('packages');
const packages = [];

for (const PATH of packagesFolder) {
const packageJSON = await readJson(`packages/${ PATH }/package.json`, 'utf8');
packages.push(packageJSON.name);
}
const packages = await Promise.all(packagesFolder.map(async PATH => {
const { name } = await readJson(`packages/${ PATH }/package.json`, 'utf8');
return name;
}));

for (const PATH of await glob('packages/*/package.json')) {
const pkg = await readJson(PATH, 'utf8');
Expand Down

0 comments on commit 633efcc

Please sign in to comment.