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) #6526

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 2, 2023

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

@remix-run/[email protected]

Minor Changes

  • built-in tls support (#6483)

    New options:

    • --tls-key / tlsKey: TLS key
    • --tls-cert / tlsCert: TLS Certificate

    If both TLS options are set, scheme defaults to https

    Example

    Install mkcert and create a local CA:

    brew install mkcert
    mkcert -install

    Then make sure you inform node about your CA certs:

    export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"

    👆 You'll probably want to put that env var in your scripts or .bashrc/.zshrc

    Now create key.pem and cert.pem:

    mkcert -key-file key.pem -cert-file cert.pem localhost

    See mkcert docs for more details.

    Finally, pass in the paths to the key and cert via flags:

    remix dev --tls-key=key.pem --tls-cert=cert.pem

    or via config:

    module.exports = {
      future: {
        unstable_dev: {
          tlsKey: "key.pem",
          tlsCert: "cert.pem",
        },
      },
    };

    That's all that's needed to set up the Remix Dev Server with TLS.

    🚨 Make sure to update your app server for TLS as well.

    For example, with express:

    import express from "express";
    import https from "node:https";
    import fs from "node:fs";
    
    let app = express();
    
    // ...code setting up your express app...
    
    let appServer = https.createServer(
      {
        key: fs.readFileSync("key.pem"),
        cert: fs.readFileSync("cert.pem"),
      },
      app
    );
    
    appServer.listen(3000, () => {
      console.log("Ready on https://localhost:3000");
    });

    Known limitations

    remix-serve does not yet support TLS.
    That means this only works for custom app server using the -c flag for now.

  • Add caching to PostCSS for regular stylesheets (#6505)

  • Reuse dev server port for WebSocket (Live Reload,HMR,HDR) (#6476)

    As a result the webSocketPort/--websocket-port option has been obsoleted.
    Additionally, scheme/host/port options for the dev server have been renamed.

    Available options are:

    Option flag config default
    Command -c / --command command remix-serve <server build path>
    Scheme --scheme scheme http
    Host --host host localhost
    Port --port port Dynamically chosen open port
    No restart --no-restart restart: false restart: true

    Note that scheme/host/port options are for the dev server, not your app server.
    You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL).

Patch Changes

  • Fix warnings when importing CSS files with future.unstable_dev enabled (#6506)

  • Fix Tailwind performance issue when postcss.config.js contains plugins: { tailwindcss: {} } and remix.config.js contains both tailwind: true and postcss: true. (#6468)

    Note that this was not an issue when the plugin function had been explicitly called, i.e. plugins: [tailwindcss()]. Remix avoids adding the Tailwind plugin to PostCSS if it's already present but we were failing to detect when the plugin function hadn't been called — either because the plugin function itself had been passed, i.e. plugins: [require('tailwindcss')], or the plugin config object syntax had been used, i.e. plugins: { tailwindcss: {} }.

  • Faster server export removal for routes when unstable_dev is enabled. (#6455)

    Also, only render modulepreloads on SSR.
    Do not render modulepreloads when hydrated.

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • better error message when remix-serve is not found (#6477)

  • restore color for app server output (#6485)

    • Fix route ranking bug with pathless layout route next to a sibling index route (#4421)

      • Under the hood this is done by removing the trailing slash from all generated path values since the number of slash-delimited segments counts towards route ranking so the trailing slash incorrectly increases the score for routes
    • Support sibling pathless layout routes by removing pathless layout routes from the unique route path checks in conventional route generation since they inherently trigger duplicate paths

  • fix dev server crashes caused by ungraceful hdr error handling (#6467)

  • Updated dependencies:

@remix-run/[email protected]

Minor Changes

  • Faster server export removal for routes when unstable_dev is enabled. (#6455)

    Also, only render modulepreloads on SSR.
    Do not render modulepreloads when hydrated.

  • Force Typescript to simplify type produced by Serialize. (#6449)

    As a result, the following types and functions have simplified return types:

    • SerializeFrom
    • useLoaderData
    • useActionData
    • useFetcher
    type Data = { hello: string; when: Date };
    
    // BEFORE
    type Unsimplified = SerializeFrom<Data>;
    //   ^? SerializeObject<UndefinedToOptional<{ hello: string; when: Date }>>
    
    // AFTER
    type Simplified = SerializeFrom<Data>;
    //   ^? { hello: string; when: string }
  • Reuse dev server port for WebSocket (Live Reload,HMR,HDR) (#6476)

    As a result the webSocketPort/--websocket-port option has been obsoleted.
    Additionally, scheme/host/port options for the dev server have been renamed.

    Available options are:

    Option flag config default
    Command -c / --command command remix-serve <server build path>
    Scheme --scheme scheme http
    Host --host host localhost
    Port --port port Dynamically chosen open port
    No restart --no-restart restart: false restart: true

    Note that scheme/host/port options are for the dev server, not your app server.
    You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL).

Patch Changes

  • retry HDR revalidations in development mode to aid in 3rd party server race conditions (#6287)

@remix-run/[email protected]

Minor Changes

  • Add errorHeaders parameter to the leaf headers() function to expose headers from thrown responses that bubble up to ancestor route boundaries. If the throwing route contains the boundary, then errorHeaders will be the same object as loaderHeaders/actionHeaders for that route. (#6425)

  • Add optional handleError export for custom server-side error processing. This is a new optional export from your entry.server.tsx that will be called with any encountered error on the Remix server (loader, action, or render error): (#6524)

    // entry.server.tsx
    export function handleError(
      error: unknown,
      { request, params, context }: DataFunctionArgs
    ): void {
      if (error instanceof Error) {
        sendErrorToBugReportingService(error);
        console.error(formatError(error));
      } else {
        let unknownError = new Error("Unknown Server Error");
        sendErrorToBugReportingService(unknownError);
        console.error(unknownError);
      }
    }
  • Force Typescript to simplify type produced by Serialize. (#6449)

    As a result, the following types and functions have simplified return types:

    • SerializeFrom
    • useLoaderData
    • useActionData
    • useFetcher
    type Data = { hello: string; when: Date };
    
    // BEFORE
    type Unsimplified = SerializeFrom<Data>;
    //   ^? SerializeObject<UndefinedToOptional<{ hello: string; when: Date }>>
    
    // AFTER
    type Simplified = SerializeFrom<Data>;
    //   ^? { hello: string; when: string }
  • Added a new future.v2_headers future flag to opt into automatic inheriting of ancestor route headers functions so you do not need to export a headers function from every possible leaf route if you don't wish to. (#6431)

  • Reuse dev server port for WebSocket (Live Reload,HMR,HDR) (#6476)

    As a result the webSocketPort/--websocket-port option has been obsoleted.
    Additionally, scheme/host/port options for the dev server have been renamed.

    Available options are:

    Option flag config default
    Command -c / --command command remix-serve <server build path>
    Scheme --scheme scheme http
    Host --host host localhost
    Port --port port Dynamically chosen open port
    No restart --no-restart restart: false restart: true

    Note that scheme/host/port options are for the dev server, not your app server.
    You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL).

Patch Changes

  • Automatically include set-cookie headers from bubbled thrown responses (#6475)

  • Properly handle thrown ErrorResponse instances inside resource routes (#6320)

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • Ensure un-sanitized server errors are logged on the server during document requests (#6495)

[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • Updated dependencies:

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • Updated dependencies:

@remix-run/[email protected]

Patch Changes

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • Fix request.clone() instanceof Request returning false. (#6512)

  • Updated dependencies:

@remix-run/[email protected]

Patch Changes

  • Add HeadersArgs type to be consistent with loaders/actions/meta and allows for using a function declaration in addition to an arrow function expression (#6247)

    import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno
    
    export function headers({ loaderHeaders }: HeadersArgs) {
      return {
        "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback",
      };
    }
  • Updated dependencies:

@remix-run/[email protected]

Patch Changes

@remix-run/[email protected]

Patch Changes

[email protected]

remix

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

@brophdawg11 brophdawg11 merged commit 3b435eb into release-next Jun 2, 2023
@brophdawg11 brophdawg11 deleted the changeset-release/release-next branch June 2, 2023 18:26
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.

1 participant