Skip to content

4.0.0-next.0

Pre-release
Pre-release

Choose a tag to compare

@StimulCross StimulCross released this 01 Mar 07:13
· 66 commits to main since this release

Breaking Changes

General

  • dropped support for Node.js versions below 20 (ee3c06e)

api-call

  • renamed the statusCode property to status in the HttpError class (9b73954)

auth

  • renamed the exchangeCode function to getAccessToken (612d5bf)
  • updated the addUser method in the RefreshingAuthProvider to return AccessTokenWithUserId (f2c9a0c)
  • removed null from expiresIn and refreshToken in the AccessToken interface (0f5d882)
  • throw InvalidTokenError from the getAccessTokenForUser method in the StaticAuthProvider for invalid access tokens (3354e7e)
  • changed the signature of addUser in the StaticAuthProvider from addUser(user: UserIdResolvable, token: Pick<AccessToken, 'accessToken' | 'scopes'>) to addUser(user: UserIdResolvable, accessToken: string, scopes?: string[]) (de00b2f)

Features

api-call

  • replaced the cross-fetch package with the native fetch API (7bec48c)
  • updated the query field in DonationAlertsApiCallOptions to allow null values in addition to the existing types (fa2f851)

auth

  • enhanced the MissingScopeError with userId and scopes properties (747687d)
  • enhanced the InvalidTokenError with a userId property (731ff63)
  • enhanced the UnregisteredUserError with a userId property (33ce749)

api

  • added the createOrUpdateMerchandise method to the merchandise API (391544a)
  • added the DonationAlertsMerchandiseTitleData type export (7ae4d14)

Fixes

common

  • removed the unnecessary g flag from the NUMERIC_STRING_REGEX used in the extractUserId function (3571099)

api

  • fixed the URL in the merchandise sale API request (ba858cc)
  • fixed optional fields in the createMerchandise method (6f7fc85)
  • made logger options partial (6aa0834)

events

  • clean up listeners on unsubscribe (a19175e)