yasithdev opened a new pull request, #139:
URL: https://github.com/apache/airavata-portals/pull/139

   ## Track C (1/N) — Vite migration: the `django-airavata-api` library
   
   First step of the frontend modernization (Track C). The 
`django-airavata-api` lib is **pure JS** (115 model/service/util modules, **0 
Vue components**), so it's the clean keystone to migrate first — every other 
frontend package depends on it.
   
   **Why:** it was built with webpack 4 / webpack-cli 3 / Babel, which no 
longer installs or builds on a modern Node toolchain (webpack-cli 3 peer 
conflicts on npm; ajv dependency rot at build time). Confirmed broken on Node 
26.
   
   **Change — webpack → Vite (library mode):**
   - `vite.config.js`: UMD lib build (`window.AiravataAPI` → 
`airavata-api.js`), matching the old webpack output. Internal consumers import 
the **source** via the package `main`/`module` entry, so they're unaffected by 
the build-tool swap.
   - `package.json`: swap webpack/webpack-cli/Babel/jest for **Vite + Vitest** 
(+ jsdom, for the `window` the entry touches at import). Drop the 
Babel-injected polyfill deps (esbuild targets modern browsers); keep the real 
runtime deps (`uuid`, `url-parse`, `stacktrace-js`). Delete `webpack.config.js` 
and `babel.config.js`.
   - tests: Vitest with jest-compatible globals; the one `jest.mock` spec uses 
the hoisted `vi.mock` equivalent.
   
   **Verified on Node 26:** clean `yarn install` (no `--legacy-peer-deps`, 298 
pkgs vs 903), `yarn build` produces the UMD bundle, **`yarn test` 31/31 pass**.
   
   Next: the `common` shared-UI package and the per-app frontends (these carry 
the Vue 2 → 3 work).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to