Skip to content

Commit

Permalink
feat: [AUTH-4057] Clean up dependecy on DOM type usage (#336)
Browse files Browse the repository at this point in the history
* feat: [AUTH-4057] Clean up dependecy on DOM type usage

* 11.4.2

* pr comments
  • Loading branch information
max-stytch authored Sep 4, 2024
1 parent 4379ce4 commit 2624ba5
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 101 deletions.
2 changes: 2 additions & 0 deletions dist/shared/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/shared/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dispatcher } from "undici";
import type { Dispatcher, BodyInit } from "undici";
import { RequestError, StytchError, StytchErrorJSON } from "./errors";

export interface fetchConfig {
Expand Down Expand Up @@ -41,6 +41,8 @@ export async function request<T>(
response = await fetch(url.toString(), {
method: requestConfig.method,
body: body,
// @ts-expect-error [AUTH-2047] things fail catastrophically when using the NextJS fetch-cache
// so we need to explicitly opt out of it using the "no-store" tag - which isn't part of the core Node fetch API
cache: "no-store",
...fetchConfig,
headers: finalHeaders,
Expand Down
182 changes: 96 additions & 86 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2624ba5

Please sign in to comment.