Skip to content

Use when creating, changing, or reviewing a workspace package in packages/*: layout, package.json rules, public API, and changesets.

View source

Package rules

Layout

packages/<name>/ with package.json, tsconfig.json, src/index.ts, and tests/. Mirror an existing package.

package.json

  • Name @workspace/<name>, private: true, "sideEffects": false.
  • Scripts: build, dev, test, typecheck, lint.
  • Core libraries are peer dependencies and exact-version dev dependencies.
  • No new dependencies without user approval.

Code

  • Use only the public exports of your dependencies. No internals, no prototype patches.
  • Everything public is exported from src/index.ts. Keep the public API small.
  • Behaviour matches the spec, including any documented differences from the reference implementation.

Changesets

Add a changeset on the last step of a package item, with the correct bump level. Refactors and chores with no published behaviour change need none.