Prefer native fetch over Axios in frontend (and integration tests)

Aperta
#2,930 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@DerekRoberts ci sta già lavorando.

Dal 2/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Context

Axios in the quickstart frontend is a thin wrapper (api-service.ts: axios.create with /api + JSON headers and a logging response interceptor; Dashboard uses .get('/v1/users')). Backend Nest does not need Axios. Integration tests also pull Axios.

Native Fetch is available in modern browsers and Node 18+ (quickstart engines are already Node ≥22). Dropping Axios reduces supply-chain / Renovate alert noise for every fork.

This is voluntary platform influence via the template and canaries — not a mandate for other teams.

Proposal

  1. Canary first (prove the pattern / catch breaks).
  2. Replace frontend Axios with a small in-repo fetch helper (baseURL, JSON, throw on !res.ok, keep equivalent logging).
  3. Update integration tests the same way; remove axios from frontend/package.json and common/tests/integration/package.json.
  4. Brief note in README/AGENTS: prefer fetch for new HTTP; Axios only when you need features fetch does not cover (e.g. upload progress, complex interceptors).

Out of scope

  • Org-wide Axios removal in other teams' repos
  • Rewrites of apps with heavy Axios-specific clients

Acceptance

  • No axios dependency in frontend or integration test packages
  • Existing frontend user-list path still works in CI / smoke
  • Short doc note on preferred HTTP client
Lingua principale
TypeScript
Stelle
32
Fork
10
Merge medio
4h 13m
PR unite (30g)
45

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bcgov/quickstart-openshift

Tutte le issue di bcgov/quickstart-openshift

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.