Skip to content

Promote mailbox to top-level package for git installability - #10

Merged
TheGreatAxios merged 2 commits into
mainfrom
chore/top-level-git-install
Aug 10, 2026
Merged

Promote mailbox to top-level package for git installability#10
TheGreatAxios merged 2 commits into
mainfrom
chore/top-level-git-install

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Make @corbits/mailbox installable as a top-level package from git (not only from a monorepo path).

What changed

  • Promote package layout so consumers can install via git URL
  • Preserve existing mailbox contracts and install proof path

Test plan

  • Install from the branch via git and import the package
  • Existing package tests pass

The package lived at packages/mailbox/ in a private-root monorepo. A git
install (bun add github:...) gets the repository root, so the published
package.json must be at the root for exports, files, and the prepare hook to
resolve under a consumer's node_modules.

- Move src/ to repo root; delete packages/ shell
- Promote packages/mailbox/package.json to root (name, exports, files, deps,
  peerDependencies with @intx/* as peers — never vendored)
- Add scripts/prepare.mjs: mirrors @corbits/react-ui — builds dist/ in a
  scratch dir when installed as a dependency (bun omits devDeps for git deps,
  and tsc cannot emit .d.ts inside a consumer node_modules tree)
- Add root tsconfig.build.json (extends ./tsconfig.json, declaration emit)
- Update README for the flat layout
- examples/reference-host: file:../.. dep (bun workspaces cannot self-reference
  the root package by name)
Build before typecheck so @corbits/mailbox resolves through dist/, then
force-reinstall to refresh the reference host's copied file: dependency —
bun copies file: deps at install time, before dist/ exists. Point the
remaining workflow and doc references at the repo root instead of the
removed packages/mailbox directory.
@TheGreatAxios
TheGreatAxios merged commit ab72ee3 into main Aug 10, 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.

1 participant