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

@miniflare/shared

Package Overview
Dependencies
Maintainers
1
Versions
39
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.0.0-rc.1 to 2.0.0-rc.2

2

dist/src/index.d.ts

@@ -233,2 +233,4 @@ import { Awaitable as Awaitable_2 } from '@miniflare/shared';

export declare function resolveStoragePersist(rootPath: string, persist?: boolean | string): boolean | string | undefined;
/**

@@ -235,0 +237,0 @@ * Runs closure with the context's input gate (if any) closed, unless

@@ -102,2 +102,11 @@ // packages/shared/src/compat.ts

}
var urlRegexp = /^([a-z]+:)?\/\//i;
function resolveStoragePersist(rootPath, persist) {
if (typeof persist === "string") {
if (urlRegexp.test(persist))
return persist;
return path.resolve(rootPath, persist);
}
return persist;
}
var namespaceRegexp = /[/\\:|]/g;

@@ -107,2 +116,3 @@ var dotRegexp = /(^|\/|\\)(\.+)(\/|\\|$)/g;

var windowsReservedRegexp = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
var leadingRegexp = /^[ /\\]+/;
var trailingRegexp = /[ /\\]+$/;

@@ -112,7 +122,7 @@ function dotReplacement(match, g1, g2, g3) {

}
function trailingReplacement(match) {
function underscoreReplacement(match) {
return "".padStart(match.length, "_");
}
function sanitisePath(unsafe) {
return unsafe.replace(namespaceRegexp, path.sep).replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(trailingRegexp, trailingReplacement).substring(0, 255);
return unsafe.replace(namespaceRegexp, path.sep).replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(leadingRegexp, underscoreReplacement).replace(trailingRegexp, underscoreReplacement).substring(0, 255);
}

@@ -530,2 +540,3 @@

randomHex,
resolveStoragePersist,
runWithInputGateClosed,

@@ -532,0 +543,0 @@ sanitisePath,

4

package.json
{
"name": "@miniflare/shared",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.2",
"description": "Shared utility module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -43,4 +43,4 @@ "keywords": [

"devDependencies": {
"@miniflare/shared-test": "2.0.0-rc.1"
"@miniflare/shared-test": "2.0.0-rc.2"
}
}
# `@miniflare/shared`
Shared utility module for [Miniflare](https://github.com/cloudflare/miniflare):
a fun, full-featured, fully-local simulator for Cloudflare Workers
a fun, full-featured, fully-local simulator for Cloudflare Workers.

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