Skip to content

v6.4.0-rc.98

Pre-release
Pre-release
Compare
Choose a tag to compare
@jtoar jtoar released this 13 Nov 20:01

Changelog

Features

  • dbAuth: Unique session cookie name per port #9248 by @Tobbe

    Previously, when using dbAuth, you couldn't run two different Redwood apps at the same time on different ports. One app would overwrite the session cookie used by the other, and vice versa. They both used the same cookie name (session), and browsers distinguish cookies by hostname, not port.

    This PR lets users configure the cookie name they want to use by setting cookie.name in their api/src/functions/auth.ts file:

    // api/src/functions/auth.ts
    
    const authHandler = new DbAuthHandler(event, context, {
      // ...
    
      cookie: {
        name: 'session_%port%',
    
        // The cookie's attributes have moved to `cookie.attributes`:
        attributes: {
          // ...
        }
      },
    })

    If that option isn't set, it defaults to the old session name for backwards compatibility. In a similar vein, DbAuthHandler still handles all the properties that are now nested in cookie.attributes at the top level.

  • <PrivateSet> #9303 by @Tobbe

    Fixes #2562, #9304, and https://community.redwoodjs.com/t/private-route-error-with-7-0-0-canary-347/5337. This PR deprecates the Router's <Private> component and the private prop on the Router's <Set> component. In their place, it introduces a new Router component, <PrivateSet>.

    Starting in this release, you'll see strikethroughs in IDE when you use <Private> or the private on <Set>.
    They still work just as they did, but they'll be removed in a future major release, and <PrivateSet> is little more than a new name. The reason for the change is that in strict mode, private is a reserved word and there were just some bugs we couldn't fix without changing the name.

  • feat(cli): Setup command for mailer #9335 by @Josh-Walker-GM

    This PR adds a setup command for the mailer:

    yarn rw setup mailer
    

    and adds functionality that enables it to conditionally use an in-memory handler for tests and the studio handler for development if those dependencies are available.

    Check out the mailer docs for more: https://redwoodjs.com/docs/canary/mailer.

Fixes

  • Fix infinite loops on nested private routes with roles #9204 by @KrisCoulson

    Fixes #9131. This restores the Router's ability to handle multiple nested routes with different levels of authentication and redirect contexts.

  • fix(types): Generate maps to allow improved "go to definition" behaviour #9269 by @Josh-Walker-GM

    Fixes #5862 and #2867. Previously, navigating to the definition of cells, components, layouts, pages, etc. would lead you to the .d.ts file. This could be pretty frustrating if you're used to flying between definitions this way. This PR generates basic definition/source mappings for directory-mapped modules, cell mirrors, router pages, and route links.

  • Fix Set wrapper type so you can have an array of wrappers #9314 by @Tobbe

    Fixes #9313. This PR lets you do something like this in your web/src/Routes.tsx without type errors (notice the array of wrappers):

    const Routes = () => {
      return (
        <Router>
          <Set wrap={[Wrapper]}>
            <Route path="/" page={HomePage} name="home" />
          </Set>
          {/* ... */}
        </Router>
      )
    }
  • Don't remount wrap components when navigating within Set #9312 by @Tobbe

    Fixes #9105. This PR assigns each Set a unique id and uses that id as a key when rendering all the wrapper components.

Core Dependencies

  • fix(deps): update storybook monorepo to v7.4.6 #9256
  • fix(deps): update dependency vite to v4.4.11 #9255
  • fix(deps): update prisma monorepo to v5.6.0 #9447
  • fix(deps): update babel monorepo to v7.23.3 #9450
  • fix(deps): update dependency fastify to v4.24.3 #9457
  • chore(deps): update yarn to v3.7.0 #9489
  • upgrade vite to v4.5.0 #9328

Docs

  • Fix typos, removing erroneous apostrophes from personal possessive pronouns #9216 by @Philzen
  • Fix broken link to most recent jest config example #9266 by @Philzen
  • Fix TypeScript code highlighting (Chapter 6: Comments – Testing the service) #9267 by @Philzen
  • Clarify Auth0 Configuration #9238 by @jdrbc
  • docs: add missing await in service validation example #9243 by @G-Rath
  • docs: Clarifies the testimonial section of the What is Redwood documentation #9207 by @jdrbc
  • fix (docs): use default markdown numbered list #9265 by @esteban-url
  • Fix typo in RBAC @requireAuth example #9286 by @Philzen
  • Fix links to Prisma n:m relationship docs #9285 by @Philzen
  • docs: How to Use Prisma Client Extensions with DB Client and Logging #9283 by @dthyresson
  • docs(mailer): Initial mailer docs #9363 by @Josh-Walker-GM
  • Added missing type to routing-params.md #9377 by @pr0h0
  • Update dbauth-passwordless.md #9357 by @brendandonahue
  • docs: Update Deployment Docs to Provide Guidance on Extending the Timeout Duration in Vercel #9370 by @dinakartumu

Experimental features

Note

These features aren't officially released, but are included here for completeness since they're in this version. They're usable, but aren't fully documented and their API may change in future releases.

  • feat: add experimental docker setup command #9024 by @jtoar

    This release features the first iteration of Redwood's Dockerfile and compose files. Thanks to everyone who participated in the container working group! Get started with the experimental setup command:

    yarn rw exp setup-docker
    

    And consult the docs here if you have any questions: https://redwoodjs.com/docs/canary/docker. Feedback welcome!

  • feat: Support GraphQL Subscriptions in Apollo Client using SSE links #9009 by @dthyresson

    This PR adds support for GraphQL SSE (Server Sent Events) in both Redwood's GraphQL Server and RedwoodApolloProvider if realtime is enabled. For more on the status of realtime, see https://community.redwoodjs.com/t/redwoodjs-realtime/5002.

  • feature: Support defer and stream GraphQL Directives in RedwoodRealtime #9235 by @dthyresson

  • feat(cli-helpers): Root package install and RWJS env var #9296 by @Josh-Walker-GM

    This PR adds a few helper functions for installing packages in a Redwood app's root workspace and for setting the RWJS_CWD env var correctly.

  • feature: Adds utility functions to add envars and update redwood.toml #9324 by @dthyresson

Dependencies

Click to see all upgraded dependencies
  • chore(deps): update dependency @clerk/types to v3.52.0 #9213
  • fix(deps): update dependency @clerk/clerk-sdk-node to v4.12.6 #9214
  • chore(deps): update dependency @clerk/clerk-react to v4.25.1 #9212
  • chore(deps): update dependency firebase to v10.4.0 #9203
  • chore(deps): update dependency rimraf to v5.0.5 #9360
  • fix(deps): update dependency concurrently to v8.2.2 #9361
  • chore(deps): update dependency tailwindcss to v3.3.5 #9378
  • fix(deps): update dependency msw to v1.3.2 #9379
  • fix(deps): update dependency core-js to v3.33.2 #9293
  • fix(deps): update apollo graphql packages #9418
  • fix(deps): update dependency pino to v8.16.2 #9476
  • fix(deps): update dependency prism-react-renderer to v2.2.0 #9492