Commit 6d7550a
authored
HUL-48 | Modernize Development Environment and Testing Infrastructure (#49)
* fix: modernize SASS configuration and eliminate deprecation warnings
- Update sass-loader to use modern API instead of legacy JS API
- Add sass:math and sass:color module imports to SASS files
- Replace deprecated ceil(), floor(), and darken() functions with modern equivalents
- Configure sass-loader to suppress import deprecation warnings from bootstrap-sass
- Add quietDeps and silenceDeprecations options to reduce build noise
* chore: modernize test environment with React Testing Library
- Add @testing-library/react and @testing-library/dom for modern component testing
- Replace deprecated isparta-loader with babel-plugin-istanbul for code coverage
- Update chai to v4.3.10 (CommonJS compatible version)
- Remove legacy babel-core v5 and associated deprecated testing utilities
- Clean up unused testing dependencies and modernize test infrastructure
* chore: modernize webpack toolchain
- Migrate from webpack-dotenv-plugin to dotenv-webpack for better webpack 5 compatibility
- Update webpack-dev-server to v4 API with async/await pattern replacing deprecated callbacks
- Modernize webpack development configuration:
- Remove deprecated HMR plugins (HotModuleReplacementPlugin, NoEmitOnErrorsPlugin)
- Update entry configuration for webpack 5
- Add modern optimization settings with emitOnErrors: false
- Update devServer configuration with webpack-dev-server v4 API:
- Add client overlay configuration
- Update devMiddleware settings
- Configure host and allowedHosts for broader accessibility
- Add webpack 5 compatible babel-plugin-istanbul for code coverage
- Fix ESLint configuration for Node.js environment compatibility
* refactor: simplify and modernize Babel configuration
- Remove 16 redundant Babel plugins now handled by @babel/preset-env:
- Remove @babel/plugin-proposal-class-properties (ES2022 standard)
- Remove @babel/plugin-proposal-json-strings (ES2019 standard)
- Remove @babel/plugin-proposal-logical-assignment-operators (ES2021 standard)
- Remove @babel/plugin-proposal-nullish-coalescing-operator (ES2020 standard)
- Remove @babel/plugin-proposal-numeric-separator (ES2021 standard)
- Remove @babel/plugin-proposal-optional-chaining (ES2020 standard)
- Remove experimental/unused proposal plugins for do-expressions,
export-default-from, export-namespace-from, function-bind,
function-sent, pipeline-operator, throw-expressions
- Remove syntax plugins covered by preset-env (dynamic-import, import-meta)
- Replace deprecated @babel/polyfill with modern core-js/stable import
- Keep only essential Babel packages:
- @babel/plugin-proposal-decorators (legacy mode still needed)
- Core Babel packages (@babel/core, presets, eslint-parser)
- Simplify .babelrc to use only presets + decorators plugin
- Update package.json and yarn.lock to reflect reduced dependency footprint
* refactor: modernize webpack asset handling and reduce dependencies
- Replace file-loader with Webpack 5 native asset/resource modules
- Remove unused url-loader dependency
- Update webpack configuration to use modern asset handling for mp4/ogg/svg files
* chore: clean up redundant dependencies and polyfills
- Remove es6-promise and isomorphic-fetch as they're redundant with core-js
- Move sass-loader from dependencies to devDependencies where it belongs
- Remove unnecessary polyfill imports from index.js
* feat: migrate from Karma to Jest test framework
- Replace Karma test runner with Jest 30.2.0 and jsdom environment
- Add comprehensive Jest configuration with module mapping and coverage
- Convert test syntax from Mocha/Chai to Jest expectations
- Remove 9+ legacy Karma packages (karma, karma-*, chai, mocha, puppeteer)
- Configure V8 coverage provider to avoid Istanbul compatibility issues
- Update ESLint environment from mocha to jest
- Modernize test setup with @testing-library/jest-dom matchers
* fix: resolve webpack NODE_ENV conflicts and improve Docker compatibility
- Remove redundant DefinePlugin NODE_ENV definitions from webpack configs
- Use webpack mode setting for NODE_ENV (production for build, development for dev)
- Configure dotenv-webpack with safe=false and defaults for Docker builds
- Update @babel/core to ^7.22.0 to resolve plugin compatibility issues
* chore: update rimraf to v6.1.2
- Updates rimraf from 5.0.10 to 6.1.2 to resolve glob security vulnerability.
Fixes high severity command injection issue in transitive dependency.
* chore: upgrade eslint to v9.39.2
- Updates eslint from 8.57.0 to 9.39.2 for latest security patches,
performance improvements, and bug fixes.
* fix: resolve security vulnerabilities with npm audit fix
Automatically fixes 8 vulnerabilities:
- @babel/runtime: RegExp complexity issue
- brace-expansion: RegExp denial of service
- glob: Command injection vulnerability
- nanoid: Predictable generation results
- node-forge: ASN.1 vulnerabilities
- on-headers: HTTP header manipulation
- webpack: DOM clobbering XSS
* fix: resolve @babel/runtime security vulnerability
Add yarn resolution to force @babel/runtime ^7.26.10 to fix
RegExp complexity vulnerability in transitive dependency from history.
* refactor: modernize test structure and Jest configuration
- Move component tests to co-located __tests__ directories
- Rename test files to follow .test.js/.test.jsx convention
- Simplify Jest testMatch patterns using glob syntax
- Remove empty .keep files from unused test directories
* feat: preserve dist/README.md in clean script
- Update clean script to use find command instead of rimraf to selectively
remove all files in dist/ directory except README.md, preventing
accidental removal of version-controlled documentation.
* test: add unit tests for Redux reducers
* fix: update API_URL for development environment1 parent 2771282 commit 6d7550a
30 files changed
Lines changed: 15109 additions & 11152 deletions
File tree
- cfg
- src
- components/__tests__
- reducers
- __tests__
- styles
- test
- __mocks__
- __tests__
- actions
- components
- helpers
- sources
- stores
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 12 | + | |
33 | 13 | | |
34 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
42 | 54 | | |
43 | | - | |
| 55 | + | |
44 | 56 | | |
45 | | - | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
60 | | - | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
30 | 26 | | |
31 | | - | |
32 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | | - | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| |||
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 37 | + | |
| 38 | + | |
45 | 39 | | |
46 | 40 | | |
47 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
48 | 46 | | |
| 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 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 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 | + | |
0 commit comments