| description | Branches, tests, and PR expectations for contentstack-javascript (CDA SDK) | |||
|---|---|---|---|---|
| globs |
|
|||
| alwaysApply | false |
- Follow team Git conventions (e.g. feature branches off the repo’s default integration branch).
- Do not commit permanent
test.only,it.only,describe.only, or skipped tests meant for CI.
npm run lint— ESLint must pass onsrcandtest.npm test— Runspretest→npm run build, thentest:e2eandtest:typescript. For live stack tests, set env vars (seetest/config.js:HOST,API_KEY,DELIVERY_TOKEN,ENVIRONMENT). Never commit secrets or.envwith real tokens.- Version bump — When the PR introduces user-visible or release-worthy SDK behavior (new API, bug fix shipped to npm, or a breaking change), update
versioninpackage.jsonper semver (patch / minor / major). Docs-only or test-only changes may omit a bump per team practice; match sibling PRs when unsure.
- User-facing changes — JSDoc on public methods; update
index.d.tswhen the public TypeScript surface changes. - Behavior — Preserve backward compatibility unless the change is explicitly breaking and documented.
- Errors — Keep rejection shapes consistent with
src/core/lib/request.js(error_message,error_code,errors,status,statusTextwhere applicable). Do not log full delivery_token or management_token / preview_token values in new code. - Tests — Add or adjust Jest tests under
test/for new behavior; live tests require the env contract intest/config.js.
- Agent overview: repo root
AGENTS.md - CDA patterns:
skills/contentstack-javascript-cda/SKILL.md - HTTP / retries / plugins:
skills/framework/SKILL.md