Skip to content

Commit 8f37680

Browse files
committed
Print progress in changed script
1 parent 2f07c6c commit 8f37680

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/changed.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const { withProgress } = require('@mongodb-js/monorepo-tools');
66

77
async function runCommandForPackages(command, packages) {
88
packages = [...packages];
9+
const totalPackages = packages.length;
910

1011
const passed = [];
1112
const failed = [];
@@ -14,6 +15,10 @@ async function runCommandForPackages(command, packages) {
1415
console.log();
1516

1617
const pkg = packages[0];
18+
const currentIndex = totalPackages - packages.length + 1;
19+
console.log(
20+
`[${currentIndex}/${totalPackages}] Running command in ${pkg.name} ...`
21+
);
1722
const { status, signal } = spawnSync(
1823
'npx',
1924
['lerna', 'run', command, '--scope', pkg.name, '--stream'],

0 commit comments

Comments
 (0)