Releases: collegevine/purescript-elmish
Releases · collegevine/purescript-elmish
v0.10.0
v0.9.1
v0.5.8
Changes
- Breaking: Removed the whole
Elmish.JsCallback
module. All use sites should convert toEffectFnN
. #53 - React props for FFI-imported components are now allowed to have a
ref
prop. This was a silly restriction. #51 - Generated React component classes now have more descriptive names. This is to help with debugging and testing. #52
- Breaking:
Aff
is now the default running monad.ComponentDef
renamed toComponentDef'
,Transition
renamed toTransition'
. AddedComponentDef
as type alias forComponentDef' Aff
,Transition
as type alias forTransition' Aff
. #48 - Added
CanReceiveFromJavaScript (Object a)
instance for anya
and a specializedCanReceiveFromJavaScript (Array Foreign)
instance as an optimization. #47 - Breaking:
readForeign'
- a new function that's likereadForeign
, but returns error information on failure. The breaking part is thatCanReceiveFromJavaScript
class had to be modified to afford that. #45 - Breaking:
Dispatch
vastly simplified, it's now basically just anmsg -> Effect Unit
function. Consequently, many functions that were supporting the complexity have been removed, includingissueMsg
,issueError
,cmapMaybe
,dispatchMsgFn
,ignoreMsg
. Operator aliases<|
and<?|
added forhandle
andhandleMaybe
respectively. #33
Bug fixes
- Fixed a bug related to maintaining state in
wrapWithLocalState
. #50 - Fixed a bug with
CanReceiveFromJavaScript (Array Foreign)
instance: it had a superfluous constraint. readForeign
for records no longer requires nullable fields to be present in the record. #45
Internal improvements
v0.3.2
v0.3.0
0.3.0
- migrated to Spago
0.2.2
Changed
- we now make sure that commands (aka effects) yielded by an
update
call
actually run asynchronously
0.2.1
Added
defaultMain
- a convenience entry point for the simplest use case - a single
bundle embedded in a single HTML file.
v0.2.0
Changed
- Breaking: The signature of
Transition
now allows effects to produce
zero, one, or multiple messages, instead of exactly one as before. This is
achieved by making each effect take a message-dispatching callback rather than
monadically returning a message as before. - Breaking:
fork
now requiresMonadEffect
.
Added
- Convenience smart constructor
transition
, which has the same signature as
theTransition
data constructor used to have before this change. forks
- likefork
(see v0.1.4), but allows the effect to produce zero,
one, or multiple messages by way of taking a callback rather than returning a
message.forkVoid
- likefork
, but the effect does not produce any messages.forkMaybe
- likefork
, but the effect may or may not produce a message.
Removed
- Breaking: removed the
Elmish.Test
module. Now that the type of
Transition
no longer pretends to be pure (i.e. contains mention of
Effect
), the testing support can no longer work in the pureStateT
, and
will have to be rewritten on top ofEffect
, with a mutable cell to
accumulate messages. However, since we're not actually using testing support
(yet?), I have decided to deprioritize this.
v0.1.6
Added
- Support for SSR (server-side rendering) via
Elmish.Boot.boot
. This breaks
pre-existingElmish.Boot
users (see "Removed").
Removed
- Breaking: The contents of
Elmish.Boot
-BootResult
,boot
, and
boot'
. Replaced and subsumed by server-side rendering support (see "Added").
Changed
- Breaking:
Elmish.React.reactMount
renamed torender
to match React's
naming. wrapWithLocalState
will now report errors to the console instead of
swallowing them. This could be used by catch-all error reporters such as
Rollbar or Airbrake.- Breaking:
mkJsCallback
remaned tojsCallback
and lost itsonError
parameter. It will now report errors to the console, same as
wrapWithLocalState
. The previous version with an explicitonError
parameter is now available asjsCallback'
- React API is now FFIed via
EffectFnX
instead ofFnX
.
v0.1.5
Changed
- Breaking:
wrapWithLocalState
no longer takes an extra
DispatchMsgFn Unit
parameter (used only for error reporting) - Breaking: All places that previously took a
DispatchMsgFn Unit
sink for
the purpose of reporting errors only, now take aDispatchMsgFn Void
instead
to better reflect the fact that they're not going to issue messages through
that sink - Upgraded to PureScript 0.13.8
Added
wrapWithLocalState'
- a more elaborate version ofwrapWithLocalState
that
takes the extraDispatchMsgFn Void
parameter