Skip to content

Conversation

@codercms
Copy link
Contributor

@codercms codercms commented Jun 11, 2023

Fixes compatibility with libraries that call the fetch API as fetch(new Request(...someParams)) without an init argument

One of these libraries is https://github.com/sindresorhus/ky (https://github.com/sindresorhus/ky/blob/main/source/utils/timeout.ts)

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Fixes compatibility with libraries that call the fetch API as `fetch(new Request(...someParams))` without an `init` argument

One of these libraries is https://github.com/sindresorhus/ky (https://github.com/sindresorhus/ky/blob/main/source/utils/timeout.ts)
@changeset-bot
Copy link

changeset-bot bot commented Jun 11, 2023

🦋 Changeset detected

Latest commit: 7fefd9a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codercms codercms changed the title fix: Fetch doesn't respect headers from 1st arg if it's type is Request fix: Fetch doesn't respect headers from 1st arg if its type is Request Jun 11, 2023
Co-authored-by: Willow (GHOST) <[email protected]>
@ghostdevv
Copy link
Member

Should we have a changeset here?

@codercms
Copy link
Contributor Author

@ghostdevv done :)

@ghostdevv ghostdevv changed the title fix: Fetch doesn't respect headers from 1st arg if its type is Request fix: fetch doesn't respect headers from 1st arg if its type is Request Jun 11, 2023
@ghostdevv ghostdevv merged commit 5ef7d0b into sveltejs:master Jun 11, 2023
@github-actions github-actions bot mentioned this pull request Jun 11, 2023
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.

3 participants