@miniflare/kv
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -46,2 +46,4 @@ var __create = Object.create; | ||
var MIN_CACHE_TTL = 60; | ||
var MIN_EXPIRATION = -2147483648; | ||
var MAX_EXPIRATION = 2147483647; | ||
var MAX_LIST_KEYS = 1e3; | ||
@@ -182,2 +184,5 @@ var MAX_KEY_SIZE = 512; | ||
if (expirationTtl !== void 0) { | ||
if (expirationTtl < MIN_EXPIRATION || expirationTtl > MAX_EXPIRATION) { | ||
throw new TypeError(`Value out of range. Must be between ${MIN_EXPIRATION} and ${MAX_EXPIRATION} (inclusive).`); | ||
} | ||
if (isNaN(expirationTtl) || expirationTtl <= 0) { | ||
@@ -191,2 +196,5 @@ throwKVError("PUT", 400, `Invalid expiration_ttl of ${options.expirationTtl}. Please specify integer greater than 0.`); | ||
} else if (expiration !== void 0) { | ||
if (expiration < MIN_EXPIRATION || expiration > MAX_EXPIRATION) { | ||
throw new TypeError(`Value out of range. Must be between ${MIN_EXPIRATION} and ${MAX_EXPIRATION} (inclusive).`); | ||
} | ||
if (isNaN(expiration) || expiration <= now) { | ||
@@ -193,0 +201,0 @@ throwKVError("PUT", 400, `Invalid expiration of ${options.expiration}. Please specify integer greater than the current number of seconds since the UNIX epoch.`); |
{ | ||
"name": "@miniflare/kv", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "Workers KV module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers", | ||
@@ -38,7 +38,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@miniflare/shared": "2.11.0" | ||
"@miniflare/shared": "2.12.0" | ||
}, | ||
"devDependencies": { | ||
"@miniflare/shared-test": "2.11.0" | ||
"@miniflare/shared-test": "2.12.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21723
371
+ Added@miniflare/shared@2.12.0(transitive)
- Removed@miniflare/shared@2.11.0(transitive)
Updated@miniflare/shared@2.12.0