pulsar-edit / package-backend

Pulsar Server Backend for Packages
https://api.pulsar-edit.dev
MIT License
12 stars 11 forks source link

VCS refactoring almost completed + DB changes unified #74

Closed Digitalone1 closed 8 months ago

Digitalone1 commented 1 year ago

Requirements

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.