@williamthorsen/nmr 0.29.0 → 0.31.0
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/.readyup/kits/default.js +33 -22
- package/.readyup/manifest.json +2 -2
- package/README.md +327 -78
- package/agents/guidance/rulebooks/nmr.md +4 -2
- package/bin/nmr-report-catalog.js +11 -0
- package/dist/esm/UserError.d.ts +3 -0
- package/dist/esm/UserError.js +6 -0
- package/dist/esm/check-cache.d.ts +36 -1
- package/dist/esm/check-cache.js +93 -24
- package/dist/esm/cli-build.js +2 -1
- package/dist/esm/cli-clean.js +2 -1
- package/dist/esm/cli-ensure-prepublish-hooks.js +2 -1
- package/dist/esm/cli-report-catalog.d.ts +1 -0
- package/dist/esm/cli-report-catalog.js +11 -0
- package/dist/esm/cli-report-overrides.js +2 -1
- package/dist/esm/cli-taze.js +2 -1
- package/dist/esm/cli.js +2 -1
- package/dist/esm/commands/clean.js +9 -5
- package/dist/esm/commands/report-catalog.d.ts +1 -0
- package/dist/esm/commands/report-catalog.js +34 -0
- package/dist/esm/commands/report-overrides.js +22 -7
- package/dist/esm/commands/taze.js +2 -1
- package/dist/esm/config.d.ts +1 -0
- package/dist/esm/config.js +81 -16
- package/dist/esm/default-scripts.d.ts +5 -1
- package/dist/esm/default-scripts.js +19 -16
- package/dist/esm/defineConfig.d.ts +1 -1
- package/dist/esm/help.js +3 -1
- package/dist/esm/helpers/clampToBytes.d.ts +2 -0
- package/dist/esm/helpers/clampToBytes.js +20 -0
- package/dist/esm/helpers/createBoundedBuffer.js +1 -4
- package/dist/esm/helpers/deriveExcerpt.d.ts +1 -0
- package/dist/esm/helpers/deriveExcerpt.js +30 -0
- package/dist/esm/helpers/duration.js +16 -9
- package/dist/esm/helpers/package-json.d.ts +11 -4
- package/dist/esm/helpers/package-json.js +51 -22
- package/dist/esm/helpers/readStringValues.d.ts +1 -0
- package/dist/esm/helpers/readStringValues.js +8 -0
- package/dist/esm/helpers/transcript.d.ts +5 -0
- package/dist/esm/helpers/transcript.js +59 -0
- package/dist/esm/recording.d.ts +65 -0
- package/dist/esm/recording.js +96 -0
- package/dist/esm/replay-assembly.d.ts +9 -0
- package/dist/esm/replay-assembly.js +26 -0
- package/dist/esm/report-format.d.ts +18 -0
- package/dist/esm/report-format.js +25 -0
- package/dist/esm/reportCliFailure.d.ts +2 -0
- package/dist/esm/reportCliFailure.js +11 -0
- package/dist/esm/resolve-scripts.d.ts +1 -1
- package/dist/esm/resolver.d.ts +13 -3
- package/dist/esm/resolver.js +34 -19
- package/dist/esm/runCli.d.ts +1 -0
- package/dist/esm/runCli.js +372 -70
- package/dist/esm/runner.d.ts +20 -1
- package/dist/esm/runner.js +72 -12
- package/dist/esm/scripts.d.ts +1 -1
- package/dist/esm/steps.d.ts +18 -0
- package/dist/esm/steps.js +144 -0
- package/dist/esm/types.d.ts +11 -2
- package/dist/esm/verbosity.d.ts +22 -0
- package/dist/esm/verbosity.js +37 -0
- package/dist/esm/verdict.d.ts +29 -0
- package/dist/esm/verdict.js +150 -0
- package/dist/esm/workspace.d.ts +2 -0
- package/dist/esm/workspace.js +20 -3
- package/package.json +12 -5
package/.readyup/kits/default.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat — @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.27.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/default.ts
|
|
@@ -20,10 +20,12 @@ import {
|
|
|
20
20
|
|
|
21
21
|
// src/default-scripts.ts
|
|
22
22
|
var GATE_PROJECTS = "--project unit --project tool";
|
|
23
|
+
var TYPECHECK_STEP = { run: "typecheck", declinesArgs: true };
|
|
24
|
+
var ROOT_TYPECHECK_STEP = { run: "root:typecheck", declinesArgs: true };
|
|
23
25
|
var workspaceScripts = {
|
|
24
26
|
build: ["compile"],
|
|
25
|
-
check: [
|
|
26
|
-
"check:strict": [
|
|
27
|
+
check: [TYPECHECK_STEP, "fmt:check", "lint:check", "test"],
|
|
28
|
+
"check:strict": [TYPECHECK_STEP, "fmt:check", "lint:strict", "test:coverage"],
|
|
27
29
|
clean: "nmr-clean",
|
|
28
30
|
compile: "nmr-compile",
|
|
29
31
|
fix: ["lint", "fmt"],
|
|
@@ -33,6 +35,7 @@ var workspaceScripts = {
|
|
|
33
35
|
lint: "eslint --fix .",
|
|
34
36
|
"lint:check": "eslint .",
|
|
35
37
|
"lint:strict": "strict-lint",
|
|
38
|
+
"report-catalog": "nmr-report-catalog",
|
|
36
39
|
test: `pnpm exec vitest ${GATE_PROJECTS}`,
|
|
37
40
|
"test:all": "pnpm exec vitest",
|
|
38
41
|
"test:coverage": `pnpm exec vitest ${GATE_PROJECTS} --coverage`,
|
|
@@ -40,19 +43,21 @@ var workspaceScripts = {
|
|
|
40
43
|
"test:unit": "pnpm exec vitest --project unit",
|
|
41
44
|
"test:watch": `pnpm exec vitest ${GATE_PROJECTS} --watch`,
|
|
42
45
|
typecheck: "tsgo --noEmit",
|
|
43
|
-
// Without `--include-locked`, nothing would be reported in a repo that pins exact version numbers.
|
|
44
|
-
|
|
46
|
+
// Without `--include-locked`, nothing would be reported in a repo that pins exact version numbers. The
|
|
47
|
+
// command is a string because neither half names an nmr command: both are binaries.
|
|
48
|
+
upgrade: "nmr-report-catalog && nmr-taze --include-locked",
|
|
45
49
|
"view-coverage": "open coverage/index.html"
|
|
46
50
|
};
|
|
47
51
|
var rootScripts = {
|
|
48
52
|
audit: ["audit:prod", "audit:dev"],
|
|
49
53
|
"audit:dev": "pnpm exec v11y --dev",
|
|
50
54
|
"audit:prod": "pnpm exec v11y --prod",
|
|
51
|
-
build: "
|
|
52
|
-
check: [
|
|
53
|
-
"check:strict": [
|
|
54
|
-
// Excludes the audit, which in CI has a workflow of its own.
|
|
55
|
-
|
|
55
|
+
build: ["-R build"],
|
|
56
|
+
check: [TYPECHECK_STEP, "fmt:check", "lint:check", "test"],
|
|
57
|
+
"check:strict": [TYPECHECK_STEP, "fmt:check", "lint:strict", "test:coverage"],
|
|
58
|
+
// Excludes the audit, which in CI has a workflow of its own. The build is what the narrowed check runs
|
|
59
|
+
// against, so it declines the arguments rather than being narrowed by them.
|
|
60
|
+
ci: [{ run: "build", declinesArgs: true }, "check:strict"],
|
|
56
61
|
clean: "nmr-clean",
|
|
57
62
|
fix: ["lint", "fmt"],
|
|
58
63
|
"fix:check": ["fmt:check", "lint:check"],
|
|
@@ -61,10 +66,11 @@ var rootScripts = {
|
|
|
61
66
|
lint: "eslint --fix .",
|
|
62
67
|
"lint:check": "eslint .",
|
|
63
68
|
"lint:strict": "strict-lint",
|
|
64
|
-
// The audit costs seconds and `ci` costs minutes, so the cheap gate fails first.
|
|
65
|
-
|
|
69
|
+
// The audit costs seconds and `ci` costs minutes, so the cheap gate fails first. The audit reads the
|
|
70
|
+
// dependency tree, which no argument narrowing the code under test says anything about.
|
|
71
|
+
prepush: [{ run: "audit", declinesArgs: true }, "ci"],
|
|
66
72
|
"report-overrides": "nmr-report-overrides",
|
|
67
|
-
"root:check": [
|
|
73
|
+
"root:check": [ROOT_TYPECHECK_STEP, "fmt:check", "root:lint:check", "root:test"],
|
|
68
74
|
"root:lint": "eslint --fix --ignore-pattern 'packages/**' .",
|
|
69
75
|
"root:lint:check": "eslint --ignore-pattern 'packages/**' .",
|
|
70
76
|
"root:lint:strict": "strict-lint --ignore-pattern 'packages/**' .",
|
|
@@ -73,15 +79,20 @@ var rootScripts = {
|
|
|
73
79
|
"root:test:tool": "vitest --config ./vitest.root.config.ts --project tool",
|
|
74
80
|
"root:test:unit": "vitest --config ./vitest.root.config.ts --project unit",
|
|
75
81
|
"root:typecheck": "tsgo --noEmit",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
"test:
|
|
81
|
-
"test:
|
|
82
|
+
// Carries the override report for the same reason `upgrade` does: both end in the tool that rewrites a
|
|
83
|
+
// `pnpm.overrides` block, so both need the reporter's rejection ahead of them.
|
|
84
|
+
"root:upgrade": "nmr-report-overrides && nmr-taze --include-locked",
|
|
85
|
+
test: ["root:test", "-R test"],
|
|
86
|
+
"test:all": ["root:test:all", "-R test:all"],
|
|
87
|
+
"test:coverage": ["root:test", "-R test:coverage"],
|
|
88
|
+
"test:tool": ["root:test:tool", "-R test:tool"],
|
|
89
|
+
"test:unit": ["root:test:unit", "-R test:unit"],
|
|
82
90
|
"test:watch": `vitest ${GATE_PROJECTS} --watch`,
|
|
83
|
-
|
|
84
|
-
//
|
|
91
|
+
// Neither step is narrowable, so `nmr typecheck <file>` is rejected rather than checking that file under
|
|
92
|
+
// default options at the root and hunting for it in every package.
|
|
93
|
+
typecheck: [ROOT_TYPECHECK_STEP, { run: "-R typecheck", declinesArgs: true }],
|
|
94
|
+
// The command is a string because neither half names an nmr command: both are binaries, and a composite
|
|
95
|
+
// element can name only a command.
|
|
85
96
|
upgrade: "nmr-report-overrides && nmr-taze --include-locked --recursive"
|
|
86
97
|
};
|
|
87
98
|
|
|
@@ -376,7 +387,7 @@ function formatPaths(paths) {
|
|
|
376
387
|
${paths.map((path2) => ` ${path2}`).join("\n")}`;
|
|
377
388
|
}
|
|
378
389
|
function getMinVersion() {
|
|
379
|
-
const picked = { "version": "0.
|
|
390
|
+
const picked = { "version": "0.31.0" };
|
|
380
391
|
if (typeof picked["version"] !== "string") {
|
|
381
392
|
throw new TypeError("nmr/package.json: 'version' must be a string");
|
|
382
393
|
}
|
package/.readyup/manifest.json
CHANGED