reading-stone 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Reading Stone is a Gaze-spawned subprocess. It speaks JSON-RPC 2.0 over stdin/stdout
6
6
  (protocol v1.2.0). Gaze owns the CLI, scoring, and reports.
7
7
 
8
- ## Current status (v0.2.0)
8
+ ## Current status
9
9
 
10
10
  | Method | Status |
11
11
  |--------|--------|
@@ -261,6 +261,33 @@ instead of producing one itself.
261
261
  When input is malformed, Reading Stone emits a one-line diagnostic to
262
262
  **stderr** and continues. **stdout carries only the JSON-RPC response.**
263
263
 
264
+ ## Releasing
265
+
266
+ Releases are tagged and staged by CI and published by a maintainer.
267
+ Release tags are created by the `release` workflow and can't be deleted
268
+ or moved afterward (the `release-tag-protection` ruleset). Nothing
269
+ reaches npm without a human 2FA approval.
270
+
271
+ The version comes from the tag alone. `package.json` on `main` holds
272
+ the placeholder `0.0.0-development`; nothing is bumped by hand.
273
+
274
+ 1. Run the `release` workflow from `main` with the new tag (Actions →
275
+ release → Run workflow, or
276
+ `gh workflow run release.yml -f tag=vX.Y.Z`). It runs the shared
277
+ release preflight (semver, uniqueness, ordering, CI status,
278
+ unreleased commits) and creates the annotated tag.
279
+ 2. Approve the `npm` environment deployment on the run. The stage job
280
+ checks out the tag, reruns the CI gates, sets the package version
281
+ to `X.Y.Z` (not committed), and runs
282
+ `npm stage publish --provenance` through npm trusted publishing
283
+ (OIDC, no tokens). Prerelease versions stage under the `next`
284
+ dist-tag.
285
+ 3. Approve the staged version on npmjs.com (Staged Packages) or with
286
+ `npm stage approve <stage-id>`. Both require 2FA. The version goes
287
+ public at this step.
288
+ 4. Create the GitHub release for the tag
289
+ (`gh release create vX.Y.Z --verify-tag --generate-notes`).
290
+
264
291
  ## License
265
292
 
266
293
  Apache 2.0 -- see [LICENSE](LICENSE). The JSON-RPC protocol layer, the
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@
31
31
  * names use `export type` clauses so the split between runtime values and
32
32
  * compile-time types stays explicit.
33
33
  */
34
- export declare const VERSION = "0.2.0";
34
+ export declare const VERSION: string;
35
35
  export type { PatternSet, PreparedAnalysis, } from "./analysis.js";
36
36
  export { analyze, classifySignals, normalizePatterns, pathInScope, } from "./analysis.js";
37
37
  export type { CognitiveRow } from "./cognitive.js";
package/dist/index.js CHANGED
@@ -31,7 +31,16 @@
31
31
  * names use `export type` clauses so the split between runtime values and
32
32
  * compile-time types stays explicit.
33
33
  */
34
- export const VERSION = "0.2.0";
34
+ import { readFileSync } from "node:fs";
35
+ /**
36
+ * The package version, read from the package's own `package.json`
37
+ * (`../package.json` resolves to the package root from both `src/` and
38
+ * `dist/`). `main` carries the placeholder `0.0.0-development`; the
39
+ * release workflow writes the tag's version before building, so the
40
+ * published value is the released version.
41
+ */
42
+ const manifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
43
+ export const VERSION = manifest.version;
35
44
  export { analyze, classifySignals, normalizePatterns, pathInScope, } from "./analysis.js";
36
45
  export { cognitiveComplexity, serializeCognitiveRow, } from "./cognitive.js";
37
46
  export { computeComplexity } from "./complexity.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reading-stone",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "TypeScript side-effect analyzer backend for Gaze",
5
5
  "keywords": [
6
6
  "gaze",