Automatic mode: leave SAFE-TS's own packages alone #58

Merged
sionzee merged 1 commit from evobug/auto-skip-safe-ts-packages into main 2026-11-16 21:27:56 +01:00
Owner

Found by the task behind #57: node scripts/verify-packages.mjs fails on main at its Vite step.

safe-ts(unhandled-failure): `describe` can throw, but the failure is not handled

describe() in the test app calls std's match. Automatic mode (#52) analyzes every package an import resolves to in node_modules. Installed from npm, which is how every real project gets it, @evobug_com/safe-ts-std was analyzed like any library. Its match throws a bug guard (unreachable) for a variant the types rule out, so every match(...) call was reported and a check: "error" build failed. This repo's own tests never saw it, because std is a workspace here and counts as project code.

Fix: automatic mode skips @evobug_com/safe-ts-* packages. They're written to SAFE-TS's rules, so their failures are Results.

Test: the auto fixture gets a stand-in package in its node_modules whose match throws. I checked it both ways: under a plain package name, match() is reported as unhandled-failure (found in its code: argument check); under the @evobug_com/safe-ts- prefix it isn't.

Docs: the libraries guide's "Which packages" paragraph, and the CHANGELOG under Fixed.

Verification:

  • verify-packages: all package checks pass, including the Vite build.
  • nextest: 193 passed.
  • std tests: 256 passed.
  • npm run build, typecheck, typecheck:emit and docs-typecheck pass (367 docs examples compile).
  • npm run test:docs passes.

🤖 Generated with Claude Code

Found by the task behind #57: `node scripts/verify-packages.mjs` fails on main at its Vite step. ``` safe-ts(unhandled-failure): `describe` can throw, but the failure is not handled ``` `describe()` in the test app calls std's `match`. Automatic mode (#52) analyzes every package an import resolves to in `node_modules`. Installed from npm, which is how every real project gets it, `@evobug_com/safe-ts-std` was analyzed like any library. Its `match` throws a bug guard (`unreachable`) for a variant the types rule out, so every `match(...)` call was reported and a `check: "error"` build failed. This repo's own tests never saw it, because std is a workspace here and counts as project code. **Fix:** automatic mode skips `@evobug_com/safe-ts-*` packages. They're written to SAFE-TS's rules, so their failures are Results. **Test:** the `auto` fixture gets a stand-in package in its `node_modules` whose `match` throws. I checked it both ways: under a plain package name, `match()` is reported as `unhandled-failure` (found in its code: argument check); under the `@evobug_com/safe-ts-` prefix it isn't. **Docs:** the libraries guide's "Which packages" paragraph, and the CHANGELOG under Fixed. **Verification:** - `verify-packages`: all package checks pass, including the Vite build. - nextest: 193 passed. - std tests: 256 passed. - `npm run build`, typecheck, typecheck:emit and docs-typecheck pass (367 docs examples compile). - `npm run test:docs` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Automatic mode: leave SAFE-TS's own packages alone
All checks were successful
Benchmarks / bench (pull_request) Successful in 2m13s
8ea6cd911d
Installed from npm, @evobug_com/safe-ts-std was analyzed like any library:
std's `match` throws a bug guard for a variant the types rule out, so every
`match(...)` call was reported as unhandled-failure, and the Vite build in
scripts/verify-packages.mjs (check: "error") failed. This repo never saw it:
std is a workspace here, so project code.

`@evobug_com/safe-ts-*` packages are skipped by automatic mode now. A fixture
with a stand-in package checks it (reported under another name, not under the
prefix).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
sionzee deleted branch evobug/auto-skip-safe-ts-packages 2026-11-16 21:27:56 +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!58
No description provided.