| name | dev-workflow |
|---|---|
| description | Branches, CI, build/test/lint commands, git hooks, PR expectations, and releases for contentstack-utils-javascript |
- Choosing a base branch or opening a PR.
- Running build/tests locally or debugging CI.
- Cutting releases or bumping versions.
- CI (
Unit-Test-CI) runs on push/PR todevelopmentandmaster(.github/workflows/ci.yml). - Feature/fix PRs should target
development. Release PRs are raised directly fromdevelopmenttomaster. - Confirm target branch with maintainers if unsure.
| Task | Command / note |
|---|---|
| Build | npm run build — prebuild: clean dist, download-regions, then tsc + Rollup |
| Test | npm test — pretest → build, then Jest + coverage → reports/ |
| Format | npm run format — Prettier on src/**/*.ts |
| ESLint | No npm run lint; use e.g. npx eslint src __test__ (eslint.config.js) |
commit-msg: Conventional Commits via commitlint (.commitlintrc.json).pre-commit: Snyk (snyk test --all-projects) and Talisman must be available locally, or setSKIP_HOOK=1to bypass (see hook script).
npm testpasses (full build + unit tests).- CHANGELOG.md for user-visible changes when maintainers expect it.
- Dependency changes: consider Snyk/SCA workflows.
- Version in
package.jsonandCHANGELOG.md. prepublishOnlyrunsnpm test.- npm / GitHub Packages:
.github/workflows/release.ymlonrelease: types: [published]for tagv*(drafts skipped); npm publishes through OIDC trusted publishing (noNPM_TOKEN), GitHub Packages with the job'sgithub.token. Pre-releases go to thebetadist-tag.