You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**npm** 11+ (no enforced constraint, but matches the version bundled with Node 24)
7
7
8
8
Clone the repository and install dependencies:
9
9
@@ -146,13 +146,15 @@ Follow the conventions:
146
146
-**Factory pattern:** Export a `createXxxService()` function that returns a plain object.
147
147
-**No default exports.**
148
148
149
-
### 5. Create a changeset
149
+
### 5. Bump the package version
150
150
151
-
```bash
152
-
npx changeset
153
-
```
151
+
Set `version` in your new package's `package.json` to `0.1.0` (the conventional starting version for new packages). When making subsequent changes to existing packages, bump the `version` field manually following semver:
-**minor** (`0.1.0` → `0.2.0`) — new features, new exports, or any pre-1.0 breaking change (caret semver treats minor bumps as breaking pre-1.0; expect a peer-range cascade — see the territory's `CLAUDE.md` § "Versioning Discipline (Pre-1.0)").
155
+
-**major** (`0.1.0` → `1.0.0`) — package crosses the stability boundary; document the contract guarantees that ship at 1.0.
154
156
155
-
Select your package, choose the version bump type (major/minor/patch), and write a description of the change. Changesets are how we track what changed and generate changelogs.
157
+
Push to `main` triggers an automatic publish (see [Publishing](#publishing) below).
156
158
157
159
## Conventions
158
160
@@ -190,9 +192,13 @@ export type {ExampleService, ExampleConfig} from './types';
190
192
If your package depends on another `@script-development/fs-*` package, declare it as a **peer dependency**, not a regular dependency. This prevents duplicate installations:
Under npm caret semantics, `^0.3.0` matches only `0.3.x` — the next minor (`0.4.0`) is treated as breaking. Cross-minor consumers must widen the range (e.g. `"^0.3.0 || ^0.4.0"`) and patch-bump the affected sibling. See the territory's `CLAUDE.md` § "Versioning Discipline (Pre-1.0)" for the full mechanical checklist.
200
+
:::
201
+
196
202
### Testing
197
203
198
204
Write tests alongside your source code in the `tests/` directory. Use `describe` + `it` blocks:
Packages are published to npm via **OIDC Trusted Publishing** — no stored tokens. The publish workflow triggers automatically when changesets are merged to `main`.
220
+
Packages are published to npm via **OIDC Trusted Publishing** — no stored tokens. The publish workflow (`.github/workflows/publish.yml`) triggers automatically on push to `main` when any `**/package.json` file changes.
221
+
222
+
The flow:
215
223
216
-
To prepare a release:
224
+
1. Create your changes on a branch (including a `version` bump in the affected package's `package.json` per the rules in [Adding a New Package § 5](#_5-bump-the-package-version)).
225
+
2. Open a PR — CI runs all 8 gates (audit → format → lint → build → typecheck → lint:pkg → coverage → mutation).
226
+
3. On merge to `main`, the publish workflow detects the `package.json` change and:
227
+
- Builds all packages and uploads `dist/` artifacts.
228
+
- For each package whose published version differs from the local `package.json#version`, publishes the new version via OIDC Trusted Publishing.
229
+
- Provenance attestation is enabled (`NPM_CONFIG_PROVENANCE=true`).
217
230
218
-
1. Create your changes on a branch
219
-
2. Run `npx changeset` to describe what changed
220
-
3. Open a PR — CI runs all 8 gates
221
-
4. After merge, the changeset bot creates a "Version Packages" PR
222
-
5. Merging that PR triggers the publish workflow
231
+
There is no changeset bot and no "Version Packages" intermediate PR. Version bumps are author-managed in the source PR; the publish step reacts to whatever shipped on `main`.
0 commit comments