Socket
Socket
Sign inDemoInstall

enhanced-require

Package Overview
Dependencies
3
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

0

examples/simple-server/README.md

@@ -0,0 +0,0 @@ # simple-server

@@ -0,0 +0,0 @@ var pageTemplate = require("./page.jade");

@@ -0,0 +0,0 @@ var http = require("http");

@@ -0,0 +0,0 @@ require("../../")(module, {

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ var RequireContext = require("./RequireContext");

@@ -0,0 +0,0 @@ var fs = require("fs");

@@ -0,0 +0,0 @@ var runInThisContext = require("vm").runInThisContext;

@@ -0,0 +0,0 @@ module.exports = function() {

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

8

lib/RequireContext.js

@@ -66,4 +66,8 @@ var fs = require("fs");

var mod = parsedRequest && (parsedRequest.resource && parsedRequest.resource.path ? parent : root.main);
parsedRequest = mod && resolve.parse(mod.id);
this.context = (parsedRequest) ? path.dirname(mod.id === "." ? process.argv[1] : parsedRequest.resource.path) : "";
if(typeof mod == "string") {
this.context = mod;
} else {
parsedRequest = mod && resolve.parse(mod.id);
this.context = (parsedRequest) ? path.dirname(mod.id === "." ? process.argv[1] : parsedRequest.resource.path) : "";
}
}

@@ -70,0 +74,0 @@ }

@@ -0,0 +0,0 @@ var RequireContext = require("./RequireContext");

{
"name": "enhanced-require",
"version": "0.4.0",
"version": "0.4.1",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Enhance the require function in node.js with support for loaders which preprocess files and really async require (AMD). Enables Hot Code Replacement.",

@@ -0,0 +0,0 @@ # enhanced-require

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

module.exports = 1;
module.exports = { two: require("./circular2") };
module.exports = 2;
module.exports = { one: require("./circular1") };
exports.module = module;
exports.a = require("./graph/a.js");
exports.b = require("./graph/b.js");
module.exports = module;
require("./b");

@@ -0,0 +0,0 @@ var list = [];

@@ -0,0 +0,0 @@ var list = [];

@@ -0,0 +0,0 @@ var list = [];

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

@@ -0,0 +0,0 @@ var should = require("should");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc