This repository is a pnpm monorepo for the cmd-table ecosystem.
| Package | Description | Version |
|---|---|---|
| cmd-table | Core CLI table library | |
| cmd-table-jest-reporter | Jest reporter that renders results as a cmd-table | |
| cmd-table-vitest-reporter | Vitest reporter (watch-mode aware) | |
| cmd-table-oclif | Drop-in cli-ux table replacement for oclif CLIs |
|
| @cmd-table/reporter-core | Shared rendering code for the test reporters | private |
- Node.js >= 20
- pnpm >= 9
pnpm installpnpm -r buildpnpm -r testpnpm --filter cmd-table docs:devWe use Changesets for versioning and publishing. No more manual release: commits — versioning, changelogs, and npm publishes are all driven by changeset files.
-
Make your changes in any package (
packages/cmd-table,packages/cmd-table-oclif, etc.). -
Add a changeset describing what changed:
pnpm changeset
The CLI walks you through:
- Which packages changed (select with space, confirm with enter).
- The bump type —
patchfor fixes,minorfor new features,majorfor breaking changes. - A short summary that becomes the changelog entry.
This creates a markdown file in
.changeset/that you commit alongside your code. -
Open a PR and merge it to
mainas usual.
The CI's Release job runs on every push to main and does one of two things:
- If there are pending changesets: it opens (or updates) a PR titled "chore: version packages" that bumps the affected versions, updates each package's
CHANGELOG.md, and removes the consumed.changeset/*.mdfiles. Review and merge that PR when you're ready to ship. - If there are no pending changesets: the job is a no-op.
When the "chore: version packages" PR merges, the same Release job sees the version bumps with no remaining changesets, and runs changeset publish — which calls npm publish for each updated package using your existing Trusted Publishing OIDC setup. No NPM_TOKEN secret needed.
| What you want to do | Command |
|---|---|
| Document a change for the next release | pnpm changeset |
| Preview what will be released | pnpm changeset status |
| Manually bump versions (rare) | pnpm version-packages |
| Manually publish (rare; CI does this) | pnpm release |
PRs that touch packages/*/src/ files must include a changeset — the changeset-check job will fail otherwise. Run pnpm changeset before pushing.
If a PR is purely chore/docs/test and shouldn't trigger a release, you can add an empty changeset:
pnpm changeset --emptyWhen publishing a brand-new package for the first time, configure npm Trusted Publishing for it on npmjs.com:
- Repository:
Aarul5/cmd-table - Workflow:
ci.yml
Then merge the version PR — the Release job will publish it.