build: Phase 2 — stop emitting unused .blockmap + clean dist per build

- L83: nsis.differentialPackage: false — the custom updater does full
  downloads and never consumes the differential blockmap, so don't generate it
  (NsisTarget gates blockmap generation on differentialPackage !== false).
- L84: add clean:dist script (fs.rmSync) run at the front of build:win so dist/
  no longer accumulates old-version installers (~3 GB observed). dist/out were
  already gitignored, so this is local-disk hygiene.

Config only; TS gate unaffected. 137 -> 135 open audit items.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 08:39:38 -04:00
parent 4dfb3c9867
commit 6bd29efd23
3 changed files with 14 additions and 5 deletions
+9 -4
View File
@@ -637,11 +637,16 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n
sketch now carries the shipped `videoId`/`itemCount`/`watched`/`feedUrl` fields (plus the sketch now carries the shipped `videoId`/`itemCount`/`watched`/`feedUrl` fields (plus the
required `url`/`playlistTitle`/`playlistIndex`) and a note that the block reflects the shipped required `url`/`playlistTitle`/`playlistIndex`) and a note that the block reflects the shipped
`shared/ipc.ts` shape.* `shared/ipc.ts` shape.*
- [ ] **L83 — Dead build artifacts.** electron-builder emits `.blockmap` differential-update files - [x] **L83 — Dead build artifacts.** electron-builder emits `.blockmap` differential-update files
for each NSIS installer, but the custom [updater.ts](src/main/updater.ts) does a full download and for each NSIS installer, but the custom [updater.ts](src/main/updater.ts) does a full download and
never consumes them. never consumes them. *Fixed: `nsis.differentialPackage: false` in
- [ ] **L84 — `dist/` accumulates unboundedly.** ~620 MB per build with no cleanup; it currently [electron-builder.yml](electron-builder.yml) stops the blockmap being generated (NsisTarget gates it
holds 0.1.00.5.0 Setup + portable artifacts (~3 GB). Add a clean step or prune. on `differentialPackage !== false`), with a comment explaining the custom-updater rationale.*
- [x] **L84 — `dist/` accumulates unboundedly.** ~620 MB per build with no cleanup; it currently
holds 0.1.00.5.0 Setup + portable artifacts (~3 GB). Add a clean step or prune. *Fixed: a
`clean:dist` npm script (`fs.rmSync('dist', …)`) now runs at the front of `build:win`, so each
packaged build starts from an empty `dist/` and only the current version's artifacts remain.
(`dist`/`out` were already gitignored, so this is disk hygiene, not a repo change.)*
- [x] **L85 — `.claude/launch.json` is committed and misplaced.** A VS Code launch config lives in - [x] **L85 — `.claude/launch.json` is committed and misplaced.** A VS Code launch config lives in
`.claude/` (VS Code reads `.vscode/launch.json`), so no tool consumes it; it's also tracked `.claude/` (VS Code reads `.vscode/launch.json`), so no tool consumes it; it's also tracked
(not gitignored). (not gitignored).
+3
View File
@@ -68,4 +68,7 @@ nsis:
perMachine: false perMachine: false
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
deleteAppDataOnUninstall: false deleteAppDataOnUninstall: false
# The custom updater (src/main/updater.ts) does a full download and never consumes
# the differential .blockmap, so don't emit it (audit L83 — dead build artifact).
differentialPackage: false
# Flip perMachine to true for an all-users install to Program Files (requires admin). # Flip perMachine to true for an all-users install to Program Files (requires admin).
+2 -1
View File
@@ -19,7 +19,8 @@
"ui:build": "vite build", "ui:build": "vite build",
"ui:preview": "vite preview", "ui:preview": "vite preview",
"build": "electron-vite build", "build": "electron-vite build",
"build:win": "electron-vite build && electron-builder --win", "clean:dist": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
"build:win": "npm run clean:dist && electron-vite build && electron-builder --win",
"start": "electron-vite preview", "start": "electron-vite preview",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false", "typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",