generated from tjx666/awesome-vscode-extension-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from tjx666/perf/remove-axios-and-got
perf: remove axios and got
- Loading branch information
Showing
4 changed files
with
37 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,7 +324,6 @@ | |
"dependencies": { | ||
"@npmcli/config": "^8.3.4", | ||
"@pnpm/config": "^21.6.1", | ||
"axios": "^1.7.2", | ||
"detect-package-manager": "^3.0.2", | ||
"escape-string-regexp": "^5.0.0", | ||
"execa": "^9.3.0", | ||
|
@@ -374,5 +373,10 @@ | |
"tsx": "^4.16.2", | ||
"type-fest": "^4.21.0", | ||
"typescript": "~5.5.3" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/build/src/main.js b/build/src/main.js | ||
index 4d2f1549cb2793091846f0b9b3ab9a04be218ffe..15d60c4edfaa0bb8d2b7fa695ac680bc23b4be23 100644 | ||
--- a/build/src/main.js | ||
+++ b/build/src/main.js | ||
@@ -2,7 +2,6 @@ import{env}from"node:process"; | ||
|
||
import{handleOfflineError}from"./cache/offline.js"; | ||
import{readCachedVersions,writeCachedVersions}from"./cache/read.js"; | ||
-import{fetchIndex}from"./fetch.js"; | ||
import{normalizeIndex}from"./normalize.js"; | ||
import{getOpts}from"./options.js"; | ||
|
||
@@ -55,3 +54,10 @@ return versionsInfo | ||
return handleOfflineError(error) | ||
} | ||
}; | ||
+ | ||
+const fetchIndex=async(fetchNodeOpts)=>{ | ||
+ const mirror=fetchNodeOpts?.mirror ?? "https://nodejs.org/dist"; | ||
+ const url=`${mirror}/index.json`; | ||
+ const response=await fetch(url); | ||
+ return response.json() | ||
+}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters