diff --git a/assets/js/src/contact.js b/assets/js/src/contact.js index 7f06cff0..80f2e904 100644 --- a/assets/js/src/contact.js +++ b/assets/js/src/contact.js @@ -1,5 +1,5 @@ import "vanilla-hcaptcha"; -import fetch from "cross-fetch"; +import fetch from "unfetch"; // don't continue if there isn't a contact form on this page // TODO: be better and only do any of this on /contact/ diff --git a/assets/js/src/hits.js b/assets/js/src/hits.js index 483a01f4..249619ab 100644 --- a/assets/js/src/hits.js +++ b/assets/js/src/hits.js @@ -1,6 +1,6 @@ import { h, render } from "preact"; import { useState, useEffect } from "preact/hooks"; -import fetch from "cross-fetch"; +import fetch from "unfetch"; import canonicalUrl from "get-canonical-url"; // shared react components: diff --git a/assets/js/src/projects.js b/assets/js/src/projects.js index 2202e2ce..d41e1a7b 100644 --- a/assets/js/src/projects.js +++ b/assets/js/src/projects.js @@ -1,6 +1,6 @@ import { h, render, Fragment } from "preact"; import { useState, useEffect } from "preact/hooks"; -import fetch from "cross-fetch"; +import fetch from "unfetch"; import dayjs from "dayjs"; import dayjsLocalizedFormat from "dayjs/plugin/localizedFormat.js"; import dayjsRelativeTime from "dayjs/plugin/relativeTime.js"; diff --git a/package.json b/package.json index 4f9e90c3..c62b9914 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "@primer/octicons-react": "^16.1.1", "@sentry/node": "^6.15.0", "clipboard-copy": "^4.0.1", - "cross-fetch": "^3.1.4", "dark-mode-switcheroo": "^0.10.0", "dayjs": "^1.10.7", "faunadb": "^4.4.1", @@ -51,6 +50,7 @@ "trim-newlines": "^4.0.2", "twemoji": "^13.1.0", "twemoji-emojis": "^14.1.0", + "unfetch": "^4.2.0", "vanilla-hcaptcha": "^1.0.0-alpha" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index fab16b49..0cb7e660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2787,7 +2787,7 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cross-fetch@^3.0.6, cross-fetch@^3.1.4: +cross-fetch@^3.0.6: version "3.1.4" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== @@ -9949,6 +9949,11 @@ undertaker@^1.2.1: object.reduce "^1.0.0" undertaker-registry "^1.0.0" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -10173,9 +10178,9 @@ vinyl@^2.0.0, vinyl@^2.2.0: replace-ext "^1.0.0" watchpack@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce" - integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.0.tgz#a41bca3da6afaff31e92a433f4c856a0c25ea0c4" + integrity sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2"