New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

watchify-middleware

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchify-middleware - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

4

index.js

@@ -10,2 +10,6 @@ var createBundler = require('./lib/bundler')

module.exports.getWatchifyVersion = function () {
return require('watchify/package.json').version
}
function createEmitter (browserify, opt) {

@@ -12,0 +16,0 @@ var bundler = createBundler(browserify, opt)

2

package.json
{
"name": "watchify-middleware",
"version": "1.2.0",
"version": "1.3.0",
"description": "a server for faster watchify development",

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

@@ -80,11 +80,11 @@ # watchify-middleware

#### `emitter.middleware`
##### `emitter.middleware`
The `middleware(req, res)` function for use in your server.
#### `emitter.on('pending', fn)`
##### `emitter.on('pending', fn)`
Called when watchify begins its incremental rebuild.
#### `emitter.on('update', fn)`
##### `emitter.on('update', fn)`

@@ -95,3 +95,3 @@ Called when bundling is finished, with parameter `(contents, rows)`.

#### `emitter.on('log', fn)`
##### `emitter.on('log', fn)`

@@ -114,14 +114,18 @@ Provides timing and server request logging, passing an `(event)` parameter.

#### `emitter.on('error', fn)`
##### `emitter.on('error', fn)`
If `errorHandler` was `fasle`, this will get triggered on bundle errors. If an error handler is being used, this will not get triggered.
#### `emitter.on('bundle-error', fn)`
##### `emitter.on('bundle-error', fn)`
This will get triggered on bundle errors, regardless of whether `errorHandler` is being used. This can be used to respond to syntax errors, such as showing a stylized notification.
#### `emitter.close()`
##### `emitter.close()`
Closes the `watchify` instance and stops file watching.
#### `version = watchifyMiddleware.getWatchifyVersion()`
Primarily useful for debugging, this will return the *actual* version number of the `watchify` module being used by `watchify-middleware`.
## running the demo

@@ -128,0 +132,0 @@

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