sane
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -6,2 +6,3 @@ 'use strict'; | ||
const WatchmanWatcher = require('./src/watchman_watcher'); | ||
const WatchexecWatcher = require('./src/watchexec_watcher'); | ||
const FSEventsWatcher = require('./src/fsevents_watcher'); | ||
@@ -18,2 +19,4 @@ | ||
return new WatchmanWatcher(dir, options); | ||
} else if (options.watchexec) { | ||
return new WatchexecWatcher(dir, options); | ||
} else if (options.fsevents) { | ||
@@ -30,2 +33,3 @@ return new FSEventsWatcher(dir, options); | ||
sane.WatchmanWatcher = WatchmanWatcher; | ||
sane.WatchexecWatcher = WatchexecWatcher; | ||
sane.FSEventsWatcher = FSEventsWatcher; |
{ | ||
"name": "sane", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Sane aims to be fast, small, and reliable file system watcher.", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "npm run format && eslint src/ test/ index.js && mocha --bail test/test.js && mocha --bail test/utils-test.js", | ||
"test": "npm run format && eslint src/ test/ index.js && mocha --bail test/test.js && mocha --bail test/utils-test.js && mocha --bail 'test/watchexec_*-test.js'", | ||
"test:debug": "mocha debug --bail", | ||
@@ -35,2 +35,3 @@ "format": "prettier --trailing-comma es5 --single-quote --write index.js 'src/**/*.js' 'test/**/*.js'" | ||
"exec-sh": "^0.2.0", | ||
"execa": "^1.0.0", | ||
"fb-watchman": "^2.0.0", | ||
@@ -37,0 +38,0 @@ "micromatch": "^3.1.4", |
@@ -14,2 +14,3 @@ [![CircleCI](https://circleci.com/gh/amasad/sane.svg?style=svg)](https://circleci.com/gh/amasad/sane) | ||
* [the facebook watchman library](https://facebook.github.io/watchman/) | ||
* [the watchexec library](https://github.com/watchexec/watchexec) | ||
* polling | ||
@@ -56,2 +57,3 @@ | ||
* `watchmanPath`: sets a custom path for `watchman` binary. | ||
* `watchexec`: makes the watcher use [watchexec](https://github.com/watchexec/watchexec). | ||
* `dot`: enables watching files/directories that start with a dot. | ||
@@ -62,2 +64,3 @@ * `ignored`: a glob, regex, function, or array of any combination. | ||
If you choose to use `watchman` you'll have to [install watchman yourself](https://facebook.github.io/watchman/docs/install.html)). | ||
If you choose to use `watchexec` you'll have to [install watchexec yourself](https://github.com/watchexec/watchexec)). | ||
For the ignored options, see [anymatch](https://github.com/es128/anymatch). | ||
@@ -73,2 +76,6 @@ | ||
### sane.Watchexec(dir, options) | ||
The watchexec watcher class. Takes the same options as `sane(dir, options)`. | ||
### sane.PollWatcher(dir, options) | ||
@@ -80,7 +87,7 @@ | ||
### sane.{Node|Watchman|Poll}Watcher#close | ||
### sane.{Node|Watchman|Watchexec|Poll}Watcher#close | ||
Stops watching. | ||
### sane.{Node|Watchman|Poll}Watcher events | ||
### sane.{Node|Watchman|Watchexec|Poll}Watcher events | ||
@@ -87,0 +94,0 @@ Emits the following events: |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
53333
13
1602
145
11
8
+ Addedexeca@^1.0.0
+ Addedcross-spawn@6.0.5(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexeca@1.0.0(transitive)
+ Addedget-stream@4.1.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpump@3.0.0(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrappy@1.0.2(transitive)