headlamp 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -215
- package/dist/cli.cjs +29 -3
- package/dist/cli.cjs.map +2 -2
- package/dist/index.js +29 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53382,6 +53382,7 @@ var init_args = __esm({
|
|
|
53382
53382
|
coverageAbortOnFailure: (value2) => ({ type: "coverageAbortOnFailure", value: value2 }),
|
|
53383
53383
|
onlyFailures: (value2) => ({ type: "onlyFailures", value: value2 }),
|
|
53384
53384
|
showLogs: (value2) => ({ type: "showLogs", value: value2 }),
|
|
53385
|
+
sequential: (value2) => ({ type: "sequential", value: value2 }),
|
|
53385
53386
|
bootstrapCommand: (value2) => ({ type: "bootstrapCommand", value: value2 }),
|
|
53386
53387
|
jestArg: (value2) => ({ type: "jestArg", value: value2 }),
|
|
53387
53388
|
jestArgs: (values) => ({ type: "jestArgs", values }),
|
|
@@ -53558,6 +53559,16 @@ var init_args = __esm({
|
|
|
53558
53559
|
"--onlyFailures",
|
|
53559
53560
|
(_flag, lookahead) => step([ActionBuilders.onlyFailures(isTruthy(String(lookahead)))], true)
|
|
53560
53561
|
),
|
|
53562
|
+
// --sequential flag (boolean) → serialize projects and map to jest --runInBand
|
|
53563
|
+
rule.eq("--sequential", () => step([ActionBuilders.sequential(true)])),
|
|
53564
|
+
rule.startsWith(
|
|
53565
|
+
"--sequential=",
|
|
53566
|
+
(value2) => step([ActionBuilders.sequential(isTruthy((value2.split("=")[1] ?? "").trim().toLowerCase()))])
|
|
53567
|
+
),
|
|
53568
|
+
rule.withLookahead(
|
|
53569
|
+
"--sequential",
|
|
53570
|
+
(_flag, lookahead) => step([ActionBuilders.sequential(isTruthy(String(lookahead)))], true)
|
|
53571
|
+
),
|
|
53561
53572
|
// --showLogs flag (boolean)
|
|
53562
53573
|
rule.eq("--showLogs", () => step([ActionBuilders.showLogs(true)])),
|
|
53563
53574
|
rule.startsWith(
|
|
@@ -53728,6 +53739,8 @@ var init_args = __esm({
|
|
|
53728
53739
|
return { vitest: [], jest: [], coverage: false, onlyFailures: action.value };
|
|
53729
53740
|
case "showLogs":
|
|
53730
53741
|
return { vitest: [], jest: [], coverage: false, showLogs: action.value };
|
|
53742
|
+
case "sequential":
|
|
53743
|
+
return { vitest: [], jest: [], coverage: false, sequential: action.value };
|
|
53731
53744
|
case "jestArgs":
|
|
53732
53745
|
return { vitest: [], jest: action.values, coverage: false };
|
|
53733
53746
|
case "selectionHint":
|
|
@@ -53807,6 +53820,7 @@ var init_args = __esm({
|
|
|
53807
53820
|
...right.coverageAbortOnFailure !== void 0 || left.coverageAbortOnFailure !== void 0 ? { coverageAbortOnFailure: right.coverageAbortOnFailure ?? left.coverageAbortOnFailure } : {},
|
|
53808
53821
|
...right.onlyFailures !== void 0 || left.onlyFailures !== void 0 ? { onlyFailures: right.onlyFailures ?? left.onlyFailures } : {},
|
|
53809
53822
|
...right.showLogs !== void 0 || left.showLogs !== void 0 ? { showLogs: right.showLogs ?? left.showLogs } : {},
|
|
53823
|
+
...right.sequential !== void 0 || left.sequential !== void 0 ? { sequential: right.sequential ?? left.sequential } : {},
|
|
53810
53824
|
...right.coverageDetail !== void 0 || left.coverageDetail !== void 0 ? { coverageDetail: right.coverageDetail ?? left.coverageDetail } : {},
|
|
53811
53825
|
...right.coverageShowCode !== void 0 || left.coverageShowCode !== void 0 ? { coverageShowCode: right.coverageShowCode ?? left.coverageShowCode } : {},
|
|
53812
53826
|
...right.coverageMode !== void 0 || left.coverageMode !== void 0 ? { coverageMode: right.coverageMode ?? left.coverageMode } : {},
|
|
@@ -53832,6 +53846,7 @@ var init_args = __esm({
|
|
|
53832
53846
|
let coverageAbortOnFailure = false;
|
|
53833
53847
|
let onlyFailures = false;
|
|
53834
53848
|
let showLogs = false;
|
|
53849
|
+
let sequential = false;
|
|
53835
53850
|
let coverageShowCode = Boolean(process.stdout.isTTY);
|
|
53836
53851
|
let coverageMode = "auto";
|
|
53837
53852
|
const coverageMaxFilesLocalInit = void 0;
|
|
@@ -53865,6 +53880,7 @@ var init_args = __esm({
|
|
|
53865
53880
|
if (conf.onlyFailures !== void 0)
|
|
53866
53881
|
p3.onlyFailures = Boolean(conf.onlyFailures);
|
|
53867
53882
|
if (conf.showLogs !== void 0) p3.showLogs = Boolean(conf.showLogs);
|
|
53883
|
+
if (conf.sequential !== void 0) p3.sequential = Boolean(conf.sequential);
|
|
53868
53884
|
if (conf.editorCmd) p3.editorCmd = String(conf.editorCmd);
|
|
53869
53885
|
if (conf.workspaceRoot) p3.workspaceRoot = String(conf.workspaceRoot);
|
|
53870
53886
|
if (Array.isArray(conf.include)) p3.includeGlobs = conf.include;
|
|
@@ -53903,6 +53919,7 @@ var init_args = __esm({
|
|
|
53903
53919
|
coverageAbortOnFailure = contrib.coverageAbortOnFailure ?? coverageAbortOnFailure;
|
|
53904
53920
|
onlyFailures = contrib.onlyFailures ?? onlyFailures;
|
|
53905
53921
|
showLogs = contrib.showLogs ?? showLogs;
|
|
53922
|
+
sequential = contrib.sequential ?? sequential;
|
|
53906
53923
|
coverageShowCode = contrib.coverageShowCode ?? coverageShowCode;
|
|
53907
53924
|
const { bootstrapCommand } = contrib;
|
|
53908
53925
|
const coverageDetailComputed = contrib.coverageDetail ?? (contrib.selection ? "auto" : void 0);
|
|
@@ -53923,6 +53940,9 @@ var init_args = __esm({
|
|
|
53923
53940
|
if (showLogs) {
|
|
53924
53941
|
jestArgs.push("--no-silent");
|
|
53925
53942
|
}
|
|
53943
|
+
if (sequential && !jestArgs.includes("--runInBand")) {
|
|
53944
|
+
jestArgs.push("--runInBand");
|
|
53945
|
+
}
|
|
53926
53946
|
const selectionLooksLikeTestPath = (contrib.selectionPaths ?? []).some(
|
|
53927
53947
|
(selectionPath) => /\.(test|spec)\.[tj]sx?$/i.test(selectionPath) || /(^|\/)tests?\//i.test(selectionPath)
|
|
53928
53948
|
);
|
|
@@ -53942,6 +53962,7 @@ var init_args = __esm({
|
|
|
53942
53962
|
coverageAbortOnFailure: configFromFile?.coverageAbortOnFailure ?? coverageAbortOnFailure,
|
|
53943
53963
|
onlyFailures: configFromFile?.onlyFailures ?? onlyFailures,
|
|
53944
53964
|
showLogs: configFromFile?.showLogs ?? showLogs,
|
|
53965
|
+
sequential: configFromFile?.sequential ?? sequential,
|
|
53945
53966
|
...bootstrapCommand !== void 0 ? { bootstrapCommand } : {},
|
|
53946
53967
|
selectionSpecified: Boolean(contrib.selection),
|
|
53947
53968
|
selectionPaths: [...contrib.selectionPaths ?? []],
|
|
@@ -61723,6 +61744,9 @@ var program = async () => {
|
|
|
61723
61744
|
if (cfg.bootstrapCommand) {
|
|
61724
61745
|
pushKV("--bootstrapCommand", cfg.bootstrapCommand);
|
|
61725
61746
|
}
|
|
61747
|
+
if (cfg.sequential === true) {
|
|
61748
|
+
t2.push("--sequential");
|
|
61749
|
+
}
|
|
61726
61750
|
if (Array.isArray(cfg.jestArgs) && cfg.jestArgs.length) {
|
|
61727
61751
|
t2.push(...cfg.jestArgs);
|
|
61728
61752
|
}
|
|
@@ -61809,6 +61833,7 @@ var program = async () => {
|
|
|
61809
61833
|
coverageAbortOnFailure,
|
|
61810
61834
|
onlyFailures,
|
|
61811
61835
|
showLogs,
|
|
61836
|
+
sequential,
|
|
61812
61837
|
bootstrapCommand,
|
|
61813
61838
|
selectionSpecified,
|
|
61814
61839
|
selectionPaths,
|
|
@@ -62515,7 +62540,7 @@ var program = async () => {
|
|
|
62515
62540
|
os4.tmpdir(),
|
|
62516
62541
|
`jest-bridge-${Date.now()}-${Math.random().toString(36).slice(2)}.json`
|
|
62517
62542
|
);
|
|
62518
|
-
const reporterPath = path13.
|
|
62543
|
+
const reporterPath = path13.join(os4.tmpdir(), "headlamp", "jest-vitest-bridge.cjs");
|
|
62519
62544
|
try {
|
|
62520
62545
|
const needsWrite = (() => {
|
|
62521
62546
|
try {
|
|
@@ -62529,7 +62554,7 @@ var program = async () => {
|
|
|
62529
62554
|
fsSync3.mkdirSync(path13.dirname(reporterPath), { recursive: true });
|
|
62530
62555
|
fsSync3.writeFileSync(reporterPath, JEST_BRIDGE_REPORTER_SOURCE, "utf8");
|
|
62531
62556
|
}
|
|
62532
|
-
const envPath = path13.
|
|
62557
|
+
const envPath = path13.join(os4.tmpdir(), "headlamp", "jest-bridge-env.cjs");
|
|
62533
62558
|
try {
|
|
62534
62559
|
const existingEnv = fsSync3.readFileSync(envPath, "utf8");
|
|
62535
62560
|
if (existingEnv !== JEST_BRIDGE_ENV_SOURCE) {
|
|
@@ -62803,7 +62828,8 @@ ${stripFooter(rawAlso)}`.trimEnd();
|
|
|
62803
62828
|
jestExitCode = code;
|
|
62804
62829
|
}
|
|
62805
62830
|
};
|
|
62806
|
-
|
|
62831
|
+
const stride = sequential ? 1 : 3;
|
|
62832
|
+
await runParallelStride(projectsToRun, stride, async (cfg, index) => {
|
|
62807
62833
|
await runOneProject(cfg);
|
|
62808
62834
|
});
|
|
62809
62835
|
} else {
|