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 #10636

Merged
merged 2 commits into from
Jun 23, 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.

Releases

[email protected]

Minor Changes

  • Add support for application/json and text/plain encodings for useSubmit/fetcher.submit. To reflect these additional types, useNavigation/useFetcher now also contain navigation.json/navigation.text and fetcher.json/fetcher.text which include the json/text submission if applicable. (#10413)

    // The default behavior will still serialize as FormData
    function Component() {
      let navigation = useNavigation();
      let submit = useSubmit();
      submit({ key: "value" }, { method: "post" });
      // navigation.formEncType => "application/x-www-form-urlencoded"
      // navigation.formData    => FormData instance
    }
    
    async function action({ request }) {
      // request.headers.get("Content-Type") => "application/x-www-form-urlencoded"
      // await request.formData()            => FormData instance
    }
    // Opt-into JSON encoding with `encType: "application/json"`
    function Component() {
      let navigation = useNavigation();
      let submit = useSubmit();
      submit({ key: "value" }, { method: "post", encType: "application/json" });
      // navigation.formEncType => "application/json"
      // navigation.json        => { key: "value" }
    }
    
    async function action({ request }) {
      // request.headers.get("Content-Type") => "application/json"
      // await request.json()                => { key: "value" }
    }
    // Opt-into text encoding with `encType: "text/plain"`
    function Component() {
      let navigation = useNavigation();
      let submit = useSubmit();
      submit("Text submission", { method: "post", encType: "text/plain" });
      // navigation.formEncType => "text/plain"
      // navigation.text        => "Text submission"
    }
    
    async function action({ request }) {
      // request.headers.get("Content-Type") => "text/plain"
      // await request.text()                => "Text submission"
    }

Patch Changes

  • (Remove) Fix FormData submitter feature detection check (#10627)
  • When submitting a form from a submitter element, prefer the built-in new FormData(form, submitter) instead of the previous manual approach in modern browsers (those that support the new submitter parameter). For browsers that don't support it, we continue to just append the submit button's entry to the end, and we also add rudimentary support for type="image" buttons. If developers want full spec-compliant support for legacy browsers, they can use the formdata-submitter-polyfill. (#9865)
  • Upgrade typescript to 5.1 (#10581)
  • Call window.history.pushState/replaceState before updating React Router state (instead of after) so that window.location matches useLocation during synchronous React 17 rendering. However, generally apps should not be relying on window.location and should always reference useLocation when possible, as window.location will not be in sync 100% of the time (due to popstate events, concurrent mode, etc.) (#10448) (#10211)
  • Fix tsc --skipLibCheck:false issues on React 17 (#10622)
  • Updated dependencies:

@remix-run/[email protected]

Minor Changes

  • Add support for application/json and text/plain encodings for router.navigate/router.fetch submissions. To leverage these encodings, pass your data in a body parameter and specify the desired formEncType: (#10413)

    // By default, the encoding is "application/x-www-form-urlencoded"
    router.navigate("/", {
      formMethod: "post",
      body: { key: "value" },
    });
    
    async function action({ request }) {
      // await request.formData() => FormData instance with entry [key=value]
    }
    // Pass `formEncType` to opt-into a different encoding
    router.navigate("/", {
      formMethod: "post",
      formEncType: "application/json",
      body: { key: "value" },
    });
    
    async function action({ request }) {
      // await request.json() => { key: "value" }
    }
    router.navigate("/", {
      formMethod: "post",
      formEncType: "text/plain",
      body: "Text submission",
    });
    
    async function action({ request }) {
      // await request.text() => "Text submission"
    }

Patch Changes

  • Fix unstable_useBlocker key issues in StrictMode (#10573)
  • Avoid calling shouldRevalidate for fetchers that have not yet completed a data load (#10623)
  • Upgrade typescript to 5.1 (#10581)
  • Strip basename from the location provided to <ScrollRestoration getKey> to match the useLocation behavior (#10550)
  • Call window.history.pushState/replaceState before updating React Router state (instead of after) so that window.location matches useLocation during synchronous React 17 rendering. However, generally apps should not be relying on window.location and should always reference useLocation when possible, as window.location will not be in sync 100% of the time (due to popstate events, concurrent mode, etc.) (#10448) (#10211)

[email protected]

Patch Changes

  • Fix unstable_useBlocker key issues in StrictMode (#10573)
  • Fix generatePath when passed a numeric 0 value parameter (#10612)
  • Upgrade typescript to 5.1 (#10581)
  • Strip basename from locations provided to unstable_useBlocker functions to match useLocation (#10573)
  • Fix tsc --skipLibCheck:false issues on React 17 (#10622)
  • Updated dependencies:

[email protected]

Patch Changes

[email protected]

Patch Changes

@brophdawg11 brophdawg11 merged commit 09b6cbe into release-next Jun 23, 2023
@brophdawg11 brophdawg11 deleted the changeset-release/release-next branch June 23, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant