'react-scripts' dependencies vulnerabilities fixed#32
Merged
technologic-technologic merged 1 commit intogen-aifrom Oct 15, 2025
Merged
'react-scripts' dependencies vulnerabilities fixed#32technologic-technologic merged 1 commit intogen-aifrom
technologic-technologic merged 1 commit intogen-aifrom
Conversation
* Vite migration, port update, API calls fix, and testing overhaul
## Key changes
- **Build & Dev Server**
- Replaced CRA with Vite; kept app logic/components unchanged.
- Removed `react-scripts`; added `vite` with minimal `vite.config.ts`.
- Updated npm scripts:
- `dev` → Vite dev server (`vite`) for local development.
- `build` → `vite build`.
- `preview` → `vite preview` (future use).
- `lint` → placeholder for later.
- `test` → run all tests manually.
- Adopted Vite layout (`index.html` at root; `src/` unchanged).
- Set client default port to **8080** in `vite.config.ts`; improved proxy rules.
- Deleted IDE config files.
- No dependency upgrades beyond the toolchain swap.
- **Data Fetching & Context**
- Fixed duplicate backend calls by consolidating fetches in `DataProvider`.
- Exposed a single data context entry point for consumer components.
- **Testing**
- Migrated to Vitest; aligned environment with Vite.
- Added `jsdom` to `devDependencies` and enabled globals in test config.
- Added app-level test parameters for smoother runs.
- Updated `.gitignore`; finalized `package-lock.json` one last time.
- Added `test` script to `package.json`.
- Created new context tests: `DataContext.test.tsx`, `SearchContext.test.tsx`.
- Fixed component tests: `InventoryTablePageSelector.test.tsx`, `InventoryTable.test.tsx`, `NewProductButton.test.tsx`, `ProductForm.test.tsx`.
- Refactored for new context management: `InventoryTable.tsx`, `InventoryTableObj.tsx`, `InventoryTablePageSelector.tsx`, `EncoraContent.tsx`.
## Breaking or pending changes
- `SearchBar` component testing is still pending.
- Update documentation to the new version.
---------
Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
PR Summary
|
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.
* Dependency vulnerability fixed with Vite migration
Key changes
Build & Dev Server
react-scripts; addedvitewith minimalvite.config.ts.dev→ Vite dev server (vite) for local development.build→vite build.preview→vite preview(future use).lint→ placeholder for later.test→ run all tests manually.index.htmlat root;src/unchanged).vite.config.ts; improved proxy rules.Data Fetching & Context
DataProvider.Testing
jsdomtodevDependenciesand enabled globals in test config..gitignore; finalizedpackage-lock.jsonone last time.testscript topackage.json.DataContext.test.tsx,SearchContext.test.tsx.InventoryTablePageSelector.test.tsx,InventoryTable.test.tsx,NewProductButton.test.tsx,ProductForm.test.tsx.InventoryTable.tsx,InventoryTableObj.tsx,InventoryTablePageSelector.tsx,EncoraContent.tsx.Breaking or pending changes