Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump @remix-run/react from 1.7.6 to 1.12.0 #352

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 31, 2023

Bumps @remix-run/react from 1.7.6 to 1.12.0.

Release notes

Sourced from @​remix-run/react's releases.

v1.12.0

We've got a few nice bug fixes and improvements in this release. You can catch those in the individual package changelogs below, but what we really want to talk about today is a huge step forward in a much nicer developer experience for you. Let's get to it!

An early peek at a new dev server 👀

Since the early days of Remix, the remix dev command has been limited by its association with the built-in Remix app server. But one of the major benefits of Remix is that you own your server. While this is a very powerful core feature of our architecture, it presented a few challenges for local development. If you own your server, how can we build a dev server that is flexible enough to work for your specific setup?

Our first answer was … we don't. Don't try to be clever, don't over-abstract anything. Simply run the server directly and let our <LiveReload> watch for changes and reboot as needed.

While this may sound nice and simple, it has a few downsides for local development:

  1. Reloading wipes in-memory references, such as database connections or in-memory caches. This means you have to use workaround like sticking flags on global to persist anything stored in memory across rebuilds.
  2. You have to manually configure the LiveReload port, which is a bit of unnecessary friction.
  3. It makes implementing popular new dev features like hot-module replacement (HMR) much more difficult to implement in a way that works consistently across all app servers.
  4. Each rebuild writes new files to build/ and public/build/. As these files are not removed (unless the dev server crashes or is gracefully terminated), thousands of files could accumulate as the dev server ran. This causes performance issues and could be confusing when debugging.

To start addressing these issues, we decided to take a new approach. This release gives you early access to our new dev server and start making incremental improvements to your local development flow.

Please note that this is an unstable feature and a work-in-progress. But we think there are good reasons to opt in right away!

At this stage, the idea is to spin up the dev server alongside your normal Remix app server:

# spin up the new dev server
remix dev
Spin up your app server in parallel.
This can be done in a separate terminal or with a tool like concurrently.
nodemon ./server.js

Our dev server will build your app in development mode and then rebuild whenever any app files changes. It will also wait for your app server to signal that it's "ready" before triggering a reload in your browser.

No more wiping in-memory caches. No more weird hacks to keep your database alive. A fresh, clean slate for each rebuild.

While this may seem like a relatively small change, but it's removes a huge barrier for future DX improvements for local development. We think you're going to love what we're working on next 🔥🔁

Configuring the unstable_dev server

To enable the new dev server with all defaults, set the unstable_dev future flag to true:

// remix.config.js
module.exports = {
  future: {
    unstable_dev: true,
  },
};

... (truncated)

Changelog

Sourced from @​remix-run/react's changelog.

1.12.0

Minor Changes

  • Added a new development server available in the Remix config under the unstable_dev flag. See the release notes for a full description. (#5133)
  • You can now configure the client-side socket timeout via the new timeoutMs prop on <LiveReload /> (#4036)

Patch Changes

  • <Link to> can now accept absolute URLs. When the to value is an absolute URL, the underlying anchor element will behave as normal, and its URL will not be prefetched. (#5092)
  • Bump React Router dependencies to the latest version. See the release notes for more details. (#5242)
  • Added support for unstable_useBlocker and unstable_usePrompt from React Router (#5151)

1.11.1

1.11.0

Minor Changes

  • Added support for Vanilla Extract via the unstable_vanillaExtract future flag. IMPORTANT: Features marked with unstable are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#5040)
  • Add support for CSS side-effect imports via the unstable_cssSideEffectImports future flag. IMPORTANT: Features marked with unstable are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#4919)
  • Add support for CSS Modules via the unstable_cssModules future flag. IMPORTANT: Features marked with unstable are … unstable. While we're confident in the use cases they solve, the API and implementation may change without a major version bump. (#4852)

Patch Changes

  • Fix v2 meta to ensure meta is rendered from the next route in the tree if no meta export is included in a leaf route (#5041)

  • Ensure useFetcher is stable across re-renders in backwards-compatibility layer (#5118)

  • Added the v2_errorBoundary future flag to opt into the next version of Remix's ErrorBoundary behavior. This removes the separate CatchBoundary and ErrorBoundary and consolidates them into a single ErrorBoundary, following the logic used by errorElement in React Router. You can then use isRouteErrorResponse to differentiate between thrown Response/Error instances. (#4918)

    // Current (Remix v1 default)
    import { useCatch } from "@remix-run/react";
    export function CatchBoundary() {
    let caught = useCatch();
    return (
    <p>
    {caught.status} {caught.data}
    </p>
    );
    }
    export function ErrorBoundary({ error }) {
    return <p>{error.message}</p>;
    }

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@remix-run/react](https://github.com/remix-run/remix/tree/HEAD/packages/remix-react) from 1.7.6 to 1.12.0.
- [Release notes](https://github.com/remix-run/remix/releases)
- [Changelog](https://github.com/remix-run/remix/blob/main/packages/remix-react/CHANGELOG.md)
- [Commits](https://github.com/remix-run/remix/commits/@remix-run/react@1.12.0/packages/remix-react)

---
updated-dependencies:
- dependency-name: "@remix-run/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 31, 2023
@JellyBrick JellyBrick merged commit 94379d9 into main Feb 6, 2023
@JellyBrick JellyBrick deleted the dependabot/npm_and_yarn/remix-run/react-1.12.0 branch February 6, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant