You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
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

Comparing version 0.4.0-beta6 to 0.4.0-beta9

1

lib/HotRequireContext.js

@@ -38,2 +38,3 @@ var RequireContext = require("./RequireContext");

this.require.hot.apply = this.root.apply.bind(this.root);
this.require.hot.stop = this.root.stop.bind(this.root);
}

@@ -40,0 +41,0 @@

@@ -96,2 +96,11 @@ var fs = require("fs");

HotRequireRoot.prototype.stop = function() {
if(this._watchDelayTimeout) clearTimeout(this._watchDelayTimeout);
Object.keys(this.resources).forEach(function(res) {
this._disposeResourceLink(this.resources[res]);
delete this.resources[res];
}, this);
this.options.watch = false;
}
//// protected ////

@@ -135,5 +144,12 @@

if(this._watchDelayTimeout) clearTimeout(this._watchDelayTimeout);
this._watchDelayTimeout = setTimeout(this._peekWatch.bind(this, function() {}), this.options.watchDelay);
this._watchDelayTimeout = setTimeout(this._peekWatch.bind(this, this._onAutomaticPeekWatchResult.bind(this)), this.options.watchDelay);
}
HotRequireRoot.prototype._onAutomaticPeekWatchResult = function(err, result) {
if(typeof this.options.onAutomaticCheck === "function") {
return this.options.onAutomaticCheck(err, result);
}
if(err) throw err;
}
HotRequireRoot.prototype._peekWatch = function(callback) {

@@ -140,0 +156,0 @@ this.currentChangedResources = {};

2

package.json
{
"name": "enhanced-require",
"version": "0.4.0-beta6",
"version": "0.4.0-beta9",
"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.",

@@ -169,2 +169,3 @@ var should = require("should");

list.should.be.eql([1, -1, 2, -2, 3]);
req.hot.stop();
done();

@@ -211,2 +212,3 @@ }, 100);

list.should.be.eql([1, -1, 2, -2, 3]);
req.hot.stop();
done();

@@ -213,0 +215,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc