-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdev-workflow.mdc
More file actions
41 lines (28 loc) · 1.62 KB
/
dev-workflow.mdc
File metadata and controls
41 lines (28 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
description: Branches, prepack/test, PR and release workflow for contentstack-cli-tsgen
alwaysApply: false
globs:
- package.json
- package-lock.json
- .github/workflows/**/*
- tsconfig.json
- jest.config.js
- .eslintrc.js
- AGENTS.md
---
# Development workflow
For detail on tests and env, see **[skills/testing](../../skills/testing/SKILL.md)**; for PR expectations, **[skills/code-review](../../skills/code-review/SKILL.md)**.
## Branches
- **CI (Node.js workflow)** runs on **push** and **pull_request** for **`master`**, **`development`**, and **`staging`** (see `.github/workflows/node.js.yml`).
- **Release** runs on **push** to **`master`** (see `.github/workflows/release.yml`), Node **22.x**, artifact **`lib`**, npm publish + GitHub release.
**Maintainer note:** Other Contentstack repos may use different default branches (`main` vs `master`). Align docs and protection rules when convenient—no git config changes implied here.
## Build and compile
- **`npm run prepack`**: removes **`lib/`**, runs **`tsc -b`**, **`oclif manifest`**, **`oclif readme`**. This is the canonical build before pack/publish.
- CI runs **`npm run prepack`** after global **`csdx`** setup and **`plugins:link`**.
## Tests and lint
- **`npm test`**: Jest with `--testPathPattern=tests`.
- **`posttest`** (after `npm test`): ESLint with `.eslintrc.js` and `--fix`.
## Pull requests
- Run **`npm run prepack`** and **`npm test`** (which triggers **`posttest`**) before merge when touching source or tests.
## Releases
- Version in **`package.json`** drives publishing; release workflow builds with **`prepack`** and publishes from **`master`**.