paf31 / purescript-event

The Event type, extracted from purescript-behaviors
BSD 3-Clause "New" or "Revised" License
23 stars 18 forks source link

Update library for PureScript 0.14 #7

Open thomashoneyman opened 3 years ago

thomashoneyman commented 3 years ago

πŸ‘‹ Hi Phil!

This PR updates event for compatibility with PureScript 0.14. I've opened this pull request instead of waiting for the official release because Halogen depends on this library, and I think users would really appreciate being able to use Halogen right off the bat when PureScript 0.14 is released. With this library ready to go we can ensure that Halogen is in the initial package set.

Specifically, this PR does two things:

First, I've updated library dependencies to the relevant master branches (other than filterable, which is awaiting https://github.com/LiamGoodacre/purescript-filterable/pull/20).

Second, I've replaced Data.Either.fromLeft and Data.Either.fromRight with manual implementations (either identity (\_ -> unsafeCrashWith "Expected Left"), for example) because these functions are now total upstream. For context, please see:

I also took the extra step of updating the repository URL in the Bower file so that it matches the PureScript registry. The URL in your local Bower file must match the URL in the registry in order for you to publish new versions of the library to Pursuit.


When PureScript 0.14 is released, then you'll still have to make a new release of this library; luckily, if this PR is already merged then you'll only need to take these steps:

  1. Update your Bower file to point to the new major versions of your dependencies, instead of master
  2. Commit and tag a new major version of this library
  3. (Optionally) publish the new documentation to Pursuit with pulp publish

I can circle back when we've released new versions of your dependencies. Once you've made a release of your own, then I can update the relevant downstream libraries and make sure that event is up to date in the package set. Please let me know if I can be helpful with any other step!

LiamGoodacre commented 3 years ago

(https://github.com/LiamGoodacre/purescript-filterable/pull/20 has been merged, so you'll want to update the dependency version)