Socket
Socket
Sign inDemoInstall

node-watch

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-watch - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

.github/FUNDING.yml

4

Changelog.md
# Changelog
## 0.6.3
* Types: Allow watching multiple files.
## 0.6.2

@@ -4,0 +8,0 @@

12

lib/watch.d.ts

@@ -11,10 +11,14 @@ import { FSWatcher } from 'fs';

*
* @param {string} filename File or directory to watch.
* @param {Filename} filename File or directory to watch.
* @param {WatchOptions|string} options
* @param {Function} listener
*/
declare function watch(filename: string, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
declare function watch(filename: string, options : string, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
declare function watch(filename: string, options : WatchOptions, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
declare function watch(filename: Filename, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
declare function watch(filename: Filename, options : string, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
declare function watch(filename: Filename, options : WatchOptions, listener : (eventType: 'update' | 'remove', filename: string) => any) : ImprovedFSWatcher;
interface FilenameArray extends Array<FilenameArray | string> {}
type Filename = string | FilenameArray;
type WatchOptions = {

@@ -21,0 +25,0 @@ /**

@@ -14,3 +14,3 @@ {

],
"version": "0.6.2",
"version": "0.6.3",
"bugs": {

@@ -17,0 +17,0 @@ "url": "https://github.com/yuanchuan/node-watch/issues"

@@ -191,3 +191,3 @@ # node-watch [![Status](https://travis-ci.org/yuanchuan/node-watch.svg?branch=master)](https://travis-ci.org/yuanchuan/node-watch "See test builds")

| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars3.githubusercontent.com/u/142875?v=4" width="100px;"/><br /><sub><b>Steve Shreeve</b></sub>](https://github.com/shreeve)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=shreeve "Code") | [<img src="https://avatars2.githubusercontent.com/u/1456400?v=4" width="100px;"/><br /><sub><b>Blake Regalia</b></sub>](https://github.com/blake-regalia)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=blake-regalia "Code") | [<img src="https://avatars3.githubusercontent.com/u/1587937?v=4" width="100px;"/><br /><sub><b>Mike Collins</b></sub>](https://github.com/intervalia)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=intervalia "Code") | [<img src="https://avatars3.githubusercontent.com/u/156867?v=4" width="100px;"/><br /><sub><b>Timo Tijhof</b></sub>](https://timotijhof.net)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=Krinkle "Code") | [<img src="https://avatars3.githubusercontent.com/u/9532377?v=4" width="100px;"/><br /><sub><b>Bailey Herbert</b></sub>](https://bailey.sh/)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=baileyherbert "Code") |
| [<img src="https://avatars3.githubusercontent.com/u/142875?v=4" width="100px;"/><br /><sub><b>Steve Shreeve</b></sub>](https://github.com/shreeve)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=shreeve "Code") | [<img src="https://avatars2.githubusercontent.com/u/1456400?v=4" width="100px;"/><br /><sub><b>Blake Regalia</b></sub>](https://github.com/blake-regalia)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=blake-regalia "Code") | [<img src="https://avatars3.githubusercontent.com/u/1587937?v=4" width="100px;"/><br /><sub><b>Mike Collins</b></sub>](https://github.com/intervalia)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=intervalia "Code") | [<img src="https://avatars3.githubusercontent.com/u/156867?v=4" width="100px;"/><br /><sub><b>Timo Tijhof</b></sub>](https://timotijhof.net)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=Krinkle "Code") | [<img src="https://avatars3.githubusercontent.com/u/9532377?v=4" width="100px;"/><br /><sub><b>Bailey Herbert</b></sub>](https://bailey.sh/)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=baileyherbert "Code") | [<img src="https://avatars0.githubusercontent.com/u/1397032?v=4" width="100px;"/><br /><sub><b>Anthony Rey</b></sub>](https://github.com/Gnuk)<br />[💻](https://github.com/yuanchuan/node-watch/commits?author=Gnuk "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -194,0 +194,0 @@

@@ -532,3 +532,3 @@ var assert = require('assert');

var changes = [];
watcher = watch(fpaths, { delay: 50, recursive: true }, function(evt, name) {
watcher = watch(fpaths, { delay: 100, recursive: true }, function(evt, name) {
changes.push(name);

@@ -547,3 +547,3 @@ });

done();
}, 150);
}, 200);
});

@@ -550,0 +550,0 @@ });

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