👷 Type-check the TS floor in CI
Add a `compat` job that type-checks the whole suite and a consumer fixture against the minimum supported TypeScript (5.9), reusing the `dist/` artifact `build` produced and gating `publish`. The compiler is resolved by npx, so it never enters `devDependencies` or the local `check`/`verify` loop. The fixture imports the package by name, resolving the emitted declarations through the `exports` map; `expectTypeOf` / `.not.toBeAny()` make it reject an `any`-typed declaration, which a bare compile would accept. Correct the README consumer floor from >= 5.0 to >= 5.9 (set by `type-fest`) and drop the `node10` resolution claim, which the exports-only entry never satisfied.
This commit is contained in:
1 parent
45df45df4b
commit
75807c4bd8
10 files changed
+218
-8
No files matched your search
@@ -54,9 +54,14 @@ npm install tiny-pattern-ts
|
||||
## Requirements
|
||||
|
||||
- **Node.js >= 26** (`engines` field; pinned via `.node-version`).
|
||||
- **TypeScript >= 5.0** to consume the published declarations. The emitted `.d.ts`
|
||||
use `const` type parameters (TS 5.0) and keep their relative `.ts` specifiers;
|
||||
both resolve on TS >= 5.0 in `node10` / `node16` / `nodenext` / `bundler`.
|
||||
- **TypeScript >= 5.9** to consume the published declarations. The floor is set
|
||||
by the `type-fest` types the declarations use and is checked in CI against a
|
||||
consumer fixture; see [`compat/`](./compat) and
|
||||
[development/ci.md § TypeScript compatibility](./development/ci.md#typescript-compatibility).
|
||||
The emitted `.d.ts` keep their relative `.ts` specifiers, which resolve under
|
||||
`node16` / `nodenext` / `bundler`. The package exposes only an `exports` map
|
||||
(no `main` / top-level `types`), so the legacy `node10` resolver does not
|
||||
apply.
|
||||
- The package is **ESM-only** (no CommonJS shim).
|
||||
|
||||
## Examples
|
||||
|
||||
Reference in new issue
Block a user