Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/changed.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { withProgress } = require('@mongodb-js/monorepo-tools');

async function runCommandForPackages(command, packages) {
packages = [...packages];
const totalPackages = packages.length;

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

const pkg = packages[0];
const currentIndex = totalPackages - packages.length + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a moment to realise that this is inside a while (packages.length)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I have no idea why that was chosen originally.

console.log(
`[${currentIndex}/${totalPackages}] Running command in ${pkg.name} ...`
);
const { status, signal } = spawnSync(
'npx',
['lerna', 'run', command, '--scope', pkg.name, '--stream'],
Expand Down
Loading