Skip to content

v0.19.0

Compare
Choose a tag to compare
@mpscholten mpscholten released this 04 May 17:06
· 1269 commits to master since this release

IHP v0.19.0 is out now

A new IHP release, containing bug fixes and productivity improvements to existing features πŸ› οΈ

IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix. Blazing fast, secure, easy to refactor and the best developer experience with everything you need - from prototype to production.

Major Changes

  • πŸ’» Apple M1 Support:
    This release finally adds support for Apple M1 devices. So we all can get new macbooks now πŸŽ‰

  • πŸ”„ Major DataSync Improvements:
    We've implemented a lot of improvements to IHP DataSync:

    • Limits and Offsets
    • Transactons using withTransaction:
      import { withTransaction } from 'ihp-datasync';
      
      await withTransaction(async transaction => {
          const team = await transaction.createRecord('teams', { title: 'New Team' });
          
          const project = await transaction.createRecord('projects', {
              title: 'Project 1',
              teamId: team.id
          });
      
          return [ team, project ];
      })
    • Batch Inserts, Batch Deletes, Batch Creates
      const todoA = { title: 'Finish Guide', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
      const todoB = { title: 'Learn Haskell', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
      
      const todos = await createRecord('todos', [ todoA, todoB ]);
    • Distinct on
    • Optimistic Updates
    • Full Text Search
    • Performance Improvements

    πŸš€ We've also launched Thin Backend, which is IHP DataSync as a Service If you're into Frontend Development, give it a try!

  • πŸ•ΆοΈ Dark Mode:
    We've redesigned the dev tools and finally added Dark Mode to IHP:
    image
    There's also a couple of nice improvements in the UI in general, e.g. you can now add columns such as created_at or updated_at with a single click:

    image

    In the Data Editor you can now hover over IDs to show the referenced database record in a card:

    image
  • 🎨 Redesigned Migration Workflow:
    Migrations can now be managed much better from the dev tools. E.g. you can see all migrations, see what has been run already and also manually run migrations here that haven't been executed yet:
    image

  • πŸ—³οΈ Filebase Integration
    You can now use Filebase as an alternative to S3 for storing files with IHP Storage:

    module Config where
    
    import IHP.Prelude
    import IHP.Environment
    import IHP.FrameworkConfig
    import IHP.FileStorage.Config
    
    config :: ConfigBuilder
    config = do
        option Development
        option (AppHostname "localhost")
    
        initFilebaseStorage "my-bucket-name"

    Learn more in the Docs.

  • πŸ”¨ Custom Middlewares:
    IHP provides an "escape-hatch" from the framework with the CustomMiddleware option.
    This can be used to run any WAI middleware after IHP's middleware stack, allowing for possibilities
    such as embedding a Servant or Yesod app into an IHP app, adding GZIP compression, or any other
    number of possibilities. See wai-extra for examples
    of WAI middleware that could be added.

    The following example sets up a custom middleware that infers the real IP using X-Forwarded-For
    and adds a custom header for every request.

    module Config where
    import Network.Wai.Middleware.AddHeaders (addHeaders)
    import Network.Wai.Middleware.RealIp (realIp)
    
    config :: ConfigBuilder
    config = do
        option $ CustomMiddleware $ addHeaders [("X-My-Header", "Custom WAI Middleware!")] . realIp

Other Changes

Full Changelog: v0.18.0...v0.19.0

Feature Voting

Help decide what's coming next to IHP by using the Feature Voting!

Updating

β†’ See the UPGRADE.md for upgrade instructions.


If you have any problems with updating, let us know on the IHP forum.

πŸ“§ To stay in the loop, subscribe to the IHP release emails (right at the bottom of the page). Or follow digitally induced on twitter.