@antelopejs/tooling-configs 0.7.3 → 0.7.4

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.
Files changed (32) hide show
  1. package/README.md +31 -3
  2. package/dist/bin/api-diff.mjs +16 -16
  3. package/dist/bin/body-check.mjs +1 -1
  4. package/dist/bin/check-size.mjs +1 -1
  5. package/dist/bin/checks.mjs +1 -1
  6. package/dist/bin/comment-proof.mjs +2 -2
  7. package/dist/bin/ratchet.mjs +3 -3
  8. package/dist/bin/readme-strip.mjs +1 -1
  9. package/dist/bin/suppressions.mjs +3 -3
  10. package/dist/bin/sync.mjs +41 -28
  11. package/dist/bin/tsc.d.mts +1 -0
  12. package/dist/bin/tsc.mjs +24 -0
  13. package/dist/bin/verify.mjs +89 -89
  14. package/dist/{checks-CSlWvky1.mjs → checks-BTFf0Evy.mjs} +31 -33
  15. package/dist/{docs-compat-BAZiPLZt.mjs → docs-compat-BmczGA1d.mjs} +1 -1
  16. package/dist/eslint.mjs +1 -1
  17. package/dist/{guardrails-nj7NTglr.mjs → guardrails-CNmSFSxO.mjs} +120 -120
  18. package/dist/{installed-typescript-6MtIWlE4.mjs → installed-typescript-CF_FR9DV.mjs} +17 -17
  19. package/dist/oxc/guardrails/index.mjs +1 -1
  20. package/dist/oxc/lint.mjs +1 -1
  21. package/dist/{package-DDG3YH7W.mjs → package-1pH5I0TF.mjs} +3 -7
  22. package/dist/{proof-stamp-BFV7JTZT.mjs → proof-stamp-Bg4ULLvr.mjs} +2 -2
  23. package/dist/{ratchet-DLCfeaPY.mjs → ratchet-CPpvIU6Y.mjs} +2 -2
  24. package/dist/{suppression-base-CYaLZAq7.mjs → suppression-base-CDiFJse2.mjs} +2 -2
  25. package/dist/{suppression-budget-CPDSFg4X.mjs → suppression-budget-BeJIgSTO.mjs} +1 -1
  26. package/dist/{suppressions-CxPnh4sC.mjs → suppressions-BvWGA463.mjs} +5 -1
  27. package/dist/{templates-HG0fel2S.mjs → templates-Df6SlGLA.mjs} +1 -1
  28. package/dist/{typescript-QfxkJYzd.mjs → typescript-B0df00nl.mjs} +13 -13
  29. package/dist/typescript-version-CptQKjGz.mjs +18 -0
  30. package/dist/typescript6-BWqCcXGY.mjs +2 -0
  31. package/dist/typescript6-HdyOMBv3.mjs +8 -0
  32. package/package.json +27 -5
package/README.md CHANGED
@@ -39,6 +39,7 @@ The AntelopeJS guardrail pack: shared lint, format and dead-code presets, the co
39
39
  | bin | `antelopejs-check-size` | Fails on authored files over 20,000 bytes and on blanket disable directives |
40
40
  | bin | `antelopejs-api-diff <base-ref>` | Compares published declaration bundles against committed HEAD |
41
41
  | bin | `antelopejs-comment-proof <base-ref>` | Compares comment-free JavaScript emit against committed HEAD |
