Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion ng-dev/misc/sync-module-bazel/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {determineRepoBaseDirFromCwd} from '../../utils/repo-directory';
import {PackageJson, syncNodeJs, syncPnpm, syncTypeScript} from './sync-module-bazel';
import {ChildProcess} from '../../utils/child-process';
import {formatFiles} from '../../format/format';
import {getBazelBin} from '../../utils/bazel-bin';

async function builder(argv: Argv) {
return argv;
Expand Down Expand Up @@ -67,7 +68,7 @@ async function handler() {

await formatFiles([moduleBazelPath]);

ChildProcess.spawnSync('pnpm', ['bazel', 'mod', 'deps', '--lockfile_mode=update'], {
ChildProcess.spawnSync(getBazelBin(), ['mod', 'deps', '--lockfile_mode=update'], {
suppressErrorOnFailingExitCode: true,
});
}
Expand Down
13 changes: 8 additions & 5 deletions tools/sync-all-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ done < <(find . -name "MODULE.bazel" -not -path "*/node_modules/*" -not -path "*
echo "Synchronizing MODULE.bazel content..."
for dir in "${module_dirs[@]}"; do
echo "Processing (Sync): $dir"
(
cd "$dir"
if [[ -f "package.json" ]] && grep -q '"ng-dev":' package.json; then
if [[ -f "$dir/package.json" ]] && grep -q '"ng-dev":' "$dir/package.json"; then
(
cd "$dir"
pnpm ng-dev misc sync-module-bazel
fi
)
)

# Update the root lockfile. This is needed for the sync-module-bazel command to work due to circular dependencies.
bazel mod deps --lockfile_mode=update
fi
done

# Update Bazel lockfiles for each module due to circular dependencies.
Expand Down
Loading