Repository navigation
refactor: move to a monorepo layout with packages/ - #2
Open
mdjastrzebski wants to merge 4 commits into
Open
mdjastrzebski wants to merge 4 commits into
mdjastrzebski wants to merge 4 commits into
Conversation
The repo becomes a Bun workspace monorepo with packages under `packages/`, ready for more packages. The root is private and keeps the shared tooling (oxfmt, release-it) and runs each script across the packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A local release-it plugin (`scripts/release-packages.js`) copies the root version to each public package in `packages/`, updates `bun.lock`, and publishes the packages with `bun publish` before the git commit, tag and GitHub release. The private root only holds the version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folders under `packages/` drop the `nitro-ui-` prefix of the npm name. The package is still published as `nitro-ui-testing-library`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the repo to a Bun workspace monorepo so more packages can be added. There's one package for now. The npm package name stays
nitro-ui-testing-library.What changed
packages/testing-library. Folders underpackages/drop thenitro-ui-prefix of the npm name. The rootpackage.jsonis private and keeps only shared tooling (oxfmt, release-it). Build and test tools are declared by each package.build,typecheck,test,test:jest,test:vitest,test:bun,test:examples,validate) run across workspaces withbun run --filter, so commands and CI workflows stay the same. Plainbun testnow only works inside a package's folder (itsbunfig.tomlsets the preload). From the root, usebun run test:bun.packages/is released with one shared version, kept in the rootpackage.json. release-it 21 has no compatible workspaces plugin, so a small local plugin (scripts/release-packages.js) does the work:bun.lock, so CI's--frozen-lockfilepassesbun publish, which turnsworkspace:dependency ranges into real versionsnpm loginwhen logged out (warns only on--dry-run)beta, ornext)LICENSEis copied into the package.AGENTS.mddescribes the layout and the release flow.scripts/use-latest-nitro-ui.shnow updates the package's dependencies instead of the root's.Notes for reviewers
bun run validatepasses,NITRO_UI_VERSION=0.3.0 ./scripts/use-latest-nitro-ui.shworks, andbun run release --dry-runruns the steps in order (version sync,bun install, build,bun publish --dry-runpacking 28 files, commit, tag, push, GitHub release). I also ran the plugin's version bump for real and reverted it; the lockfile stayed frozen-clean.bun.lockwas edited by hand tonitro-ui-testing-library-monorepo. Bun kept the old name, and--frozen-lockfileaccepts the edit.🤖 Generated with Claude Code