pulsar-edit / package-backend

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

Remove Uninstallation Behavior #105

Closed confused-Techie closed 1 year ago

confused-Techie commented 1 year ago

Requirements

Description of the Change

When creating the original Pulsar Backend, there was an undocumented endpoint discovered /api/:packType/:packageName/versions/:versionName/events/uninstall. This endpoint was a POST message that was triggered each time a package was uninstalled. Without much thought this was assumed to have decreased the download count of the package.

But after further investigation and communication with other Pulsar Devs we determined that this likely was not the case, as the download count for packages was unlikely to represent current installs rather it's more likely showing the total ever installs, as one would initially expect.

We then came to the conclusion that this was likely used as a way to measure current active users of any given package, and for us this seemed to much like telemetry of users.

Especially considering we had not been using this endpoint in that way, we went ahead then and decided it would be best to remove it. So this PR does just that.

Removes any logic associated with the endpoint. While the endpoint will still resolve, it will always return a successful request. This is done to prevent this change having any effect on users, and not have to bump our semver version, and not have to implement any changes on PPM in a time coordinated fashion.

So this PR should make it feel like nothing has changed, meanwhile now changing the download count of a package to be total downloads, whereas uninstalling the package does nothing.