Socket
Socket
Sign inDemoInstall

enhanced-require

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-require - npm Package Compare versions

Comparing version 0.5.0-beta5 to 0.5.0-beta6

0

examples/simple-server/enhanced-require.config.js

@@ -0,0 +0,0 @@ module.exports = {

@@ -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");

4

lib/HotRequireRoot.js

@@ -246,2 +246,6 @@ var fs = require("fs");

}
if(module.parents.length === 0) {
this._status = "abort";
return callback(new Error("Aborted because of bubbling"));
}
for(var i = 0; i < module.parents.length; i++) {

@@ -248,0 +252,0 @@ var parentId = module.parents[i];

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

3

lib/require.js

@@ -29,3 +29,4 @@ /*

var context = "";
if(parent.context) context = parent.context;
if(typeof parent === "string") context = parent
else if(parent.context) context = parent.context;
else if(parent.filename) context = path.dirname(parent.filename);

@@ -32,0 +33,0 @@ new EROptionsDefaulter(context).process(options)

@@ -56,3 +56,3 @@ var path = require("path");

this.root = root;
if(typeof parent == "string") {
if(typeof parent === "string") {
this.context = parent;

@@ -65,3 +65,3 @@ } else {

this.context = path.dirname(parent.splitQuery(parent.resource)[0]);
} else if(typeof root.main == "string") {
} else if(typeof root.main === "string") {
this.context = root.main;

@@ -68,0 +68,0 @@ } else if(root.main && root.main.filename) {

@@ -22,3 +22,5 @@ var path = require("path");

this.main = parent;
if(parent.context) {
if(typeof parent === "string") {
this.context = parent;
} else if(parent.context) {
this.context = parent.context;

@@ -25,0 +27,0 @@ } else if(parent.filename) {

{
"name": "enhanced-require",
"version": "0.5.0-beta5",
"version": "0.5.0-beta6",
"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");

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

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

@@ -0,0 +0,0 @@ exports.filename = __filename;

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 @@ module.exports = function(source) {

@@ -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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc