Skip to content

chore: migrate from pnpm to bun#21

Closed
arzafran wants to merge 1 commit into
chore/vite-playgroundfrom
chore/bun-migration
Closed

chore: migrate from pnpm to bun#21
arzafran wants to merge 1 commit into
chore/vite-playgroundfrom
chore/bun-migration

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Standardizes tempus on bun + biome, removing pnpm/npm — matching hamo, so the darkroom libs share one toolchain (no eslint/prettier/npm/pnpm fragmentation). Biome was already wired (eslint/prettier were deleted earlier); this swaps the package manager.

Stacked on #20 (Vite playground) — base is chore/vite-playground. GitHub will retarget this to main automatically once #20 merges. Review/merge #20 first.

Summary

Package manager

  • pnpm-lock.yaml + pnpm-workspace.yamlbun.lock + a workspaces field
  • scripts: pnpmbun run/bun --filter; npm versionbun pm version (supports --preid/--no-git-tag-version); npm publishbun publish
  • dev now runs the playground (it HMRs against packages/ source via the Vite alias, so the tsup watch isn't needed for demo work); dev:build stays for bundle-watching
  • dropped the pnpm.overrides block — under bun, tsup 8.5.1 + Vite 6 already resolve secure transitive deps; forcing esbuild globally actually broke Vite's transform
  • CI: pnpm/action-setupoven-sh/setup-bun; the playground job is now a real gate (the Vite app builds green under bun)

Fixes surfaced by bun's stricter resolution

  • packages/react declared "tempus": "workspace:tempus*" (a pnpm-ism bun can't parse) → workspace:*
  • removed a dead export * from './src/types' that re-exported an empty 0-byte file; deleted the file
  • playground tsconfig: tempus* paths so tsc resolves types from source (mirrors the Vite alias) + @types/node for vite.config.ts
  • Vite build target: 'esnext' (avoids esbuild lowering destructuring-with-defaults in profiler.ts)

Result

  • Advisories: 23 (main) → 1 low (esbuild dev-server file-read, Windows-only, dev-only — never reaches the zero-dep published library)
  • Published library untouched; core bundle byte-identical (1985 B gz)

Test Plan

  • bun install --frozen-lockfile clean
  • bun run build (library) — 10 builds, dist intact
  • bun run lint (biome) passes
  • bun --filter playground build green
  • bun audit → 1 low (documented)

Standardize tempus on bun + biome (matching hamo), removing pnpm/npm.

Package manager:
- replace pnpm-lock.yaml + pnpm-workspace.yaml with bun.lock and a
  package.json "workspaces" field
- scripts: pnpm → bun run / bun --filter; npm version → bun pm version
  (supports --preid/--no-git-tag-version); npm publish → bun publish
- simplify `dev` to run the playground (it HMRs against packages/ source
  via the vite alias, so the tsup watch is no longer needed for demo work);
  `dev:build` stays for bundle-watching
- drop the pnpm.overrides block: under bun, tsup 8.5.1 + vite 6 already
  resolve secure transitive deps, so the overrides were unneeded (and forcing
  esbuild globally broke vite's transform)
- CI: pnpm/action-setup → oven-sh/setup-bun; the playground job is now a real
  gate (the Vite app builds green under bun)

Fixes surfaced by bun's stricter resolution:
- packages/react declared "tempus": "workspace:tempus*" (a pnpm-ism bun
  can't parse) → "workspace:*"
- removed a dead `export * from './src/types'` re-exporting an empty
  (0-byte) packages/react/src/types.ts; deleted the file
- playground tsconfig: add `tempus*` paths (so tsc resolves types from
  source, mirroring the vite alias) + @types/node for vite.config.ts
- vite build target → esnext (avoids esbuild lowering destructuring-with-
  defaults in profiler.ts to a legacy target)

Audit: 23 advisories on main → 1 low remaining (esbuild dev-server file-read,
Windows-only, dev-only — never reaches the zero-dep published library).
Verified: bun install --frozen-lockfile, build, lint, playground build all
green; core bundle byte-identical (1985 B gz).
@arzafran arzafran mentioned this pull request Jun 22, 2026
6 tasks
@arzafran

Copy link
Copy Markdown
Member Author

Consolidated into #22 (it was stacked on the Vite rewrite in #20). The bun migration lives in #22 now, on top of the kept Astro playground.

@arzafran arzafran closed this Jun 22, 2026
@arzafran arzafran deleted the chore/bun-migration branch June 22, 2026 12:05
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.

1 participant