Skip to content

Releases: greys-tools/pkapi.js

v7.5.1

06 Apr 06:34

Choose a tag to compare

What's New

  • Fixes issues with importing version from package.json (the lib should work again now. oops)

v7.5.0

06 Apr 04:30

Choose a tag to compare

What's New

  • Added linting, formatting, and typechecking with workflows
  • Fixed issues with tests
  • Removed unneeded try-catch statements
  • Fixed failure when specifying fetch: [ 'config' ] with API.getSystem()
  • Changed User-Agent to use version number directly from package.json
  • Fixed date errors with the internal formatDate function

PRs from Contributors

  • fix(RateLimiter): fix flakey tests by @z0w13 in #16
  • Add linting, formatting and typechecking commands and GitHub workflows by @z0w13 in #17
  • refactor: remove redundant try-catch statements by @z0w13 in #18

Full Changelog: v7.4.0...v7.5.0

v7.4.0

01 Jul 01:11

Choose a tag to compare

❗ New

  • Implemented a ratelimiter, added tested for various parts, some general cleanup by @z0w13 in #15

🔨 Fixes

  • fix: add missing export for ProxyTag by @z0w13 in #13

Full Changelog: v7.3.1...v7.4.0

(Note: trying out auto-generated release notes here!)

Release 7.3.1

14 Apr 18:12

Choose a tag to compare

🔨 Fixes

  • Made .d.ts files discoverable from the package.json (thanks @adri326 !)

Release 7.2.1

16 May 20:05

Choose a tag to compare

🔨 Fixes

  • Fixed a couple spots where the token wasn't sent with requests (thanks @z0w13!)

Release 7.2.0

03 May 00:24

Choose a tag to compare

🔨 Fixes

  • the SystemAutoproxySettings model is now properly exported. whoops!
  • previously, all props that were considered nullable weren't actually marked as nullable for TS users with strict mode (or strictNullChecks) on. that should be fixed now for props that you can set to null to clear on the API

feel free to open an issue or PR if we missed a couple spots with nullable props! we tried our best to follow PK's API docs but there are a few things on there that aren't documented fully 😅

Release 7.1.0

02 May 19:06

Choose a tag to compare

❗ New

  • The group model now has the system property when fetched using getGroup(), reflecting the behavior of PK's API

(This has been a thing on the API for a bit, but wasn't documented until recently)

Release 7.0.0

11 Apr 18:34

Choose a tag to compare

🔨 Fixes

  • Fixed an issue where certain nullable dates weren't treated as nullable, and thus were converted anyways (resulting in a Date with a timestamp of 0) (Fixes #7)

This is technically a breaking change for a couple reasons:

  • While the field is marked as nullable (aka potentially falsey), this was always returning something truthy, and anyone relying on this behavior will have their code broken
  • Related to the above: anyone not checking if the property is truthy may run into issues when trying to treat the object as a Date (as now it may be null)

Release 6.2.1

29 Feb 01:53

Choose a tag to compare

🔨 Fixes

  • Fetching fronters on a system with no switches no longer errors out and will instead return undefined

Release 6.2.0

11 Dec 01:15

Choose a tag to compare

❗ New

  • There are new arguments on System.getGroups():
    • with_members: set to true to fetch group members
    • raw: set to true to only receive member UUIDs, directly from the API
  • Relatedly, there are also new arguments for System.getSwitches()
    • before: set to a Date in order to fetch switches from before that time
    • limit: supply a number to limit how many switches to fetch
  • avatar_url and display_name have been added to the system guild settings object

Everything should be tested and working, but feel free to let us know if anything goes wrong!