@hailstails/hone 0.1.0-pre.8 → 1.0.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/ADOPTING.md +2 -2
- package/CHANGELOG.md +12 -0
- package/MIGRATING.md +1 -1
- package/README.md +13 -11
- package/api/audit.js +0 -1
- package/api/testing.js +8 -9
- package/chunks/chunk-5X2BR42Y.js +117 -0
- package/chunks/{chunk-NRXSM7BY.js → chunk-LHVFZMXD.js} +10 -7
- package/chunks/{chunk-5LCLBXP7.js → chunk-NILRE23T.js} +1 -1
- package/chunks/{chunk-P3NLETF5.js → chunk-OKQHVZLO.js} +1 -1
- package/chunks/{chunk-POZL7G62.js → chunk-OVEQ37JQ.js} +40 -37
- package/chunks/chunk-RNXPEK2U.js +77 -0
- package/chunks/{chunk-XXLMIBLS.js → chunk-XE6RNNZB.js} +162 -143
- package/chunks/{chunk-WPRR2MPJ.js → chunk-YL6WR3QW.js} +5 -5
- package/core/check/tool-command.js +20 -20
- package/mechanisms/audit/CD-1/any-cast.js +0 -1
- package/mechanisms/audit/CD-10/throws-in-tests.js +0 -1
- package/mechanisms/audit/CD-14/class-syntax.js +0 -1
- package/mechanisms/audit/CD-15/loops.js +0 -1
- package/mechanisms/audit/CD-17/clock-sources.js +0 -1
- package/mechanisms/audit/CD-19/import-boundaries.js +2 -3
- package/mechanisms/audit/CD-2/cast-expressions.js +0 -1
- package/mechanisms/audit/CD-23/export-test-sibling.js +0 -1
- package/mechanisms/audit/CD-25/dependency-isolation.js +0 -1
- package/mechanisms/audit/CD-26/module-mocking.js +0 -1
- package/mechanisms/audit/CD-27/test-body-logic.js +0 -1
- package/mechanisms/audit/CD-3/compiler-overrides.js +2 -861
- package/mechanisms/audit/CD-43/boolean-signatures.js +0 -1
- package/mechanisms/audit/CD-44/parameter-mutation.js +0 -1
- package/mechanisms/audit/CD-47/hermetic-git-spawns.js +0 -1
- package/mechanisms/audit/CD-5/comments-directives.js +3 -4
- package/mechanisms/audit/CD-6/identifier-names.js +0 -1
- package/mechanisms/audit/CD-7/categorical-paths.js +0 -1
- package/mechanisms/audit/CD-7a/factory-return-types.js +0 -1
- package/mechanisms/audit/CD-8/switch-defaults.js +0 -1
- package/mechanisms/audit/runner/runner.js +31 -27
- package/mechanisms/eslint/CD-1/cd1/cd1.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-10/cd10/cd10.eslint-plugin.js +0 -2
- package/mechanisms/eslint/CD-14/cd14/cd14.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-2/cd2/cd2.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-27/cd27/cd27.eslint-plugin.js +0 -2
- package/mechanisms/eslint/CD-40/cd40/cd40.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-41/cd41/cd41.eslint-plugin.js +0 -2
- package/mechanisms/eslint/CD-42/cd42/cd42.eslint-plugin.js +0 -2
- package/mechanisms/eslint/CD-44/cd44/cd44.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-6/cd6/cd6.eslint-plugin.js +0 -1
- package/mechanisms/eslint/CD-7/cd7/cd7.eslint-plugin.js +0 -2
- package/mechanisms/eslint/runner/README.md +1 -1
- package/mechanisms/eslint/runner/runner.js +58 -2532
- package/package.json +6 -2
- package/THIRD-PARTY-NOTICES.md +0 -354
- package/chunks/chunk-MYX7GAVM.js +0 -73
- package/chunks/chunk-NCDYOPHG.js +0 -19832
- package/chunks/chunk-NZLE2WMY.js +0 -35
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
folderScope
|
|
3
3
|
} from "../../../chunks/chunk-QWA6OVLC.js";
|
|
4
|
-
import "../../../chunks/chunk-NZLE2WMY.js";
|
|
5
4
|
|
|
6
5
|
// mechanisms/audit/CD-47/hermetic-git-spawns.ts
|
|
7
6
|
var TEST_FILE_SUFFIXES = [".test.ts", ".test.tsx", ".test.mjs", ".test.js", ".spec.ts", ".spec.mjs"];
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stringListClauseSettings
|
|
3
|
-
} from "../../../chunks/chunk-
|
|
3
|
+
} from "../../../chunks/chunk-YL6WR3QW.js";
|
|
4
4
|
import {
|
|
5
5
|
typeDirectiveReaderFor
|
|
6
|
-
} from "../../../chunks/chunk-
|
|
6
|
+
} from "../../../chunks/chunk-NILRE23T.js";
|
|
7
7
|
import {
|
|
8
8
|
gatheredOutcomes
|
|
9
9
|
} from "../../../chunks/chunk-LDQUT742.js";
|
|
10
10
|
import {
|
|
11
11
|
clauseAddressText
|
|
12
|
-
} from "../../../chunks/chunk-
|
|
12
|
+
} from "../../../chunks/chunk-5X2BR42Y.js";
|
|
13
13
|
import {
|
|
14
14
|
folderScope
|
|
15
15
|
} from "../../../chunks/chunk-QWA6OVLC.js";
|
|
16
|
-
import "../../../chunks/chunk-NZLE2WMY.js";
|
|
17
16
|
|
|
18
17
|
// mechanisms/audit/CD-5/comments-directives.ts
|
|
19
18
|
var sourceEligibility = (request) => {
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
TYPE_DIRECTIVES,
|
|
3
3
|
directiveEscapesIn,
|
|
4
4
|
escapesOf
|
|
5
|
-
} from "../../../chunks/chunk-
|
|
5
|
+
} from "../../../chunks/chunk-NILRE23T.js";
|
|
6
6
|
import {
|
|
7
7
|
hitSchema,
|
|
8
8
|
runnerResultSchema
|
|
9
|
-
} from "../../../chunks/chunk-
|
|
9
|
+
} from "../../../chunks/chunk-RNXPEK2U.js";
|
|
10
10
|
import {
|
|
11
11
|
createDefaultPackageLocationPort,
|
|
12
12
|
installRootOfRunnerEntry,
|
|
13
13
|
toolchainBoundStandaloneRunner
|
|
14
|
-
} from "../../../chunks/chunk-
|
|
14
|
+
} from "../../../chunks/chunk-OKQHVZLO.js";
|
|
15
15
|
import {
|
|
16
16
|
gatheredOutcomes
|
|
17
17
|
} from "../../../chunks/chunk-LDQUT742.js";
|
|
@@ -24,28 +24,30 @@ import {
|
|
|
24
24
|
loadedPeer,
|
|
25
25
|
moduleExtensionOf,
|
|
26
26
|
moduleFileForm
|
|
27
|
-
} from "../../../chunks/chunk-
|
|
27
|
+
} from "../../../chunks/chunk-LHVFZMXD.js";
|
|
28
28
|
import {
|
|
29
|
-
external_exports,
|
|
30
29
|
sameClauseAddress
|
|
31
|
-
} from "../../../chunks/chunk-
|
|
32
|
-
|
|
30
|
+
} from "../../../chunks/chunk-5X2BR42Y.js";
|
|
31
|
+
|
|
32
|
+
// mechanisms/audit/runner/create-walker-runner.ts
|
|
33
|
+
import { z as z4 } from "zod";
|
|
33
34
|
|
|
34
35
|
// mechanisms/audit/runner/observe-walker-file.ts
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
import { z } from "zod";
|
|
37
|
+
var pieceHitsSchema = z.array(hitSchema.unwrap().omit({ file: true }).readonly());
|
|
38
|
+
var callSchema = z.function({ input: [z.unknown()], output: z.unknown() });
|
|
39
|
+
var functionSchema = () => z.custom().superRefine((candidate, refinement) => {
|
|
38
40
|
if (typeof candidate !== "function") {
|
|
39
41
|
refinement.addIssue({ code: "invalid_type", expected: "function", input: candidate });
|
|
40
42
|
}
|
|
41
43
|
});
|
|
42
|
-
var fileCheckSchema =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
var fileCheckSchema = z.discriminatedUnion("kind", [
|
|
45
|
+
z.object({ kind: z.literal("skipped") }),
|
|
46
|
+
z.object({ kind: z.literal("complete"), hits: pieceHitsSchema }),
|
|
47
|
+
z.object({ kind: z.literal("syntax"), begin: callSchema })
|
|
46
48
|
]);
|
|
47
49
|
var filePreparationSchema = runnerResultSchema({ value: fileCheckSchema });
|
|
48
|
-
var sourceObserversSchema =
|
|
50
|
+
var sourceObserversSchema = z.object({
|
|
49
51
|
enter: functionSchema().optional(),
|
|
50
52
|
leave: functionSchema().optional(),
|
|
51
53
|
comment: functionSchema().optional(),
|
|
@@ -266,16 +268,17 @@ var observeWalkerFile = (request) => {
|
|
|
266
268
|
};
|
|
267
269
|
|
|
268
270
|
// mechanisms/audit/runner/prepare-walker-pieces.ts
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
271
|
+
import { z as z2 } from "zod";
|
|
272
|
+
var preparationCallSchema = z2.function({
|
|
273
|
+
input: [z2.unknown()],
|
|
274
|
+
output: z2.unknown()
|
|
272
275
|
});
|
|
273
|
-
var registeredWalkerPieceModuleSchema =
|
|
274
|
-
check:
|
|
276
|
+
var registeredWalkerPieceModuleSchema = z2.object({
|
|
277
|
+
check: z2.object({ prepare: preparationCallSchema })
|
|
275
278
|
});
|
|
276
|
-
var loadedPreparedWalkerCheckSchema =
|
|
277
|
-
prepareFile:
|
|
278
|
-
finish:
|
|
279
|
+
var loadedPreparedWalkerCheckSchema = z2.object({
|
|
280
|
+
prepareFile: z2.function({ input: [z2.unknown()], output: z2.unknown() }),
|
|
281
|
+
finish: z2.function({ input: [], output: z2.unknown() })
|
|
279
282
|
});
|
|
280
283
|
var walkerPreparationResultSchema = runnerResultSchema({
|
|
281
284
|
value: loadedPreparedWalkerCheckSchema
|
|
@@ -375,16 +378,17 @@ var prepareWalkerPieces = (request) => Promise.all(
|
|
|
375
378
|
).then((preparations) => collectPreparations({ preparations }));
|
|
376
379
|
|
|
377
380
|
// mechanisms/audit/runner/walker-check-schema.ts
|
|
378
|
-
|
|
379
|
-
|
|
381
|
+
import { z as z3 } from "zod";
|
|
382
|
+
var walkerPieceSettingsSchema = z3.object({
|
|
383
|
+
module: z3.string().refine(
|
|
380
384
|
(text) => moduleFileForm({ text }) === "module-file" && isRepoPathText({ text }) === "repo-path",
|
|
381
385
|
"the module is not a path inside the piece folder ending .ts, or .js in a built install"
|
|
382
386
|
),
|
|
383
|
-
escapingDirectives:
|
|
387
|
+
escapingDirectives: z3.array(z3.enum(TYPE_DIRECTIVES)).readonly().optional()
|
|
384
388
|
}).readonly();
|
|
385
389
|
|
|
386
390
|
// mechanisms/audit/runner/create-walker-runner.ts
|
|
387
|
-
var finishedHitsSchema = runnerResultSchema({ value:
|
|
391
|
+
var finishedHitsSchema = runnerResultSchema({ value: z4.array(hitSchema).readonly() });
|
|
388
392
|
var pieceInvalid3 = (request) => ({
|
|
389
393
|
outcome: "failed",
|
|
390
394
|
error: { kind: "piece-invalid", pieceRoot: request.pieceRoot, detail: request.detail }
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "../../../../chunks/chunk-NZLE2WMY.js";
|
|
2
|
-
|
|
3
1
|
// mechanisms/eslint/CD-7/cd7/cd7.eslint-plugin.ts
|
|
4
2
|
var NAME_CASE = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*|[A-Z](?:[A-Za-z0-9]*[a-z][A-Za-z0-9]*|[0-9]*))$/u;
|
|
5
3
|
var ROUTE_SEGMENT = /^(?:\[{1,2}(?:\.\.\.)?[A-Za-z0-9_-]+\]{1,2}|\([A-Za-z0-9_-]+\))/u;
|
|
@@ -12,7 +12,7 @@ The config roots are the repository root, every folder holding a tracked `eslint
|
|
|
12
12
|
|
|
13
13
|
- From source, Node 22.18.0 or later, which runs the `.ts` modules directly by stripping types. The built package is plain JavaScript.
|
|
14
14
|
- `zod`, for the piece settings, the loaded plugin, ESLint's resolved configuration and the files the runner reads. A dependency of core.
|
|
15
|
-
- `@eslint/plugin-kit`, for parsing inline configuration comments. A dependency of core,
|
|
15
|
+
- `@eslint/plugin-kit`, for parsing inline configuration comments. A dependency of core, declared as a caret range whose floor is the version core's lock holds, because a transitive copy does not resolve under strict package managers.
|
|
16
16
|
- The repository's own toolchain, as optional peers: `eslint` `^9.28.0 || ^10.0.0`, and `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` `^8.56.0`, the first typescript-eslint release whose peer range accepts both ESLint majors. TypeScript is the parser's own peer, so the runner does not check it. The runner loads all three once, when it is loaded, and answers every call with `toolchain-unavailable` naming each that is missing, cannot load or is out of range, or with `toolchain-shadowed` when one resolves from inside the installed core package, before it loads any piece. The suite runs on four lines: ESLint 9.28.0 and 10.0.0 with typescript-eslint 8.56.0, and ESLint 9.39.5 and 10.11.0 with 8.71.2.
|
|
17
17
|
|
|
18
18
|
## Files
|