4.0.0-next.0
Pre-release
Pre-release
·
66 commits
to main
since this release
Breaking Changes
General
- dropped support for Node.js versions below 20 (ee3c06e)
api-call
- renamed the
statusCodeproperty tostatusin theHttpErrorclass (9b73954)
auth
- renamed the
exchangeCodefunction togetAccessToken(612d5bf) - updated the
addUsermethod in theRefreshingAuthProviderto returnAccessTokenWithUserId(f2c9a0c) - removed
nullfromexpiresInandrefreshTokenin theAccessTokeninterface (0f5d882) - throw
InvalidTokenErrorfrom thegetAccessTokenForUsermethod in theStaticAuthProviderfor invalid access tokens (3354e7e) - changed the signature of
addUserin theStaticAuthProviderfromaddUser(user: UserIdResolvable, token: Pick<AccessToken, 'accessToken' | 'scopes'>)toaddUser(user: UserIdResolvable, accessToken: string, scopes?: string[])(de00b2f)
Features
api-call
- replaced the
cross-fetchpackage with the native fetch API (7bec48c) - updated the
queryfield inDonationAlertsApiCallOptionsto allownullvalues in addition to the existing types (fa2f851)
auth
- enhanced the
MissingScopeErrorwithuserIdandscopesproperties (747687d) - enhanced the
InvalidTokenErrorwith auserIdproperty (731ff63) - enhanced the
UnregisteredUserErrorwith auserIdproperty (33ce749)
api
- added the
createOrUpdateMerchandisemethod to the merchandise API (391544a) - added the
DonationAlertsMerchandiseTitleDatatype export (7ae4d14)
Fixes
common
- removed the unnecessary
gflag from theNUMERIC_STRING_REGEXused in theextractUserIdfunction (3571099)
api
- fixed the URL in the merchandise sale API request (ba858cc)
- fixed optional fields in the
createMerchandisemethod (6f7fc85) - made logger options partial (6aa0834)
events
- clean up listeners on unsubscribe (a19175e)