Repository Workflow
This guide is the maintainer-oriented map for working inside the Polingo monorepo: setup, daily commands, testing, templates, changesets, and publishing.
Repository Model
- The repo root is a private workspace orchestrator. Published artifacts live under
packages/. packages/create-polingo-app/templates/is the canonical source for starter apps.examples/is a mirrored consumer view used for documentation and smoke validation.turbocoordinates workspace tasks, whilemakeprovides convenient shortcuts for the most common repo-wide commands.
Local Setup
Install dependencies from the repo root:
pnpm install --frozen-lockfileIf you prefer the shortcut:
make installUse the root package.json scripts and Makefile from the repository root unless you are intentionally targeting a single package.
Daily Commands
Workspace Health
Use either the direct pnpm scripts or the matching make shortcuts:
| Task | Preferred command | Shortcut |
|---|---|---|
| Build all packages | pnpm build | make build |
| Lint all packages | pnpm lint | make lint |
| Typecheck all packages | pnpm typecheck | none |
| Run all tests | pnpm test | make test |
| Run coverage | pnpm test:coverage | make coverage |
| Run security checks | pnpm run security | make security |
Docs
pnpm run docs:dev
pnpm run docs:build
pnpm run docs:previewTargeting One Package
Run package-scoped work with --filter when you do not need the full workspace:
pnpm --filter @polingo/core test
pnpm --filter @polingo/node typecheck
pnpm --filter @polingo/react buildWorking on Code Changes
Use this loop for normal feature and bug-fix work:
- Install dependencies from the root.
- Make the code and test changes in the relevant package.
- Run the smallest targeted package checks that prove the change.
- Run the repo-wide checks before opening or merging a PR:
pnpm lint
pnpm typecheck
make test
make coverageIf the change affects docs or examples, also run the relevant docs build or example checks before you finish.
Templates and Examples
Do not treat examples/ as the primary source for starter apps. Edit the canonical templates under packages/create-polingo-app/templates/, then resync the mirror:
pnpm examples:sync
pnpm examples:checkUse the smoke build when you change starter templates, scaffolding behavior, or package versions used by the generated apps:
pnpm examples:smokeWhat each command does:
pnpm examples:synccopies canonical templates intoexamples/.pnpm examples:checkfails if tracked example files drift from the canonical templates.pnpm examples:smokeverifies the mirrors are in sync, installs each example as a consumer app, and runs their builds.
Changesets and Versioning
Use Changesets for any change that should affect a published package.
Create a changeset:
pnpm run changesetGuidelines:
- Add a changeset when package behavior, public APIs, package contents, or published docs meaningfully change.
- Skip a changeset for internal-only repo mechanics, test-only changes, or docs changes that do not affect published packages.
- Choose
patch,minor, ormajorbased on the user-facing impact to each affected package.
Apply version bumps after changesets have landed:
pnpm run version-packagesThat command updates package versions and changelog content based on the queued changesets.
Publishing
The normal publish path is the Changesets release flow:
pnpm build
pnpm run releasepnpm run release runs the build and then publishes queued package releases through Changesets.
There is also a lower-level publish shortcut:
make publishOptional publish controls:
make publish PUBLISH_TAG=next
make publish PUBLISH_FILTERS="--filter @polingo/cli"Use make publish only when you intentionally want direct workspace publishing behavior. Prefer pnpm run release for the standard versioned release flow.
Recommended Pre-Release Checklist
Before publishing or merging a substantial change:
- Run
pnpm lint. - Run
pnpm typecheck. - Run
make test. - Run
make coverage. - If templates or scaffolding changed, run
pnpm examples:smoke. - If docs changed materially, run
pnpm run docs:build. - If a package release is intended, create or verify the required changeset.