Skip to content

Commit

Permalink
remove fetch-enhanced and undici dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Dec 21, 2023
1 parent ff0d328 commit ae28737
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 85 deletions.
72 changes: 0 additions & 72 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"eslint": "8.55.0",
"eslint-config-silverwind": "79.3.6",
"execa": "8.0.1",
"fetch-enhanced": "12.0.0",
"glowie": "1.2.0",
"hosted-git-info": "7.0.1",
"memize": "2.1.0",
Expand All @@ -35,7 +34,6 @@
"supports-color": "9.4.0",
"text-table": "0.2.0",
"timerel": "5.4.3",
"undici": "6.2.0",
"versions": "12.0.0",
"vitest": "1.0.1",
"vitest-config-silverwind": "5.0.0"
Expand Down
12 changes: 1 addition & 11 deletions updates.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env node
import ansiRegex from "ansi-regex";
import fetchEnhanced from "fetch-enhanced";
import minimist from "minimist";
import rat from "registry-auth-token";
import rc from "rc";
import {parse, coerce, diff, gt, gte, lt, neq, valid, validRange} from "semver";
import textTable from "text-table";
import {cwd, stdout, argv, env, exit, versions} from "node:process";
import {cwd, stdout, argv, env, exit} from "node:process";
import hostedGitInfo from "hosted-git-info";
import {join, dirname, basename, resolve} from "node:path";
import {lstatSync, readFileSync, truncateSync, writeFileSync, accessSync} from "node:fs";
Expand All @@ -18,15 +17,6 @@ import pAll from "p-all";
import memize from "memize";
import picomatch from "picomatch";

// in bun use fetch as-is, it has built-in proxy support
// in node, wrap the native fetch to add proxy support
let fetch;
if (versions?.bun) {
fetch = globalThis.fetch;
} else {
fetch = fetchEnhanced(globalThis.fetch, {undici: true});
}

const MAX_SOCKETS = 96;
const sep = "\0";

Expand Down

0 comments on commit ae28737

Please sign in to comment.