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

@miniflare/runner-vm

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/runner-vm - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

12

dist/src/index.js

@@ -45,2 +45,4 @@ var __create = Object.create;

return false;
if (O === null)
return false;
const P = C.prototype;

@@ -104,2 +106,3 @@ if (typeof P !== "object" && typeof P !== "function") {

var import_promises = __toModule(require("fs/promises"));
var import_module = __toModule(require("module"));
var import_path = __toModule(require("path"));

@@ -109,2 +112,3 @@ var import_vm2 = __toModule(require("vm"));

var SUGGEST_BUNDLE = "If you're trying to import an npm package, you'll need to bundle your Worker first.";
var SUGGEST_NODE = "If you're trying to import a Node.js built-in module, or an npm package that uses Node.js built-ins, you'll either need to:\n- Bundle your Worker, configuring your bundler to polyfill Node.js built-ins\n- Configure your bundler to load Workers-compatible builds by changing the main fields/conditions\n- Find an alternative package that doesn't require Node.js built-ins";
var ModuleLinker = class {

@@ -151,4 +155,6 @@ constructor(moduleRules, additionalModules) {

if (rule === void 0) {
const isBuiltin = import_module.builtinModules.includes(spec);
const suggestion = isBuiltin ? SUGGEST_NODE : SUGGEST_BUNDLE;
throw new VMScriptRunnerError("ERR_MODULE_RULE", `${errorBase}: no matching module rules.
${SUGGEST_BUNDLE}`);
${suggestion}`);
}

@@ -202,4 +208,6 @@ const data = await import_promises.default.readFile(identifier);

if (rule === void 0) {
const isBuiltin = import_module.builtinModules.includes(spec);
const suggestion = isBuiltin ? SUGGEST_NODE : SUGGEST_BUNDLE;
throw new VMScriptRunnerError("ERR_MODULE_RULE", `${errorBase}: no matching module rules.
${SUGGEST_BUNDLE}`);
${suggestion}`);
}

@@ -206,0 +214,0 @@ this.#cjsModuleCache.set(identifier, module2);

6

package.json
{
"name": "@miniflare/runner-vm",
"version": "2.1.0",
"version": "2.2.0",
"description": "VM script runner module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -38,7 +38,7 @@ "keywords": [

"dependencies": {
"@miniflare/shared": "2.1.0"
"@miniflare/shared": "2.2.0"
},
"devDependencies": {
"@miniflare/shared-test": "2.1.0"
"@miniflare/shared-test": "2.2.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