Skip to content

Commit

Permalink
Merge pull request #138 from xicri/refactor-undici
Browse files Browse the repository at this point in the history
Migrate from node-fetch to undici
  • Loading branch information
xicri authored Jan 11, 2024
2 parents b12d161 + 69363e6 commit c326697
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 107 deletions.
143 changes: 41 additions & 102 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"klona": "^2.0.4",
"lodash-es": "^4.17.21",
"luxon": "^3.2.1",
"node-fetch": "^3.3.2",
"nuxt": "^3.0.0",
"nuxt-simple-robots": "4.0.0-rc.11",
"pinia": "^2.0.13",
"sass": "^1.32.10"
"sass": "^1.32.10",
"undici": "^6.3.0"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.332.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/postinstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Therefore, you cannot convert this JavaScript file to TypeScript.
*/
import { copyFile, mkdir, writeFile } from "fs/promises";
import fetch from "node-fetch";
import { fetch } from "undici";
import { resolve } from "path";
import { fileURLToPath } from "url";
import "dotenv/config";
Expand Down
2 changes: 1 addition & 1 deletion scripts/purge-cache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch from "node-fetch";
import { fetch } from "undici";

const zone = process.env.CLOUDFLARE_ZONE;
const apiToken = process.env.CLOUDFLARE_API_TOKEN;
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e.pwtest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from "@playwright/test";
import fetch from "node-fetch";
import { fetch } from "undici";
import type { Locale } from "../types";

const { describe } = test;
Expand Down

0 comments on commit c326697

Please sign in to comment.