|
Ran
|
Jobs
3
|
Files
534
|
Run time
2min
|
Badge
README BADGES
|
push
github
refactor(web): drop custom utils in favor of Radashi usage. (#2412) ## Problem Over time, we’ve created a number of utility functions, such as `isEmpty`, that are already well-implemented in mature, widely-used libraries like [Lodash](https://lodash.com/), [Ramda](https://ramdajs.com/), or [Radashi](https://radashi.js.org/). These libraries are not only well-tested and maintained, but they also provide battle-hardened solutions to common problems, allowing us to avoid reinventing the wheel. Some time ago, adopting Radashi was proposed and discussed in [#1601](https://github.com/agama-project/agama/discussions/1601), but the idea was eventually postponed. This week, [while updating and expanding our utils/isEmpty function](https://github.com/agama-project/agama/pull/2402/commits/7829ade8a), I noticed it was evolving into something more complex, more along the lines of `isVariableConsideredEmpty`, which, apart from being debatable in behavior, also strays from its original simplicity. Writing tests for this change made it even more apparent that our time and energy might be better spent focusing on Agama-specific business logic, rather than on maintaining our own versions of common utility functions. ## Solution This PR introduces [Radashi](https://radashi.js.org/) as a dependency and removes our custom utility functions that are already covered by it. Radashi offers modern, type-safe, and well-tested utility functions that align with our needs, and adopting it allows us to: * Reduce technical debt by eliminating redundant code * Rely on a maintained and community-backed solution * Focus our efforts on Agama-specific features and business logic This change builds on the earlier discussion in [#1601](https://github.com/agama-project/agama/discussions/1601) and serves as a practical step forward in simplifying our codebase while improving long-term maintainability. ## Summary of changes As part of this PR, ut... (continued)
92 of 132 branches covered (69.7%)
Branch coverage included in aggregate %.
2 of 2 new or added lines in 1 file covered. (100.0%)
11130 of 17817 relevant lines covered (62.47%)
41.6 hits per line
| ID | Flag name | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|---|
| 3 | web | 15493532578.3 | 36 |
82.3 |
GitHub Action Run | |
| 3 | service | 15386206965.3 | 380 |
89.17 |
GitHub Action Run | |
| 1 | rust | 15491140750.1 | 118 |
1.31 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|