Skip to content

Commit 5bd08a4

Browse files
authored
fix: switch from forEachPackage to listAllPackages (#6789)
switch from forEachPackage to listAllPackages
1 parent 3399c3b commit 5bd08a4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/find-packages-on-old-config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
const fs = require('fs');
33
const path = require('path');
44

5-
const { forEachPackage } = require('@mongodb-js/monorepo-tools');
5+
const { listAllPackages } = require('@mongodb-js/monorepo-tools');
66

7-
forEachPackage((props) => {
7+
for await (const props of listAllPackages()) {
88
if (!fs.existsSync(path.resolve(props.location, '.prettierrc.json'))) {
99
console.log(props.name);
1010
}
11-
});
11+
}

scripts/update-electron.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const semver = require('semver');
33
const fetch = require('make-fetch-happen');
44
const fs = require('fs');
55
const path = require('path');
6-
const { forEachPackage } = require('@mongodb-js/monorepo-tools');
6+
const { listAllPackages } = require('@mongodb-js/monorepo-tools');
77
const { runInDir } = require('./run-in-dir');
88

99
async function cleanAndBootstrap(newVersions) {
@@ -125,11 +125,11 @@ async function main() {
125125

126126
console.log('Updating the following packages:', newVersions);
127127

128-
forEachPackage((props) => {
128+
for await (const props of listAllPackages()) {
129129
const packageJsonPath = path.resolve(props.location, 'package.json');
130130

131131
updatePackageVersions(packageJsonPath, newVersions);
132-
});
132+
}
133133

134134
console.log('Cleaning node_modules and rebootstrapping');
135135
cleanAndBootstrap(newVersions);

0 commit comments

Comments
 (0)