@upstash/ratelimit
Advanced tools
Comparing version 0.2.0 to 0.3.0-canary.0
{ | ||
"module": "./esm/mod.js", | ||
"main": "./script/mod.js", | ||
"types": "./types/mod.d.ts", | ||
"name": "@upstash/ratelimit", | ||
"version": "v0.2.0", | ||
"description": "A serverless ratelimiter built on top of Upstash REST API.", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/upstash/ratelimit.git" | ||
}, | ||
"version": "0.3.0-canary.0", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"license": "MIT", | ||
"private": false, | ||
"keywords": [ | ||
@@ -20,4 +16,2 @@ "rate", | ||
], | ||
"author": "Andreas Thomas <andreas.thomas@chronark.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
@@ -27,35 +21,22 @@ "url": "https://github.com/upstash/ratelimit/issues" | ||
"homepage": "https://github.com/upstash/ratelimit#readme", | ||
"files": [ | ||
"./dist/**" | ||
], | ||
"author": "Andreas Thomas <andreas@upstash.com>", | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "latest", | ||
"@upstash/redis": "1.3.3-alpha.1", | ||
"size-limit": "latest" | ||
"@jest/globals": "^29.3.1", | ||
"@types/jest": "^29.2.5", | ||
"@types/node": "^18.11.18", | ||
"@upstash/redis": "^1.19.3", | ||
"dotenv-cli": "^7.0.0", | ||
"jest": "^29.3.1", | ||
"ts-jest": "^29.0.3", | ||
"tsup": "^6.2.3", | ||
"tsx": "^3.12.1", | ||
"typescript": "^4.9.4" | ||
}, | ||
"peerDependencies": { | ||
"@upstash/redis": "^1.4.0" | ||
}, | ||
"size-limit": [ | ||
{ | ||
"path": "esm/mod.js", | ||
"limit": "15 KB" | ||
}, | ||
{ | ||
"path": "script/mod.js", | ||
"limit": "15 KB" | ||
} | ||
], | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./types/mod.d.ts", | ||
"default": "./esm/mod.js" | ||
}, | ||
"require": { | ||
"types": "./types/mod.d.ts", | ||
"default": "./script/mod.js" | ||
} | ||
} | ||
}, | ||
"dependencies": { | ||
"@deno/shim-crypto": "~0.3.1" | ||
"scripts": { | ||
"build": "tsup", | ||
"test": "dotenv -e ../../.env jest" | ||
} | ||
} | ||
} |
@@ -153,2 +153,16 @@ # Upstash RateLimit | ||
### Timeout | ||
You can define an optional timeout in milliseconds, after which the request will | ||
be allowed to pass regardless of what the current limit is. This can be useful | ||
if you don't want network issues to cause your application to reject requests. | ||
```ts | ||
const ratelimit = new Ratelimit({ | ||
redis: Redis.fromEnv(), | ||
limiter: Ratelimit.slidingWindow(10, "10 s"), | ||
timeout: 1000, // 1 second | ||
}); | ||
``` | ||
### Block until ready | ||
@@ -155,0 +169,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
209501
0
2647
417
10
9
1
- Removed@deno/shim-crypto@~0.3.1
- Removed@deno/shim-crypto@0.3.1(transitive)
- Removed@upstash/redis@1.34.3(transitive)
- Removedcrypto-js@4.2.0(transitive)