Composable monorepo of @ctx-core/* TypeScript packages. Functional-first, zero-dependency utilities.
lib/ 187 packages — core utilities, reactive primitives, UI components
tools/ 4 packages — dev tooling (git, package, TypeScript)
bin/ Shell scripts for build, dev environment, dependency management
dormant/ Archived/inactive packages
.changeset/ Changesets config for versioning
- Language: TypeScript (ES2022 target, strict mode)
- Package manager: bun workspaces (migrated from pnpm)
- Versioning: Changesets
- Test runner: uvu
- Build: @ctx-core/build (custom)
- Environment: mise (.mise.toml)
ctx-core (v7.2.32) — 48 modular sub-exports (array, promise, rmemo, uuid, etc.). Each is tree-shakeable.
Three-step version → commit → publish:
# 1. Version bump — applies changesets, generates CHANGELOG diffs, populates COMMIT_EDITMSG files
changeset-version-COMMIT_EDITMSG
# 2. Recursive commit — opens editor for review, then commits in each workspace package
recursive-git-commit
# 3. Publish — parallel publish to npm, skips already-published versions
publish--force # publish all
publish--force -d # dry run
publish--force -s # single package (run from package dir)changeset-version-COMMIT_EDITMSGrunsbun changeset versionthenCHANGELOG-diff-COMMIT_EDITMSGto populate per-packageCOMMIT_EDITMSGfiles from CHANGELOG diffs.recursive-git-commitcreates a temp commit script, opens$EDITORfor review, then runs it in each workspace package + submodule. UsesCOMMIT_EDITMSGif present, else empty message.publish--forceuses GNUparallelto publish all packages concurrently viabun publish. Compares local version vs. npm registry — only publishes if version differs. Reports failures with joblog.
# 1. Check npm registry and update all subpackage dependencies to latest, auto-create changesets
ctx_core__monorepo_pnpm__dependencies__update
# 2. Install updated dependencies
bun install
# 3. Then follow the Release Workflow (changeset-version-COMMIT_EDITMSG → recursive-git-commit → publish--force)How ctx_core__monorepo_pnpm__dependencies__update works:
- Runs
monorepo_pnpm__dependencies__update(fromlib/monorepo/) which queries the npm registry for latest versions of each dependency across all workspace packages - Filters out
@ctx-core/devand unchanged entries - Pipes results to
package-manifest-changesetwhich auto-creates changeset entries for the version bumps
Quick alternative (less precise — uses semver ranges, no changesets):
bun-update # runs: bun update && strip-workspace.shFor testing local changes in consumer projects (e.g., briantakita.me-dev) without publishing to npm:
# Install yalc globally (one-time):
bun add -g yalc
# Publish all workspace packages to local yalc store + push to consumers:
yalc-publish-all.sh # --push is the default
# Publish without pushing:
yalc-publish-all.sh --no-push
# In the consumer project, add packages from yalc:
yalc add rebuildjs relysjs @ctx-core/sass
bun installWhy yalc instead of symlinks: Cross-monorepo symlinks cause TypeScript type identity conflicts — the same package resolved from two different node_modules paths creates incompatible types. yalc copies packages into the consumer's node_modules, so all types resolve from a single tree.
Workflow: Edit in ctx-core-dev → yalc-publish-all.sh → consumer auto-updates (via --push). When done, yalc remove --all in the consumer to revert to npm versions.
# Start tmux dev layout (4 panes: shell, tig, build, etc.)
tmux-dev
# Watch mode build
build-watch| Path | Purpose |
|---|---|
lib/ctx-core/ |
Core utility package (48 exports) |
lib/monorepo/ |
Monorepo automation scripts |
lib/monorepo/bin/ |
Release workflow scripts |
tools/ |
Dev tooling packages |
bin/ |
Root-level shell scripts |
.changeset/ |
Changesets config (commit: false, access: restricted) |
See NAMING.md for the full Immutable Tag Naming Convention.
Key rules:
- Tags are lowercase singular, joined by
_(snake_case) __separates namespaces/dimensions:auth0__user__validate()- External names preserve their casing:
Response_header_name - Factory functions use
create_prefix:create_memo() - Reactive signals use
$suffix:pathname$ - Types use
_Tsuffix:ctx_T - Never mutate a name when composing it
- Each
lib/*/package publishes to@ctx-core/*on npm. strip-workspaceremovesworkspace:*references before publish.- COMMIT_EDITMSG files are per-package, auto-generated from CHANGELOG diffs.
.mise.tomladdsbin/,node_modules/.bin/,lib/*/bin/,tools/*/bin/to PATH.- Changesets
access: restricteddefault — overridden topublicbypublish--force.
- Commit from within the repo, not from parent.
- Use
recursive-git-commitfor bulk commits across packages. changeset-version-COMMIT_EDITMSGmust run beforerecursive-git-commit.