@shivaedev/quality 0.44.1 → 0.45.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/CHANGELOG.md +30 -0
- package/README.md +11 -6
- package/biome/preset.json +11 -2
- package/dist/adapters/knip/entryPointFindings.d.ts.map +1 -1
- package/dist/adapters/knip/entryPointFindings.js +11 -2
- package/dist/adapters/knip/entryPointFindings.js.map +1 -1
- package/dist/appTestConfig.d.ts +2 -1
- package/dist/appTestConfig.d.ts.map +1 -1
- package/dist/appTestConfig.js +2 -2
- package/dist/appTestConfig.js.map +1 -1
- package/dist/appViteConfig.d.ts +1 -1
- package/dist/appViteConfig.d.ts.map +1 -1
- package/dist/appViteConfig.js +2 -2
- package/dist/appViteConfig.js.map +1 -1
- package/dist/biome/exceptionConfig.d.ts.map +1 -1
- package/dist/biome/exceptionConfig.js +13 -4
- package/dist/biome/exceptionConfig.js.map +1 -1
- package/dist/biome/recommendedRules.js +1 -1
- package/dist/biome/recommendedRules.js.map +1 -1
- package/dist/biome/run.d.ts.map +1 -1
- package/dist/biome/run.js +7 -9
- package/dist/biome/run.js.map +1 -1
- package/dist/cli/args.d.ts +2 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/ci.d.ts +1 -1
- package/dist/cli/ci.d.ts.map +1 -1
- package/dist/cli/ci.js +13 -2
- package/dist/cli/ci.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 +2 -1
- package/dist/cli/messages.js.map +1 -1
- package/dist/cli/program.js +1 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/rules/builtIn.d.ts +1 -1
- package/dist/rules/builtIn.d.ts.map +1 -1
- package/dist/rules/builtIn.js +6 -0
- package/dist/rules/builtIn.js.map +1 -1
- package/dist/rules/stories/authSql.d.ts.map +1 -1
- package/dist/rules/stories/authSql.js +22 -3
- package/dist/rules/stories/authSql.js.map +1 -1
- package/dist/rules/stories/domainOutcomes.d.ts +2 -0
- package/dist/rules/stories/domainOutcomes.d.ts.map +1 -0
- package/dist/rules/stories/domainOutcomes.js +34 -0
- package/dist/rules/stories/domainOutcomes.js.map +1 -0
- package/dist/rules/stories/groupedOutcomes.d.ts +2 -0
- package/dist/rules/stories/groupedOutcomes.d.ts.map +1 -0
- package/dist/rules/stories/groupedOutcomes.js +55 -0
- package/dist/rules/stories/groupedOutcomes.js.map +1 -0
- package/dist/rules/stories/importBindings.d.ts +8 -0
- package/dist/rules/stories/importBindings.d.ts.map +1 -0
- package/dist/rules/stories/importBindings.js +29 -0
- package/dist/rules/stories/importBindings.js.map +1 -0
- package/dist/rules/stories/specSources.d.ts +4 -0
- package/dist/rules/stories/specSources.d.ts.map +1 -0
- package/dist/rules/stories/specSources.js +17 -0
- package/dist/rules/stories/specSources.js.map +1 -0
- package/dist/rules/stories/waitOnEvents.d.ts +2 -0
- package/dist/rules/stories/waitOnEvents.d.ts.map +1 -0
- package/dist/rules/stories/waitOnEvents.js +52 -0
- package/dist/rules/stories/waitOnEvents.js.map +1 -0
- package/package.json +10 -8
- package/src/adapters/knip/entryPointFindings.ts +15 -2
- package/src/appTestConfig.ts +3 -3
- package/src/appViteConfig.ts +2 -2
- package/src/biome/exceptionConfig.ts +14 -6
- package/src/biome/recommendedRules.ts +1 -1
- package/src/biome/run.ts +7 -10
- package/src/cli/args.ts +5 -4
- package/src/cli/ci.ts +14 -2
- package/src/cli/messages.ts +2 -1
- package/src/cli/program.ts +1 -1
- package/src/rules/builtIn.ts +6 -0
- package/src/rules/stories/authSql.ts +25 -3
- package/src/rules/stories/domainOutcomes.ts +45 -0
- package/src/rules/stories/groupedOutcomes.ts +67 -0
- package/src/rules/stories/importBindings.ts +37 -0
- package/src/rules/stories/specSources.ts +20 -0
- package/src/rules/stories/waitOnEvents.ts +62 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.45.0 - 2026-10-30
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `quality ci --coverage` collects V8 coverage and JUnit from the gate's single test run into `coverage/lcov.info` and `coverage/junit.xml`, including failed tests. Quality provides the V8 coverage dependency, and `appTestConfig` accepts native coverage options through its second argument.
|
|
8
|
+
- `@shivaedev/quality` accepts extra host proxy paths as the third argument to `appViteConfig`, beside `/api/auth` and `/rpc`, so applications can exercise their host routes through Vite during development.
|
|
9
|
+
- Quality accepts app migrations referencing the auth user id with `ON DELETE CASCADE` or `ON DELETE SET NULL`, while keeping auth reads and writes behind identity.
|
|
10
|
+
- Identity exports `userReference` from `server/better-auth/userReference.ts` so app migrations share the user table and id column names.
|
|
11
|
+
- Starter notes use a `user_id` foreign key with cascading deletion. A numbered migration renames the existing ownership column and adds the constraint for existing apps.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Require Effect 4.0.6 and align the Effect companion package peers and generated starter catalog to the same exact release. Install the 4.0.6 Effect stack together.
|
|
16
|
+
- Recognize ambient runtime modules in their declaring TypeScript project when checking missing package dependencies, including generated JavaScript clients. Undeclared dependencies and declarations outside that project still fail.
|
|
17
|
+
- The `story-testing` skill covers how a story reads: one name per actor, actions that name their change, a proven before state, domain outcomes, a separated action, a true title, `outcomes` for several checks, explained setup, one behaviour per story, stories only for plausible regressions, and settling on events. It now applies to package stories as well as app stories.
|
|
18
|
+
- Generated apps record the starter's existing findings for the new story rules in their baseline.
|
|
19
|
+
- Quality applies Biome’s test-title check only to `*.test.*`, `*.spec.*` and `test-support/` files, so ordinary helpers named `describe`, `it` or `test` do not receive test-title findings.
|
|
20
|
+
- Quality and starter guidance explain that a `CreateSpace` component in `spaces/client/` is named `Create.tsx`, keeping the full export name without repeating a folder in the file name.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Register hosted RPC cache-control handling through Effect 4.0.6's request-scoped pre-response API so responses keep `private, no-store`.
|
|
25
|
+
- Accept native RPC's `application/x-ndjson` media type while preserving `application/ndjson` callers at the transport guard.
|
|
26
|
+
- Keep subscriptions open after their HTTP request body completes; closing the socket still cancels them.
|
|
27
|
+
- Leave pnpm-generated lockfiles out of Biome checks and fixes so dependency updates retain pnpm's YAML format. Hand-written YAML remains checked and formatted.
|
|
28
|
+
|
|
29
|
+
### Breaking
|
|
30
|
+
|
|
31
|
+
- Specs get new findings from three story rules. `tests/domain-outcomes` reports Effect `Exit`, `Cause` and `Result` uses, `_tag` reads and `"Success"` or `"Failure"` tagged literals: return the outcome in the domain's words from a kit verb or readout. `tests/grouped-outcomes` reports consecutive `expect(yield* …)` checks: write them as rows of one `outcomes` call from `@shivaedev/test-story/server/outcomes.ts`. `tests/wait-on-events` reports sleeps, timers, `eventually`, Vitest fake timers and `TestClock` adjustments: settle on the engine's own signal, and advance the clock in a kit verb named for the time that passes. Record existing findings with `quality baseline write --rule tests/domain-outcomes --rule tests/grouped-outcomes --rule tests/wait-on-events`.
|
|
32
|
+
|
|
3
33
|
## 0.44.1 - 2026-10-29
|
|
4
34
|
|
|
5
35
|
### Changed
|
package/README.md
CHANGED
|
@@ -66,6 +66,8 @@ Add the daily commands to `package.json`:
|
|
|
66
66
|
|
|
67
67
|
For pnpm applications, `quality ci` checks peer dependencies, then runs the app’s `lint`, `typecheck`, `build` and `test` scripts in that order. It stops at the first failure. Keep those scripts as the app’s native tool commands; set `ci` to `quality ci` and let `ready` call the same script.
|
|
68
68
|
|
|
69
|
+
Run `quality ci --coverage` to collect V8 coverage during that single test run. It writes `coverage/lcov.info` and `coverage/junit.xml`, including when tests fail, through Vitest's `reportOnFailure`. Add `coverage/` to `.gitignore`. Quality provides the V8 provider; the application needs no coverage dependency or separate coverage configuration. Without the flag, the gate uses the test script unchanged.
|
|
70
|
+
|
|
69
71
|
The optional pre-commit hook runs Quality's lint, then the `typecheck` script when it exists, then an optional `quality:commit` script for repository checks. It uses the manifest's `packageManager` (`npm`, `pnpm`, `yarn` or `bun`), defaulting to `npm` when omitted. Add `quality:commit` only when the repository has extra commit checks.
|
|
70
72
|
|
|
71
73
|
Inspect the report and install the optional commit check explicitly:
|
|
@@ -169,7 +171,9 @@ Quality's `tests/story-setup` rule reports top-level test functions named with t
|
|
|
169
171
|
|
|
170
172
|
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, except in test-support files that register tests at module top level and are not imported by any module, so nested Vitest runs can execute them as test files with real assertions. `tests/named-values` rejects numeric literals passed to `toBe` or `toHaveLength` in specs, except zero and process exit codes asserted on an `exitCode` subject: assert the observed items or use a domain name that comes from the story's inputs or the product. For HTTP statuses, import `* as HttpStatus` from `effect/http/HttpStatus` and use `HttpStatus.fromLiteral("NotFound")`; subjects named `status` or `code` do not exempt numeric assertions. A spec-local numeric const that only feeds these matchers is reported, including aliases for zero and codes. `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.
|
|
171
173
|
|
|
172
|
-
|
|
174
|
+
Three more rules keep a spec readable as a story, as the [story-testing skill](https://github.com/ShivaeDev/platform/blob/main/packages/skills/skills/story-testing/SKILL.md) describes. They read spec files, skip type and unit tests, and exempt the same test-story prerequisites as `tests/story-specs`. `tests/domain-outcomes` reports each use of Effect's `Exit`, `Cause` or `Result` module, each `_tag` read or destructuring, and each object literal tagged `"Success"` or `"Failure"`: the kit's verb or readout returns the outcome in the domain's words, such as `"unauthorized"`, and a trait builds any failing input. A domain's own tagged value, such as `{ _tag: "Resync" }`, passes. `tests/grouped-outcomes` reports each run of two or more consecutive `expect(yield* …)` statements once, at its first statement: write the outcomes as rows of one `outcomes` call. `tests/wait-on-events` reports `Effect.sleep`, `setTimeout` and `setInterval`, calls to an imported `eventually`, Vitest's fake timers, `vi.waitFor`, and `TestClock.adjust` and `TestClock.setTime`: settle on the engine's own signal through a kit verb, and when time passing is the behaviour, advance the clock in a verb named for it.
|
|
175
|
+
|
|
176
|
+
`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. App tables reference users by foreign key: migrations may reference only `user(id)` with `ON DELETE CASCADE` or `ON DELETE SET NULL`. Import `userReference` from `@shivaedev/identity/server/better-auth/userReference.ts` and interpolate `sql(userReference.table)` and `sql(userReference.column)` in the reference. Apps use identity for account data; `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.
|
|
173
177
|
|
|
174
178
|
`boundaries/http-status` rejects comparisons with HTTP error status numbers, switch cases and literal status-list membership outside `options.edge`. Domain code handles typed errors; the named HTTP edge translates them into transport responses. Process exit codes remain ordinary domain values.
|
|
175
179
|
|
|
@@ -178,7 +182,7 @@ Declare these architectural facts in the repository's quality config; paths and
|
|
|
178
182
|
```ts
|
|
179
183
|
export default defineConfig({
|
|
180
184
|
rules: {
|
|
181
|
-
"boundaries/auth-sql": { options: { owners: ["
|
|
185
|
+
"boundaries/auth-sql": { options: { owners: ["packages/identity/src/server/better-auth/**", "examples/starter/src/server/migrations/**"] } },
|
|
182
186
|
"boundaries/http-status": { options: { edge: ["src/http/**"] } },
|
|
183
187
|
},
|
|
184
188
|
});
|
|
@@ -225,7 +229,7 @@ Git calls `quality baseline merge <ancestor> <current> <other>`. Entries are key
|
|
|
225
229
|
|
|
226
230
|
### Unused code
|
|
227
231
|
|
|
228
|
-
`code/unused` uses knip to report unused files, value and type exports, unused dependencies (including development and optional peer dependencies), and imports missing from the package manifest in every workspace. It runs through `quality lint` and the normal report and baseline. The rule accepts no options or permanent exceptions; Quality supplies knip’s entry points without a repository knip config.
|
|
232
|
+
`code/unused` uses knip to report unused files, value and type exports, unused dependencies (including development and optional peer dependencies), and imports missing from the package manifest in every workspace. It runs through `quality lint` and the normal report and baseline. The rule accepts no options or permanent exceptions; Quality supplies knip’s entry points without a repository knip config. Runtime modules supplied by a host can be declared in an ambient script included by the importing file’s TypeScript project. These declarations satisfy the missing-dependency check only in that project; undeclared imports still fail.
|
|
229
233
|
|
|
230
234
|
Package `exports` are public API, including wildcard targets and source conditions. Package `bin` and scripts, test and story globs, tool configs and `src/test-support` provide the other entry points. Imports reachable from those entries count as used. Source-conditioned package import aliases resolve to their sources before a build. Compiler mappings from `tsconfig.json` and `tsconfig.build.json` keep imports on their source files when build output exists. An internal module can be used while one of its exports remains unused. An application’s declared dependency entry points satisfy provided imports under the same policy as `imports/manifest`.
|
|
231
235
|
|
|
@@ -239,7 +243,7 @@ For adoption, run `quality baseline write --rule code/unused` and review the rec
|
|
|
239
243
|
- **Documentation:** `docs/references` checks every Markdown file in the sources except `CHANGELOG.md`, whose released history keeps the links of its release. Relative links, reference definitions and `href`/`src` attributes reach an existing file or folder inside the repository, and a heading anchor matches one GitHub forms from the target's headings. A link to the repository's own GitHub tree, named by the root `package.json` `repository` field, is checked like a relative one unless it is pinned to a commit or a release tag. A published workspace package's README is shown on npm without the repository around it, so its links that leave the package use absolute URLs. Imports in TypeScript and JavaScript code blocks, workspace module paths such as `@scope/lib/repository.ts` written as inline code, `` `name` from `module` `` phrases and a package README's API rows resolve through the owning package's `exports` to a module that is not blocked, and every named import exists in that module unless it re-exports another. A linked document such as `CLAUDE.md` beside `AGENTS.md` is checked once, through its target. `docs/unversioned-installs` rejects a version after a package name in install commands, in shell code blocks and inline code; the package's own version ranges decide what installs, and a written version goes stale with the next release. A dist-tag such as `latest` passes.
|
|
240
244
|
- **Suppressions:** the `suppressions/*` rules reject inline lint and compiler directives, casts through `unknown`, `any` or `never`, Biome settings that weaken a check, recommended Biome rules the preset leaves below `error`, and `ignoreDeprecations`. None of them takes exceptions. A type test (`*.typecheck.test.ts`) may use `@ts-expect-error`; a test that must pass a rejected value at run time calls the API through `Reflect.apply`.
|
|
241
245
|
- **Imports:** cycles, unresolvable imports, workspace imports missing from the manifest or an entry point, relative imports that leave their folder, production imports of test code, runtime folders and fences, as described above.
|
|
242
|
-
- **Names and files:** the Biome preset's naming rules and plugins, and the `files/*` rules, which name a file after its main export with its folders as the prefix. No naming rule renames anything; the author picks the name. A name an outside system owns, such as a query parameter or an environment variable, is written as a quoted key, which the naming rules skip. A `Schema.Struct` field stays camelCase even when quoted and maps to the outside name with `Schema.encodeKeys`. Biome's naming messages print only a pattern: spell acronyms as words (`HttpClient`, `userId`, `parseUrl`) rather than turning off `strictCase` as its hint suggests, give a type no `I` prefix, and name a type parameter `T`, `T` plus a PascalCase name (`TItem`), or Effect's `A`, `E` and `R`. No rule checks these, so review does: a boolean reads as a question (`isOpen`, `canRetry`) unless the DOM or React names it (`open`, `disabled`); a schema shares its name with its type (`type Item = typeof Item.Type`); an unused parameter is removed rather than renamed with the `_` prefix TypeScript accepts. The naming rules take repository facts: `toolOwned` lists `.gitignore` patterns whose names a tool fixes, and a configured list extends the rule's defaults, so list only repository-specific additions; `content` lists snake_case content folders and files; `tests/follow` and `tests/colocated` take `suites` for test folders with their own layout, such as a Playwright suite.
|
|
246
|
+
- **Names and files:** the Biome preset's naming rules and plugins, and the `files/*` rules, which name a file after its main export with its folders as the prefix. `files/named-after-export` keeps the export’s full name while the file name omits words already supplied by any folder above it. In `spaces/client/`, a component exporting `CreateSpace` lives in `Create.tsx`: `spaces/` supplies “Space” even across the intervening `client/` folder. Keep the export named `CreateSpace`; `CreateSpace.tsx` would repeat a folder name. No naming rule renames anything; the author picks the name. A name an outside system owns, such as a query parameter or an environment variable, is written as a quoted key, which the naming rules skip. A `Schema.Struct` field stays camelCase even when quoted and maps to the outside name with `Schema.encodeKeys`. Biome's naming messages print only a pattern: spell acronyms as words (`HttpClient`, `userId`, `parseUrl`) rather than turning off `strictCase` as its hint suggests, give a type no `I` prefix, and name a type parameter `T`, `T` plus a PascalCase name (`TItem`), or Effect's `A`, `E` and `R`. No rule checks these, so review does: a boolean reads as a question (`isOpen`, `canRetry`) unless the DOM or React names it (`open`, `disabled`); a schema shares its name with its type (`type Item = typeof Item.Type`); an unused parameter is removed rather than renamed with the `_` prefix TypeScript accepts. The naming rules take repository facts: `toolOwned` lists `.gitignore` patterns whose names a tool fixes, and a configured list extends the rule's defaults, so list only repository-specific additions; `content` lists snake_case content folders and files; `tests/follow` and `tests/colocated` take `suites` for test folders with their own layout, such as a Playwright suite.
|
|
243
247
|
- **React:** `react/jsx-conditionals` reports `&&` and ternaries in JSX children, including nested decisions. Decide before the JSX or extract a component that receives the data and returns `null` when it has nothing to show. Inside `.map`, extract an item component that makes its own decision. Conditional attributes such as `className` are accepted. This rule owns the check, so the shared Biome preset leaves `noLeakedRender` off.
|
|
244
248
|
- **Tests:** `tests/follow` and `tests/colocated` keep a test beside the code it covers, named `<file>[.<modifier>].test.ts` or `<behaviour>[.<modifier>].spec.ts` with at most one modifier of `dom`, `slow`, `typecheck` and `unit`; a unit test runs without the DOM, so `.unit.dom` is rejected. `tests/colocated` always treats `__tests__/` as a test folder. It treats `test/`, `tests/` and `spec/` as test folders only when their directly contained checked files are all tests or test support; a product folder with source beside its specs is an ordinary source folder. Declared `suites` keep their own layout. Shared test support belongs in `test-support/`, the sanctioned test-only folder. A test covering a whole module may sit at its root or directly beside its folder. The story rules above keep setup in the kit.
|
|
245
249
|
- **Manifests:** `manifests/sorted` keeps every `package.json` in sort-package-json order, and `manifests/source-first` puts the `source` condition first in `exports` and `imports`. `manifests/exports-shape` checks the package root and workspace members with exports. They use one file-preserving TypeScript wildcard: for example, `./*.ts` maps to `./src/*.ts`, `./dist/*.d.ts` and `./dist/*.js` under `source`, `types` and `default`. A subtree pattern such as `./server/*.ts` keeps that same subtree in its targets. An optional root entry, exact-path non-code assets such as JSON presets, `./package.json` and `null` blocks are allowed. A package without modules, such as a dependency shell, exports only exact assets and needs no wildcard. Import each module at its path under `src/`; named aliases, flattened paths, per-file module lists and additional non-null wildcards fail. `manifests/application` keeps an application on its entry points, as described above.
|
|
@@ -338,6 +342,7 @@ Register it with `defineConfig({ local: [noLog] })`. Its check receives `root`,
|
|
|
338
342
|
|
|
339
343
|
```text
|
|
340
344
|
quality lint [--config <file>]
|
|
345
|
+
quality ci [--coverage]
|
|
341
346
|
quality fix [--config <file>]
|
|
342
347
|
quality exceptions migrate [--config <file>] [--from <registry>]
|
|
343
348
|
quality baseline merge <ancestor> <current> <other>
|
|
@@ -392,7 +397,7 @@ import { appViteConfig } from "@shivaedev/quality/appViteConfig.ts";
|
|
|
392
397
|
export default appViteConfig([tailwindcss(), react()]);
|
|
393
398
|
```
|
|
394
399
|
|
|
395
|
-
Use this in `vite.config.ts`. Plugins belong to the app. The shared server proxies `/api/auth` and `/rpc` to the local host on port 3000, preserving the request Host. It enables TypeScript path resolution. Client routes, including administration pages, stay on Vite.
|
|
400
|
+
Use this in `vite.config.ts`. Plugins belong to the app. The shared server proxies `/api/auth` and `/rpc` to the local host on port 3000, preserving the request Host. Pass extra host routes as the third argument, for example `appViteConfig(plugins, [], ["/health"])`, to proxy them to the same host during development. It enables TypeScript path resolution. Client routes, including administration pages, stay on Vite.
|
|
396
401
|
|
|
397
402
|
```ts
|
|
398
403
|
import { appTestConfig } from "@shivaedev/quality/appTestConfig.ts";
|
|
@@ -424,7 +429,7 @@ testProjects({ maxWorkers: 4 });
|
|
|
424
429
|
|
|
425
430
|
The first configuration allows six workers, including on a two-CPU runner. `maxWorkers` takes precedence over the connection calculation. Counts and estimates must be positive safe integers. Vitest's native `--maxWorkers` CLI option can also override the returned configuration for a single run.
|
|
426
431
|
|
|
427
|
-
Coverage is opt-in: `testProjects({ coverage: true })` enables Vitest's V8 provider across the selected projects.
|
|
432
|
+
Coverage is opt-in: `testProjects({ coverage: true })` enables Vitest's V8 provider across the selected projects. Quality supplies `@vitest/coverage-v8` at its supported Vitest version. The report includes unvisited `src/**/*.ts` and `src/**/*.tsx` files and excludes declarations, tests, specs and `test-support`. To customize it, pass native Vitest coverage options, for example `testProjects({ coverage: { reporter: ["lcov", "text-summary"] } })` or `appTestConfig([], { coverage: { include: ["src/domain/**/*.ts"] } })`. No separate coverage config is needed.
|
|
428
433
|
|
|
429
434
|
Outside CI, `testProjects` sets `silent: "passed-only"` so local runs show logs only from failing tests. When `CI` is set to a nonempty value, it sets `silent: false` so CI keeps all test logs. It leaves `reporters` unset so Vitest can auto-detect its agent reporter. If a repository adds a reporter, spread `configDefaults.reporters` instead of replacing the defaults:
|
|
430
435
|
|
package/biome/preset.json
CHANGED
|
@@ -337,8 +337,7 @@
|
|
|
337
337
|
"useRegexpExec": "error",
|
|
338
338
|
"useStringStartsEndsWith": "error",
|
|
339
339
|
"useTailwindShorthandClasses": "error",
|
|
340
|
-
"useTailwindSortedClasses": { "fix": "safe", "level": "error" }
|
|
341
|
-
"useValidTestTitle": "error"
|
|
340
|
+
"useTailwindSortedClasses": { "fix": "safe", "level": "error" }
|
|
342
341
|
},
|
|
343
342
|
"performance": {
|
|
344
343
|
"noAccumulatingSpread": "error",
|
|
@@ -615,6 +614,16 @@
|
|
|
615
614
|
},
|
|
616
615
|
"markdown": { "parser": { "frontmatter": true } },
|
|
617
616
|
"overrides": [
|
|
617
|
+
{
|
|
618
|
+
"includes": ["**/*.test.*", "**/*.spec.*", "**/test-support/**"],
|
|
619
|
+
"linter": {
|
|
620
|
+
"rules": {
|
|
621
|
+
"nursery": {
|
|
622
|
+
"useValidTestTitle": "error"
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
618
627
|
{
|
|
619
628
|
"assist": {
|
|
620
629
|
"actions": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entryPointFindings.d.ts","sourceRoot":"","sources":["../../../src/adapters/knip/entryPointFindings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entryPointFindings.d.ts","sourceRoot":"","sources":["../../../src/adapters/knip/entryPointFindings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGrD,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuDlG"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { posix } from "node:path";
|
|
1
|
+
import { join, posix } from "node:path";
|
|
2
|
+
import { ambientModules } from "#imports/ambient.ts";
|
|
2
3
|
import { importGraph } from "#imports/graph.ts";
|
|
3
4
|
import { isTooling } from "#imports/isTooling.ts";
|
|
5
|
+
import { projectsFor } from "#imports/projects.ts";
|
|
4
6
|
import { packageOf } from "#imports/workspace.ts";
|
|
5
7
|
import { entryPointsOf, isApplication, provider } from "#manifests/entryPoints.ts";
|
|
6
8
|
import { isTestCode } from "#naming/testName.ts";
|
|
9
|
+
import { parse } from "#rules/parse.ts";
|
|
7
10
|
export async function entryPointFindings(inputs, findings) {
|
|
8
11
|
const graph = await importGraph(inputs);
|
|
12
|
+
const projectOf = projectsFor(inputs.root);
|
|
13
|
+
const ambient = ambientModules(inputs.sources.flatMap((file) => {
|
|
14
|
+
const syntax = parse(file);
|
|
15
|
+
return syntax === undefined ? [] : [{ path: join(inputs.root, file.path), syntax }];
|
|
16
|
+
}));
|
|
9
17
|
const unusedFiles = new Set(findings.filter((finding) => finding.subject?.startsWith("files:")).map((finding) => finding.file));
|
|
10
18
|
const workspace = new Map(graph.packages.map(({ name, directory }) => [name, directory]));
|
|
11
19
|
const directories = [".", ...graph.packages.map(({ directory }) => directory)];
|
|
@@ -27,7 +35,8 @@ export async function entryPointFindings(inputs, findings) {
|
|
|
27
35
|
const directory = owner(finding.file);
|
|
28
36
|
const entries = policies.get(directory) ?? [];
|
|
29
37
|
if (kind === "unlisted") {
|
|
30
|
-
return
|
|
38
|
+
return (!ambient(name, projectOf(join(inputs.root, finding.file)).files)
|
|
39
|
+
&& provider(entries, name, development(directory, finding.file), true) === undefined);
|
|
31
40
|
}
|
|
32
41
|
if (kind !== "dependencies" && kind !== "devDependencies") {
|
|
33
42
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entryPointFindings.js","sourceRoot":"","sources":["../../../src/adapters/knip/entryPointFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"entryPointFindings.js","sourceRoot":"","sources":["../../../src/adapters/knip/entryPointFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAkB,EAAE,QAAkB;IAC9E,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,cAAc,CAC7B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,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AC,IAAI,EAAE,EAAE;YAC3D,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClE,OAAO,KAAK,CAAC;YACd,CAAC;YACD,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;gBAC5C,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,IAAI,CAAC,SAAS;qBACb,KAAK,CAAC,GAAG,CAAC;qBACV,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBAChD,IAAI,CAAC,GAAG,CAAC,CAAC;YACd,OAAO,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;QAClH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/appTestConfig.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { type TestProjectsOptions } from "#testProjects.ts";
|
|
2
|
+
export declare function appTestConfig(conditions?: string[], options?: Pick<TestProjectsOptions, "coverage">): import("vite").UserConfig;
|
|
2
3
|
//# sourceMappingURL=appTestConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appTestConfig.d.ts","sourceRoot":"","sources":["../src/appTestConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appTestConfig.d.ts","sourceRoot":"","sources":["../src/appTestConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAgB,MAAM,kBAAkB,CAAC;AAE1E,wBAAgB,aAAa,CAAC,UAAU,GAAE,MAAM,EAAO,EAAE,OAAO,GAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAM,6BAM3G"}
|
package/dist/appTestConfig.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineConfig } from "vitest/config";
|
|
2
2
|
import { testProjects } from "#testProjects.ts";
|
|
3
|
-
export function appTestConfig(conditions = []) {
|
|
3
|
+
export function appTestConfig(conditions = [], options = {}) {
|
|
4
4
|
return defineConfig({
|
|
5
5
|
resolve: { conditions: [...conditions, "module", "browser", "development|production"] },
|
|
6
6
|
ssr: { resolve: { conditions: [...conditions, "node", "development|production"] } },
|
|
7
|
-
test: { ...testProjects(), server: { deps: { inline: [/^@shivaedev\//u] } } },
|
|
7
|
+
test: { ...testProjects(options), server: { deps: { inline: [/^@shivaedev\//u] } } },
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=appTestConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appTestConfig.js","sourceRoot":"","sources":["../src/appTestConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"appTestConfig.js","sourceRoot":"","sources":["../src/appTestConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAA4B,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,UAAU,aAAa,CAAC,UAAU,GAAa,EAAE,EAAE,OAAO,GAA0C,EAAE;IAC3G,OAAO,YAAY,CAAC;QACnB,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,wBAAwB,CAAC,EAAE;QACvF,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,wBAAwB,CAAC,EAAE,EAAE;QACnF,IAAI,EAAE,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE;KACpF,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/appViteConfig.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appViteConfig.d.ts","sourceRoot":"","sources":["../src/appViteConfig.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAE,MAAM,EAAO;;;;;;;
|
|
1
|
+
{"version":3,"file":"appViteConfig.d.ts","sourceRoot":"","sources":["../src/appViteConfig.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAE,MAAM,EAAO,EAAE,UAAU,GAAE,MAAM,EAAO;;;;;;;QAK5G,IAAI;QACJ,IAAI;QACJ,KAAK;;;;;;QACL,UAAU;;EAGZ"}
|
package/dist/appViteConfig.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function appViteConfig(plugins, conditions = []) {
|
|
1
|
+
export function appViteConfig(plugins, conditions = [], proxyPaths = []) {
|
|
2
2
|
return {
|
|
3
3
|
plugins,
|
|
4
4
|
resolve: { conditions, tsconfigPaths: true },
|
|
5
5
|
server: {
|
|
6
6
|
host: "127.0.0.1",
|
|
7
7
|
port: 5173,
|
|
8
|
-
proxy: Object.fromEntries(["/api/auth", "/rpc"].map((path) => [path, { changeOrigin: false, target: "http://127.0.0.1:3000" }])),
|
|
8
|
+
proxy: Object.fromEntries(["/api/auth", "/rpc", ...proxyPaths].map((path) => [path, { changeOrigin: false, target: "http://127.0.0.1:3000" }])),
|
|
9
9
|
strictPort: true,
|
|
10
10
|
},
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appViteConfig.js","sourceRoot":"","sources":["../src/appViteConfig.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAU,OAAkB,EAAE,UAAU,GAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"appViteConfig.js","sourceRoot":"","sources":["../src/appViteConfig.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAU,OAAkB,EAAE,UAAU,GAAa,EAAE,EAAE,UAAU,GAAa,EAAE;IAC9G,OAAO;QACN,OAAO;QACP,OAAO,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE;QAC5C,MAAM,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC;YAC/I,UAAU,EAAE,IAAI;SAChB;KACD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptionConfig.d.ts","sourceRoot":"","sources":["../../src/biome/exceptionConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exceptionConfig.d.ts","sourceRoot":"","sources":["../../src/biome/exceptionConfig.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAUvE,wBAAgB,eAAe,CAAC,YAAY,EAAE,SAAS,oBAAoB,EAAE,GAAG;IAC/E,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC,CAQA;AAED,wBAAsB,mBAAmB,CAAC,MAAM,EAC/C,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,SAAS,oBAAoB,EAAE,EAC7C,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,GAC/C,OAAO,CAAC,MAAM,CAAC,CA6CjB"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
2
|
+
import { rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import {
|
|
4
|
+
import { NodeFileSystem } from "@effect/platform-node";
|
|
5
|
+
import { Effect, Schema } from "effect";
|
|
5
6
|
import ts from "typescript";
|
|
7
|
+
import { readOptionalText } from "#inventory/filesystem.ts";
|
|
6
8
|
function nativeOverride(files, rule) {
|
|
7
9
|
const [, tool, group = "", name = ""] = rule.split("/");
|
|
8
10
|
const key = tool === "lint" ? "linter" : "assist";
|
|
@@ -23,8 +25,15 @@ export async function withExceptionConfig(root, declarations, run) {
|
|
|
23
25
|
}
|
|
24
26
|
const name = `.quality-biome-${randomUUID()}.json`;
|
|
25
27
|
const path = join(root, name);
|
|
26
|
-
const config = await
|
|
27
|
-
|
|
28
|
+
const { config, text } = await Effect.runPromise(Effect.gen(function* () {
|
|
29
|
+
for (const candidate of ["biome.json", "biome.jsonc"]) {
|
|
30
|
+
const content = yield* readOptionalText(join(root, candidate));
|
|
31
|
+
if (content !== undefined) {
|
|
32
|
+
return { config: candidate, text: content };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { config: "biome.json", text: "{}" };
|
|
36
|
+
}).pipe(Effect.provide(NodeFileSystem.layer)));
|
|
28
37
|
const parsed = ts.parseConfigFileTextToJson(config, text);
|
|
29
38
|
if (parsed.error !== undefined) {
|
|
30
39
|
throw new Error(`Cannot load ${config}: ${ts.flattenDiagnosticMessageText(parsed.error.messageText, " ")}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptionConfig.js","sourceRoot":"","sources":["../../src/biome/exceptionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"exceptionConfig.js","sourceRoot":"","sources":["../../src/biome/exceptionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,SAAS,cAAc,CAAC,KAAwB,EAAE,IAAY;IAC7D,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,MAAM,QAAQ,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,eAAe,CA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AAS,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,OAAO,MAAM,GAAG,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;YAAS,CAAC;QACV,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;AACF,CAAC"}
|
|
@@ -8,7 +8,7 @@ export async function recommendedRules() {
|
|
|
8
8
|
const directory = await mkdtemp(join(tmpdir(), "quality-biome-recommended-"));
|
|
9
9
|
try {
|
|
10
10
|
await writeFile(join(directory, "biome.json"), RECOMMENDED_ONLY);
|
|
11
|
-
const rage = await runBiome(directory, ["rage", "--linter"
|
|
11
|
+
const rage = await runBiome(directory, ["rage", "--linter"]);
|
|
12
12
|
const rules = [...rage.stdout.matchAll(ENABLED_RULE)].flatMap((match) => match.groups?.rule ?? []);
|
|
13
13
|
if (rules.length === 0) {
|
|
14
14
|
throw new Error(`biome rage --linter listed no enabled rules under the recommended preset:\n${[rage.stdout, rage.stderr].join("\n").trim()}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendedRules.js","sourceRoot":"","sources":["../../src/biome/recommendedRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,gBAAgB,GAAG,0DAA0D,CAAC;AAEpF,MAAM,YAAY,GAAG,mCAAmC,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACrC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,4BAA4B,CAAC,CAA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AAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/I,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACV,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACF,CAAC"}
|
package/dist/biome/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/biome/run.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAID,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,GAAE,SAAS,oBAAoB,EAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/biome/run.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAID,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,GAAE,SAAS,oBAAoB,EAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuBzI"}
|
package/dist/biome/run.js
CHANGED
|
@@ -8,15 +8,13 @@ import { withExceptionConfig } from "./exceptionConfig.js";
|
|
|
8
8
|
const BIN = createRequire(import.meta.url).resolve("@biomejs/biome/bin/biome");
|
|
9
9
|
export async function runBiome(root, args, exceptions = []) {
|
|
10
10
|
const folders = await Effect.runPromise(shadcnFolders(root).pipe(Effect.provide(NodeFileSystem.layer)));
|
|
11
|
-
const toolOwned =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
];
|
|
11
|
+
const toolOwned = [
|
|
12
|
+
{
|
|
13
|
+
files: ["**", "!**/pnpm-lock.yaml", ...folders.map((folder) => `!${folder}`)],
|
|
14
|
+
reason: "pnpm writes its lockfiles; components.json assigns UI folders to the shadcn CLI.",
|
|
15
|
+
rules: ["biome/files/includes"],
|
|
16
|
+
},
|
|
17
|
+
];
|
|
20
18
|
return withExceptionConfig(root, [...exceptions, ...toolOwned], (configArgs) => new Promise((resolve, reject) => {
|
|
21
19
|
execFile(process.execPath, [BIN, ...args, ...configArgs, "--colors=off"], { cwd: root, maxBuffer: 2 ** 30 }, (error, stdout, stderr) => {
|
|
22
20
|
if (error !== null && typeof error.code !== "number") {
|
package/dist/biome/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/biome/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,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AAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC;YAC7E,MAAM,EAAE,kFAAkF;YAC1F,KAAK,EAAE,CAAC,sBAAsB,CAAC;SAC/B;KACD,CAAC;IACF,OAAO,mBAAmB,CACzB,IAAI,EACJ,CAAC,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC,EAC7B,CAAC,UAAU,EAAE,EAAE,CACd,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC/B,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,EAAE,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACtI,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACtD,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,OAAO;YACR,CAAC;YACD,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACH,CAAC"}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type Command = {
|
|
2
2
|
readonly _tag: "Ci";
|
|
3
|
+
readonly coverage: boolean;
|
|
3
4
|
} | {
|
|
4
5
|
readonly _tag: "Setup";
|
|
5
6
|
readonly config: string | undefined;
|
|
@@ -57,6 +58,6 @@ export type Parsed = {
|
|
|
57
58
|
readonly _tag: "Usage";
|
|
58
59
|
readonly problem: string;
|
|
59
60
|
};
|
|
60
|
-
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci\n quality setup [--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\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\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.";
|
|
61
|
+
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--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\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\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.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
|
|
61
62
|
export declare function parseCommand(args: readonly string[]): Parsed;
|
|
62
63
|
//# 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,IAAI,CAAA;CAAE,
|
|
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,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC/D;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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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,oiGAAgB,CAAC;AAwFnC,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CA0B5D"}
|
package/dist/cli/args.js
CHANGED
|
@@ -5,6 +5,7 @@ export const USAGE = COMMAND_USAGE;
|
|
|
5
5
|
const OPTIONS = {
|
|
6
6
|
against: { type: "string" },
|
|
7
7
|
config: { type: "string" },
|
|
8
|
+
coverage: { type: "boolean" },
|
|
8
9
|
force: { type: "boolean" },
|
|
9
10
|
from: { type: "string" },
|
|
10
11
|
help: { short: "h", type: "boolean" },
|
|
@@ -17,14 +18,14 @@ function usage(problem) {
|
|
|
17
18
|
function parsed(command) {
|
|
18
19
|
return { _tag: "Parsed", command };
|
|
19
20
|
}
|
|
20
|
-
const COMMAND_OPTIONS = ["against", "force", "from", "rule", "staged"];
|
|
21
|
+
const COMMAND_OPTIONS = ["against", "coverage", "force", "from", "rule", "staged"];
|
|
21
22
|
const ACCEPTS = {
|
|
22
23
|
"baseline install-driver": [],
|
|
23
24
|
"baseline migrate": ["from"],
|
|
24
25
|
"baseline prune": ["against"],
|
|
25
26
|
"baseline tighten": ["staged"],
|
|
26
27
|
"baseline write": ["rule"],
|
|
27
|
-
ci: [],
|
|
28
|
+
ci: ["coverage"],
|
|
28
29
|
"exceptions migrate": ["from"],
|
|
29
30
|
fix: [],
|
|
30
31
|
"hooks install": ["force"],
|
|
@@ -46,7 +47,7 @@ function commandFor(name, values) {
|
|
|
46
47
|
const config = values.config;
|
|
47
48
|
switch (name) {
|
|
48
49
|
case "ci":
|
|
49
|
-
return parsed({ _tag: "Ci" });
|
|
50
|
+
return parsed({ _tag: "Ci", coverage: values.coverage === true });
|
|
50
51
|
case "setup":
|
|
51
52
|
return parsed({ _tag: "Setup", config });
|
|
52
53
|
case "lint":
|
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;AAsBpE,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC;AAEnC,MAAM,OAAO,GAAG;IACf,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CAClB,CAAC;AAEX,SAAS,KAAK,CAAC,OAAe;IAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,OAAgB;IAC/B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACpC,CAAC;AAMD,MAAM,eAAe,GAAsB,CAAC,SAAS,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AO,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/cli/ci.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { ChildProcessSpawner } from "effect/process";
|
|
3
3
|
import { GateFailed } from "#failure.ts";
|
|
4
|
-
export declare const ci: (cwd: string) => Effect.Effect<undefined, GateFailed | import("effect/PlatformError").PlatformError, ChildProcessSpawner.ChildProcessSpawner>;
|
|
4
|
+
export declare const ci: (cwd: string, coverage?: any) => Effect.Effect<undefined, GateFailed | import("effect/PlatformError").PlatformError, ChildProcessSpawner.ChildProcessSpawner>;
|
|
5
5
|
//# sourceMappingURL=ci.d.ts.map
|
package/dist/cli/ci.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/cli/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../src/cli/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAazC,eAAO,MAAM,EAAE,+JAWb,CAAC"}
|
package/dist/cli/ci.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Console, Effect } from "effect";
|
|
2
2
|
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
3
3
|
import { GateFailed } from "#failure.ts";
|
|
4
|
-
|
|
4
|
+
const coverageArgs = [
|
|
5
|
+
"--coverage",
|
|
6
|
+
"--coverage.provider=v8",
|
|
7
|
+
"--coverage.reporter=lcov",
|
|
8
|
+
"--coverage.reportOnFailure",
|
|
9
|
+
"--coverage.reportsDirectory=coverage",
|
|
10
|
+
"--reporter=default",
|
|
11
|
+
"--reporter=junit",
|
|
12
|
+
"--outputFile.junit=coverage/junit.xml",
|
|
13
|
+
];
|
|
14
|
+
export const ci = Effect.fn("Cli.ci")(function* (cwd, coverage = false) {
|
|
5
15
|
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
|
6
|
-
|
|
16
|
+
const scripts = ["lint", "typecheck", "build", "test"].map((script) => ["run", script, ...(script === "test" && coverage ? coverageArgs : [])]);
|
|
17
|
+
for (const args of [["peers", "check"], ...scripts]) {
|
|
7
18
|
yield* Console.log(`quality: running \`pnpm ${args.join(" ")}\``);
|
|
8
19
|
const code = yield* spawner.exitCode(ChildProcess.make("pnpm", args, { cwd, stderr: "inherit", stdout: "inherit" }));
|
|
9
20
|
if (code !== 0) {
|
package/dist/cli/ci.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/cli/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAW;
|
|
1
|
+
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/cli/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,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K,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC;QAChC,CAAC;IACF,CAAC;AACF,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 ci\n quality setup [--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\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\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.";
|
|
1
|
+
export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--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\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\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.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\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,oiGAsCwC,CAAC;AAE3D,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxD,CAAC"}
|