| name | dev-workflow |
|---|---|
| description | Branches, lint/tests before PR, semver version bumps, and PR expectations for contentstack-management-javascript. |
- Starting work or opening a PR.
- Choosing which npm scripts to run before push.
- Deciding whether to bump
package.jsonversion.
- Follow team Git conventions (e.g. feature branches off
development/ integration branch used in this repo). - Keep commits focused; do not commit with
test.only,it.only,describe.only, or permanent skips.
npm run lint— ESLint must pass onlibandtest.- Unit tests —
npm run test:unit. (npm testalso runstest:apifirst — confirmtest:apiis defined inpackage.jsonon your branch.) - Sanity / API tests — only when validating against live CMA:
npm run buildthennpm run test:sanity-nocovortest:sanity-test, with env vars pertest/sanity-check/utility/testSetup.js. Never commit secrets. - Version bump — For user-visible or release-worthy
lib/changes (new API, shipped fix, breaking change), updateversioninpackage.jsonper semver (patch / minor / major). Docs-only or chore-only PRs may omit per team practice.
- User-facing changes — JSDoc on public methods; update
types/**when the public surface changes. - Behavior — Preserve backward compatibility unless the change is explicitly breaking and documented.
- Errors — Use
lib/core/contentstackError.jspatterns; do not leak full tokens in logs. - Tests — Unit tests under
test/unit/with mocks; for sanity env and commands, use the testing skill (listed inAGENTS.md).