express-rate-limit 6.11.1 → 6.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [6.11.2](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.11.2)
10
+
11
+ Fixed:
12
+
13
+ - Restored `IncrementResponse ` TypeScript type (See
14
+ [#397](https://github.com/express-rate-limit/express-rate-limit/pull/397))
15
+
9
16
  ## [6.11.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.11.1)
10
17
 
11
18
  ### Fixed
package/dist/index.d.cts CHANGED
@@ -50,6 +50,7 @@ export type ClientRateLimitInfo = {
50
50
  totalHits: number;
51
51
  resetTime: Date | undefined;
52
52
  };
53
+ export type IncrementResponse = ClientRateLimitInfo;
53
54
  /**
54
55
  * A modified Express request handler with the rate limit functions.
55
56
  */
@@ -123,9 +124,9 @@ export type Store = {
123
124
  *
124
125
  * @param key {string} - The identifier for a client.
125
126
  *
126
- * @returns {ClientRateLimitInfo | undefined} - The number of hits and reset time for that client.
127
+ * @returns {IncrementResponse | undefined} - The number of hits and reset time for that client.
127
128
  */
128
- increment: (key: string) => Promise<ClientRateLimitInfo> | ClientRateLimitInfo;
129
+ increment: (key: string) => Promise<IncrementResponse> | IncrementResponse;
129
130
  /**
130
131
  * Method to decrement a client's hit counter.
131
132
  *
package/dist/index.d.mts CHANGED
@@ -50,6 +50,7 @@ export type ClientRateLimitInfo = {
50
50
  totalHits: number;
51
51
  resetTime: Date | undefined;
52
52
  };
53
+ export type IncrementResponse = ClientRateLimitInfo;
53
54
  /**
54
55
  * A modified Express request handler with the rate limit functions.
55
56
  */
@@ -123,9 +124,9 @@ export type Store = {
123
124
  *
124
125
  * @param key {string} - The identifier for a client.
125
126
  *
126
- * @returns {ClientRateLimitInfo | undefined} - The number of hits and reset time for that client.
127
+ * @returns {IncrementResponse | undefined} - The number of hits and reset time for that client.
127
128
  */
128
- increment: (key: string) => Promise<ClientRateLimitInfo> | ClientRateLimitInfo;
129
+ increment: (key: string) => Promise<IncrementResponse> | IncrementResponse;
129
130
  /**
130
131
  * Method to decrement a client's hit counter.
131
132
  *
package/dist/index.d.ts CHANGED
@@ -50,6 +50,7 @@ export type ClientRateLimitInfo = {
50
50
  totalHits: number;
51
51
  resetTime: Date | undefined;
52
52
  };
53
+ export type IncrementResponse = ClientRateLimitInfo;
53
54
  /**
54
55
  * A modified Express request handler with the rate limit functions.
55
56
  */
@@ -123,9 +124,9 @@ export type Store = {
123
124
  *
124
125
  * @param key {string} - The identifier for a client.
125
126
  *
126
- * @returns {ClientRateLimitInfo | undefined} - The number of hits and reset time for that client.
127
+ * @returns {IncrementResponse | undefined} - The number of hits and reset time for that client.
127
128
  */
128
- increment: (key: string) => Promise<ClientRateLimitInfo> | ClientRateLimitInfo;
129
+ increment: (key: string) => Promise<IncrementResponse> | IncrementResponse;
129
130
  /**
130
131
  * Method to decrement a client's hit counter.
131
132
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "6.11.1",
3
+ "version": "6.11.2",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",