Socket
Socket
Sign inDemoInstall

@miniflare/shared

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/shared - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

16

dist/src/index.d.ts
import { Awaitable as Awaitable_2 } from '@miniflare/shared';
import { MockAgent } from 'undici';

@@ -225,2 +226,3 @@ export declare function addAll<T>(set: Set<T>, values: Iterable<T>): void;

globalAsyncIO?: boolean;
fetchMock?: MockAgent;
}

@@ -324,2 +326,8 @@

export declare type RouteType = string | {
pattern: string;
zone_id?: string;
zone_name?: string;
};
/**

@@ -512,4 +520,4 @@ * Runs closure with the context's input gate (if any) closed, unless

workers_dev?: boolean;
route?: string;
routes?: string[];
route?: RouteType;
routes?: RouteType[];
webpack_config?: string;

@@ -576,4 +584,4 @@ vars?: Record<string, any>;

mounts?: Record<string, string>;
route?: string;
routes?: string[];
route?: RouteType;
routes?: RouteType[];
global_async_io?: boolean;

@@ -580,0 +588,0 @@ global_timers?: boolean;

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

var import_path = __toModule(require("path"));
var import_ignore = __toModule(require("ignore"));
var import_picomatch = __toModule(require("picomatch"));
var numericCompare = new Intl.Collator(void 0, { numeric: true }).compare;

@@ -110,9 +110,21 @@ function lexicographicCompare(x, y) {

}
function globsToMatcher(globs) {
const ign = (0, import_ignore.default)();
if (globs)
ign.add(globs);
function globsToMatcher(globs = []) {
const matchGlobs = [];
const ignoreGlobs = [];
for (const glob of globs) {
if (glob.startsWith("!")) {
ignoreGlobs.push(glob.slice(1));
} else {
matchGlobs.push(glob);
}
}
const isMatch = (0, import_picomatch.default)(matchGlobs, {
dot: true,
bash: true,
contains: true,
ignore: ignoreGlobs
});
return {
test: (string) => ign.ignores(string),
toString: () => globs?.join(", ") ?? ""
test: (string) => isMatch(string),
toString: () => globs.join(", ")
};

@@ -119,0 +131,0 @@ }

{
"name": "@miniflare/shared",
"version": "2.6.0",
"version": "2.7.0",
"description": "Shared utility module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -20,3 +20,3 @@ "keywords": [

"engines": {
"node": ">=16.7"
"node": ">=16.13"
},

@@ -39,8 +39,9 @@ "publishConfig": {

"dependencies": {
"ignore": "^5.1.8",
"kleur": "^4.1.4"
"kleur": "^4.1.4",
"picomatch": "^2.3.1"
},
"devDependencies": {
"@miniflare/shared-test": "2.6.0"
"@miniflare/shared-test": "2.7.0",
"@types/picomatch": "^2.3.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