42
+ | bin | `antelopejs-tsc <tsc arguments>` | Runs the pack's own TypeScript 7 with `tsc`'s arguments, for `build` and `typecheck` ([TypeScript 7](#typescript-7-for-build-and-typecheck)) |
42
43
  | bin | `antelopejs-body-check <body.md \| -> [--head <sha>] [--base <sha>]` | Checks a PR body's proof and findings blocks against HEAD; `--findings` prints the findings block |
43
44
  | bin | `antelopejs-readme-strip --kind <kind> --name <label-name>` | Writes a framework repository's README strip banner to `.github/readme/strip.svg` ([docs](docs/documentation-checks.md#framework-strip-banner)) |
44
45
  | bin | `antelopejs-garden [--json] [--apply] [--apply-prunes]` | The Gardener's scans of the organization through the GitHub API and npm |
@@ -250,7 +251,7 @@ pnpm install
250
251
 
251
252
  An entry matches every error with that code in that file, at any line. The step prints each matched error under `errors guardrails.published-types.json declares as known` whether it passes or fails, and passes when every error it found is declared. An error in a package of the repository, or in a file or with a code no entry names, still fails, and an entry may not name a package of the repository. Once tsc ran over every package, an entry that matched no error fails with `<dependency>/<file> <code> no longer occurs. Remove the entry.`, so the entry goes when the dependency fixes its declarations. When the step runs, a malformed file, an entry with a path tsc does not print (such as `./lib/x.d.ts`) or a repeated entry fails it before anything is packed. It needs the registry, so it fails offline unless the package manager's store already holds what the install needs.
252
253
 
253
- - `verify:types` type-checks each layer's own code with the repository's own TypeScript, run as `node <typescript>/bin/tsc` without a shell. A repository that installs the TypeScript 6 API as `typescript` (`npm:@typescript/typescript6`) for tools that need it, beside TypeScript 7 as `@typescript/native`, runs `@typescript/native`'s `tsc`. The files are those the layer's `tsconfig.json` includes, minus its `playground` folder and any `node_modules` or `dist` folder: verify compiles a playground itself, with the playground's own config, after installing it. The step writes a config to the system temp folder that extends the layer's, lists those files, keeps the layer's type roots, sets `noEmit` and unsets with `null` the `declaration`, `composite`, `incremental`, `tsBuildInfoFile`, `declarationDir`, `declarationMap`, `emitDeclarationOnly` and `isolatedDeclarations` the layer may inherit, then deletes it. No `.tsbuildinfo` is written, no declaration check runs on code that is never emitted, and `skipLibCheck` keeps the layer's value. `antelopejs-sync` writes the `tsconfig.json` of the shared `verify-interface`, `verify-module` and `verify-template` layers; a repository's own layer, such as a `verify-dms-*` one, keeps the one it wrote. A layer with a `verify.config.ts` and no `tsconfig.json` fails, and so does one whose `tsconfig.json` does not include its `verify.config.ts`.
254
+ - `verify:types` type-checks each layer's own code with the repository's own TypeScript, run as `node <typescript>/bin/tsc` without a shell. It never runs another package's `tsc`, so it stays on the TypeScript 6 the repository declares when `build` and `typecheck` run `antelopejs-tsc`, and a `typescript` without a `tsc` bin counts as not installed. The files are those the layer's `tsconfig.json` includes, minus its `playground` folder and any `node_modules` or `dist` folder: verify compiles a playground itself, with the playground's own config, after installing it. The step writes a config to the system temp folder that extends the layer's, lists those files, keeps the layer's type roots, sets `noEmit` and unsets with `null` the `declaration`, `composite`, `incremental`, `tsBuildInfoFile`, `declarationDir`, `declarationMap`, `emitDeclarationOnly` and `isolatedDeclarations` the layer may inherit, then deletes it. No `.tsbuildinfo` is written, no declaration check runs on code that is never emitted, and `skipLibCheck` keeps the layer's value. `antelopejs-sync` writes the `tsconfig.json` of the shared `verify-interface`, `verify-module` and `verify-template` layers; a repository's own layer, such as a `verify-dms-*` one, keeps the one it wrote. A layer with a `verify.config.ts` and no `tsconfig.json` fails, and so does one whose `tsconfig.json` does not include its `verify.config.ts`.
254
255
  - `verify:lockfiles` compares, in code, the direct dependencies each lockfile records with the `package.json` files it locks, and fails on a difference in either direction, naming the dependency and the command that regenerates the lockfile. It reads each lockfile in a folder under a layer, `node_modules` and `dist` aside, and in the root `playground`. A `pnpm-lock.yaml` is compared importer by importer, for each importer it lists that has a `package.json` on disk; a `package-lock.json` by its root entry. Only `dependencies`, `devDependencies` and `optionalDependencies` are compared, by name and specifier: a name counts as present whichever of the three fields records it, and a `catalog:` or `workspace:` specifier compares as written, as pnpm stores it. A name the lockfile records that `package.json` declares only in `peerDependencies` passes, whether or not peers are auto-installed. A name an override selector in the `pnpm-lock.yaml` mentions is not compared, nor is a `link:` dependency the lockfile leaves out under `excludeLinksFromLockfile`. A lockfile it cannot parse, or of a version before pnpm's 6 or npm's 2, fails as unreadable. A missing lockfile fails only in a layer's `playground` or the root `playground` whose `package.json` has dependencies, unless a folder above it holds a `pnpm-workspace.yaml` or a `package.json` with `workspaces`; the fix it names is npm's when a `package-lock.json` sits in a folder above, pnpm's otherwise. It does not check workspace membership, `overrides`, lockfile `settings`, catalogs, `.npmrc` or user configuration, resolved versions, integrity hashes, transitive entries, npm workspace members, or `yarn.lock` and `bun.lock`: verify's own frozen install still rejects a lockfile stale there.
255
256
 
256
257
  `ANTELOPEJS_CHECKS_SKIP` accepts both names.
@@ -312,7 +313,7 @@ When every rule count is zero and `oversizeFiles` is empty, the ratchet is retir
312
313
 
313
314
  No repository sets `skipLibCheck` globally. `typecheck` runs a full `tsc --noEmit` over the program that covers the sources, and `build` may pass `--skipLibCheck` only over a program `typecheck` checks in full, so nothing `typecheck` skipped goes unchecked. `antelopejs-sync --check` fails with a line naming the file, the script and the fix, and plain `antelopejs-sync` prints the same line as a `Note:` and carries on, when:
314
315
 
315
- - `build` passes `--skipLibCheck` (in any letter case) to a `tsc` program (`-p`/`--project`, `tsconfig.json` when absent) that no `tsc` run of `typecheck` covers without `--skipLibCheck`. `./tsconfig.build.json` and `tsconfig.build.json`, `-p .` and no `-p` are the same program. `pre<script>` scripts count with their script, and `&&` chains, parentheses, `cross-env` and environment prefixes, `run-s` and `npm-run-all`, and scripts run through `pnpm`, `npm`, `yarn` or `bun` (`--filter <x>`, `-C <dir>` and other options with a value included) are followed to five levels. `tsc` is recognised as `tsc`, `npx tsc`, `npx -p typescript tsc`, `pnpm exec tsc` and `node ./node_modules/typescript/bin/tsc`.
316
+ - `build` passes `--skipLibCheck` (in any letter case) to a `tsc` program (`-p`/`--project`, `tsconfig.json` when absent) that no `tsc` run of `typecheck` covers without `--skipLibCheck`. `./tsconfig.build.json` and `tsconfig.build.json`, `-p .` and no `-p` are the same program. `pre<script>` scripts count with their script, and `&&` chains, parentheses, `cross-env` and environment prefixes, `run-s` and `npm-run-all`, and scripts run through `pnpm`, `npm`, `yarn` or `bun` (`--filter <x>`, `-C <dir>` and other options with a value included) are followed to five levels. `tsc` is recognised as `tsc`, `npx tsc`, `npx -p typescript tsc`, `pnpm exec tsc` and `node ./node_modules/typescript/bin/tsc`. `antelopejs-tsc` is recognised wherever `tsc` is: on its own, through `npx`, `pnpm exec` or a package manager, and as `node_modules/.bin/antelopejs-tsc`.
316
317
  - A tsconfig the scripts use through `tsc`, or the root `tsconfig.json`, ends up with `compilerOptions.skipLibCheck: true`, set directly or through a local `extends` chain (`.json` or `.jsonc`, a later duplicate key winning as in tsc). `tsc -b` reads the config it names and the projects they reference. Presets extended from a package are not read. When the file that sets it is one git ignores, such as Nuxt's generated `.nuxt/tsconfig.json`, the note names the first tracked tsconfig of the chain and asks for `skipLibCheck: false` there; when none is tracked, nothing is reported.
317
318
  - A `release` script exists and does not run `typecheck`, directly or through a script it runs, its `prerelease`, or a release-it hook that runs before publishing (`before:init`, `before:bump`, `before:release` and their plugin-scoped forms), read from `.release-it.json` and from `release-it.hooks` in `package.json`.
318
319
  - A file the check needs cannot be read (a directory where a tsconfig is expected, a permission error): both commands print a `Note:` that says "could not read …" and neither fails on it.
@@ -321,6 +322,33 @@ No repository sets `skipLibCheck` globally. `typecheck` runs a full `tsc --noEmi
321
322
 
322
323
  Known blind spots, none of them read: `|| true` or a background `&` after a `typecheck`, a `typecheck` placed after `release-it` in `release`, a `typecheck` that checks nothing, `vue-tsc`, release-it configs other than JSON (`.release-it.js`, `.yaml`, `.toml`), presets extended from a package, and workspace packages.
323
324
 
325
+ ### TypeScript 7 for build and typecheck
326
+
327
+ A repository keeps TypeScript 6 as its `typescript` package and can build and type-check with TypeScript 7, the native compiler. The pack lists TypeScript 7's native compiler packages, `@typescript/typescript-<platform>-<arch>` at `~7.0.2`, as optional dependencies, so the package manager installs the one for the platform it runs on, and `antelopejs-tsc` runs that compiler with its arguments unchanged. Installing the pack leaves the repository's `tsc` the one its own `typescript` ships, whatever its version, under npm, pnpm, yarn and bun. npm links into `node_modules/.bin` the `tsc` of a package at the root of `node_modules`, the first in name order when several ship one, so a package that ships a `tsc` under another name than `typescript` can replace the repository's. The pack installs none: its compiler packages have no bin, and its TypeScript 6 is a plain `typescript` dependency, which the package manager may share with the repository's `typescript` when that one satisfies `^6.0.2` and otherwise installs under the pack, never in the root `typescript` the repository owns. An override of `typescript` in the repository (`overrides` under npm, bun and pnpm, `resolutions` under yarn) reaches the pack's dependency too; the pack's commands then stop with a message that names the version found and the scoped override that exempts the pack, such as `"overrides": { "@antelopejs/tooling-configs": { "typescript": "^6.0.2" } }` under npm. Under yarn 1 the exemption, `"**/@antelopejs/tooling-configs/typescript": "^6.0.2"`, must come before any other `resolutions` key that matches `typescript`, because yarn 1 applies the first one that matches.
328
+
329
+ To opt in, call `antelopejs-tsc` in place of `tsc` in `build` and `typecheck`, with the same arguments. To back out, call `tsc` again.
330
+
331
+ ```json
332
+ {
333
+ "scripts": {
334
+ "build": "antelopejs-tsc",
335
+ "typecheck": "antelopejs-tsc --noEmit"
336
+ }
337
+ }
338
+ ```
339
+
340
+ Before opting in, remove from the tsconfig chain the options TypeScript 6 deprecated: `baseUrl`, `moduleResolution` set to `node`, `node10` or `classic`, `target` set to `es5`, `downlevelIteration`, `outFile`, `module` set to `amd`, `umd` or `system`, and `esModuleInterop`, `allowSyntheticDefaultImports` or `alwaysStrict` set to `false`. TypeScript 7 refuses each one with an error that names it, such as `error TS5102: Option 'baseUrl' has been removed`, and exits non-zero. `ignoreDeprecations: "6.0"` does not bring them back.
341
+
342
+ Only `build` and `typecheck` change. TypeScript 7.0 ships no compiler API, so everything that loads one stays on TypeScript 6: the `antelopejs` lint rules, `antelopejs-api-diff`, `antelopejs-comment-proof`, the auto-import checks and dts-bundle-generator load the pack's own `typescript` 6 dependency, and `verify:types`, vue-tsc, `nuxi typecheck`, ts-node and editors use the repository's `typescript`. Sync reads `antelopejs-tsc` wherever it reads `tsc`, so [Lib check coverage](#lib-check-coverage) holds for a repository that opted in.
343
+
344
+ Known differences between the two compilers' output:
345
+
346
+ - JavaScript is the same, except for a class that names itself in one of its member decorators: TypeScript 7 emits a `<Name>_1` alias assigned in a `static {}` block where TypeScript 6 names the class.
347
+ - Declarations describe the same types. Without `stableTypeOrdering`, TypeScript 6 can print union members in another order. With `stableTypeOrdering: true` in the tsconfig, which TypeScript 7 accepts, the order matches, and what remains is a type one compiler prints through an alias and the other spells out, such as `value is string` for `value is TypeofTags["string"]`.
348
+ - Source maps differ.
349
+
350
+ `antelopejs-api-diff` emits both revisions' declarations with TypeScript 6 from the repository's tsconfig, so it reports any change to the API between them whichever compiler builds the package. It does not compare those declarations with the ones TypeScript 7 ships; `stableTypeOrdering` brings the two to the same order. Its runtime check runs the package's `build`, so it compares the JavaScript TypeScript 7 emits once the repository opted in.
351
+
324
352
  ### Suppression budget
325
353
 
326
354
  `guardrails.suppressions.json` caps the suppressions in authored code files. It is separate from the ratchet and permanent: it stays when its counts reach zero and when the ratchet is retired.
@@ -355,7 +383,7 @@ Pass paths to check only those files, as the pre-commit hook does. The command a
355
383
 
356
384
  ### Cleanup proof
357
385
 
358
- A behaviour-preserving cleanup PR shows `antelopejs-api-diff <base-ref>` passing. It checks each tracked package with a `tsconfig.json` that publishes something (not private, and declaring `exports`, `main`, `types`, `typings` or `typesVersions`) and lists the others as `API: skipped <directory>, <reason>.`. Each package is analysed and bundled with the pack's own TypeScript 6 (`@typescript/typescript6`), never the `typescript` the repository installs, so a repository on TypeScript 7, which has no compiler API, is proven like any other. The package's config is read as the TypeScript it installs reads it: on TypeScript 5, each option whose default TypeScript 6 changed (`strict`, `alwaysStrict`, `types`, `module`, `moduleResolution`, `esModuleInterop`, `allowSyntheticDefaultImports`, `noUncheckedSideEffectImports`, `target`) keeps its TypeScript 5 default when the config leaves it unset, the options TypeScript 6 deprecated, such as `baseUrl`, still compile, and the output is laid out under the common directory of the sources when no `rootDir` is set. A package that declares `typescript` but cannot resolve it fails with an execution error naming the package and asking for an install, because the pack cannot tell which defaults it builds with; one that declares none is read with TypeScript 6's defaults. Large packages are bundled by several worker processes (up to 8, bounded by cpus and free memory); the output is the same as a single process. It emits declarations without comments, resolves published entries from `exports` (preferring `types`), `main`, `types`/`typings` and `typesVersions`, and bundles each entry's local declaration closure. External packages stay external. The bundles of both revisions are compared as one `declarations.d.ts`: an index of every published entry, then each distinct declaration text once, under one `// In` line per entry that carries it (`// In every entry` when all do). A change shared by many entries is printed once. The first hunk that changes a declaration below its `// In` lines names its entries in the hunk header, and an added or removed entry prints one index line and one `// In` line per declaration it shares. Stable top-level ordering ignores declaration moves between internal files while preserving overload order. Members of object type literals, interfaces and classes are compared in a canonical order, because TypeScript can emit an inferred object type's properties in another order after a refactor; overloads, call and construct signatures, tuple elements, parameters, enum members and union constituents keep their written order. Compiler errors fail the proof.
386
+ A behaviour-preserving cleanup PR shows `antelopejs-api-diff <base-ref>` passing. It checks each tracked package with a `tsconfig.json` that publishes something (not private, and declaring `exports`, `main`, `types`, `typings` or `typesVersions`) and lists the others as `API: skipped <directory>, <reason>.`. Each package is analysed and bundled with the pack's own TypeScript 6, its `typescript` dependency, never a `typescript` of another major the repository installs, so a repository on TypeScript 7, which has no compiler API, is proven like any other. The package's config is read as the TypeScript it installs reads it: on TypeScript 5, each option whose default TypeScript 6 changed (`strict`, `alwaysStrict`, `types`, `module`, `moduleResolution`, `esModuleInterop`, `allowSyntheticDefaultImports`, `noUncheckedSideEffectImports`, `target`) keeps its TypeScript 5 default when the config leaves it unset, the options TypeScript 6 deprecated, such as `baseUrl`, still compile, and the output is laid out under the common directory of the sources when no `rootDir` is set. A package that declares `typescript` but cannot resolve it fails with an execution error naming the package and asking for an install, because the pack cannot tell which defaults it builds with; one that declares none is read with TypeScript 6's defaults. Large packages are bundled by several worker processes (up to 8, bounded by cpus and free memory); the output is the same as a single process. It emits declarations without comments, resolves published entries from `exports` (preferring `types`), `main`, `types`/`typings` and `typesVersions`, and bundles each entry's local declaration closure. External packages stay external. The bundles of both revisions are compared as one `declarations.d.ts`: an index of every published entry, then each distinct declaration text once, under one `// In` line per entry that carries it (`// In every entry` when all do). A change shared by many entries is printed once. The first hunk that changes a declaration below its `// In` lines names its entries in the hunk header, and an added or removed entry prints one index line and one `// In` line per declaration it shares. Stable top-level ordering ignores declaration moves between internal files while preserving overload order. Members of object type literals, interfaces and classes are compared in a canonical order, because TypeScript can emit an inferred object type's properties in another order after a refactor; overloads, call and construct signatures, tuple elements, parameters, enum members and union constituents keep their written order. Compiler errors fail the proof.
359
387
 
360
388
  A comment-only PR shows `antelopejs-comment-proof <base-ref>` passing instead of a verifier. It includes private packages, ignores type diagnostics and compares comment-free JavaScript emit byte for byte. Both commands exclude test sources, fail on added or removed outputs, and print unified diffs for changes.
361
389
 
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { o as packageManager, s as parseManifest } from "../package-DDG3YH7W.mjs";
3
- import { r as installedTypeScriptMajor, t as asInstalledCompilerReads } from "../installed-typescript-6MtIWlE4.mjs";
2
+ import { o as packageManager, s as parseManifest } from "../package-1pH5I0TF.mjs";
3
+ import { t as typescript6_default } from "../typescript6-HdyOMBv3.mjs";
4
+ import { r as installedTypeScriptMajor, t as asInstalledCompilerReads } from "../installed-typescript-CF_FR9DV.mjs";
4
5
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
5
6
  import { c as repositoryRoot, l as resolveRevision } from "../files-C-JJhExM.mjs";
6
7
  import { n as shimInvocation } from "../run-command-BlFRPORx.mjs";
7
- import { a as DIRECTORY_LINK, c as revisionCounts, d as createAddedPolicy, f as describeAllowance, i as stampProof, l as workspaceManifests, m as recordVerdict, o as compareRevisions, p as fillStars, u as allowedByGlob } from "../proof-stamp-BFV7JTZT.mjs";
8
- import { c as unpublishedAt, i as isTestSource, o as outputRoot, r as isExportPath, s as packagesAt, t as emitPackage } from "../typescript-QfxkJYzd.mjs";
8
+ import { a as DIRECTORY_LINK, c as revisionCounts, d as createAddedPolicy, f as describeAllowance, i as stampProof, l as workspaceManifests, m as recordVerdict, o as compareRevisions, p as fillStars, u as allowedByGlob } from "../proof-stamp-Bg4ULLvr.mjs";
9
+ import { c as unpublishedAt, i as isTestSource, o as outputRoot, r as isExportPath, s as packagesAt, t as emitPackage } from "../typescript-B0df00nl.mjs";
9
10
  import { createRequire } from "node:module";
10
11
  import { copyFileSync, cpSync, existsSync, globSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
11
12
  import { basename, dirname, isAbsolute, join, parse, posix, relative, resolve, sep } from "node:path";
12
13
  import { execFileSync, spawnSync } from "node:child_process";
13
- import ts from "@typescript/typescript6";
14
14
  import { availableParallelism, freemem } from "node:os";
15
15
  import { parseArgs } from "node:util";
16
16
  //#region src/guardrails/auto-import-globals.ts
@@ -370,10 +370,10 @@ function describe(compiler, checker, name, exported, source) {
370
370
  /** The auto-import surface of one frontend module: one sorted line per name and meaning that unimport would expose from its scanned files. Exports are read with the module's compiler, so `export *` and inferred types resolve as the frontend workspace types them. */
371
371
  function moduleSurface(worktree, directory) {
372
372
  const moduleRoot = join(worktree, directory);
373
- const files = scannedFiles(moduleRoot, declaredDirectories(ts, join(moduleRoot, BUILD_FILE), posix.join(directory, BUILD_FILE)));
374
- const options = compilerOptions(ts, moduleRoot);
375
- const presets = presetModules(ts, moduleRoot, options);
376
- const plain = ts.createProgram([...files, ...presets.map(({ file }) => file)], options);
373
+ const files = scannedFiles(moduleRoot, declaredDirectories(typescript6_default, join(moduleRoot, BUILD_FILE), posix.join(directory, BUILD_FILE)));
374
+ const options = compilerOptions(typescript6_default, moduleRoot);
375
+ const presets = presetModules(typescript6_default, moduleRoot, options);
376
+ const plain = typescript6_default.createProgram([...files, ...presets.map(({ file }) => file)], options);
377
377
  const scanned = new Map(files.flatMap((file) => {
378
378
  const source = plain.getSourceFile(file);
379
379
  return source === void 0 ? [] : [[source.fileName, source]];
@@ -389,13 +389,13 @@ function moduleSurface(worktree, directory) {
389
389
  specifier: sourceSpecifier(source.fileName)
390
390
  }))];
391
391
  const imports = autoImports(plain.getTypeChecker(), sources);
392
- const program = ts.createProgram(files, options, injectingHost(ts, options, scanned, imports));
392
+ const program = typescript6_default.createProgram(files, options, injectingHost(typescript6_default, options, scanned, imports));
393
393
  const checker = program.getTypeChecker();
394
394
  const lines = /* @__PURE__ */ new Set();
395
395
  for (const file of files) {
396
396
  const source = program.getSourceFile(file);
397
397
  if (source === void 0) continue;
398
- for (const { name, symbol } of exportedNames(checker, source)) for (const line of describe(ts, checker, name, symbol, source)) lines.add(line.split(worktree).join("<root>"));
398
+ for (const { name, symbol } of exportedNames(checker, source)) for (const line of describe(typescript6_default, checker, name, symbol, source)) lines.add(line.split(worktree).join("<root>"));
399
399
  }
400
400
  return [...lines].sort();
401
401
  }
@@ -455,11 +455,11 @@ for (const job of jobs) {
455
455
  });
456
456
  }
457
457
  `;
458
- /** Places a copy of `dts-bundle-generator` beside a `typescript` link to the pack's `@typescript/typescript6`. The generator requires `typescript` by name, and the one it was installed with may be TypeScript 7, which has no compiler API, so this makes it drive the pack's TypeScript 6. Returns a path to require the copy from. */
458
+ /** Places a copy of `dts-bundle-generator` beside a `typescript` link to the pack's own `typescript` 6. The generator requires `typescript` by name, and the one it was installed with may be TypeScript 7, which has no compiler API, so this makes it drive the pack's TypeScript 6. Returns a path to require the copy from. */
459
459
  function installGenerator(scratch) {
460
460
  const require = createRequire(import.meta.url);
461
461
  const source = dirname(require.resolve("dts-bundle-generator/package.json"));
462
- const compilerRoot = dirname(require.resolve("@typescript/typescript6/package.json"));
462
+ const compilerRoot = dirname(require.resolve("typescript/package.json"));
463
463
  const modules = join(scratch, "generator", "node_modules");
464
464
  mkdirSync(modules, { recursive: true });
465
465
  cpSync(source, join(modules, "dts-bundle-generator"), {
@@ -1192,13 +1192,13 @@ function bundlePackage(paths, manifest, policy) {
1192
1192
  for (const [index, { entry }] of entries.entries()) {
1193
1193
  const path = join(output, entry);
1194
1194
  mkdirSync(dirname(path), { recursive: true });
1195
- writeFileSync(path, normalizeBundle(ts, bundles[index]));
1195
+ writeFileSync(path, normalizeBundle(typescript6_default, bundles[index]));
1196
1196
  }
1197
1197
  if (policy !== void 0) for (const { file, subpath } of entries) {
1198
1198
  if (!allowedByGlob(policy, subpath)) continue;
1199
1199
  const emittedFile = join(scratch, file);
1200
1200
  const module = emitted.modules.get(resolve(emittedFile)) ?? emittedFile;
1201
- recordVerdict(policy, ts, {
1201
+ recordVerdict(policy, typescript6_default, {
1202
1202
  directory: paths.name,
1203
1203
  subpath,
1204
1204
  module,
@@ -1254,7 +1254,7 @@ function declarationDiff(root, baseRef, policy) {
1254
1254
  };
1255
1255
  }, {
1256
1256
  policy,
1257
- collate: (output) => collateDeclarations(ts, output),
1257
+ collate: (output) => collateDeclarations(typescript6_default, output),
1258
1258
  annotate: labelHunks
1259
1259
  });
1260
1260
  return {
@@ -2,7 +2,7 @@
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot, l as resolveRevision } from "../files-C-JJhExM.mjs";
4
4
  import { n as lintDiagnostics } from "../oxlint-CIeonWMB.mjs";
5
- import { n as proofDigest, r as proofLines, s as revisionCountRows, t as parseProofStamp } from "../proof-stamp-BFV7JTZT.mjs";
5
+ import { n as proofDigest, r as proofLines, s as revisionCountRows, t as parseProofStamp } from "../proof-stamp-Bg4ULLvr.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { spawnSync } from "node:child_process";
8
8
  import { parseArgs } from "node:util";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot, n as authoredSizes, s as repositoryPath } from "../files-C-JJhExM.mjs";
4
- import { l as worktreeSuppressions, o as revisionSuppressions } from "../suppressions-CxPnh4sC.mjs";
4
+ import { l as worktreeSuppressions, o as revisionSuppressions } from "../suppressions-BvWGA463.mjs";
5
5
  import { t as checkSize } from "../size-CCGLY4Ke.mjs";
6
6
  import { realpathSync } from "node:fs";
7
7
  import { resolve } from "node:path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as runCliAsync } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot } from "../files-C-JJhExM.mjs";
4
- import { r as runChecks, t as CHECKS_SKIP_ENV } from "../checks-CSlWvky1.mjs";
4
+ import { r as runChecks, t as CHECKS_SKIP_ENV } from "../checks-BTFf0Evy.mjs";
5
5
  import { parseArgs } from "node:util";
6
6
  //#region src/bin/checks.ts
7
7
  const SIGNAL_EXIT = /* @__PURE__ */ new Map([
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot } from "../files-C-JJhExM.mjs";
4
- import { c as revisionCounts, i as stampProof, o as compareRevisions } from "../proof-stamp-BFV7JTZT.mjs";
5
- import { a as listsNoFiles, n as extendedConfigs, s as packagesAt, t as emitPackage } from "../typescript-QfxkJYzd.mjs";
4
+ import { c as revisionCounts, i as stampProof, o as compareRevisions } from "../proof-stamp-Bg4ULLvr.mjs";
5
+ import { a as listsNoFiles, n as extendedConfigs, s as packagesAt, t as emitPackage } from "../typescript-B0df00nl.mjs";
6
6
  import { copyFileSync, existsSync, mkdirSync } from "node:fs";
7
7
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
8
8
  //#region src/guardrails/comment-proof.ts
@@ -3,10 +3,10 @@ import { c as parseCeilings, l as readCeilings, t as CEILINGS_FILE } from "../ce
3
3
  import { n as renamedPaths } from "../renames-L2owF5GD.mjs";
4
4
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
5
5
  import { c as repositoryRoot, l as resolveRevision, t as LINT_CONFIG } from "../files-C-JJhExM.mjs";
6
- import { n as ratchet, r as withPreviousTree } from "../ratchet-DLCfeaPY.mjs";
6
+ import { n as ratchet, r as withPreviousTree } from "../ratchet-CPpvIU6Y.mjs";
7
7
  import { n as lintDiagnostics } from "../oxlint-CIeonWMB.mjs";
8
- import { d as stagedAdditions, f as stagedChanges, u as previousLine } from "../suppression-budget-CPDSFg4X.mjs";
9
- import { n as suppressionBase } from "../suppression-base-CYaLZAq7.mjs";
8
+ import { d as stagedAdditions, f as stagedChanges, u as previousLine } from "../suppression-budget-BeJIgSTO.mjs";
9
+ import { n as suppressionBase } from "../suppression-base-CDiFJse2.mjs";
10
10
  import { existsSync } from "node:fs";
11
11
  import { join } from "node:path";
12
12
  import { execFileSync, spawnSync } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { d as toolingRoot } from "../package-DDG3YH7W.mjs";
2
+ import { d as toolingRoot } from "../package-1pH5I0TF.mjs";
3
3
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
4
4
  import { c as repositoryRoot } from "../files-C-JJhExM.mjs";
5
5
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -2,9 +2,9 @@
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { c as repositoryRoot, r as changedFiles } from "../files-C-JJhExM.mjs";
4
4
  import { t as directiveReport } from "../oxlint-CIeonWMB.mjs";
5
- import { c as stagedSuppressions, i as checkSuppressions, l as checkPolicy, s as stagedNames } from "../suppression-budget-CPDSFg4X.mjs";
6
- import { c as suppressionsIn, i as inWorktree } from "../suppressions-CxPnh4sC.mjs";
7
- import { n as suppressionBase, t as raisedCeilings } from "../suppression-base-CYaLZAq7.mjs";
5
+ import { c as stagedSuppressions, i as checkSuppressions, l as checkPolicy, s as stagedNames } from "../suppression-budget-BeJIgSTO.mjs";
6
+ import { c as suppressionsIn, i as inWorktree } from "../suppressions-BvWGA463.mjs";
7
+ import { n as suppressionBase, t as raisedCeilings } from "../suppression-base-CDiFJse2.mjs";
8
8
  import { readdirSync } from "node:fs";
9
9
  import { join, posix } from "node:path";
10
10
  import { execFileSync, spawnSync } from "node:child_process";
package/dist/bin/sync.mjs CHANGED
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as formatCeilings, l as readCeilings, s as isRetired, t as CEILINGS_FILE } from "../ceilings-B7KayYIG.mjs";
3
- import { a as managedPackage, c as repositoryTools, f as toolingVersions, l as serializeManifest, m as usesNuxt, n as bootstrapDependencies, o as packageManager, p as usesCaptures, r as bootstrappedManifest, s as parseManifest, t as addedDevDependencies, u as templatePackage } from "../package-DDG3YH7W.mjs";
3
+ import { a as managedPackage, c as repositoryTools, f as toolingVersions, l as serializeManifest, m as usesNuxt, n as bootstrapDependencies, o as packageManager, p as usesCaptures, r as bootstrappedManifest, s as parseManifest, t as addedDevDependencies, u as templatePackage } from "../package-1pH5I0TF.mjs";
4
4
  import { t as admits } from "../semver-BDxeEcP_.mjs";
5
- import { i as presetConfig, n as SETUP_SCRIPT, r as lefthook, t as PRESET_CONFIGS } from "../templates-HG0fel2S.mjs";
5
+ import { i as presetConfig, n as SETUP_SCRIPT, r as lefthook, t as PRESET_CONFIGS } from "../templates-Df6SlGLA.mjs";
6
6
  import { a as VERIFY_KINDS, c as isVerifyKind, d as linkPointsAt, i as SYNCED_SKILL_FILES, l as skillFolder, o as claudeLink, s as claudeLinkTarget, u as planDocsSkills } from "../shared-BCFFyp3l.mjs";
7
+ import { t as typescript6_default } from "../typescript6-HdyOMBv3.mjs";
7
8
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
8
9
  import { _ as placeholderTestScript, f as CI_CONTEXT, g as ciWorkflow, i as hasChecksWorkflow, l as GITATTRIBUTES_ARTIFACT, m as CI_PATH, n as ciNodeCallers, r as ciRenovateSyncCallers, s as renovateArtifacts, t as MISSING_CHECKS_WORKFLOW } from "../workflow-C-oBwL2H.mjs";
9
10
  import { a as gitFiles, c as repositoryRoot } from "../files-C-JJhExM.mjs";
10
- import { n as workspaceDirectories, r as workspacePatterns, t as planDocs } from "../docs-compat-BAZiPLZt.mjs";
11
+ import { n as workspaceDirectories, r as workspacePatterns, t as planDocs } from "../docs-compat-BmczGA1d.mjs";
11
12
  import { n as shimInvocation } from "../run-command-BlFRPORx.mjs";
12
- import { a as stepsOf, c as installsWithPnpm, d as runPnpm, i as matchingScripts, l as verifyLayers, n as droppedChecksSteps, o as pnpmLockfiles, s as inWorkspace, u as moveDependencyRanges } from "../checks-CSlWvky1.mjs";
13
- import { i as recordedRelease, t as measureBaseline } from "../ratchet-DLCfeaPY.mjs";
14
- import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-CPDSFg4X.mjs";
15
- import { u as typescript } from "../suppressions-CxPnh4sC.mjs";
13
+ import { a as stepsOf, c as installsWithPnpm, d as runPnpm, i as matchingScripts, l as verifyLayers, n as droppedChecksSteps, o as pnpmLockfiles, s as inWorkspace, u as moveDependencyRanges } from "../checks-BTFf0Evy.mjs";
14
+ import { i as recordedRelease, t as measureBaseline } from "../ratchet-CPpvIU6Y.mjs";
15
+ import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-BeJIgSTO.mjs";
16
+ import { u as typescript } from "../suppressions-BvWGA463.mjs";
16
17
  import { t as DEFAULT_SHARED } from "../map-BYkmnvNw.mjs";
17
18
  import { createRequire } from "node:module";
18
19
  import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
19
20
  import { basename, dirname, join, posix, resolve } from "node:path";
20
21
  import { execFileSync, spawnSync } from "node:child_process";
21
22
  import { isAlias, isMap, isNode, isScalar, isSeq, parseDocument, stringify } from "yaml";
22
- import ts from "@typescript/typescript6";
23
23
  import { parseArgs } from "node:util";
24
24
  //#region src/guardrails/docs-typescript.ts
25
25
  const MARKDOWN = /\.(?:md|mdc)$/i;
@@ -602,12 +602,12 @@ function boundaryCheck(): VitePlugin {
602
602
  function formatFreeProgram(text) {
603
603
  const parts = [];
604
604
  const visit = (node) => {
605
- if (ts.isParenthesizedExpression(node) || ts.isParenthesizedTypeNode(node)) return void ts.forEachChild(node, visit);
606
- parts.push(ts.SyntaxKind[node.kind]);
607
- if (ts.isIdentifier(node) || ts.isPrivateIdentifier(node) || ts.isLiteralExpression(node) || ts.isTemplateHead(node) || ts.isTemplateMiddle(node) || ts.isTemplateTail(node)) parts.push(JSON.stringify(node.text));
608
- ts.forEachChild(node, visit);
605
+ if (typescript6_default.isParenthesizedExpression(node) || typescript6_default.isParenthesizedTypeNode(node)) return void typescript6_default.forEachChild(node, visit);
606
+ parts.push(typescript6_default.SyntaxKind[node.kind]);
607
+ if (typescript6_default.isIdentifier(node) || typescript6_default.isPrivateIdentifier(node) || typescript6_default.isLiteralExpression(node) || typescript6_default.isTemplateHead(node) || typescript6_default.isTemplateMiddle(node) || typescript6_default.isTemplateTail(node)) parts.push(JSON.stringify(node.text));
608
+ typescript6_default.forEachChild(node, visit);
609
609
  };
610
- visit(ts.createSourceFile("backend-boundary.ts", text, ts.ScriptTarget.Latest, false, ts.ScriptKind.TS));
610
+ visit(typescript6_default.createSourceFile("backend-boundary.ts", text, typescript6_default.ScriptTarget.Latest, false, typescript6_default.ScriptKind.TS));
611
611
  return parts.join(" ");
612
612
  }
613
613
  /** The sync plan for every tracked backend boundary plugin under `root`: each one is the pack's plugin for the package that holds its layer, in any formatting. */
@@ -766,17 +766,17 @@ function unreadableNotes(files) {
766
766
  }
767
767
  /** The property `name` of a JSON object literal; when the key is repeated the last one wins, as when tsc reads it. */
768
768
  function propertyNamed(object, name) {
769
- if (object === void 0 || !ts.isObjectLiteralExpression(object)) return void 0;
770
- return object.properties.findLast((item) => ts.isPropertyAssignment(item) && (ts.isIdentifier(item.name) || ts.isStringLiteral(item.name)) && item.name.text === name)?.initializer;
769
+ if (object === void 0 || !typescript6_default.isObjectLiteralExpression(object)) return void 0;
770
+ return object.properties.findLast((item) => typescript6_default.isPropertyAssignment(item) && (typescript6_default.isIdentifier(item.name) || typescript6_default.isStringLiteral(item.name)) && item.name.text === name)?.initializer;
771
771
  }
772
772
  /** The root value of a JSON text, comments and trailing commas allowed. */
773
773
  function jsonRoot(file, text) {
774
- return ts.parseJsonText(file, text).statements[0]?.expression;
774
+ return typescript6_default.parseJsonText(file, text).statements[0]?.expression;
775
775
  }
776
776
  /** The strings of a JSON string or array of strings. */
777
777
  function stringValues(value) {
778
778
  if (value === void 0) return [];
779
- return (ts.isArrayLiteralExpression(value) ? value.elements : [value]).filter(ts.isStringLiteral).map((item) => item.text);
779
+ return (typescript6_default.isArrayLiteralExpression(value) ? value.elements : [value]).filter(typescript6_default.isStringLiteral).map((item) => item.text);
780
780
  }
781
781
  //#endregion
782
782
  //#region src/guardrails/release-hooks.ts
@@ -787,8 +787,8 @@ function hooksIn(files, file, path) {
787
787
  if (text === void 0) return [];
788
788
  let node = jsonRoot(file, text);
789
789
  for (const key of path) node = propertyNamed(node, key);
790
- if (node === void 0 || !ts.isObjectLiteralExpression(node)) return [];
791
- return node.properties.flatMap((property) => ts.isPropertyAssignment(property) && (ts.isStringLiteral(property.name) || ts.isIdentifier(property.name)) && BEFORE_PUBLISH.test(property.name.text) && propertyNamed(node, property.name.text) === property.initializer ? stringValues(property.initializer) : []);
790
+ if (node === void 0 || !typescript6_default.isObjectLiteralExpression(node)) return [];
791
+ return node.properties.flatMap((property) => typescript6_default.isPropertyAssignment(property) && (typescript6_default.isStringLiteral(property.name) || typescript6_default.isIdentifier(property.name)) && BEFORE_PUBLISH.test(property.name.text) && propertyNamed(node, property.name.text) === property.initializer ? stringValues(property.initializer) : []);
792
792
  }
793
793
  /** The commands of the release-it hooks that run before publishing, from `.release-it.json` and from the `release-it` key of `package.json`. Other config formats are not read. */
794
794
  function releaseHooks(files) {
@@ -805,7 +805,18 @@ function normalizeProgram(project) {
805
805
  function optionName(word) {
806
806
  return word.startsWith("-") ? word.replace(/^--?/u, "").toLowerCase() : void 0;
807
807
  }
808
- function tscRun(args) {
808
+ /** The options `tsc -b` accepts that take a string as the next word, which would otherwise read as a project; TypeScript 7 adds `builders`, `checkers` and `pprofdir`. */
809
+ const VALUED = /* @__PURE__ */ new Set([
810
+ "builders",
811
+ "checkers",
812
+ "pprofdir",
813
+ "locale",
814
+ "generatetrace",
815
+ "generatecpuprofile"
816
+ ]);
817
+ /** The explicit values a boolean option such as `--pretty false` takes, which are not projects. */
818
+ const BOOLEAN_VALUES = /* @__PURE__ */ new Set(["true", "false"]);
819
+ function tscRun(command, args) {
809
820
  const build = ["b", "build"].includes(optionName(args[0] ?? "") ?? "");
810
821
  const positional = [];
811
822
  let project;
@@ -813,11 +824,13 @@ function tscRun(args) {
813
824
  for (let index = build ? 1 : 0; index < args.length; index++) {
814
825
  const option = optionName(args[index]);
815
826
  if (option === "p" || option === "project") project = args[++index];
827
+ else if (option !== void 0 && VALUED.has(option)) index++;
816
828
  else if (option === "skiplibcheck") skipsLibCheck = args[index + 1] !== "false";
817
- else if (option === void 0) positional.push(args[index]);
829
+ else if (option === void 0 && !BOOLEAN_VALUES.has(args[index])) positional.push(args[index]);
818
830
  }
819
831
  const named = build ? positional : project === void 0 ? [] : [project];
820
832
  return {
833
+ command,
821
834
  programs: (named.length === 0 ? ["."] : named).map(normalizeProgram),
822
835
  build,
823
836
  skipsLibCheck
@@ -844,7 +857,7 @@ function referencedFile(files, from, path) {
844
857
  }
845
858
  function referencePaths(object) {
846
859
  const references = propertyNamed(object, "references");
847
- if (references === void 0 || !ts.isArrayLiteralExpression(references)) return [];
860
+ if (references === void 0 || !typescript6_default.isArrayLiteralExpression(references)) return [];
848
861
  return references.elements.flatMap((element) => stringValues(propertyNamed(element, "path")));
849
862
  }
850
863
  function readFacts(files, file) {
@@ -854,7 +867,7 @@ function readFacts(files, file) {
854
867
  const flag = propertyNamed(propertyNamed(object, "compilerOptions"), "skipLibCheck");
855
868
  const resolve = (found) => found ? [found] : [];
856
869
  return {
857
- skipLibCheck: flag === void 0 ? void 0 : flag.kind === ts.SyntaxKind.TrueKeyword,
870
+ skipLibCheck: flag === void 0 ? void 0 : flag.kind === typescript6_default.SyntaxKind.TrueKeyword,
858
871
  parents: stringValues(propertyNamed(object, "extends")).flatMap((entry) => resolve(extendedFile(files, file, entry))),
859
872
  references: referencePaths(object).flatMap((path) => resolve(referencedFile(files, file, path)))
860
873
  };
@@ -939,18 +952,18 @@ function reach(scripts, name, extra = []) {
939
952
  return reached;
940
953
  }
941
954
  function ownRuns(script) {
942
- return stepsOf(script).flatMap((step) => step.kind === "tsc" ? [tscRun(step.args)] : []);
955
+ return stepsOf(script).flatMap((step) => step.kind === "tsc" ? [tscRun(step.command, step.args)] : []);
943
956
  }
944
957
  function runsOf(scripts, name) {
945
958
  return [...reach(scripts, name).local].flatMap((script) => ownRuns(scripts.get(script) ?? ""));
946
959
  }
947
960
  function skipCoverageErrors(scripts) {
948
- const skipped = [...new Set(runsOf(scripts, "build").filter((run) => run.skipsLibCheck).flatMap((run) => run.programs))];
961
+ const skipped = new Map(runsOf(scripts, "build").filter((run) => run.skipsLibCheck).flatMap((run) => run.programs.map((program) => [program, run.command])));
949
962
  const typecheck = runsOf(scripts, "typecheck");
950
963
  const covered = typecheck.filter((run) => !run.skipsLibCheck).flatMap((run) => run.programs);
951
- return skipped.filter((program) => !covered.includes(program)).map((program) => {
952
- const lead = `package.json: script "build" passes --skipLibCheck to tsc for ${program}, but`;
953
- const fix = `Make "typecheck" run \`tsc --noEmit${program === "tsconfig.json" ? "" : ` -p ${program}`}\` without --skipLibCheck, or drop --skipLibCheck from "build".`;
964
+ return [...skipped].filter(([program]) => !covered.includes(program)).map(([program, command]) => {
965
+ const lead = `package.json: script "build" passes --skipLibCheck to ${command} for ${program}, but`;
966
+ const fix = `Make "typecheck" run \`${command} --noEmit${program === "tsconfig.json" ? "" : ` -p ${program}`}\` without --skipLibCheck, or drop --skipLibCheck from "build".`;
954
967
  if (!scripts.has("typecheck")) return `${lead} there is no "typecheck" script. ${fix}`;
955
968
  if (typecheck.some((run) => run.programs.includes(program))) return `${lead} script "typecheck" also passes --skipLibCheck for it. ${fix}`;
956
969
  return `${lead} script "typecheck" runs no full tsc over it. ${fix}`;
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { dirname, join } from "node:path";
3
+ import { spawnSync } from "node:child_process";
4
+ import { fileURLToPath } from "node:url";
5
+ //#region src/bin/tsc.ts
6
+ const platformPackage = `@typescript/typescript-${process.platform}-${process.arch}`;
7
+ let manifest;
8
+ try {
9
+ manifest = fileURLToPath(import.meta.resolve(`${platformPackage}/package.json`));
10
+ } catch {
11
+ process.stderr.write(`antelopejs-tsc: ${platformPackage}, TypeScript 7 for this platform, is not installed. Install the pack's optional dependencies, or run tsc.\n`);
12
+ process.exit(1);
13
+ }
14
+ const windows = process.platform === "win32";
15
+ const path$1 = join(dirname(manifest), "lib", windows ? "tsc.exe" : "tsc");
16
+ const exe = windows && path$1.length >= 248 ? `\\\\?\\${path$1}` : path$1;
17
+ const args = process.argv.slice(2);
18
+ if (!windows && process.execve !== void 0) process.execve(exe, [exe, ...args]);
19
+ const result = spawnSync(exe, args, { stdio: "inherit" });
20
+ if (result.error) throw result.error;
21
+ if (result.signal) process.kill(process.pid, result.signal);
22
+ process.exitCode = result.status ?? 1;
23
+ //#endregion
24
+ export {};