Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

express-rate-limit

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-rate-limit - npm Package Compare versions

Comparing version 6.6.0 to 6.7.0

35

changelog.md

@@ -9,10 +9,39 @@ # Changelog

## [6.5.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.5.0)
## [6.7.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.7.0)
## Changed
### Changed
- Updated links to point to new express-rate-limit organization on GitHub.
- Added advertisement to Readme for project sponsor
[Zuplo](https://zuplo.link/express-rate-limit).
- Updated TypeScript version and other dev dependencies
- Changed CI test suite: dropped node.js 12, added node.js 19
No functional changes.
## [6.6.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.6.0)
### Added
- Added `shutdown` method to the Store interface and the MemoryStore.
## [6.5.2](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.5.2)
### Fixed
- Fixed an issue with missing types in ESM monorepos.
## [6.5.1](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.5.1)
### Added
- The message option can now be a (sync/asynx) function that returns a value
(#311)
### Changed
- Updated all dependencies
Note: 6.5.0 was not released due to CI automation issues.
## [6.4.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.3.0)

@@ -24,3 +53,3 @@

## Changed
### Changed

@@ -27,0 +56,0 @@ - Tests are now run on Node 12, 14, 16 and 18 on CI (#305)

18

dist/index.d.ts

@@ -1,2 +0,2 @@

// Generated by dts-bundle-generator v6.12.0
// Generated by dts-bundle-generator v7.0.0

@@ -69,3 +69,3 @@ import { NextFunction, Request, RequestHandler, Response } from 'express';

*/
export interface LegacyStore {
export declare type LegacyStore = {
/**

@@ -94,7 +94,7 @@ * Method to increment a client's hit counter.

resetAll?: () => void;
}
};
/**
* An interface that all hit counter stores must implement.
*/
export interface Store {
export declare type Store = {
/**

@@ -135,7 +135,7 @@ * Method that initializes the store, and has access to the options passed to

shutdown?: () => Promise<void> | void;
}
};
/**
* The configuration options for the rate limiter.
*/
export interface Options {
export declare type Options = {
/**

@@ -258,3 +258,3 @@ * How long we should remember the requests.

draft_polli_ratelimit_headers?: boolean;
}
};
/**

@@ -271,3 +271,3 @@ * The extended request object that includes information about the client's

*/
export interface RateLimitInfo {
export declare type RateLimitInfo = {
readonly limit: number;

@@ -277,3 +277,3 @@ readonly current: number;

readonly resetTime: Date | undefined;
}
};
/**

@@ -280,0 +280,0 @@ *

{
"name": "express-rate-limit",
"version": "6.6.0",
"version": "6.7.0",
"description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",

@@ -10,4 +10,4 @@ "author": {

"license": "MIT",
"homepage": "https://github.com/nfriedly/express-rate-limit",
"repository": "https://github.com/nfriedly/express-rate-limit",
"homepage": "https://github.com/express-rate-limit/express-rate-limit",
"repository": "https://github.com/express-rate-limit/express-rate-limit",
"keywords": [

@@ -75,20 +75,20 @@ "express-rate-limit",

"devDependencies": {
"@jest/globals": "28.1.3",
"@types/express": "4.17.13",
"@types/jest": "28.1.6",
"@types/node": "18.0.6",
"@jest/globals": "29.3.1",
"@types/express": "4.17.14",
"@types/jest": "29.2.3",
"@types/node": "18.11.9",
"@types/supertest": "2.0.12",
"cross-env": "7.0.3",
"del-cli": "4.0.1",
"dts-bundle-generator": "6.12.0",
"esbuild": "0.14.49",
"express": "4.18.1",
"husky": "8.0.1",
"jest": "28.1.3",
"del-cli": "5.0.0",
"dts-bundle-generator": "7.0.0",
"esbuild": "0.15.14",
"express": "4.18.2",
"husky": "8.0.2",
"jest": "29.3.1",
"lint-staged": "13.0.3",
"npm-run-all": "4.1.5",
"supertest": "6.2.4",
"ts-jest": "28.0.7",
"supertest": "6.3.1",
"ts-jest": "29.0.3",
"ts-node": "10.9.1",
"typescript": "4.7.4",
"typescript": "4.8.4",
"xo": "0.49.0"

@@ -105,3 +105,4 @@ },

"index-signature"
]
],
"n/no-unsupported-features/es-syntax": 0
}

@@ -108,0 +109,0 @@ },

# <div align="center"> Express Rate Limit </div>
---
Sponsored by [Zuplo](https://zuplo.link/express-rate-limit) a fully-managed API
Gateway for developers. Add
[dynamic rate-limiting](https://zuplo.link/dynamic-rate-limiting),
authentication and more to any API in minutes. Learn more at
[zuplo.com](https://zuplo.link/express-rate-limit)
---
<div align="center">
[![Tests](https://github.com/nfriedly/express-rate-limit/workflows/Test/badge.svg)](https://github.com/nfriedly/express-rate-limit/actions)
[![Tests](https://github.com/express-rate-limit/express-rate-limit/workflows/Test/badge.svg)](https://github.com/express-rate-limit/express-rate-limit/actions)
[![npm version](https://img.shields.io/npm/v/express-rate-limit.svg)](https://npmjs.org/package/express-rate-limit 'View this project on NPM')

@@ -44,5 +54,5 @@ [![npm downloads](https://img.shields.io/npm/dm/express-rate-limit)](https://www.npmjs.com/package/express-rate-limit)

# Using npm
> npm install https://github.com/nfriedly/express-rate-limit/releases/download/v{version}/express-rate-limit.tgz
> npm install https://github.com/express-rate-limit/express-rate-limit/releases/download/v{version}/express-rate-limit.tgz
# Using yarn or pnpm
> yarn/pnpm add https://github.com/nfriedly/express-rate-limit/releases/download/v{version}/express-rate-limit.tgz
> yarn/pnpm add https://github.com/express-rate-limit/express-rate-limit/releases/download/v{version}/express-rate-limit.tgz
```

@@ -184,6 +194,5 @@

Go to `/ip` and see the IP address returned in the response. If it matches your
IP address (which you can get by going to http://ip.nfriedly.com/ or
https://api.ipify.org/), then the number of proxies is correct and the rate
limiter should now work correctly. If not, then keep increasing the number until
it does.
public IP address, then the number of proxies is correct and the rate limiter
should now work correctly. If not, then keep increasing the number until it
does.

@@ -392,3 +401,3 @@ For more information about the `trust proxy` setting, take a look at the

This method was
[deprecated in v6](https://github.com/nfriedly/express-rate-limit/releases/v6.0.0) -
[deprecated in v6](https://github.com/express-rate-limit/express-rate-limit/releases/v6.0.0) -
Please use a custom `handler` that checks the number of hits instead.

@@ -462,3 +471,3 @@

Take a look at
[this guide](https://github.com/nfriedly/express-rate-limit/wiki/Creating-Your-Own-Store)
[this guide](https://github.com/express-rate-limit/express-rate-limit/wiki/Creating-Your-Own-Store)
if you wish to create your own store.

@@ -487,5 +496,6 @@

If you encounter a bug or want to see something added/changed, please go ahead
and [open an issue](https://github.com/nfriedly/express-rate-limit/issues/new)!
and
[open an issue](https://github.com/nfriexpress-rate-limitedly/express-rate-limit/issues/new)!
If you need help with something, feel free to
[start a discussion](https://github.com/nfriedly/express-rate-limit/discussions/new)!
[start a discussion](https://github.com/express-rate-limit/express-rate-limit/discussions/new)!

@@ -492,0 +502,0 @@ If you wish to contribute to the library, thanks! First, please read

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc