v3.1.0
Breaking Changes (Summary)
- v3.1 only compatible with Node.js v16.6 or above.
- v3.1 only compatible with discord.js v13 or above.
- Performance improvements by using undici instead of node-fetch.
- Cache policy changed.
Discord#inviteUrl
has been renamed toDiscord#url
.- The invite url format of
Discord#url
has been changed fromhttps://discord.gg/<code>
tohttps://discord.com/invite/<code>
. Added support for servers list. It is accessible with(Canceled in this version)koreanbots.servers.fetch()
.
Dependency Changes
- Removed dependencies related with commitlint because it was the root of the vulnerability alert, as they never (or sometimes?) published new versions with the update of their vulnerable dependencies.
- node-fetch has been removed in favor of undici.
- The abort-controller package has been removed in favor of the native Node.js v16 AbortController API.
- All dependencies have been updated to the latest version.
Why undici instead of node-fetch?
- node-fetch is not compatible with CJS imports from v3.
- undici is faster than node-fetch. see benchmark results
- undici is maintained by contributors of nodejs.
Why Node.js v16.6 or above?
With undici being used, koreanbots JS/TS SDK v3.1 will only be compatible with nodejs v16.6 and above, because undici only supports above that. Therefore, the sdk will only be compatible with discord.js v13 above.
LimitedCollection of discord.js and changed cache policies
LifetimeCollection removed in favor of LimitedCollection from discord.js
- BREAKING: Cache policies have been changed as LimitedCollection only supports sweeping at certain intervals, so instead of
maxAge
being applied to all values each by themselves, they will all be deleted after a few intervals , regardless of just entered the cache store. max
has been renamed tomaxSize
with use of LimitedCollectionmaxAge
has been renamed tosweepInterval
with use of LimitedCollection, changing the cache policy as mentioned above.
What's Changed
- Release v3 SDK by @zero734kr in #95
- build(deps): bump undici from 4.7.0 to 4.8.0 by @dependabot in #110
- build(deps): bump actions/setup-node from 2.2.0 to 2.4.1 by @dependabot in #103
- build(deps-dev): bump typedoc from 0.22.4 to 0.22.7 by @dependabot in #111
- build(deps-dev): bump @next/env from 11.1.2 to 12.0.0 by @dependabot in #115
- build(deps-dev): bump @types/node from 16.10.2 to 16.11.6 by @dependabot in #113
- build(deps-dev): bump jest from 27.2.4 to 27.3.1 by @dependabot in #112
- Release v3.1.0 SDK by @zero734kr in #120
- build(deps): bump discord.js from 13.1.0 to 13.2.0 by @dependabot in #121
- Bump version by @zero734kr in #122
Full Changelog: 3.1.0-rc.1...3.1.0