[Snyk] Upgrade express-rate-limit from 5.4.1 to 6.2.1 #392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade express-rate-limit from 5.4.1 to 6.2.1.
ℹ️ 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
undefined
is passed to the ratelimiter.
Added
MemoryStore
, so it can now be imported as a named import(
import { MemoryStore } from 'express-rate-limit'
).Fixed
onLimitReached
option (this was supposed to be deprecated inv6.0.0 itself); developers should use a custom handler function that checks if
the rate limit has been exceeded instead.
Added
rateLimit
in case the default import does not work.Fixed
default
, so Typescript CommonJS developers can default-import the library (import rateLimit from 'express-rate-limit'
).Fixed
esModuleInterop
flag in their Typescript compiler configuration.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
Commit messages
Package name: express-rate-limit
Compare
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