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

watchify

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchify - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

35

index.js

@@ -18,11 +18,23 @@ var through = require('through');

var changingDeps = {};
var first = true;
if (opts.cache) {
cache = opts.cache;
delete opts.cache;
first = false;
}
if (opts.pkgcache) {
pkgcache = opts.pkgcache;
delete opts.pkgcache;
}
b.on('package', function (file, pkg) {
pkgcache[file] = pkg;
});
b.on('dep', function(dep) {
queuedDeps[dep.id] = dep;
});
function addDep (dep) {

@@ -32,3 +44,3 @@ if (watching[dep.id]) return;

cache[dep.id] = dep;
var watcher = chokidar.watch(dep.id, {

@@ -45,3 +57,3 @@ persistent: true,

changingDeps[dep.id] = true
// wait for the disk/editor to quiet down first:

@@ -53,13 +65,11 @@ if (!pending) setTimeout(function () {

}, opts.delay || 300);
pending = true;
});
}
var bundle = b.bundle.bind(b);
var first = true;
b.bundle = function (opts_, cb) {
if (b._pending) return bundle(opts_, cb);
if (typeof opts_ === 'function') {

@@ -74,3 +84,3 @@ cb = opts_;

first = false;
// we only want to mess with the listeners if the bundle was created

@@ -93,5 +103,4 @@ // successfully, e.g. on the 'close' event.

};
return b;
}
{
"name": "watchify",
"version": "0.3.0",
"version": "0.4.0",
"description": "watch mode for browserify builds",

@@ -5,0 +5,0 @@ "main": "index.js",

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