Skip to content

Commit 50f7135

Browse files
committed
fix(script): don't hide tg output
1 parent a628d68 commit 50f7135

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

scripts/package_automation.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ class TangramClient {
9191
}
9292

9393
async push(target: string): Promise<void> {
94-
await $`${this.exe} push ${target}`.quiet();
94+
await $`${this.exe} push ${target}`;
9595
}
9696

9797
async cancel(processId: string, token: string): Promise<void> {
9898
await $`${this.exe} cancel ${processId} ${token}`.quiet();
9999
}
100100

101101
async format(path: string): Promise<void> {
102-
await $`${this.exe} format ${path}`.quiet();
102+
await $`${this.exe} format ${path}`;
103103
}
104104

105105
async check(path: string): Promise<void> {
106-
await $`${this.exe} check ${path}`.quiet();
106+
await $`${this.exe} check ${path}`;
107107
}
108108

109109
async publish(path: string): Promise<void> {
110-
await $`${this.exe} publish ${path}`.quiet();
110+
await $`${this.exe} publish ${path}`;
111111
}
112112
}
113113

@@ -138,9 +138,11 @@ interface PackageFilter {
138138
function resolvePackages(filter: PackageFilter): string[] {
139139
const blacklist = new Set(["demo", "sanity", "webdemo"]);
140140
let packages: string[] = [];
141+
let wasExplicitlyIncluded = false;
141142

142143
if (filter.include && filter.include.length > 0) {
143144
packages = [...filter.include];
145+
wasExplicitlyIncluded = true;
144146
} else {
145147
const entries = fs.readdirSync(packagesPath(), { withFileTypes: true });
146148

@@ -161,7 +163,9 @@ function resolvePackages(filter: PackageFilter): string[] {
161163
packages = packages.filter((pkg) => !filter.exclude?.includes(pkg));
162164
}
163165

164-
return packages.sort();
166+
// Only sort if packages were discovered from the filesystem
167+
// Preserve order if explicitly included via command-line arguments
168+
return wasExplicitlyIncluded ? packages : packages.sort();
165169
}
166170

167171
class Configuration {
@@ -186,7 +190,7 @@ class Configuration {
186190
}) {
187191
this.packages = options.packages || {};
188192
this.actions = options.actions || [];
189-
this.parallel = options.parallel ?? true;
193+
this.parallel = options.parallel ?? false;
190194
this.tangram = options.tangram || this.detectTangramExe();
191195
this.currentPlatform = options.platform || this.detectPlatform();
192196
this.exports = options.exports || ["default"];
@@ -270,7 +274,7 @@ Flags:
270274
--exclude=PKG Exclude specific packages
271275
--dry-run Show what would be done without executing
272276
--verbose Enable verbose output
273-
--sequential Run packages sequentially (default: parallel)
277+
--parallel Run packages in parallel (default: sequential)
274278
--platform=PLAT Override target platform
275279
276280
Action Dependencies:
@@ -300,7 +304,7 @@ function parseFromArgs(): Configuration {
300304
test: { type: "boolean", short: "t", default: false },
301305
"dry-run": { type: "boolean", default: false },
302306
verbose: { type: "boolean", default: false },
303-
sequential: { type: "boolean", default: false },
307+
parallel: { type: "boolean", default: false },
304308
export: { type: "string", multiple: true },
305309
exclude: { type: "string", multiple: true },
306310
platform: { type: "string" },
@@ -348,7 +352,7 @@ function parseFromArgs(): Configuration {
348352
exclude: values.exclude,
349353
},
350354
actions,
351-
parallel: !values.sequential,
355+
parallel: values.parallel ?? false,
352356
exports,
353357
dryRun: values["dry-run"] ?? false,
354358
verbose: values.verbose ?? false,

0 commit comments

Comments
 (0)