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

@miniflare/storage-memory

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/storage-memory - npm Package Compare versions

Comparing version 2.11.0 to 2.12.0

2

dist/src/index.d.ts

@@ -45,3 +45,3 @@ import { Awaitable } from '@miniflare/shared';

getMaybeExpired<Meta>(key: string): StoredValueMeta<Meta> | undefined;
getRangeMaybeExpired<Meta>(key: string, { offset, length, suffix }: Range): RangeStoredValueMeta<Meta> | undefined;
getRangeMaybeExpired<Meta>(key: string, range: Range): RangeStoredValueMeta<Meta> | undefined;
put<Meta = unknown>(key: string, value: StoredValueMeta<Meta>): void;

@@ -48,0 +48,0 @@ deleteMaybeExpired(key: string): boolean;

@@ -40,3 +40,3 @@ var __create = Object.create;

function listFilterMatch(options, name) {
return !(options?.prefix && !name.startsWith(options.prefix) || options?.start && (0, import_shared.lexicographicCompare)(name, options.start) < 0 || options?.end && (0, import_shared.lexicographicCompare)(name, options.end) >= 0);
return !(options?.prefix !== void 0 && !name.startsWith(options.prefix) || options?.excludePrefix !== void 0 && name.startsWith(options.excludePrefix) || options?.start !== void 0 && (0, import_shared.lexicographicCompare)(name, options.start) < 0 || options?.end !== void 0 && (0, import_shared.lexicographicCompare)(name, options.end) >= 0);
}

@@ -199,3 +199,3 @@ function listPaginate(options, keys) {

}
getRangeMaybeExpired(key, { offset, length, suffix }) {
getRangeMaybeExpired(key, range) {
const stored = this.map.get(key);

@@ -206,23 +206,3 @@ if (stored === void 0)

const size = value.byteLength;
if (suffix !== void 0) {
if (suffix <= 0) {
throw new Error("Suffix must be > 0");
}
if (suffix > size)
suffix = size;
offset = size - suffix;
length = size - offset;
}
if (offset === void 0)
offset = 0;
if (length === void 0)
length = size - offset;
if (offset < 0)
throw new Error("Offset must be >= 0");
if (offset > size)
throw new Error("Offset must be < size");
if (length <= 0)
throw new Error("Length must be > 0");
if (offset + length > size)
length = size - offset;
const { offset, length } = (0, import_shared3.parseRange)(range, size);
return {

@@ -229,0 +209,0 @@ value: value.slice(offset, offset + length),

{
"name": "@miniflare/storage-memory",
"version": "2.11.0",
"version": "2.12.0",
"description": "In-memory storage 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

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