Commit 5aec6a2
authored
Dependencies vulnerabilities fix
* Dependency vulnerability fixed with Vite migration
* 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>1 parent bc89713 commit 5aec6a2
File tree
72 files changed
+5698
-21113
lines changed- documentation
- inventory-manager
- public
- src
- assets
- fonts
- IBM Plex Sans
- Montserrat
- images
- components
- page-content
- segment1-search_product
- input-bars
- segment2-new_product
- segment3-table
- segment
- segment4-metrics
- segment1-search_product/input-bars
- segment2-new_product
- segment3-table
- context
- pages
- services
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
72 files changed
+5698
-21113
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
21 | 4 | | |
22 | 5 | | |
23 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
This file was deleted.
0 commit comments