Monorepo for @onkernel/managed-auth-react — a drop-in React component for Kernel managed auth.
@onkernel/managed-auth-react— the published component library.@onkernel/managed-auth-react-demo— local-only Vite app with two tabs: every UI state in the package, and eight worked appearance variants. Runs without a Kernel account.
bun install
bun run --filter '@onkernel/managed-auth-react' build
bun run --filter '@onkernel/managed-auth-react' typecheck
bun run --filter '@onkernel/managed-auth-react-demo' dev
# → http://localhost:5173 (auto-opens; #states or #appearances tabs)For live iteration on the package itself, run the package in watch mode in another terminal — Vite picks up the rebuilt dist/ automatically:
bun run --filter '@onkernel/managed-auth-react' devtsup watch mode can mirror dist/ into a consumer's node_modules after every successful rebuild. Cleanest way to iterate on the package against real consumers without dealing with bun symlinks or stale tarballs:
# In the consumer (one-time): install the package once via tarball/file dep so# node_modules/@onkernel/managed-auth-react/ exists.# In packages/managed-auth-react (LINK_TO is resolved relative to the# package dir, so 3 levels up lands in the parent of this repo):
LINK_TO=../../../managed-auth-hosted-ui/node_modules/@onkernel/managed-auth-react bun run dev
# Shorthand assuming managed-auth-hosted-ui is a sibling of this repo:
bun run dev:hosted-uiEvery successful build (JS + DTS) replaces the consumer's dist/, so refreshing the dev server picks up changes immediately — no reinstall needed.
.github/workflows/test.yamlruns on every PR and push tomain:format:check,typecheck,build, and anpm pack --dry-runto verify publishability..github/workflows/release.yamlruns on every push tomainand is driven by Changesets. Either opens/updates a "Version Packages" PR, or — when that PR is merged — publishes to npm via OIDC trusted publishing.
Bun is pinned to 1.2.21 in both workflows (and in packageManager at the root) so lockfile-format drift across bun majors doesn't silently break CI.
The release flow is fully PR-driven — no direct package.json edits, no manual git tag, no main-branch bypasses.
In any PR that changes published behavior, add a changeset:
bun run changeset
The CLI asks which packages changed and which bump (patch / minor / major), then writes a
.changeset/<random>.mdfile describing the change. Commit it alongside your code.Skip the changeset for tooling/infra/docs PRs that don't affect what consumers see.
Merge your PR to
main. The Changesets bot runs and either:- Opens (or updates) a single "chore: version packages" PR that bumps
package.jsonversions, regeneratesCHANGELOG.md, and deletes the consumed changeset files. Multiple feature PRs accumulate into the same Version PR. - If no pending changesets exist (i.e. the Version PR was just merged), runs
bun run releasewhich builds the package and callschangeset publish→npm publishfor every version not yet on the registry, then tags + creates the GitHub release.
- Opens (or updates) a single "chore: version packages" PR that bumps
To ship, review and merge the open Version PR. The next workflow run publishes.
That's it. The git tag, npm publish, and GitHub release are all created by the bot on Version-PR merge.
MIT