@shivaedev/quality 0.31.1 → 0.32.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/CHANGELOG.md +21 -0
- package/README.md +20 -5
- package/dist/baseline/installDriver.d.ts +5 -0
- package/dist/baseline/installDriver.d.ts.map +1 -0
- package/dist/baseline/installDriver.js +11 -0
- package/dist/baseline/installDriver.js.map +1 -0
- package/dist/baseline/merge.d.ts +4 -0
- package/dist/baseline/merge.d.ts.map +1 -0
- package/dist/baseline/merge.js +28 -0
- package/dist/baseline/merge.js.map +1 -0
- package/dist/baseline/rewrite.d.ts.map +1 -1
- package/dist/baseline/rewrite.js +0 -1
- package/dist/baseline/rewrite.js.map +1 -1
- package/dist/baseline/shards.d.ts +13 -0
- package/dist/baseline/shards.d.ts.map +1 -0
- package/dist/baseline/shards.js +48 -0
- package/dist/baseline/shards.js.map +1 -0
- package/dist/cli/args.d.ts +8 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js +6 -7
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/messages.d.ts +1 -1
- package/dist/cli/messages.d.ts.map +1 -1
- package/dist/cli/messages.js +6 -2
- package/dist/cli/messages.js.map +1 -1
- package/dist/cli/migrate.d.ts.map +1 -1
- package/dist/cli/migrate.js +10 -6
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +6 -0
- package/dist/cli/program.js.map +1 -1
- package/dist/config/load.js +1 -1
- package/dist/engine/baselineFile.d.ts +2 -1
- package/dist/engine/baselineFile.d.ts.map +1 -1
- package/dist/engine/baselineFile.js +23 -6
- package/dist/engine/baselineFile.js.map +1 -1
- package/dist/hooks/forwarding.d.ts +7 -0
- package/dist/hooks/forwarding.d.ts.map +1 -0
- package/dist/hooks/forwarding.js +94 -0
- package/dist/hooks/forwarding.js.map +1 -0
- package/dist/hooks/install.d.ts.map +1 -1
- package/dist/hooks/install.js +2 -1
- package/dist/hooks/install.js.map +1 -1
- package/dist/hooks/shim.d.ts +1 -0
- package/dist/hooks/shim.d.ts.map +1 -1
- package/dist/hooks/shim.js +3 -1
- package/dist/hooks/shim.js.map +1 -1
- package/dist/hooks/status.d.ts +1 -1
- package/dist/hooks/status.d.ts.map +1 -1
- package/dist/hooks/status.js +8 -6
- package/dist/hooks/status.js.map +1 -1
- package/dist/hooks/uninstall.d.ts.map +1 -1
- package/dist/hooks/uninstall.js +3 -1
- package/dist/hooks/uninstall.js.map +1 -1
- package/dist/imports/packageExports.d.ts +4 -0
- package/dist/imports/packageExports.d.ts.map +1 -0
- package/dist/imports/packageExports.js +48 -0
- package/dist/imports/packageExports.js.map +1 -0
- package/dist/imports/publicModules.d.ts +4 -0
- package/dist/imports/publicModules.d.ts.map +1 -0
- package/dist/imports/publicModules.js +21 -0
- package/dist/imports/publicModules.js.map +1 -0
- package/dist/rules/imports/bundleInputs.d.ts.map +1 -1
- package/dist/rules/imports/bundleInputs.js +4 -50
- package/dist/rules/imports/bundleInputs.js.map +1 -1
- package/dist/rules/stories/supportImports.d.ts.map +1 -1
- package/dist/rules/stories/supportImports.js +9 -3
- package/dist/rules/stories/supportImports.js.map +1 -1
- package/docs/debt-and-hooks.md +9 -6
- package/package.json +3 -3
- package/src/baseline/installDriver.ts +12 -0
- package/src/baseline/merge.ts +34 -0
- package/src/baseline/rewrite.ts +0 -1
- package/src/baseline/shards.ts +60 -0
- package/src/cli/args.ts +11 -0
- package/src/cli/baseline.ts +6 -10
- package/src/cli/messages.ts +6 -2
- package/src/cli/migrate.ts +10 -6
- package/src/cli/program.ts +6 -0
- package/src/config/load.ts +1 -1
- package/src/engine/baselineFile.ts +24 -7
- package/src/hooks/forwarding.ts +99 -0
- package/src/hooks/install.ts +3 -1
- package/src/hooks/shim.ts +3 -1
- package/src/hooks/status.ts +10 -6
- package/src/hooks/uninstall.ts +3 -1
- package/src/imports/packageExports.ts +55 -0
- package/src/imports/publicModules.ts +27 -0
- package/src/rules/imports/bundleInputs.ts +4 -59
- package/src/rules/stories/supportImports.ts +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.32.1 - 2026-10-21
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Let story kits import any workspace package's exported modules through package names or aliases without listing them in `tests/support-imports.options.modules`. Keep the allowlist for additional internal modules; packages without exports retain their existing boundary.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Keep all global Git hooks running after `quality hooks install`, including hooks added later, and prevent recursive pre-commit chaining. Report installations that hide global hooks with a reinstall repair hint; uninstall leaves global hooks in effect.
|
|
12
|
+
|
|
13
|
+
## 0.32.0 - 2026-10-19
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Store baseline debt in package shards and a root `quality-baseline.jsonl`, remove empty shards, and keep tighten, prune and lint on the same records. Migrate a single-file baseline with `quality baseline migrate --from quality/baseline.jsonl`.
|
|
18
|
+
- Merge baseline entries by path and rule: removals win, retained counts take the minimum and additions from both sides survive. Configure the checkout with `quality baseline install-driver` and register `merge=quality-baseline` for shard files in `.gitattributes`. The source exports are `mergeBaseline(base, ours, theirs)` in `baseline/merge.ts`, `installDriver(cwd, launch)` in `baseline/installDriver.ts`, and `SHARD_NAME`, `Shard`, `shardOf(file, rootFile)`, `shardPaths(config)` and `saveShards(config, before, entries)` in `baseline/shards.ts`.
|
|
19
|
+
|
|
20
|
+
### Breaking
|
|
21
|
+
|
|
22
|
+
- `BaselineFile` from `engine/baselineFile.ts` exposes `files: ReadonlyMap<string, Shard>` instead of a single `raw` string. Read each shard's `raw` and `entries` from `files`; the combined `entries` field remains available.
|
|
23
|
+
|
|
3
24
|
## 0.31.1 - 2026-10-19
|
|
4
25
|
|
|
5
26
|
### Fixed
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ The work has three parts: connect the repository to the shared tools once; descr
|
|
|
31
31
|
|
|
32
32
|
### 1. Once per repository: connect the shared policy
|
|
33
33
|
|
|
34
|
-
A new repository needs no `quality.config.ts`. Quality checks sources from the current directory with every built-in rule at its default error level.
|
|
34
|
+
A new repository needs no `quality.config.ts`. Quality checks sources from the current directory with every built-in rule at its default error level. Baseline entries for `packages/<package>/...` live in `packages/<package>/quality-baseline.jsonl`; entries outside packages live in the root `quality-baseline.jsonl`. A package with no entries has no shard file. Permanent exceptions belong in `quality.config.ts`.
|
|
35
35
|
|
|
36
36
|
Create a root `biome.json`:
|
|
37
37
|
|
|
@@ -140,7 +140,7 @@ Quality's `tests/story-setup` rule reports top-level test functions named with t
|
|
|
140
140
|
|
|
141
141
|
Specs keep expectations visible. `tests/spec-helpers` moves all module-level helper functions out of specs and into the kit; `tests/no-expect-in-support` moves `expect` calls into the spec. `tests/named-values` rejects numeric literals passed to `toBe` or `toHaveLength` in specs: assert the observed items or give the value a domain name. `tests/no-limit-imports` rejects importing `MAX_*` constants from a `limits` module into specs, so a story proves behavior instead of copying an implementation cap.
|
|
142
142
|
|
|
143
|
-
`tests/support-imports`
|
|
143
|
+
`tests/support-imports` lets a kit drive any workspace package's exported modules, including its own package's exports through package names or `#` aliases. Export blocks keep internal modules closed. `options.modules` opens additional repository-relative module paths or glob patterns, such as an app's host, schemas and queue definitions. Packages without exports still need that allowlist. Imports within test-support and imports of external packages remain available for the harness; aliases, dynamic imports and re-exports resolve through the same import graph as the other import rules.
|
|
144
144
|
|
|
145
145
|
`boundaries/queue-sql` rejects SQL mentioning the private `pgboss.` schema. Apps use their queue definitions and let workers process jobs; there is no queue-purge API by design. `boundaries/auth-sql` rejects SQL accessing Better Auth's `user`, `account`, `session` and `verification` tables. Apps use platform's auth API; `options.owners` names platform's own auth implementation and its migrations. These rules inspect SQL templates, literal query calls and query variables, and inventoried `.sql` files. They do not evaluate arbitrary runtime SQL construction.
|
|
146
146
|
|
|
@@ -174,7 +174,7 @@ When you fix debt, lower the entries of changed files:
|
|
|
174
174
|
quality baseline tighten
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
-
`tighten` lowers entries for files changed since `HEAD`; `--staged` restricts those updates to staged files. `prune` considers every baseline entry. Both only lower or remove counts and
|
|
177
|
+
`tighten` lowers entries for files changed since `HEAD`; `--staged` restricts those updates to staged files. `prune` considers every baseline entry. Both read all shards, only lower or remove counts and carry entries to the destination shard when git detects tracked moves. They also remove empty shards left by content merges. Unchanged entries stay in their existing shards, with unrelated lines preserved.
|
|
178
178
|
|
|
179
179
|
When a Quality upgrade adds a check, or a reviewed change needs to record one rule's findings again:
|
|
180
180
|
|
|
@@ -184,6 +184,19 @@ quality baseline write --rule tests/story-setup
|
|
|
184
184
|
|
|
185
185
|
Keep the default error level. The command replaces that rule's entries and leaves other rules' entries alone. Any new or raised count belongs in the review and the pull request's Callouts. The [debt and hook guide](https://github.com/ShivaeDev/platform/blob/main/packages/quality/docs/debt-and-hooks.md) covers the baseline format, exception subjects, limit changes, renames and commit checks.
|
|
186
186
|
|
|
187
|
+
### Baseline merges
|
|
188
|
+
|
|
189
|
+
Register the driver in `.gitattributes`:
|
|
190
|
+
|
|
191
|
+
```gitattributes
|
|
192
|
+
/quality-baseline.jsonl merge=quality-baseline
|
|
193
|
+
/packages/*/quality-baseline.jsonl merge=quality-baseline
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Run `quality baseline install-driver` from your checkout's setup script. It sets only repository-local `merge.quality-baseline.driver`; it leaves other Git settings alone. Platform's `pnpm run setup` includes this step. Each checkout needs the setting because Git does not copy local configuration when cloning.
|
|
197
|
+
|
|
198
|
+
Git calls `quality baseline merge <ancestor> <current> <other>`. Entries are keyed by path and rule. Removing an ancestor entry on either side removes it from the result; retained counts take the minimum of the two sides, and entries newly added on either side survive. The command writes the result to `<current>`, so parallel reductions of neighbouring entries merge without a text conflict.
|
|
199
|
+
|
|
187
200
|
### What the rules check
|
|
188
201
|
|
|
189
202
|
`quality lint` prints each failing rule's guidance with its findings, so the finding is the reference for what to change. The built-in rules fall into these groups:
|
|
@@ -218,7 +231,7 @@ Import names from their defining module; there is no root entry. The package's `
|
|
|
218
231
|
| --- | --- | --- |
|
|
219
232
|
| `sources` | `["."]` | Directories or files the source rules check, relative to the repository root. |
|
|
220
233
|
| `extensions` | `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs` | Source extensions. |
|
|
221
|
-
| `baseline` | `quality
|
|
234
|
+
| `baseline` | `quality-baseline.jsonl` | Root shard for paths outside packages; package shards use `packages/<package>/quality-baseline.jsonl`. |
|
|
222
235
|
| `exceptions` | `[]` | Permanent exceptions as `{ files, rules, reason, subject? }`. |
|
|
223
236
|
| `registry` | `quality/registry.json` | Legacy input for upgrades; run `quality exceptions migrate`. |
|
|
224
237
|
| `local` | `[]` | Exposed extension API for rules made with `defineRule`; not required for adoption. |
|
|
@@ -249,6 +262,8 @@ Register it with `defineConfig({ local: [noLog] })`. Its check receives `root`,
|
|
|
249
262
|
quality lint [--config <file>]
|
|
250
263
|
quality fix [--config <file>]
|
|
251
264
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
265
|
+
quality baseline merge <ancestor> <current> <other>
|
|
266
|
+
quality baseline install-driver
|
|
252
267
|
quality baseline write [--config <file>] [--rule <id>]...
|
|
253
268
|
quality baseline prune [--config <file>] [--against <ref>]
|
|
254
269
|
quality baseline tighten [--config <file>] [--staged]
|
|
@@ -259,7 +274,7 @@ quality hooks status
|
|
|
259
274
|
quality hooks pre-commit [--config <file>]
|
|
260
275
|
```
|
|
261
276
|
|
|
262
|
-
`quality` alone runs lint. The commands above use the default error-level policy. `prune --against` follows renames since the target's merge base; without a target it tries `origin/HEAD`, `origin/main`, then `origin/master`, and prunes without following moves when no merge base is available. An explicit target with unavailable history fails; fetch the needed history before rerunning. `migrate`
|
|
277
|
+
`quality` alone runs lint. The commands above use the default error-level policy. `prune --against` follows renames since the target's merge base; without a target it tries `origin/HEAD`, `origin/main`, then `origin/master`, and prunes without following moves when no merge base is available. An explicit target with unavailable history fails; fetch the needed history before rerunning. `migrate` splits a single JSON Lines baseline into shards, or converts an earlier JSON baseline into sharded JSON Lines. Use `--from quality/baseline.jsonl` for an existing single-file baseline. It removes the source after writing the shards.
|
|
263
278
|
|
|
264
279
|
| Exit code | Meaning |
|
|
265
280
|
| --- | --- |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { SetupFailure } from "#failure.ts";
|
|
3
|
+
import { type Launch } from "#hooks/command.ts";
|
|
4
|
+
export declare const installDriver: (cwd: string, launch: Launch) => Effect.Effect<void, SetupFailure, import("effect/process/ChildProcessSpawner").ChildProcessSpawner>;
|
|
5
|
+
//# sourceMappingURL=installDriver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installDriver.d.ts","sourceRoot":"","sources":["../../src/baseline/installDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAe,KAAK,MAAM,EAAc,MAAM,mBAAmB,CAAC;AAEzE,eAAO,MAAM,aAAa,sIAMxB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Console, Effect } from "effect";
|
|
2
|
+
import { gitOrFail } from "#git/command.ts";
|
|
3
|
+
import { hookCommand, shellWords } from "#hooks/command.ts";
|
|
4
|
+
export const installDriver = Effect.fn("Baseline.installDriver")(function* (cwd, launch) {
|
|
5
|
+
const root = (yield* gitOrFail(cwd, ["rev-parse", "--show-toplevel"])).trim();
|
|
6
|
+
const command = hookCommand(root, launch, undefined);
|
|
7
|
+
const driver = `${shellWords([...command.runner, command.launcher, "baseline", "merge"])} "%O" "%A" "%B"`;
|
|
8
|
+
yield* gitOrFail(root, ["config", "--local", "merge.quality-baseline.driver", driver]);
|
|
9
|
+
yield* Console.log("quality: configured the repository-local quality-baseline merge driver.");
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=installDriver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installDriver.js","sourceRoot":"","sources":["../../src/baseline/installDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAY,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAW,EAAE,MAAc;IACtG,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9E,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC;IAC1G,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,+BAA+B,EAAE,MAAM,CAAC,CAAC,CAAC;IACvF,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,yEAAyE,CAAC,CAAC;AAC/F,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/baseline/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAI5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiB3C,eAAO,MAAM,aAAa,0GAYzB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Effect, FileSystem } from "effect";
|
|
2
|
+
import { decodeBaseline, encodeBaseline } from "#baseline/format.ts";
|
|
3
|
+
import { validOrFail } from "#decoded.ts";
|
|
4
|
+
import { keyOf } from "#engine/violation.ts";
|
|
5
|
+
import { SetupFailure } from "#failure.ts";
|
|
6
|
+
function mergeEntries(base, ours, theirs) {
|
|
7
|
+
const original = new Set(base.map((entry) => keyOf(entry.rule, entry.file)));
|
|
8
|
+
const left = new Map(ours.map((entry) => [keyOf(entry.rule, entry.file), entry]));
|
|
9
|
+
const right = new Map(theirs.map((entry) => [keyOf(entry.rule, entry.file), entry]));
|
|
10
|
+
return [...new Set([...left.keys(), ...right.keys()])].flatMap((key) => {
|
|
11
|
+
const a = left.get(key);
|
|
12
|
+
const b = right.get(key);
|
|
13
|
+
if (original.has(key) && (a === undefined || b === undefined)) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const entry = a ?? b;
|
|
17
|
+
return entry === undefined ? [] : [{ ...entry, count: Math.min(a?.count ?? entry.count, b?.count ?? entry.count) }];
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export const mergeBaseline = Effect.fn("Baseline.mergeBaseline")(function* (base, ours, theirs) {
|
|
21
|
+
const fs = yield* FileSystem.FileSystem;
|
|
22
|
+
const entries = yield* Effect.forEach([base, ours, theirs], (path) => Effect.gen(function* () {
|
|
23
|
+
const raw = yield* fs.readFileString(path);
|
|
24
|
+
return yield* validOrFail(path, yield* Effect.promise(() => decodeBaseline(raw)));
|
|
25
|
+
}));
|
|
26
|
+
yield* fs.writeFileString(ours, encodeBaseline(mergeEntries(entries[0] ?? [], entries[1] ?? [], entries[2] ?? [])));
|
|
27
|
+
}, Effect.mapError((failure) => new SetupFailure({ message: failure.message })));
|
|
28
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/baseline/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAsB,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,SAAS,YAAY,CAAC,IAA8B,EAAE,IAA8B,EAAE,MAAgC;IACrH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAClF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,IA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AAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC,CAAC,CACF,CAAC;IACF,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrH,CAAC,EACD,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAC5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite.d.ts","sourceRoot":"","sources":["../../src/baseline/rewrite.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAuC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"rewrite.d.ts","sourceRoot":"","sources":["../../src/baseline/rewrite.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAuC,MAAM,aAAa,CAAC;AAOtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,SAAS,aAAa,EAAE,EAAE,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAclI"}
|
package/dist/baseline/rewrite.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { keyOf } from "#engine/violation.ts";
|
|
2
2
|
import { byPathAndRule, encodeEntry, linesOf } from "./format.js";
|
|
3
|
-
// An untouched entry keeps its exact line and a new one goes before the first line that sorts after it, so two branches conflict only on the same or neighbouring entries.
|
|
4
3
|
export function rewriteBaseline(raw, before, after) {
|
|
5
4
|
const wanted = new Map(after.map((entry) => [keyOf(entry.rule, entry.file), entry]));
|
|
6
5
|
const lines = linesOf(raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite.js","sourceRoot":"","sources":["../../src/baseline/rewrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAsB,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAOtF,
|
|
1
|
+
{"version":3,"file":"rewrite.js","sourceRoot":"","sources":["../../src/baseline/rewrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAsB,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAOtF,MAAM,UAAU,eAAe,CAAC,GAAuB,EAAE,MAAgC,EAAE,KAA+B;IACzH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACrF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAU,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACjD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvI,CAAC,CAAC,CAAC;IACH,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect, FileSystem } from "effect";
|
|
2
|
+
import type { BaselineEntry } from "#baseline/format.ts";
|
|
3
|
+
import type { ResolvedConfig } from "#config/load.ts";
|
|
4
|
+
import { SetupFailure } from "#failure.ts";
|
|
5
|
+
export declare const SHARD_NAME = "quality-baseline.jsonl";
|
|
6
|
+
export interface Shard {
|
|
7
|
+
readonly entries: readonly BaselineEntry[];
|
|
8
|
+
readonly raw: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function shardOf(file: string, rootFile: string): string;
|
|
11
|
+
export declare const shardPaths: (config: ResolvedConfig) => Effect.Effect<string[], import("#inventory/filesystem.ts").FilesystemFailure | import("effect/PlatformError").PlatformError, FileSystem.FileSystem>;
|
|
12
|
+
export declare const saveShards: (config: ResolvedConfig, before: ReadonlyMap<string, Shard>, entries: readonly BaselineEntry[]) => Effect.Effect<void, SetupFailure, FileSystem.FileSystem>;
|
|
13
|
+
//# sourceMappingURL=shards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shards.d.ts","sourceRoot":"","sources":["../../src/baseline/shards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,MAAM,WAAW,KAAK;IACrB,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9D;AAED,eAAO,MAAM,UAAU,iLAWrB,CAAC;AAEH,eAAO,MAAM,UAAU,6JA0BtB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { Effect, FileSystem } from "effect";
|
|
3
|
+
import { rewriteBaseline } from "#baseline/rewrite.ts";
|
|
4
|
+
import { SetupFailure } from "#failure.ts";
|
|
5
|
+
import { orWhenAbsent, writeText } from "#inventory/filesystem.ts";
|
|
6
|
+
export const SHARD_NAME = "quality-baseline.jsonl";
|
|
7
|
+
export function shardOf(file, rootFile) {
|
|
8
|
+
const [folder, name, ...rest] = file.split("/");
|
|
9
|
+
return folder === "packages" && name !== undefined && rest.length > 0 ? `packages/${name}/${SHARD_NAME}` : rootFile;
|
|
10
|
+
}
|
|
11
|
+
export const shardPaths = Effect.fn("Baseline.shardPaths")(function* (config) {
|
|
12
|
+
const fs = yield* FileSystem.FileSystem;
|
|
13
|
+
const folder = join(config.root, "packages");
|
|
14
|
+
const names = yield* orWhenAbsent(folder, fs.readDirectory(folder), []);
|
|
15
|
+
const paths = [config.baseline];
|
|
16
|
+
for (const name of names) {
|
|
17
|
+
if ((yield* fs.stat(join(folder, name))).type === "Directory") {
|
|
18
|
+
paths.push(`packages/${name}/${SHARD_NAME}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return paths;
|
|
22
|
+
});
|
|
23
|
+
export const saveShards = Effect.fn("Baseline.saveShards")(function* (config, before, entries) {
|
|
24
|
+
const fs = yield* FileSystem.FileSystem;
|
|
25
|
+
const grouped = new Map();
|
|
26
|
+
for (const entry of entries) {
|
|
27
|
+
const path = shardOf(entry.file, config.baseline);
|
|
28
|
+
const group = grouped.get(path) ?? [];
|
|
29
|
+
group.push(entry);
|
|
30
|
+
grouped.set(path, group);
|
|
31
|
+
}
|
|
32
|
+
for (const path of new Set([...before.keys(), ...grouped.keys()])) {
|
|
33
|
+
const old = before.get(path);
|
|
34
|
+
const next = grouped.get(path) ?? [];
|
|
35
|
+
if (next.length === 0) {
|
|
36
|
+
if (old !== undefined) {
|
|
37
|
+
yield* fs.remove(join(config.root, path));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const text = rewriteBaseline(old?.raw, old?.entries ?? [], next);
|
|
42
|
+
if (text !== old?.raw) {
|
|
43
|
+
yield* writeText(join(config.root, path), text);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, Effect.mapError((failure) => new SetupFailure({ message: failure.message })));
|
|
48
|
+
//# sourceMappingURL=shards.js.map
|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EAAE,CAAC;YACvB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBACvB,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAC3C,CAAC;QACF,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;YACjE,IAAI,IAAI,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC;gBACvB,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;YACjD,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC,EACD,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAC5E,CAAC"}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -8,6 +8,13 @@ export type Command = {
|
|
|
8
8
|
} | {
|
|
9
9
|
readonly _tag: "Fix";
|
|
10
10
|
readonly config: string | undefined;
|
|
11
|
+
} | {
|
|
12
|
+
readonly _tag: "BaselineMerge";
|
|
13
|
+
readonly base: string;
|
|
14
|
+
readonly ours: string;
|
|
15
|
+
readonly theirs: string;
|
|
16
|
+
} | {
|
|
17
|
+
readonly _tag: "BaselineInstallDriver";
|
|
11
18
|
} | {
|
|
12
19
|
readonly _tag: "BaselineWrite";
|
|
13
20
|
readonly config: string | undefined;
|
|
@@ -45,6 +52,6 @@ export type Parsed = {
|
|
|
45
52
|
readonly _tag: "Usage";
|
|
46
53
|
readonly problem: string;
|
|
47
54
|
};
|
|
48
|
-
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality fix [--config <file>]\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline write [--config <file>] [--rule <id>]...\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a
|
|
55
|
+
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality fix [--config <file>]\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]...\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit What the hook runs: lint, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
|
|
49
56
|
export declare function parseCommand(args: readonly string[]): Parsed;
|
|
50
57
|
//# sourceMappingURL=args.d.ts.map
|
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC9D;IAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC9G;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EA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IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5G;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC/F;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GACnC;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7B,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnI,eAAO,MAAM,KAAK,8nFAAgB,CAAC;AAiFnC,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CA0B5D"}
|
package/dist/cli/args.js
CHANGED
|
@@ -19,6 +19,7 @@ function parsed(command) {
|
|
|
19
19
|
}
|
|
20
20
|
const COMMAND_OPTIONS = ["against", "force", "from", "rule", "staged"];
|
|
21
21
|
const ACCEPTS = {
|
|
22
|
+
"baseline install-driver": [],
|
|
22
23
|
"baseline migrate": ["from"],
|
|
23
24
|
"baseline prune": ["against"],
|
|
24
25
|
"baseline tighten": ["staged"],
|
|
@@ -48,6 +49,8 @@ function commandFor(name, values) {
|
|
|
48
49
|
return parsed({ _tag: "ExceptionsMigrate", config, from: values.from });
|
|
49
50
|
case "fix":
|
|
50
51
|
return parsed({ _tag: "Fix", config });
|
|
52
|
+
case "baseline install-driver":
|
|
53
|
+
return parsed({ _tag: "BaselineInstallDriver" });
|
|
51
54
|
case "baseline write":
|
|
52
55
|
return parsed({ _tag: "BaselineWrite", config, rules: values.rule ?? [] });
|
|
53
56
|
case "baseline prune":
|
|
@@ -79,6 +82,12 @@ export function parseCommand(args) {
|
|
|
79
82
|
if (values.help === true || command === "help") {
|
|
80
83
|
return parsed({ _tag: "Help" });
|
|
81
84
|
}
|
|
85
|
+
if (command === "baseline" && rest[0] === "merge") {
|
|
86
|
+
const [, base, ours, theirs] = rest;
|
|
87
|
+
return rest.length === 4 && base !== undefined && ours !== undefined && theirs !== undefined
|
|
88
|
+
? parsed({ _tag: "BaselineMerge", base, ours, theirs })
|
|
89
|
+
: usage("baseline merge takes <ancestor> <current> <other>.");
|
|
90
|
+
}
|
|
82
91
|
const name = [command, ...rest].join(" ");
|
|
83
92
|
if (ACCEPTS[name] === undefined) {
|
|
84
93
|
const subcommands = SUBCOMMANDS[command];
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,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AC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG1D,OAAO,EAA6B,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C,eAAO,MAAM,aAAa,iIAiBxB,CAAC;AAWH,eAAO,MAAM,cAAc,GAA8C,aAAa,8DAGlE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,6EAa/E,CAAC"}
|
package/dist/cli/baseline.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
1
|
import { Console, Effect } from "effect";
|
|
3
|
-
import {
|
|
2
|
+
import { saveShards } from "#baseline/shards.ts";
|
|
4
3
|
import { adopt, prune } from "#baseline/update.ts";
|
|
5
4
|
import { openSession } from "#engine/session.ts";
|
|
6
5
|
import { applyRegistry } from "#exceptions/registry.ts";
|
|
7
6
|
import { SetupFailure } from "#failure.ts";
|
|
8
|
-
import { writeText } from "#inventory/filesystem.ts";
|
|
9
7
|
import { plural } from "#report/plural.ts";
|
|
10
8
|
function save(session, entries) {
|
|
11
|
-
return
|
|
9
|
+
return saveShards(session.config, session.baseline.files, entries);
|
|
12
10
|
}
|
|
13
11
|
function unregistered(session) {
|
|
14
12
|
return applyRegistry(session.violations, session.registry, session.config).kept;
|
|
15
13
|
}
|
|
16
14
|
export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (cwd, config, rules) {
|
|
17
15
|
const session = yield* openSession(cwd, config);
|
|
18
|
-
const existing = session.baseline.
|
|
16
|
+
const existing = session.baseline.files.size === 0 ? undefined : session.baseline.entries;
|
|
19
17
|
const adoption = adopt(existing, rules, unregistered(session), session.config);
|
|
20
18
|
if (adoption._tag === "Refused") {
|
|
21
19
|
return yield* new SetupFailure({ message: `baseline write refused:\n${adoption.reasons.map((reason) => ` - ${reason}`).join("\n")}` });
|
|
@@ -37,11 +35,12 @@ function changes(pruned) {
|
|
|
37
35
|
}
|
|
38
36
|
export const shrinkBaseline = Effect.fn("Cli.shrinkBaseline")(function* (cwd, config, scopeOf) {
|
|
39
37
|
const session = yield* openSession(cwd, config);
|
|
40
|
-
if (session.baseline.
|
|
38
|
+
if (session.baseline.files.size === 0) {
|
|
41
39
|
return yield* Console.log(`quality: no baseline at ${session.config.baseline}; nothing to lower.`);
|
|
42
40
|
}
|
|
43
41
|
const pruned = prune(session.baseline.entries, unregistered(session), session.config, yield* scopeOf(session));
|
|
44
|
-
|
|
42
|
+
const emptyShard = [...session.baseline.files.values()].some((file) => file.entries.length === 0);
|
|
43
|
+
if (pruned.removed === 0 && pruned.lowered === 0 && pruned.moved === 0 && !emptyShard) {
|
|
45
44
|
return yield* Console.log(`quality: ${session.config.baseline} is current.`);
|
|
46
45
|
}
|
|
47
46
|
yield* save(session, pruned.entries);
|
package/dist/cli/baseline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAe,KAAK,EAAc,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAgB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,SAAS,IAAI,CAAC,OAAgB,EAAE,OAAiC;IAChE,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB;IACrC,OAAO,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;AACjF,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,QAAQ,C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,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/G,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAClG,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QACvF,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,MAAM,CAAC,QAAQ,cAAc,CAAC,CAAC;IAC9E,CAAC;IACD,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC"}
|
package/dist/cli/messages.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality fix [--config <file>]\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline write [--config <file>] [--rule <id>]...\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a
|
|
1
|
+
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality fix [--config <file>]\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]...\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit What the hook runs: lint, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
|
|
2
2
|
export declare const SUBCOMMANDS: Readonly<Record<string, string>>;
|
|
3
3
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,8nFAiCwC,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxD,CAAC"}
|
package/dist/cli/messages.js
CHANGED
|
@@ -2,6 +2,8 @@ export const USAGE = `Usage:
|
|
|
2
2
|
quality lint [--config <file>]
|
|
3
3
|
quality fix [--config <file>]
|
|
4
4
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
5
|
+
quality baseline merge <ancestor> <current> <other>
|
|
6
|
+
quality baseline install-driver
|
|
5
7
|
quality baseline write [--config <file>] [--rule <id>]...
|
|
6
8
|
quality baseline prune [--config <file>] [--against <ref>]
|
|
7
9
|
quality baseline tighten [--config <file>] [--staged]
|
|
@@ -15,10 +17,12 @@ lint Run every rule. Exits 1 on an error-level violation, a file ov
|
|
|
15
17
|
or a baseline entry for an unknown rule.
|
|
16
18
|
fix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.
|
|
17
19
|
exceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.
|
|
20
|
+
baseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.
|
|
21
|
+
baseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.
|
|
18
22
|
baseline write Record current error-level violations. Creates the baseline, or records the named rules again, replacing their entries.
|
|
19
23
|
baseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.
|
|
20
24
|
baseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.
|
|
21
|
-
baseline migrate Move a
|
|
25
|
+
baseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.
|
|
22
26
|
hooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's
|
|
23
27
|
unless --force replaces it.
|
|
24
28
|
hooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.
|
|
@@ -29,7 +33,7 @@ hooks pre-commit What the hook runs: lint, then package.json scripts typecheck
|
|
|
29
33
|
--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.
|
|
30
34
|
Exit codes: 0 passed, 1 failed the gate, 2 could not run.`;
|
|
31
35
|
export const SUBCOMMANDS = {
|
|
32
|
-
baseline: "baseline takes write, prune, tighten or
|
|
36
|
+
baseline: "baseline takes write, prune, tighten, migrate, merge or install-driver.",
|
|
33
37
|
exceptions: "exceptions takes migrate.",
|
|
34
38
|
hooks: "hooks takes install, uninstall, status or pre-commit.",
|
|
35
39
|
};
|
package/dist/cli/messages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/cli/messages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAiCqC,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC5D,QAAQ,EAAE,yEAAyE;IACnF,UAAU,EAAE,2BAA2B;IACvC,KAAK,EAAE,uDAAuD;CAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/cli/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/cli/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAQrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,eAAO,MAAM,eAAe,qIA0B1B,CAAC"}
|
package/dist/cli/migrate.js
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { Console, Effect, FileSystem } from "effect";
|
|
3
|
-
import {
|
|
3
|
+
import { decodeBaseline } from "#baseline/format.ts";
|
|
4
4
|
import { convertLegacy, decodeLegacyBaseline, LEGACY_BASELINE } from "#baseline/legacy.ts";
|
|
5
|
+
import { saveShards, shardPaths } from "#baseline/shards.ts";
|
|
5
6
|
import { loadConfig } from "#config/load.ts";
|
|
6
7
|
import { validOrFail } from "#decoded.ts";
|
|
7
8
|
import { readInput } from "#engine/baselineFile.ts";
|
|
8
9
|
import { scan } from "#engine/session.ts";
|
|
9
10
|
import { SetupFailure } from "#failure.ts";
|
|
10
|
-
import { writeText } from "#inventory/filesystem.ts";
|
|
11
11
|
import { plural } from "#report/plural.ts";
|
|
12
12
|
export const migrateBaseline = Effect.fn("Cli.migrateBaseline")(function* (cwd, configPath, from) {
|
|
13
13
|
const config = yield* loadConfig(cwd, configPath);
|
|
14
14
|
const source = from ?? LEGACY_BASELINE;
|
|
15
|
-
|
|
15
|
+
const paths = yield* shardPaths(config).pipe(Effect.mapError((error) => new SetupFailure({ message: error.message })));
|
|
16
|
+
const existing = yield* Effect.forEach(paths, (path) => readInput(config.root, path));
|
|
17
|
+
if (source === config.baseline || existing.some((text) => text !== undefined)) {
|
|
16
18
|
return yield* new SetupFailure({ message: `${config.baseline} already exists. Migrate into a baseline file that does not exist yet.` });
|
|
17
19
|
}
|
|
18
20
|
const raw = yield* readInput(config.root, source);
|
|
19
21
|
if (raw === undefined) {
|
|
20
22
|
return yield* new SetupFailure({ message: `no baseline at ${source} to migrate. Name it with --from <file>.` });
|
|
21
23
|
}
|
|
22
|
-
const legacy =
|
|
23
|
-
|
|
24
|
+
const legacy = source.endsWith(".jsonl")
|
|
25
|
+
? yield* validOrFail(source, yield* Effect.promise(() => decodeBaseline(raw)))
|
|
26
|
+
: yield* validOrFail(source, yield* Effect.promise(() => decodeLegacyBaseline(raw)));
|
|
27
|
+
const entries = source.endsWith(".jsonl") ? legacy : convertLegacy(legacy, (yield* scan(config)).violations);
|
|
24
28
|
const fs = yield* FileSystem.FileSystem;
|
|
25
|
-
const written = Effect.andThen(
|
|
29
|
+
const written = Effect.andThen(saveShards(config, new Map(), entries), fs.remove(join(config.root, source)));
|
|
26
30
|
yield* Effect.mapError(written, (failure) => new SetupFailure({ message: failure.message }));
|
|
27
31
|
const fixed = legacy.length - entries.length;
|
|
28
32
|
const dropped = fixed > 0 ? `, dropping ${plural(fixed, "fixed entry", "fixed entries")}` : "";
|
package/dist/cli/migrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/cli/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3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cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AAUzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAMhD,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,OAAO,kOAoClB,CAAC"}
|