github remix-run/remix @remix-run/fetch-router@0.15.0
@remix-run/fetch-router v0.15.0

latest releases: remix@3.0.0-alpha.0, @remix-run/static-middleware@0.4.1, @remix-run/file-storage@0.13.1...
11 hours ago

Minor Changes

  • BREAKING CHANGE: RequestContext.headers now returns a standard Headers instance instead of the SuperHeaders/Headers subclass from @remix-run/headers. As a result, the @remix-run/headers peer dependency has now been removed.

    If you were relying on the type-safe property accessors on RequestContext.headers, you should use the new parse functions from @remix-run/headers instead:

    // Before:
    router.get('/api/users', (context) => {
      let acceptsJson = context.headers.accept.accepts('application/json')
      // ...
    })
    
    // After:
    import { Accept } from '@remix-run/headers'
    
    router.get('/api/users', (context) => {
      let accept = Accept.from(context.headers.get('accept'))
      let acceptsJson = accept.accepts('application/json')
      // ...
    })

Don't miss a new remix release

NewReleases is sending notifications on new releases.