Snyk has created this PR to upgrade express-rate-limit from 5.4.1 to 6.0.4.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
The recommended version is 7 versions ahead of your current version.
The recommended version was released 21 days ago, on 2022-01-02.
Bumped minimum Node version from 12.9 to 14.5 because the transpiled output uses the nullish coalescing operator (??), which isn't supported in Node prior to 14.x.
Better Typescript support (the library was rewritten in Typescript).
Export the package as both ESM and CJS.
Publish the built package (.tgz file) on GitHub releases as well as the npm registry.
Issue and PR templates.
A contributing guide.
A changelog.
Changed
Rename the draft_polli_ratelimit_headers option to standardHeaders.
Rename the headers option to legacyHeaders.
Retry-After header is now sent if either legacyHeaders or standardHeaders is set.
Allow keyGenerator to be an async function/return a promise.
Change the way custom stores are defined.
Add the init method for stores to set themselves up using options passed to the middleware.
Rename the incr method to increment.
Allow the increment, decrement, resetKey and resetAll methods to return a promise.
Old stores will automatically be promisified and used.
The package can now only be used with NodeJS version 12.9.0 or greater.
The onLimitReached configuration option is now deprecated. Replace it with a custom handler that checks the number of hits.
Removed
Remove the deprecated limiter.resetIp method (use the limiter.resetKey method instead).
Remove the deprecated options delayMs, delayAfter (the delay functionality was moved to the express-slow-down package) and global (use a key generator that returns a constant value).
Snyk has created this PR to upgrade express-rate-limit from 5.4.1 to 6.0.4.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: express-rate-limit
Fixed
.tgz
to GitHub releases.Changed
main
andmodule
fields topackage.json
. This helps tools such as ESLint that do not yet support theexports
field.package-lock.json
to matchpackage.json
Changed
??
), which isn't supported in Node prior to 14.x.Fixed
Added
js-cjs
,js-esm
,ts-cjs
,ts-esm
environments.redis
,mongo
,memcached
,precise
).Changed
esbuild
to generate ESM and CJS output. This reduces the size of the built package from 138 kb to 13kb and build time to 4 ms!dts-bundle-generator
to generate a single Typescript declaration file.Fixed
Added
express
4.x as a peer dependency..tgz
file) on GitHub releases as well as the npm registry.Changed
draft_polli_ratelimit_headers
option tostandardHeaders
.headers
option tolegacyHeaders
.Retry-After
header is now sent if eitherlegacyHeaders
orstandardHeaders
is set.keyGenerator
to be an async function/return a promise.init
method for stores to set themselves up using options passed to the middleware.incr
method toincrement
.increment
,decrement
,resetKey
andresetAll
methods to return a promise.onLimitReached
configuration option is now deprecated. Replace it with a customhandler
that checks the number of hits.Removed
limiter.resetIp
method (use thelimiter.resetKey
method instead).delayMs
,delayAfter
(the delay functionality was moved to theexpress-slow-down
package) andglobal
(use a key generator that returns a constant value).5.5.1
5.5.0
5.4.1
Commit messages
Package name: express-rate-limit
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs