Published packages that build: std's declarations type-check, strict-lib's export points at the file #145

Merged
sionzee merged 1 commit from fix/release-package-build into main 2026-11-23 20:52:40 +01:00
Owner

verify-packages found two problems while cutting 0.5.0. Both were added after 0.4.0, so no released version has them, and both would have failed the release job.

  • std's .d.ts failed without skipLibCheck. The promise checks from #121 (C extends PromiseCheck = CheckResult<T, E>) have a default that fails its constraint on purpose, under a // @ts-expect-error (TS2344). tsc drops that comment when it writes the declarations. That left ten TS2344 errors in result.d.ts, json.d.ts and testing.d.ts, and building safe-ts-vue against std failed. build-packages now adds the comment back above each of those lines, and the build fails if the count differs from the sources'. I tried a default that satisfies the constraint instead, but then a generic Result<T, E> argument no longer compiles.
  • ./strict-lib pointed at a missing file. It is a hand-written declaration file at the package root (#108). The exports rewrite turned it into ./strict-lib.d.d.ts. Exports outside src/ now ship as they are.

No docs change: this only changes the build script. I'm not adding a CHANGELOG entry, since neither problem was ever published.

Test: npm run build && node scripts/verify-packages.mjs: all package checks passed (the published declarations go through tsc, and the Vite, Node loader, Bun, oxlint, CLI/LSP and skill checks run).

🤖 Generated with Claude Code

`verify-packages` found two problems while cutting 0.5.0. Both were added after 0.4.0, so no released version has them, and both would have failed the release job. - **std's `.d.ts` failed without `skipLibCheck`.** The promise checks from #121 (`C extends PromiseCheck = CheckResult<T, E>`) have a default that fails its constraint on purpose, under a `// @ts-expect-error` (TS2344). tsc drops that comment when it writes the declarations. That left ten TS2344 errors in `result.d.ts`, `json.d.ts` and `testing.d.ts`, and building safe-ts-vue against std failed. `build-packages` now adds the comment back above each of those lines, and the build fails if the count differs from the sources'. I tried a default that satisfies the constraint instead, but then a generic `Result<T, E>` argument no longer compiles. - **`./strict-lib` pointed at a missing file.** It is a hand-written declaration file at the package root (#108). The exports rewrite turned it into `./strict-lib.d.d.ts`. Exports outside `src/` now ship as they are. No docs change: this only changes the build script. I'm not adding a CHANGELOG entry, since neither problem was ever published. Test: `npm run build && node scripts/verify-packages.mjs`: all package checks passed (the published declarations go through tsc, and the Vite, Node loader, Bun, oxlint, CLI/LSP and skill checks run). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Published packages that build: std's declarations type-check, strict-lib's export points at the file
Some checks failed
Tests / test (pull_request) Failing after 2s
Benchmarks / bench (pull_request) Has been cancelled
7d35b12581
Two holes `verify-packages` found while cutting 0.5.0, both new since 0.4.0:

- std's promise checks (#121) keep a default that fails its constraint under a
  `// @ts-expect-error` (TS2344). tsc drops the comment from the `.d.ts` it writes, so a
  consumer without `skipLibCheck` (and the build of safe-ts-vue against std) got ten TS2344.
  build-packages puts the comment back above each and fails when the count differs from the
  sources'.
- The `./strict-lib` export (#108) is a declaration file at the package root; the exports
  rewrite made it `./strict-lib.d.d.ts`. Exports outside src now ship as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
sionzee deleted branch fix/release-package-build 2026-11-23 20:52:40 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Evobug/Safe-Ts!145
No description provided.