From d45b587434372ba1fa24454e604ff9b058e0c341 Mon Sep 17 00:00:00 2001 From: ThatGuySam Date: Mon, 6 Apr 2026 12:09:16 -0500 Subject: [PATCH] Finish axios migration via shared native HTTP helper Replace all in-scope axios callsites with a new helpers/http.js wrapper over native fetch, including JSON/text GET, JSON POST, HEAD checks, and transient 5xx retry behavior; update all browser, build, script, and proxy API clients to use it; add focused unit tests; and remove axios from package dependencies. Constraint: Preserve API/build and deployment behavior while lowering transport surface area. Rejected: inline fetch replacements at each callsite | rejected to avoid inconsistent error/retry semantics. Confidence: high Scope-risk: moderate Directive: Keep helper in place as the transport boundary and update tests when changing request semantics. Tested: pnpm run -s typecheck, pnpm -s run test-prebuild, pnpm -s run test, pnpm -s run test:browser, pnpm -s run netlify-build, smoke GETs on /apple-silicon-app-test and /apple-silicon-app-test/?version=2 Not-tested: branch/netlify deployment health in CI pipeline after merge --- components/all-updates-subscribe.vue | 27 +- components/email-subscribe.vue | 35 +-- docs/plans/axios-removal.md | 269 +++++++++++++++++++ helpers/api/client.js | 6 +- helpers/api/sitemap/parse.js | 15 +- helpers/api/static.js | 9 +- helpers/api/youtube/build.js | 5 +- helpers/app-files-scanner.js | 9 +- helpers/build-app-list.js | 26 +- helpers/build-device-list.js | 8 +- helpers/build-game-list.js | 8 +- helpers/build-homebrew-list.js | 12 +- helpers/build-video-list.js | 2 +- helpers/http.js | 244 +++++++++++++++++ helpers/pagefind/load-sitemap-endpoints.ts | 34 +-- package.json | 1 - pages/apple-silicon-app-test.vue | 1 - pnpm-lock.yaml | 24 -- scripts/download-sitemaps.js | 6 +- scripts/scan-new-apps.js | 6 +- scripts/vercel-post-deploy/index.js | 4 +- test/listings/index.test.ts | 5 +- test/prebuild/http.test.ts | 170 ++++++++++++ test/prebuild/load-sitemap-endpoints.test.ts | 104 +++---- test/scanner/plist.test.ts | 61 ++--- 25 files changed, 824 insertions(+), 267 deletions(-) create mode 100644 docs/plans/axios-removal.md create mode 100644 helpers/http.js create mode 100644 test/prebuild/http.test.ts diff --git a/components/all-updates-subscribe.vue b/components/all-updates-subscribe.vue index d24abf1..b6741a8 100644 --- a/components/all-updates-subscribe.vue +++ b/components/all-updates-subscribe.vue @@ -59,10 +59,10 @@