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: Update version for release (pre) #7284

Merged
merged 1 commit into from Aug 28, 2023

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

release-next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on release-next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

create-remix@2.0.0-pre.0

Major Changes

  • The create-remix CLI has been rewritten to feature a cleaner interface, Git repo initialization and optional remix.init script execution. The interactive template prompt and official Remix stack/template shorthands have also been removed so that community/third-party templates are now on a more equal footing. (#6887)

    The code for create-remix has been moved out of the Remix CLI since it's not intended for use within an existing Remix application. This means that the remix create command is no longer available.

  • Stop passing isTypeScript to remix.init script (#7099)

  • Require Node >=18.0.0 (#6939)

Minor Changes

  • Remove empty directory checking in favor of overwrite prompt/flag. (#7062)

    create-remix now allows you to write into an existing non-empty directory. It will perform a file-level comparison and if the template will overwrite any existing files in the destination directory, it will prompt you if it's OK to overwrite those files. If you answer no (the default) then it will exit without copying any files. You may skip this prompt with the --overwrite CLI flag.

  • Support bun package manager (#7074)

@remix-run/architect@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)

  • For preparation of using Node's built in fetch implementation, installing the fetch globals is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install the globals yourself. (#7009)

    import { installGlobals } from "@remix-run/node";
    
    installGlobals();

    source-map-support is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install source-map-support yourself.

    npm i source-map-support
    import sourceMapSupport from "source-map-support";
    sourceMapSupport.install();

Patch Changes

    • Switch to headers.entries() instead of non-spec-compliant headers.raw() in sendRemixResponse (#7150)
    • Update to @remix-run/web-fetch@4.3.7
  • remove references to fetch polyfills in node and arc adapters (#7230)
  • Updated dependencies:
    • @remix-run/node@2.0.0-pre.0

@remix-run/cloudflare@2.0.0-pre.0

Major Changes

  • Remove createCloudflareKVSessionStorage (#6898)

  • Require Node >=18.0.0 (#6939)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • Drop @cloudflare/workers-types v2 & v3 support (#6925)

  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";

Minor Changes

  • Re-export new redirectDocument method from React Router (#7040, #6842) (#7040)

Patch Changes

  • Export proper ErrorResponse type for usage alongside isRouteErrorResponse (#7244)
  • Updated dependencies:
    • @remix-run/server-runtime@2.0.0-pre.0

@remix-run/cloudflare-pages@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)
  • Drop @cloudflare/workers-types v2 & v3 support (#6925)

Patch Changes

  • Updated dependencies:
    • @remix-run/cloudflare@2.0.0-pre.0

@remix-run/cloudflare-workers@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)
  • Drop @cloudflare/workers-types v2 & v3 support (#6925)

Patch Changes

  • Updated dependencies:
    • @remix-run/cloudflare@2.0.0-pre.0

@remix-run/css-bundle@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)

Patch Changes

  • Decouple the @remix-run/dev package from the contents of the @remix-run/css-bundle package. (#6982)

    The contents of the @remix-run/css-bundle package are now entirely managed by the Remix compiler. Even though it's still recommended that your Remix dependencies all share the same version, this change ensures that there are no runtime errors when upgrading @remix-run/dev without upgrading @remix-run/css-bundle.

@remix-run/deno@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }

Minor Changes

  • Re-export new redirectDocument method from React Router (#7040, #6842) (#7040)

Patch Changes

  • Export proper ErrorResponse type for usage alongside isRouteErrorResponse (#7244)
  • Updated dependencies:
    • @remix-run/server-runtime@2.0.0-pre.0

@remix-run/dev@2.0.0-pre.0

Major Changes

  • Remove serverBuildTarget config option (#6896)

  • The create-remix CLI has been rewritten to feature a cleaner interface, Git repo initialization and optional remix.init script execution. The interactive template prompt and official Remix stack/template shorthands have also been removed so that community/third-party templates are now on a more equal footing. (#6887)

    The code for create-remix has been moved out of the Remix CLI since it's not intended for use within an existing Remix application. This means that the remix create command is no longer available.

  • Remove deprecated REMIX_DEV_HTTP_ORIGIN env var. (#6963)

    Use REMIX_DEV_ORIGIN instead.

  • Enable built-in PostCSS and Tailwind support by default. (#6909)

    These tools are now automatically used within the Remix compiler if PostCSS and/or Tailwind configuration files are present in your project.

    If you have a custom PostCSS and/or Tailwind setup outside of Remix, you can disable these features in your remix.config.js.

    module.exports = {
      postcss: false,
      tailwind: false,
    };
  • Remove devServerBroadcastDelay config option (#7063)

  • Stop passing isTypeScript to remix.init script (#7099)

  • remove deprecated devServerPort option (#7078)

    use --port / config.dev.port option instead

  • remove deprecated REMIX_DEV_SERVER_WS_PORT env var (#6965)

    use remix dev's '--port/port option instead

  • Remove replace-remix-magic-imports codemod (#6899)

  • Drop React 17 support (#7121)

  • Require Node >=18.0.0 (#6939)

  • Remove default Node.js polyfills from the server build when targeting non-Node.js platforms. (#6911)

    Any Node.js polyfills that are required for your server code to run on non-Node.js platforms must be manually specified in remix.config.js using the serverNodeBuiltinsPolyfill option.

    exports.serverNodeBuiltinsPolyfill = {
      modules: {
        path: true, // Provide a JSPM polyfill
        fs: "empty", // Provide an empty polyfill
      },
    };
  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • remove deprecated cli args and flags (#6962)

    • --no-restart/restart 👉 use --manual/manual instead
    • --scheme/scheme and --host/host 👉 use REMIX_DEV_ORIGIN instead
  • promote config.future.v2_dev to config.dev (#7002)

  • Remove browserBuildDirectory config option (#6900)

  • remove codemod command (#6918)

  • Remove serverBuildDirectory config option (#6897)

  • Default to serverModuleFormat esm, and update remix-serve to use dynamic import to support esm and cjs build outputs. (#6949)

  • Remove v2_errorBoundary flag and CatchBoundary implementation (#6906)

  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";
  • Remove v2_normalizeFormMethod future flag - all formMethod values will be normalized in v2 (#6875)

  • Remove v2_routeConvention flag. The flat route file convention is now standard. (#6969)

  • Remove v2_headers flag. It is now the default behavior to use the deepest headers function in the route tree. (#6979)

Minor Changes

  • Warn users about obsolete future flags in remix.config.js (#7048)

  • detect built mode via build.mode (#6964)

    Prevents mode mismatch between built Remix server entry and user-land server.
    Additionally, all runtimes (including non-Node runtimes) can use build.mode to determine if HMR should be performed.

  • Support bun package manager (#7074)

Patch Changes

  • Fix importing of PNGs, SVGs, and other assets from packages in node_modules (#6813) (#7182)

  • Decouple the @remix-run/dev package from the contents of the @remix-run/css-bundle package. (#6982)

    The contents of the @remix-run/css-bundle package are now entirely managed by the Remix compiler. Even though it's still recommended that your Remix dependencies all share the same version, this change ensures that there are no runtime errors when upgrading @remix-run/dev without upgrading @remix-run/css-bundle.

  • allow non-development modes for remix watch (#7117)

  • stop remix dev when esbuild is not running (#7158)

  • Improve browser compatibility of minified CSS (#7187)

    We now minify CSS targeting the Remix browser support baseline (i.e. anything that supports ES module scripts), whereas previously CSS was minified using esbuild's default "esnext" target. This meant that CSS in the production build could be using properties that are unsupported in some browsers. This change also means you now have more control over CSS transformations using the built-in PostCSS support since they won't be reversed by esbuild's minification.

  • allow decorators in app code (#7176)

  • allow jsx in js files during hmr (#7112)

  • Support dependencies that import polyfill packages for Node built-ins via a trailing slash (e.g. importing the buffer package with var Buffer = require('buffer/').Buffer as recommended in their readme). These imports were previously marked as external. This meant that they were left as dynamic imports in the client bundle and would throw a runtime error in the browser (e.g. Dynamic require of "buffer/" is not supported). (#7198)

  • Remove outdated ESM import warnings (#6916)

    Most of the time these warnings were false positives.
    Instead, we now rely on built-in Node warnings for ESM imports.

  • do not trigger rebuilds when .DS_Store changes (#7172)

  • Remove warnings for stabilized flags: (#6905)

    • unstable_cssSideEffectImports
    • unstable_cssModules
    • unstable_vanillaExtract
  • allow any mode (NODE_ENV) (#7113)

  • Replace the deprecated xdm package with @mdx-js/mdx (#4054)

  • Updated dependencies:

    • @remix-run/serve@2.0.0-pre.0
    • @remix-run/server-runtime@2.0.0-pre.0

@remix-run/eslint-config@2.0.0-pre.0

Major Changes

  • Remove @remix-run/eslint-config/jest ESLint config (#6903)
  • Drop React 17 support (#7121)
  • Remove magic imports ESLint warnings (#6902)
  • Remove v2_normalizeFormMethod future flag - all formMethod values will be normalized in v2 (#6875)

@remix-run/express@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)

  • For preparation of using Node's built in fetch implementation, installing the fetch globals is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install the globals yourself. (#7009)

    import { installGlobals } from "@remix-run/node";
    
    installGlobals();

    source-map-support is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install source-map-support yourself.

    npm i source-map-support
    import sourceMapSupport from "source-map-support";
    sourceMapSupport.install();

Patch Changes

    • Switch to headers.entries() instead of non-spec-compliant headers.raw() in sendRemixResponse (#7150)
    • Update to @remix-run/web-fetch@4.3.7
  • remove references to fetch polyfills in node and arc adapters (#7230)
  • Updated dependencies:
    • @remix-run/node@2.0.0-pre.0

@remix-run/node@2.0.0-pre.0

Major Changes

  • Require Node >=18.0.0 (#6939)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • For preparation of using Node's built in fetch implementation, installing the fetch globals is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install the globals yourself. (#7009)

    import { installGlobals } from "@remix-run/node";
    
    installGlobals();

    source-map-support is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install source-map-support yourself.

    npm i source-map-support
    import sourceMapSupport from "source-map-support";
    sourceMapSupport.install();
  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";

Minor Changes

  • Re-export new redirectDocument method from React Router (#7040, #6842) (#7040)

Patch Changes

  • Export proper ErrorResponse type for usage alongside isRouteErrorResponse (#7244)
  • ensures fetch() return is instanceof global Response by removing extended classes for NodeRequest and NodeResponse in favor of custom interface type cast. (#7109)
  • remove recursion from stream utilities (#7245)
  • Updated dependencies:
    • @remix-run/server-runtime@2.0.0-pre.0

@remix-run/react@2.0.0-pre.0

Major Changes

  • Remove imagesizes & imagesrcset properties from HtmlLinkDescriptor, LinkDescriptor & PrefetchPageDescriptor types (#6936)

  • remove deprecated REMIX_DEV_SERVER_WS_PORT env var (#6965)

    use remix dev's '--port/port option instead

  • Drop React 17 support (#7121)

  • Require Node >=18.0.0 (#6939)

  • Remove unstable_shouldReload, which has been replaced by shouldRevalidate (#6865)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • promote config.future.v2_dev to config.dev (#7002)

  • Remove v2_errorBoundary flag and CatchBoundary implementation (#6906)

  • Remove back-compat layer for useFetcher/useFetchers. This includes a few small breaking changes: (#6874)

    • fetcher.type has been removed since it can be derived from other available information
    • "Submission" fields have been flattened from fetcher.submission down onto the root fetcher object, and prefixed with form in some cases (fetcher.submission.action => fetcher.formAction)
    • <fetcher.Form method="get"> is now more accurately categorized as state:"loading" instead of state:"submitting" to better align with the underlying GET request
  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";
  • Remove v2_normalizeFormMethod future flag - all formMethod values will be normalized in v2 (#6875)

  • Remove deprecated useTransition hook in favor of useNavigation. useNavigation is almost identical with a few exceptions:_ (#6870)

    • useTransition.type has been removed since it can be derived from other available information
    • "Submission" fields have been flattened from useTransition().submission down onto the root useNavigation() object
    • <Form method="get"> is now more accurately categorized as state:"loading" instead of state:"submitting" to better align with the underlying GET navigation
  • Remove v2_routeConvention flag. The flat route file convention is now standard. (#6969)

  • Remove v2_headers flag. It is now the default behavior to use the deepest headers function in the route tree. (#6979)

Minor Changes

  • [REMOVE] Update to experimental react router version with Remix back compat code removed (#7040)
  • Export the Navigation type returned from useNavigation (#7136)
  • Update Remix to use React Router route.lazy for module loading (#7133)

Patch Changes

  • Add error to meta params so you can render error titles, etc. (#7105)

    export function meta({ error }) {
      return [{ title: error.message }];
    }
  • Deduplicate prefetch link tags (#7060)

  • Skip preloading of stylesheets on client-side route transitions if the browser does not support <link rel=preload>. This prevents us from hanging on client-side navigations when we try to preload stylesheets and never receive a load/error event on the link tag. (#7106)

  • Export proper ErrorResponse type for usage alongside isRouteErrorResponse (#7244)

  • Use the hostname from REMIX_DEV_ORIGIN to connect to the live reload socket (#6923)

  • Bump router to 1.9.0/6.16.0 prereleases (#7283)

  • Use unique key for script:ld+json meta descriptors (#6954)

  • Fix types for useLoaderData when using Yarn PnP (#7137)

  • Updated dependencies:

    • @remix-run/server-runtime@2.0.0-pre.0

@remix-run/serve@2.0.0-pre.0

Major Changes

  • remix-serve picks an open port if 3000 is taken (#7278)

    • If PORT env var is set, remix-serve will use that port
    • Otherwise, remix-serve picks an open port (3000 unless that is already taken)
  • integrate manual mode in remix-serve (#7231)

  • Remove undocumented createApp Node API (#7229)

    remix-serve should a CLI, not a library

  • Require Node >=18.0.0 (#6939)

  • promote config.future.v2_dev to config.dev (#7002)

  • Default to serverModuleFormat esm, and update remix-serve to use dynamic import to support esm and cjs build outputs. (#6949)

  • For preparation of using Node's built in fetch implementation, installing the fetch globals is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install the globals yourself. (#7009)

    import { installGlobals } from "@remix-run/node";
    
    installGlobals();

    source-map-support is now a responsibility of the app server. If you are using remix-serve, nothing is required. If you are using your own app server, you will need to install source-map-support yourself.

    npm i source-map-support
    import sourceMapSupport from "source-map-support";
    sourceMapSupport.install();
  • Preserve dynamic imports in remix-serve for external bundle (#7173)

Patch Changes

  • Updated dependencies:
    • @remix-run/node@2.0.0-pre.0
    • @remix-run/express@2.0.0-pre.0

@remix-run/server-runtime@2.0.0-pre.0

Major Changes

  • Remove deprecated REMIX_DEV_HTTP_ORIGIN env var. (#6963)

    Use REMIX_DEV_ORIGIN instead.

  • Remove imagesizes & imagesrcset properties from HtmlLinkDescriptor, LinkDescriptor & PrefetchPageDescriptor types (#6936)

  • Require Node >=18.0.0 (#6939)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • promote config.future.v2_dev to config.dev (#7002)

  • Remove v2_errorBoundary flag and CatchBoundary implementation (#6906)

  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";
  • Remove v2_normalizeFormMethod future flag - all formMethod values will be normalized in v2 (#6875)

  • Remove v2_routeConvention flag. The flat route file convention is now standard. (#6969)

  • Remove v2_headers flag. It is now the default behavior to use the deepest headers function in the route tree. (#6979)

Minor Changes

  • detect built mode via build.mode (#6964)

    Prevents mode mismatch between built Remix server entry and user-land server.
    Additionally, all runtimes (including non-Node runtimes) can use build.mode to determine if HMR should be performed.

  • [REMOVE] Update to experimental react router version with Remix back compat code removed (#7040)

  • Update Remix to use React Router route.lazy for module loading (#7133)

  • Re-export new redirectDocument method from React Router (#7040, #6842) (#7040)

Patch Changes

  • Fix destroySession for sessions using a maxAge cookie. The data in the cookie was always properly destroyed but when using maxAge, the cookie itself wasn't deleted because Max-Age takes precedence over Expires in the cookie spec. (#7252)
  • Export proper ErrorResponse type for usage alongside isRouteErrorResponse (#7244)
  • Ensure maxAge/expires options passed to commitSession take precedence over the original cookie.expires value (#6598) (#7269)
  • Fix handleError method to correctly receive ErrorResponse instances on ?_data and resource route requests. It now receives the ErrorResponse instance the same way a document request would. Users can leverage isRouteErrorResponseto detect these error instances and log accordingly. (#7211)
  • Bump router to 1.9.0/6.16.0 prereleases (#7283)
  • Update createMemorySessionStorage to use an internal hash value instead of an integer for the session id (#7227)
  • Fix false-positive resource route classification on document requests for routes that only export an ErrorBoundary (#7155)
  • correctly infer deferred types for top-level promises (#7104)
  • construct request with duplex option (#7234)

@remix-run/testing@2.0.0-pre.0

Major Changes

  • Drop React 17 support (#7121)

  • Require Node >=18.0.0 (#6939)

  • We have made a few important changes to the route meta API as reflected in the v1 implementation when using the future.v2_meta config option. (#6958)

    • The meta function should no longer return an object, but an array of objects that map to the HTML tag's respective attributes. This provides more flexibility and control over how certain tags are rendered, and the order in which they appear.
    • In most cases, meta descriptor objects render a <meta> tag. There are a few notable exceptions:
      • { title: "My app" } will render <title>My app</title>.
      • { 'script:ld+json': { /* ... */ } } will render <script type="application/ld+json">/* ... */</script>, where the value is serialized to JSON and rendered inside the <script> tag.
      • { tagName: 'link', ...attributes } will render <link {...attributes} />
        • This is useful for things like setting canonical URLs. For loading assets, we encourage you to use the links export instead.
        • It's important to note that tagName may only accept meta or link, so other arbitrary elements will be ignored.
    • <Meta /> will no longer render the meta output from the entire route hierarchy. Only the output from the leaf (current) route will be rendered unless that route does not export a meta function, in which case the output from the nearest ancestor route with meta will be rendered.
      • This change comes from user feedback that auto-merging meta made effective SEO difficult to implement. Our goal is to give you as much control as you need over meta tags for each individual route.
      • Our suggested approach is to only export a meta function from leaf route modules. However, if you do want to render a tag from another matched route, meta now accepts a matches argument for you to merge or override parent route meta as you'd like.
      export function meta({ matches }) {
        return [
          // render all ancestor route meta except for title tags
          ...matches
            .flatMap((match) => match.meta)
            .filter((match) => !("title" in match)),
          { title: "Override the title!" },
        ];
      }
    • The parentsData argument has been removed. If you need to access data from a parent route, you can use matches instead.
      // before
      export function meta({ parentsData }) {
        return [{ title: parentsData["routes/some-route"].title }];
      }
      // after
      export function meta({ matches }) {
        return [
          {
            title: matches.find((match) => match.id === "routes/some-route").data
              .title,
          },
        ];
      }
  • promote config.future.v2_dev to config.dev (#7002)

  • Remove v2_errorBoundary flag and CatchBoundary implementation (#6906)

  • Removed support for "magic exports" from the remix package. This package can be removed from your package.json and you should update all imports to use the source @remix-run/* packages: (#6895)

    - import type { ActionArgs } from "remix";
    - import { json, useLoaderData } from "remix";
    + import type { ActionArgs } from "@remix-run/node";
    + import { json } from "@remix-run/node";
    + import { useLoaderData } from "@remix-run/react";
  • Remove v2_normalizeFormMethod future flag - all formMethod values will be normalized in v2 (#6875)

  • Remove v2_routeConvention flag. The flat route file convention is now standard. (#6969)

  • Remove v2_headers flag. It is now the default behavior to use the deepest headers function in the route tree. (#6979)

Minor Changes

    • unstable_createRemixStub now supports adding meta/links functions on stubbed Remix routes (#7186)
    • ⚠️ unstable_createRemixStub no longer supports the element/errorElement properties on routes. You must use Component/ErrorBoundary to match what you would export from a Remix route module.
  • Update Remix to use React Router route.lazy for module loading (#7133)

Patch Changes

  • Fix types for StubRouteObject children property (#7098)
  • Bump router to 1.9.0/6.16.0 prereleases (#7283)
  • Updated dependencies:
    • @remix-run/react@2.0.0-pre.0
    • @remix-run/node@2.0.0-pre.0

remix@2.0.0-pre.0

remix

See the CHANGELOG.md in individual Remix packages for all changes.

@brophdawg11 brophdawg11 merged commit 65f0b29 into release-next Aug 28, 2023
1 check passed
@brophdawg11 brophdawg11 deleted the changeset-release/release-next branch August 28, 2023 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant