Changed
catchfollows only anawait:await f(x) catch (e) => altmakes a matching rejection the answer. Acatchafter anything else is the new compile errorCATCH_NOT_ON_AWAIT(R-f-4). Show a failed value with anerroredregion where it is read; in a handler or action, read it insidetry { … } catch (e) { … }; write validation as a value (""or a message), not a thrown class.
Fixed
affectson a keyed or structured source that takes a guess threwINVALID_AFFECTS_TARGETin a dev build, so the action never reached itsawait, and did nothing in a production build, sopending?stayed false (#50, S-affects-keyed).- A keyed source that takes a guess (
source rows key id = q.rows) merges each answer by key instead of replacing every row, so a row's readers re-run only when its own leaves change (#51). - The guide's action example (
guide/async.md§3) lost an error thrown before the firstawait: theonFlushclear ran after the catch. The catch now writes the error throughonFlushas well (#52). - A
catchexpression read with no observer (a componentfncalled from a handler or an action) built a fresh error boundary, which had no value while arefreshwas out, so the click threwNotReadyErrorand was lost. It is now a snapshot: the committed value, or the alternative on a matching failure (R-8, S-catch-snapshot).
New
ARGUMENT_COUNT(AC-1f): a call of an action declared in the module with another number of arguments than its parameters is refused.propsin a component declared without props (component C()) isUNBOUND(RG-4b); it readundefined.guide/async.md: "One store over the server"; theGUESS_WHILE_LOADINGadvice says what holds when a selection changes while a guess is out (05 DV-22).
New
- Spread attributes in markup,
<button {...rest}>and<Inner {...rest} />, lowered to Solid's spread andmerge: later attributes override, and each field keeps updating (07 §4, S-surface-5).
@reactivescript/compiler, @reactivescript/runtime, @reactivescript/language-server and the editor extension,
together.
Breaking
UNGUARDED_SNAPSHOT(R-8) is stricter: anerroredregion ordisabledcovers a failure only when it reads the value. A region whose content readsxonly underpending? xnever shows its fallback, so it no longer counts (#58).
New
- Solid libraries (MO-10): declare a primitive once in a
.d.rx(export pure fn createToggle(v: boolean): [ref boolean, (v: boolean) => void]) and use it like .rx: it is called once,refarguments go in as accessors, readers are read without a call, and setters are io. A package's.d.rxsits beside the file its import resolves to.guide/libraries.md(#57). - The guide (shipped in
@reactivescript/compiler) places data by its lifetime: what a visit, a write or the screen needs, with a module only for data whose writes outlive their page (#58, #59).
Fixed
refreshof a keyed equation re-asks it. It used to re-ask nothing in compiled code (#58).
@reactivescript/compiler, @reactivescript/runtime, @reactivescript/language-server and the editor extension,
together.
Breaking
optimisticis nowguess(guess todos := …), and errors clear withonFlush(#47).optimisticis no longer a keyword.- A new check,
GUESS_WHILE_LOADING(AC-3a): a guess written before its value has been shown is an error (#53).
New
rx-tsc, in@reactivescript/language-server: TypeScript'stscwith.rxfiles in the program, for CI (#41).else ifin markup:{if a { … } else if b { … } else { … }}.- A guess over an equation, as Solid's
createOptimistic(fn)(#48). - Destructuring (RG-4b): live in declarations, a snapshot in
let, with rest (#49). - Parse errors are coded and name the JS or React habit they come from; every code has a page in
guide/diagnostics.md, linked from Vite,rx-tscand the editor (#42).
Fixed
- A relative JS import (
import pure { f } from "./util.js") compiles to an ES import. It used to fail as "not in the scenario prelude", so a package.json#importsalias was needed../apiis still the app's injected API.