@1agh/maude 0.52.1 → 0.52.2

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.
@@ -15,7 +15,7 @@
15
15
  //
16
16
  // Per DDR-009 (Bun runtime authoritative) + DDR-012 (React 19 unified) + DDR-014 (Lightning CSS).
17
17
 
18
- import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs';
18
+ import { existsSync, mkdirSync, readFileSync, statSync, unlinkSync, writeFileSync } from 'node:fs';
19
19
  import { dirname, join, relative } from 'node:path';
20
20
  import { fileURLToPath } from 'node:url';
21
21
 
@@ -457,12 +457,37 @@ async function main() {
457
457
 
458
458
  console.log(`[build] mode=${MODE}`);
459
459
 
460
+ // MAUDE_SKIP_CLIENT_BUILD=1 — ship the committed dist/client.bundle.js
461
+ // instead of regenerating it. Same contract as MAUDE_SKIP_RUNTIME_BUILD
462
+ // above, for the same reason: the bundle is PLATFORM-INDEPENDENT JavaScript,
463
+ // so there is nothing a per-OS rebuild can add — and measurably something it
464
+ // can take away. With Bun pinned exactly, apps/studio/bun.lock committed and
465
+ // sources normalised to LF, macOS and Linux both emit 1,977,006 B, identical
466
+ // to the reviewed artifact; Bun on Windows emits 1,976,621 B from the same
467
+ // inputs. 385 bytes nobody chose, in the file that decides whether the app
468
+ // draws anything — and a differently-emitted bundle is exactly what opened a
469
+ // blank window in v0.51.1 and v0.52.0. So the Windows job skips the rebuild
470
+ // and packages the same bundle every other platform ships.
471
+ const skipClient = process.env.MAUDE_SKIP_CLIENT_BUILD === '1';
460
472
  const t0 = performance.now();
461
- const client = await buildClient();
473
+ const client = skipClient ? null : await buildClient();
462
474
  const t1 = performance.now();
463
- console.log(
464
- `[build] client.bundle.js ${client.outBytes.toLocaleString()} B (${(t1 - t0).toFixed(0)} ms)`
465
- );
475
+ if (client) {
476
+ console.log(
477
+ `[build] client.bundle.js ${client.outBytes.toLocaleString()} B (${(t1 - t0).toFixed(0)} ms)`
478
+ );
479
+ } else {
480
+ const committed = join(DIST, 'client.bundle.js');
481
+ if (!existsSync(committed)) {
482
+ console.error(
483
+ '[build] MAUDE_SKIP_CLIENT_BUILD=1 but dist/client.bundle.js is absent — nothing to ship.'
484
+ );
485
+ process.exit(1);
486
+ }
487
+ console.log(
488
+ `[build] client.bundle.js SKIPPED (MAUDE_SKIP_CLIENT_BUILD=1 — shipping the committed ${statSync(committed).size.toLocaleString()} B artifact)`
489
+ );
490
+ }
466
491
 
467
492
  const commentMount = await buildCommentMount();
468
493
  const t1b = performance.now();