Contributing
Contribution work should preserve a clean boundary between package behavior and examples.
Keep Sample PRs Separate
Sample PRs may change:
sample/**docs/**website/docs/**- CI and release scripts that validate samples
- README links that point to samples
Sample PRs must not include packages/asyncapi/** changes. If a sample reveals a
library bug, pause the sample branch and fix the package separately.
Stash And Fix Workflow
-
Stash the sample work:
git stash push -u -m "sample work before library fix" -
Create a library-fix branch from
main. -
Add the package fix and a regression test.
-
Open and merge the package fix PR.
-
Return to the sample branch and restore the sample work:
git stash pop -
Confirm the sample PR has no package changes:
git diff --name-only main...HEAD -- packages/asyncapigit diff --cached --name-only -- packages/asyncapi
Both commands should print nothing for a sample-only PR.
Quality Gate
Run the full gate before opening a PR:
npm run ci
This covers typecheck, 100% coverage, cognitive complexity, release checks, the
docs-site build, the security audit, and the sample matrix. Every generated
sample document must pass @asyncapi/parser.
Why This Matters
Samples are documentation, validation, and onboarding material. Package changes alter the public library contract. Keeping them separate makes each PR easier to review, easier to revert, and safer to release.