summaryrefslogtreecommitdiff
path: root/packages/webapi/src
diff options
context:
space:
mode:
authorGravatar Erika <3019731+Princesseuh@users.noreply.github.com> 2023-03-03 14:47:24 +0100
committerGravatar GitHub <noreply@github.com> 2023-03-03 14:47:24 +0100
commit0abd1d3e42cf7bf5efb8c41f37e011b933fb0629 (patch)
tree0d8c4205cefbfae9311fca2e4827d62befc98cdb /packages/webapi/src
parent13f6f591e352696558b58de160672d7dc6aa1771 (diff)
downloadastro-0abd1d3e42cf7bf5efb8c41f37e011b933fb0629.tar.gz
astro-0abd1d3e42cf7bf5efb8c41f37e011b933fb0629.tar.zst
astro-0abd1d3e42cf7bf5efb8c41f37e011b933fb0629.zip
Use undici's FormData for polyfilling (#6413)
* fix(webapi): Use undici's FormData instead of a polyfill * chore: changeset
Diffstat (limited to 'packages/webapi/src')
-rw-r--r--packages/webapi/src/ponyfill.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/webapi/src/ponyfill.ts b/packages/webapi/src/ponyfill.ts
index 25c880fda..368f7ee5b 100644
--- a/packages/webapi/src/ponyfill.ts
+++ b/packages/webapi/src/ponyfill.ts
@@ -1,6 +1,5 @@
// @ts-check
-import { Event, EventTarget } from 'event-target-shim'
-import { FormData } from 'formdata-polyfill/esm.min.js'
+import { Event, EventTarget } from 'event-target-shim' // Look into removing when Node 18 is dropped for Node 20
import {
ByteLengthQueuingStrategy,
CountQueuingStrategy,
@@ -14,18 +13,18 @@ import {
WritableStream,
WritableStreamDefaultController,
WritableStreamDefaultWriter,
-} from 'node:stream/web'
-import { fetch, File, Headers, Request, Response } from 'undici'
+} from 'node:stream/web' // Remove when Node 16 is dropped for Node 18.
+import { fetch, File, FormData, Headers, Request, Response } from 'undici' // Remove when Node 16 is dropped for Node 18.
import { URLPattern } from 'urlpattern-polyfill'
import {
cancelAnimationFrame,
requestAnimationFrame,
} from './lib/AnimationFrame'
import { CharacterData, Comment, Text } from './lib/CharacterData'
-import { CustomEvent } from './lib/CustomEvent'
+import { CustomEvent } from './lib/CustomEvent' // Look into removing when Node 18 is dropped for Node 20
import { DOMException } from './lib/DOMException'
import { cancelIdleCallback, requestIdleCallback } from './lib/IdleCallback'
-import structuredClone from './lib/structuredClone'
+import structuredClone from './lib/structuredClone' // Remove when Node 16 is dropped for Node 18.
import { clearTimeout, setTimeout } from './lib/Timeout'
import { TreeWalker } from './lib/TreeWalker'