Repository navigation
feat: production readiness fixes and test coverage - #29
Merged
Merged
Conversation
- Map defects without double wrapping: EffectQueryDefect exposes `defect`, `interrupted` and the original `defectCause`; both error classes get a real `name`, a short `message` and the standard `cause` - Turn Effect functions that throw synchronously into defects - Keep getters on options objects live instead of reading them once - Rebuild a Layer whose build died so retries can recover; expose `runtime` and `dispose()` on every adapter - Only log defects, not typed failures or interruptions - React QueryErrorBoundary decides ownership once per caught error - Boundaries hash queries with their own queryKeyHashFn (BigInt keys) - Solid QueryErrorBoundary handles errors restored during SSR hydration - Add a node `core` test project, rewrite the React query and infinite query tests, add boundary, hydration, getter and runtime-handle type tests - Add CI workflow and run checks before publishing; sideEffects: false Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the issues found in a pre-release review of
2.0.0-alpha.1and adds the test coverage that was missing. Breaking changes are intentional, since the package is not public yet.Fixes
QueryErrorBoundarydecides once, when an error is caught, whether it belongs to the boundary. Previously it re-checked on every render. If the failed query was removed, garbage-collected or refetched while the fallback was showing, the next re-render escalated the error to the parent boundary.EffectQueryDefect(breaking):defectis the original value,defectCauseis the originalCause, and the newinterruptedproperty istruewhen the Effect was cancelled.Cause.name, a shortmessagewith no stack traces, and the standardError.cause.EffectQueryDefect.eq.runtimeandeq.dispose()on every adapter. Afterdispose(), queries fail; the runtime is not quietly rebuilt.queryKeyHashFn, so keys that need a custom hash (for exampleBigInt) no longer crash the boundary.EffectQueryDefectwrapping the server error.Tests (174 → 240)
coreproject (Node): error mapping,match/OrElse, cancellation, span names, getters, layer rebuild, dispose and logging.runtime/disposeandcreateEffectQueryFromManagedRuntimein all four frameworks.CI and packaging
ci.ymlruns lint, build, typecheck, the Playwright browser tests, publint and arethetypeswrong on PRs and pushes tomain.release.ymlnow runs lint, typecheck and tests before publishing.package.jsongets"sideEffects": false.Test plan
pnpm turbo lint typecheck build test --force: all 11 tasks pass, including the four example apps🤖 Generated with Claude Code