TTTaevas / osu-api-v2-js

Package to easily access the new api of osu!
https://osu-v2.taevas.xyz
The Unlicense
6 stars 0 forks source link

Prepare for 1.1.0 #35

Closed TTTaevas closed 2 days ago

TTTaevas commented 2 days ago

This PR does quite many things, here's a summary of what and why


Drop Node 16, therefore only supporting Node 18 and above

Node.js 16 reached its end-of-life on 2023-09-11 (although it was planned to be on 2024-04-30) meaning it doesn't get security updates anymore, so people shouldn't be running this version of Node.js anymore!

Furthermore, making Node 18 the lowest supported version means this package can use code that performs better, and even drop one of the two (non-dev) dependencies it was using, node-fetch, in favour of Node's implementation of fetch


Better-looking tests

For my sanity because I couldn't stand copy/pasting weird syntax and using oddly named constants anymore


License change

Switched from WTFPL to Unlicense as I felt the Unlicense suited my tastes better, I don't think there's deeper meaning beyond what's actually written in the new license

This should not affect any user of this package


Switch from yarn to npm

The benefits of Yarn Classic simply do not outweigh the simplicity of npm

Relevant documentation and scripts have been updated to reflect this change, which should only affect contributors of this package


CI/Automated testing

Testing the API as a guest user is now something that is also being done automatically when pushing or PRing

The package has also been made to be automatically tested on a monthly basis, in order to ensure/guarantee its well-being to new users wondering if it is up to date or not, as well as to notify me if that was to not be the case


Compiler changes

Due to the package aiming for Node 18 instead of 16, the compiled code is now more modern ECMAScript, meaning better performance and less heavy on the hard drive, check tsconfig.json for details


Breaking changes

Because of the Node version change and the changes to how the package is compiled, I believed it was a good idea to also introduce (imo necessary) breaking changes which will affect all package users

Those changes include a few interfaces changes due to having locked in a x-api-version which forces the server to give more modern responses, as well as API's properties getting changes for future ease of use