Phase 1: Scaffolding & tooling (Vite + React + TypeScript) - #686
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
Phase 1: Scaffolding & tooling (Vite + React + TypeScript)#686devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the 8-phase Angular 9 → React (Vite + TypeScript) migration: stand up the React build alongside the existing Angular app without porting any UI. The Angular application source stays in place (
src/app/**,src/main.ts,src/polyfills.ts,src/index.html,src/styles.scss,src/assets,src/manifest.json,ngsw-config.json) — later phases port it and Phase 6 is the cutover.The one non-obvious piece: the repo now has two coexisting entrypoints (
src/main.tsfor Angular,src/main.tsxfor React), sotsconfig.jsondeliberately allow-lists only the new files rather than the wholesrctree, which is what keepsnpm run buildgreen while Angular sources with decorators/RxJS are still present:Vite's entry is a new root
index.html(with<div id="root">) —src/index.htmlis untouched and still belongs to the Angular build.Migrated in this phase
package.json: dropped@angular/*,zone.js,rxjs,rxjs-compat,tslib,node-fetch,unfetch, and the karma/jasmine/protractor/tslint tooling; addedreact18.3.1,react-dom18.3.1,react-router-dom7.18.2,typescript5.6.2,vite5.4.21,@vitejs/plugin-react4.3.1,sass1.79.4,@types/react(-dom). No HTTP client added — later phases use nativefetch.dev(vite),build(tsc && vite build),preview(vite preview).vite.config.ts, rootindex.html,src/main.tsx(React 18createRoot+StrictMode), placeholdersrc/App.tsx,src/vite-env.d.ts.tsconfig.jsonrewritten for React/JSX ("jsx": "react-jsx",moduleResolution: "bundler",strict,noEmit).angular.json,tsconfig.app.json,tsconfig.spec.json,karma.conf.js, the protractore2e/directory, and the staleyarn.lock; added apackage-lock.jsonfor the new dependency set.Router version note: this landed on
react-router-dom7.18.2 rather than 6.x — the Snyk check flagged two findings inreact-router6.x (SNYK-JS-REACTROUTER-18313130unsafe reflection,SNYK-JS-REACTROUTER-18313144open redirect) that are only fixed in 7.18.0+. Nothing imports the router yet (Phase 1 is a placeholder app), so Phase 6 should be written against the v7 API.vitewas likewise bumped 5.4.8 → 5.4.21 for a Snyk finding.Verified locally:
npm install,npm run build(green, emitsdist/), andnpm run dev(serves the placeholder with<div id="root">).Remaining for later phases
Note for later phases: the Hacker News API base URL
https://node-hnapi.herokuapp.commust be preserved.Phase spec (restated)
Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/b08019bee50c44a4a2800b537f6e726e
Requested by: @abboudp
Devin Review