26 lines
1.2 KiB
Markdown
26 lines
1.2 KiB
Markdown
# WRNexusJS public API policy
|
|
|
|
The package root and every declared package export subpath are public API. During
|
|
the `0.8.x` release line, exported names are additive: removal or renaming needs
|
|
a deprecation cycle and a major/minor compatibility decision, not an incidental
|
|
refactor.
|
|
|
|
`bun run check:public-api` resolves TypeScript re-exports and compares all
|
|
publishable package/subpaths with `docs/public-api-0.8.json`. It is read-only and
|
|
runs in the production gate. When an intentional, reviewed API addition or
|
|
approved compatibility change occurs, update the baseline with:
|
|
|
|
```bash
|
|
bun run generate:public-api
|
|
```
|
|
|
|
The baseline guards exported names, while package tarball consumer tests guard
|
|
conditional export targets, declarations, runtime imports, browser bundling,
|
|
assets, and the CLI binary. Behavioral compatibility remains covered by package
|
|
tests and migration tests; the API baseline does not replace those contracts.
|
|
|
|
Browser runtime growth is also a reviewed compatibility concern. The read-only
|
|
security/performance gate caps source payloads at 150 kB for reactive hydration,
|
|
25 kB for navigation, and 15 kB for realtime. Production delivery additionally
|
|
uses Brotli; a budget increase requires an explicit performance review.
|