This repository was archived by the owner on Apr 9, 2024. It is now read-only.
chore(deps): update remix monorepo to v2.8.1#113
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@remix-run/dev@2.4.0, npm/@remix-run/react@2.4.0 |
8a956f4 to
576bcdd
Compare
576bcdd to
6531772
Compare
6531772 to
de2b136
Compare
de2b136 to
a8d07ac
Compare
a8d07ac to
74a43e7
Compare
74a43e7 to
f00f9d3
Compare
f00f9d3 to
50c0993
Compare
50c0993 to
30f7e48
Compare
30f7e48 to
c26f069
Compare
c26f069 to
e5ea47d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.4.0->2.8.12.4.0->2.8.1Release Notes
remix-run/remix (@remix-run/dev)
v2.8.1Compare Source
Patch Changes
remix revealandremix routesCLI commands (#8916)--helpoutput (#8939)build.sourcemapoption in Vite config (#8965)server.fs.allowoption without a client entry file (#8966)@remix-run/node@2.8.1@remix-run/server-runtime@2.8.1v2.8.0Compare Source
Minor Changes
viteConfigto Remix Vite plugin'sbuildEndhook (#8885)Patch Changes
Layoutas browser safe route export inesbuildcompiler (#8842)serverBundlesissue where multiple browser manifests are generated (#8864)build.assetsDiroption (#8843)@remix-run/node@2.8.0@remix-run/server-runtime@2.8.0v2.7.2Compare Source
Patch Changes
.css?urlimports (#8829)@remix-run/node@2.7.2@remix-run/server-runtime@2.7.2v2.7.1Compare Source
Patch Changes
@remix-run/node@2.7.1@remix-run/server-runtime@2.7.1v2.7.0Compare Source
Minor Changes
Allow an optional
Layoutexport from the root route (#8709)Vite: Cloudflare Proxy as a Vite plugin (#8749)
This is a breaking change for projects relying on Cloudflare support from the unstable Vite plugin
The Cloudflare preset (
unstable_cloudflarePreset) as been removed and replaced with a new Vite plugin:import { unstable_vitePlugin as remix, - unstable_cloudflarePreset as cloudflare, + cloudflareDevProxyVitePlugin as remixCloudflareDevProxy, } from "@​remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ + remixCloudflareDevProxy(), + remix(), - remix({ - presets: [cloudflare()], - }), ], - ssr: { - resolve: { - externalConditions: ["workerd", "worker"], - }, - }, });remixCloudflareDevProxymust come before theremixplugin so that it can override Vite's dev server middleware to be compatible with Cloudflare's proxied environment.Because it is a Vite plugin,
remixCloudflareDevProxycan setssr.resolve.externalConditionsto beworkerd-compatible for you.remixCloudflareDevProxyaccepts agetLoadContextfunction that replaces the oldgetRemixDevLoadContext.If you were using a
nightlyversion that requiredgetBindingsProxyorgetPlatformProxy, that is no longer required.Any options you were passing to
getBindingsProxyorgetPlatformProxyshould now be passed toremixCloudflareDevProxyinstead.This API also better aligns with future plans to support Cloudflare with a framework-agnostic Vite plugin that makes use of Vite's (experimental) Runtime API.
Vite: Stabilize the Remix Vite plugin, Cloudflare preset, and all related types by removing all
unstable_/Unstable_prefixes. (#8713)While this is a breaking change for existing Remix Vite plugin consumers, now that the plugin has stabilized, there will no longer be any breaking changes outside of a major release. Thank you to all of our early adopters and community contributors for helping us get here! 🙏
Vite: Stabilize "SPA Mode" by renaming the Remix vite plugin config from
unstable_ssr -> ssr(#8692)Vite: Add a new
basenameoption to the Vite plugin, allowing users to set the internal React Routerbasenamein order to to serve their applications underneath a subpath (#8145)Patch Changes
Vite: fix server exports dead-code elimination for routes outside of app directory (#8795)
Always prepend DOCTYPE in SPA mode entry.server.tsx, can opt out via remix reveal (#8725)
Fix build issue in SPA mode when using a
basename(#8720)Vite: Validate that the MDX Rollup plugin, if present, is placed before Remix in Vite config (#8690)
Vite: reliably detect non-root routes in Windows (#8806)
Sometimes route
filewill be unnormalized Windows path with\instead of/.Vite: Pass
remixUserConfigto presetremixConfighook (#8797)Vite: Fix issue resolving critical CSS during development when the current working directory differs from the project root (#8752)
Vite: Ensure CSS file URLs that are only referenced in the server build are available on the client (#8796)
Vite: Require version 5.1.0 to support
.css?urlimports (#8723)Fix type error in Remix config for synchronous
routesfunction (#8745)Vite: Support Vite v5.1.0's
.css?urlimports (#8684)Always ignore route files starting with
.(#8801)Vite: Enable use of
vite previewto preview Remix SPA applications (#8624)npm run starthas been renamed tonpm run previewwhich usesvite previewinstead of a standalone HTTP server such ashttp-serverorserv-cliVite: Remove the ability to pass
publicPathas an option to the Remix vite plugin (#8145)publicPathbaseconfig so we now set the RemixpublicPathfrom the VitebaseconfigVite: Fix issue where client route file requests fail if search params have been parsed and serialized before reaching the Remix Vite plugin (#8740)
Vite: Enable HMR for .md and .mdx files (#8711)
Updated dependencies:
@remix-run/server-runtime@2.7.0@remix-run/node@2.7.0v2.6.0Compare Source
Minor Changes
future.v3_throwAbortReasonflag to throwrequest.signal.reasonwhen a request is aborted instead of anErrorsuch asnew Error("query() call aborted: GET /path")(#8251)Patch Changes
Vite: Add
manifestoption to Vite plugin to enable writing a.remix/manifest.jsonfile to the build directory (#8575)This is a breaking change for consumers of the Vite plugin's "server bundles" feature.
The
build/server/bundles.jsonfile has been superseded by the more generalbuild/.remix/manifest.json. While the old server bundles manifest was always written to disk when generating server bundles, the build manifest file must be explicitly enabled via themanifestoption.Vite: Provide
Unstable_ServerBundlesFunctionandUnstable_VitePluginConfigtypes (#8654)Vite: add
--sourcemapClientand--sourcemapServerflags toremix vite:build(#8613)--sourcemapClient--sourcemapClient=inline--sourcemapClient=hidden--sourcemapServer--sourcemapServer=inline--sourcemapServer=hiddenSee https://vitejs.dev/config/build-options.html#build-sourcemap
Vite: Validate IDs returned from the
serverBundlesfunction to ensure they only contain alphanumeric characters, hyphens and underscores (#8598)Vite: fix "could not fast refresh" false alarm (#8580)
HMR is already functioning correctly but was incorrectly logging that it "could not fast refresh" on internal client routes.
Now internal client routes correctly register Remix exports like
metafor fast refresh,which removes the false alarm.
Vite: Cloudflare Pages support (#8531)
To get started with Cloudflare, you can use the [
unstable-vite-cloudflare][template-vite-cloudflare] template:Or read the new docs at Future > Vite > Cloudflare and
Future > Vite > Migrating > Migrating Cloudflare Functions.
Vite: Remove undocumented backwards compatibility layer for Vite v4 (#8581)
Vite: rely on Vite plugin ordering (#8627)
This is a breaking change for projects using the unstable Vite plugin.
The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first.
For example, that means putting the MDX plugin before the Remix plugin:
import mdx from "@​mdx-js/rollup"; import { unstable_vitePlugin as remix } from "@​remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ + mdx(), remix() - mdx(), ], });Previously, the Remix plugin misused
enforce: "post"from Vite's plugin API to ensure that it ran last.However, this caused other unforeseen issues.
Instead, we now rely on standard Vite semantics for plugin ordering.
The official Vite React SWC plugin also relies on plugin ordering for MDX.
Vite: Add
presetsoption to ease integration with different platforms and tools. (#8514)Vite: Remove interop with
<LiveReload />, rely on<Scripts />instead (#8636)This is a breaking change for projects using the unstable Vite plugin.
Vite provides a robust client-side runtime for development features like HMR,
making the
<LiveReload />component obsolete.In fact, having a separate dev scripts component was causing issues with script execution order.
To work around this, the Remix Vite plugin used to override
<LiveReload />into a bespokeimplementation that was compatible with Vite.
Instead of all this indirection, now the Remix Vite plugin instructs the
<Scripts />componentto automatically include Vite's client-side runtime and other dev-only scripts.
import { - LiveReload, Outlet, Scripts, } export default function App() { return ( <html> <head> </head> <body> <Outlet /> <Scripts /> - <LiveReload /> </body> </html> ) }Vite: Add
buildEndhook (#8620)Vite: add dev load context option to Cloudflare preset (#8649)
Vite: Add
modefield into generated server build (#8539)Vite: Only write Vite manifest files if
build.manifestis enabled within the Vite config (#8599)This is a breaking change for consumers of Vite's
manifest.jsonfiles.To explicitly enable generation of Vite manifest files, you must set
build.manifesttotruein your Vite config.Vite: reduce network calls for route modules during HMR (#8591)
Vite: Add new
buildDirectoryoption with a default value of"build". This replaces the oldassetsBuildDirectoryandserverBuildDirectoryoptions which defaulted to"build/client"and"build/server"respectively. (#8575)This is a breaking change for consumers of the Vite plugin that were using the
assetsBuildDirectoryandserverBuildDirectoryoptions.The Remix Vite plugin now builds into a single directory containing
clientandserverdirectories. If you've customized your build output directories, you'll need to migrate to the newbuildDirectoryoption, e.g.import { unstable_vitePlugin as remix } from "@​remix-run/dev"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [ remix({ - serverBuildDirectory: "dist/server", - assetsBuildDirectory: "dist/client", + buildDirectory: "dist", }) ], });Vite: Remove
unstableprefix fromserverBundlesoption. (#8596)Vite: Write Vite manifest files to
build/.vitedirectory rather than being nested withinbuild/clientandbuild/serverdirectories. (#8599)This is a breaking change for consumers of Vite's
manifest.jsonfiles.Vite manifest files are now written to the Remix build directory. Since all Vite manifests are now in the same directory, they're no longer named
manifest.json. Instead, they're namedbuild/.vite/client-manifest.jsonandbuild/.vite/server-manifest.json, orbuild/.vite/server-{BUNDLE_ID}-manifest.jsonwhen using server bundles.Updated dependencies:
@remix-run/server-runtime@2.6.0@remix-run/node@2.6.0v2.5.1Compare Source
Patch Changes
isSpaModeto@remix-run/dev/server-buildvirtual module (#8492)<!DOCTYPE html>if not present to fix quirks mode warnings for SPA template (#8495)remix vite:build --profileto generate a.cpuprofilethat can be shared or uploaded to speedscope.appp + enterto start a new profiling session or stop the current sessionremix vite:dev --profileto initialize the dev server with a running profiling session@remix-run/node@2.5.1@remix-run/server-runtime@2.5.1v2.5.0Compare Source
Minor Changes
Add unstable support for "SPA Mode" (#8457)
You can opt into SPA Mode by setting
unstable_ssr: falsein your Remix Vite plugin config:Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:
Building in SPA Mode will generate an
index.htmlfile in your client assets directory:To run your SPA, you serve your client assets directory via an HTTP server:
For more information, please refer to the SPA Mode docs.
Add
unstable_serverBundlesoption to Vite plugin to support splitting server code into multiple request handlers. (#8332)This is an advanced feature designed for hosting provider integrations. When compiling your app into multiple server bundles, there will need to be a custom routing layer in front of your app directing requests to the correct bundle. This feature is currently unstable and only designed to gather early feedback.
Example usage:
Patch Changes
Fix issue with
isbotv4 released on 1/1/2024 (#8415)remix devwill now add"isbot": "^4"topackage.jsoninstead of usinglatestentry.serverfiles to work with bothisbot@3andisbot@4for backwards-compatibility with Remix apps that have pinnedisbotto v3isbot@4moving forward viacreate-remixVite: Fix HMR issues when altering exports for non-rendered routes (#8157)
Vite: Default
NODE_ENVto"production"when runningremix vite:buildcommand (#8405)Vite: Remove Vite plugin config option
serverBuildPathin favor of separateserverBuildDirectoryandserverBuildFileoptions (#8332)Vite: Loosen strict route exports restriction, reinstating support for non-Remix route exports (#8420)
Updated dependencies:
@remix-run/server-runtime@2.5.0@remix-run/node@2.5.0v2.4.1Compare Source
Patch Changes
Vite: Error messages when
.serverfiles are referenced by client (#8267).servermodule from client code resulted in an error message like:The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'answer.server.tsdoes provide theisDateTypeexport, but Remix was replacing.servermodules with empty modules (export {}) for the client build.servermodule is referenced from client code and includes dedicated error messages depending on whether the import occurs in a route or a non-route moduleRemove
unstable_viteServerBuildModuleIdin favor of manually referencing virtual module name"virtual:remix/server-build". (#8264)This is a breaking change for projects using the unstable Vite plugin with a custom server.
This change was made to avoid issues where
@remix-run/devcould be inadvertently required in your server's production dependencies.Instead, you should manually write the virtual module name
"virtual:remix/server-build"when callingssrLoadModulein development.Vite: Fix errors for non-existent
index.htmlimporter (#8353)Add
vite:devandvite:buildcommands to the Remix CLI. (#8211)In order to handle upcoming Remix features where your plugin options can impact the number of Vite builds required, you should now run your Vite
devandbuildprocesses via the Remix CLI.{ "scripts": { - "dev": "vite dev", - "build": "vite build && vite build --ssr" + "dev": "remix vite:dev", + "build": "remix vite:build" } }Vite: Preserve names for exports from
.clientmodules (#8200)Unlike
.servermodules, the main idea is not to prevent code from leaking into the server buildsince the client build is already public. Rather, the goal is to isolate the SSR render from client-only code.
Routes need to import code from
.clientmodules without compilation failing and then rely on runtime checksor otherwise ensure that execution only happens within a client-only context (e.g. event handlers,
useEffect).Replacing
.clientmodules with empty modules would cause the build to fail as ESM named imports are statically analyzed.So instead, we preserve the named export but replace each exported value with
undefined.That way, the import is valid at build time and standard runtime checks can be used to determine if the
code is running on the server or client.
Disable watch mode in Vite child compiler during build (#8342)
Vite: Show warning when source maps are enabled in production build (#8222)
Updated dependencies:
@remix-run/server-runtime@2.4.1@remix-run/node@2.4.1remix-run/remix (@remix-run/react)
v2.8.1Compare Source
Patch Changes
LayoutComponenttype to accept limited children (#8910)@remix-run/server-runtime@2.8.1v2.8.0Compare Source
Patch Changes
ErrorBoundarycomponent so it leverages the user-providedLayoutcomponent (#8859)HydrateFallbackcomponent so it leverages any user-providedLayoutcomponent (#8892)@remix-run/reactre-exports everything fromreact-router-domfor SPA mode (#8929)@remix-run/server-runtime@2.8.0v2.7.2Compare Source
Patch Changes
@remix-run/server-runtime@2.7.2v2.7.1Compare Source
Patch Changes
@remix-run/server-runtime@2.7.1v2.7.0Compare Source
Minor Changes
Layoutexport from the root route (#8709)basenameoption to the Vite plugin, allowing users to set the internal React Routerbasenamein order to to serve their applications underneath a subpath (#8145)Patch Changes
@remix-run/server-runtime@2.7.0v2.6.0Compare Source
Patch Changes
@remix-run/server-runtime@2.6.0v2.5.1Compare Source
Patch Changes
<Meta>/<Links>in SPA mode (#8538)unstable_prefix fromBlocker/BlockerFunctiontypes (#8530)@remix-run/server-runtime@2.5.1v2.5.0Compare Source
Minor Changes
Add unstable support for "SPA Mode" (#8457)
You can opt into SPA Mode by setting
unstable_ssr: falsein your Remix Vite plugin config:Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:
Building in SPA Mode will generate an
index.htmlfile in your client assets directory:To run your SPA, you serve your client assets directory via an HTTP server:
For more information, please refer to the SPA Mode docs.
Patch Changes
import.meta.hotfrom the existing Remix compiler (#8459)@remix-run/server-runtime@2.5.0v2.4.1Compare Source
Patch Changes
loadererrors throughserverLoaderin hydratingclientLoader's (#8304)Responsehelpers (defer/json/redirect/redirectDocument) through@remix-run/reactfor use inclientLoader/clientAction(#8351)@remix-run/server-runtime@2.4.1Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.