Skip to content

Releases: collegevine/purescript-elmish

v0.10.0

19 Jul 16:23
Compare
Choose a tag to compare
  • type parameters of readForeign and readForeign' can now be specified via
    visible type application, a new feature in PureScript 0.15.10 #74

v0.9.1

30 Dec 02:45
Compare
Choose a tag to compare

v0.5.8

03 Mar 18:11
Compare
Choose a tag to compare

Changes

  • Breaking: Removed the whole Elmish.JsCallback module. All use sites should convert to EffectFnN. #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 to ComponentDef', Transition renamed to Transition'. Added ComponentDef as type alias for ComponentDef' Aff, Transition as type alias for Transition' Aff. #48
  • Added CanReceiveFromJavaScript (Object a) instance for any a and a specialized CanReceiveFromJavaScript (Array Foreign) instance as an optimization. #47
  • Breaking: readForeign' - a new function that's like readForeign, but returns error information on failure. The breaking part is that CanReceiveFromJavaScript class had to be modified to afford that. #45
  • Breaking: Dispatch vastly simplified, it's now basically just an msg -> Effect Unit function. Consequently, many functions that were supporting the complexity have been removed, including issueMsg, issueError, cmapMaybe, dispatchMsgFn, ignoreMsg. Operator aliases <| and <?| added for handle and handleMaybe 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

  • Integration tests powered by enzyme #49
  • Migrated to PureScript 0.14 #31

v0.3.2

27 Jan 21:11
Compare
Choose a tag to compare

0.3.2

  • Transition is now a Monad

0.3.1

  • migrated to GitHub Actions

v0.3.0

23 Dec 21:07
Compare
Choose a tag to compare

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

30 Jul 15:28
Compare
Choose a tag to compare

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 requires MonadEffect.

Added

  • Convenience smart constructor transition, which has the same signature as
    the Transition data constructor used to have before this change.
  • forks - like fork (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 - like fork, but the effect does not produce any messages.
  • forkMaybe - like fork, 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 pure StateT, and
    will have to be rewritten on top of Effect, 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

08 Jun 15:17
Compare
Choose a tag to compare

Added

  • Support for SSR (server-side rendering) via Elmish.Boot.boot. This breaks
    pre-existing Elmish.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 to render 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 to jsCallback and lost its onError
    parameter. It will now report errors to the console, same as
    wrapWithLocalState. The previous version with an explicit onError
    parameter is now available as jsCallback'
  • React API is now FFIed via EffectFnX instead of FnX.

v0.1.5

08 Jun 15:17
Compare
Choose a tag to compare

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 a DispatchMsgFn 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 of wrapWithLocalState that
    takes the extra DispatchMsgFn Void parameter

v0.1.4

08 Jun 15:19
Compare
Choose a tag to compare

Added

  • Bind instance for Transition, enabling do-notation
  • fork - a convenience wrapper function for constructing effectful state
    updates in imperative-ish style
  • Reexports lmap and rmap from BiFunctor

v0.1.3

08 Jun 15:19
Compare
Choose a tag to compare

Added

  • Convenience reexports of bimap, (>$<), and (>#<)