Skip to content

chore: repo hygiene — format, lint, tsc, Info.plist version#7

Merged
matej21 merged 5 commits intomainfrom
chore/repo-hygiene
May 4, 2026
Merged

chore: repo hygiene — format, lint, tsc, Info.plist version#7
matej21 merged 5 commits intomainfrom
chore/repo-hygiene

Conversation

@jonasnobile
Copy link
Copy Markdown
Member

Summary

Pure repo hygiene — no behavior changes, no new features. Pulls together four small fixes that were each independently green:

  1. chore: apply pending dprint formatter fixesdprint check was failing on four files with pre-existing formatter drift on main (CLAUDE.md, connection-pool.ts, postgres-driver.ts, connection-manager.test.ts). Pure whitespace, no syntactic changes (verified with the TypeScript syntactic-diff tool).
  2. chore: clear pending biome lint warnings — collapses a redundant record && record.encryptedConfig to optional chain in indexeddb.ts, switches a push-only let to const in grid.ts, and drops two ['search_path'] literal-key accesses in query-executor.ts. All four were FIXABLE warnings biome was already flagging.
  3. chore: remove unused isLinux platform check — the only tsc --noEmit error on main. isLinux was declared but never referenced; only isMac and isWindows gate platform-specific behavior.
  4. fix: bake the released version into desktop builds — Info.plist was shipping with CFBundleVersion = "0.0.1" because electrobun.config.ts hardcoded that string and the release workflow never injected the tag's version into the desktop build step. Now reads process.env.VERSION || pkg.version (same pattern scripts/build-server.ts already uses for the npm package), and the workflow exports VERSION from the parsed tag. Local dev still resolves to package.json, so nothing changes outside CI.

Verified locally: VERSION=0.0.21 bun -e "import('./electrobun.config.ts').then(...)" resolves to 0.0.21; unset case falls back to pkg.version.

Test plan

  • bun run format:check — clean
  • bun run lint — clean (no warnings, no infos)
  • bunx tsc --noEmit — clean
  • bun test (relevant subset: connection-manager, query-executor, grid-store, rpc-handlers) — all pass
  • Next release tag — confirm Info.plist's CFBundleVersion / CFBundleShortVersionString match the tag (e.g. 0.0.21 rather than 0.0.1). Can't be verified pre-merge since the env var only flows through on tag push.

Companion PR

Split out from #6 (fetch-databases-in-connection-form). Recommended merge order: this one first, then rebase #6.

🤖 Generated with Claude Code

jonasnobile and others added 4 commits May 4, 2026 16:22
Pure whitespace pass — `dprint check` was failing on four files. Only
the trailing blank line in tests/connection-manager.test.ts was inside
the file this branch edits; the other three (CLAUDE.md,
connection-pool.ts, postgres-driver.ts) were pre-existing drift on
main and just hadn't been reformatted. No syntactic changes (verified
with the TypeScript syntactic-diff tool).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- indexeddb.ts: collapse `record && record.encryptedConfig` to optional chain
- grid.ts: `joinedColumnSets` is push-only — switch let to const
- query-executor.ts: drop `['search_path']` literal-key access (×2)

All four were FIXABLE warnings biome was already flagging on main; none
are introduced by this branch. Pulled in here so the feature PR ships
with `bun run lint` clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`isLinux` was declared but never referenced — only `isMac` and
`isWindows` gate platform-specific behavior. Was the only TS error on
main; CI's typecheck job was failing on it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Releases since the version regression have been shipping with Info.plist
CFBundleVersion = "0.0.1" because `electrobun.config.ts` hardcoded that
string and the release workflow never passed the tag's version through
to `electrobun build`.

Now the config reads `process.env.VERSION || pkg.version` (the same
pattern `scripts/build-server.ts` already uses for the npm package),
and the workflow's "Build desktop app" step exports `VERSION` from the
parsed tag. Local dev still resolves to `package.json`'s version, so
nothing changes outside of CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
grid-store.test.ts mocks the entire \`../src/frontend-shared/lib/rpc\`
module. The previous mock supplied a stub
\`friendlyErrorMessage: (err) => String(err)\`, which on Linux leaks
into rpc-errors.test.ts when both run in the same bun process —
nine assertions there fail with "Error: ..." raw strings instead of
the friendly mapped messages. macOS happens not to reproduce.

Re-expose the real implementation imported from
\`lib/rpc-errors\` so any cross-file pollution still resolves to the
correct function. The earlier fix in 10e9984 only addressed
ui-store.test.ts (which CI excludes) and missed the same pattern in
grid-store.

Reproduced locally with bun 1.3.13 (the version setup-bun installs
in CI): \`shopt -s extglob && bun test tests/!(pg-*|postgres-*|mysql-*|driver-iterate|ui-store).test.ts\`
goes from 9 fail to 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@matej21 matej21 merged commit 0b40485 into main May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants