| description | Branching, CI, local commands, commit hooks, and release flow for contentstack-utils-javascript |
|---|---|
| alwaysApply | false |
- CI (
Unit-Test-CI) runs on push/PR todevelopment,staging, andmaster(see.github/workflows/ci.yml). - Branch protection: A workflow fails PRs that target
stagingwhen the head branch is notdevelopment(see.github/workflows/check-branch.yml). Preferdevelopmentas the integration branch when contributing upstream. - Target the branch your team uses for integration; align with maintainers if unsure.
| Task | Command / note |
|---|---|
| Build | npm run build (runs prebuild: clean dist, download-regions, then tsc + Rollup) |
| Test | npm test (includes pretest → build; Jest + coverage; reports/) |
| Format | npm run format (Prettier: src/**/*.ts) |
| ESLint | No lint script in package.json; run e.g. npx eslint src __test__ using eslint.config.js |
commit-msg: Conventional Commits viacommitlint(.commitlintrc.json).pre-commit: Requires Snyk (snyk test --all-projects) and Talisman installed locally. SetSKIP_HOOK=1to bypass (documented in the hook).
npm testpasses (build + unit tests).- CHANGELOG.md updated for user-visible changes when maintainers expect it.
- Dependencies: Be mindful of Snyk/SCA workflows; security-relevant bumps should be justified.
- Package version lives in
package.json(also reflected inCHANGELOG.md). prepublishOnlyrunsnpm testbefore publish.- NPM / GitHub Packages: Publishing is driven by GitHub release
created(.github/workflows/npm-publish.yml); requires maintainer secrets (NPM_TOKEN,GIT_TOKEN). Bump version and changelog in the same change set as the release your team uses.