All new code requires tests to ensure against regressions.
However, if your PR contains zero code changes, feel free to select the checkmark below to indicate so.
[x] Have you ran tests against this code?
Description of the Change
fixed unused variable signaled by CodeQL
removed pseudo objects that I previously modified
added an internal util for metadata object construction
removed versions sorting since the database will have its own sorting system
@confused-Techie please, take a look at this, tarball data appended to versions metadata objects were overwritten, so we need to clone the whole packageJSON.
Besided I added an util for metadata construction. This might seem overkill, but having the structure repeated in multiple places in the code is generally bad because you might update one and not the others when needed, while having a single point to serve it it's better because you modify the object in one place. You still need to update the function arguments, but maybe a default for additional arguments can be added in the future...
Update 2023/01/29
@confused-Techie Merged the DB changes branch with git refactoring branch and then fixed all the remaining issues. The tests are all passing! (except Codacy that seems not enabled for this branch)
There will be surely issues in production, but at least we have no issues on tests in developer mode.
Requirements
Filling out the template is required.
All new code requires tests to ensure against regressions.
[x] Have you ran tests against this code?
Description of the Change
@confused-Techie please, take a look at this, tarball data appended to versions metadata objects were overwritten, so we need to clone the whole packageJSON.
Besided I added an util for metadata construction. This might seem overkill, but having the structure repeated in multiple places in the code is generally bad because you might update one and not the others when needed, while having a single point to serve it it's better because you modify the object in one place. You still need to update the function arguments, but maybe a default for additional arguments can be added in the future...
Update 2023/01/29
@confused-Techie Merged the DB changes branch with git refactoring branch and then fixed all the remaining issues. The tests are all passing! (except Codacy that seems not enabled for this branch)
There will be surely issues in production, but at least we have no issues on tests in developer mode.