reading-stone 0.2.0 → 0.2.2
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 +34 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
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
|
|
8
|
+
## Current status
|
|
9
9
|
|
|
10
10
|
| Method | Status |
|
|
11
11
|
|--------|--------|
|
|
@@ -261,6 +261,39 @@ 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, staged, and given a GitHub release by CI, and
|
|
267
|
+
published to npm by a maintainer.
|
|
268
|
+
Release tags are created by the `release` workflow and can't be deleted
|
|
269
|
+
or moved afterward (the `release-tag-protection` ruleset). Nothing
|
|
270
|
+
reaches npm without a human 2FA approval.
|
|
271
|
+
|
|
272
|
+
The version comes from the tag alone. `package.json` on `main` holds
|
|
273
|
+
the placeholder `0.0.0-development`; nothing is bumped by hand.
|
|
274
|
+
|
|
275
|
+
1. Run the `release` workflow from `main` with the new tag (Actions →
|
|
276
|
+
release → Run workflow, or
|
|
277
|
+
`gh workflow run release.yml -f tag=vX.Y.Z`). It calls the shared
|
|
278
|
+
npm pipeline in [`jflowers/ship`](https://github.com/jflowers/ship),
|
|
279
|
+
which runs the release preflight (semver, uniqueness, ordering, CI
|
|
280
|
+
status, unreleased commits) and creates the annotated tag. The
|
|
281
|
+
stage job then checks out the tag, reruns the CI gates, sets the
|
|
282
|
+
package version to `X.Y.Z` (not committed), and runs
|
|
283
|
+
`npm stage publish --provenance` through npm trusted publishing
|
|
284
|
+
(OIDC, no tokens). Last, it creates the GitHub release with
|
|
285
|
+
generated notes. Prerelease tags stage under the `next` dist-tag
|
|
286
|
+
and get a GitHub prerelease.
|
|
287
|
+
2. Approve the staged version on npmjs.com (Staged Packages) or with
|
|
288
|
+
`npm stage approve <stage-id>` (npm 11.15.0 or newer, e.g.
|
|
289
|
+
`npx -y npm@11.21.2 stage approve <stage-id>`). Both require 2FA.
|
|
290
|
+
The version goes public at this step; it is the only approval.
|
|
291
|
+
|
|
292
|
+
Re-running the workflow is safe: a version already on npm is not
|
|
293
|
+
restaged, and an existing GitHub release is left unchanged. If you
|
|
294
|
+
reject a staged version (`npm stage reject <stage-id>`), delete its
|
|
295
|
+
GitHub release by hand (`gh release delete vX.Y.Z`); the tag stays.
|
|
296
|
+
|
|
264
297
|
## License
|
|
265
298
|
|
|
266
299
|
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
|
|
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
|
-
|
|
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";
|