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

chokidar

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chokidar - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

5

index.js

@@ -153,2 +153,3 @@ 'use strict';

this.hasGlob = watchPath !== path;
/** @type {object|boolean} */
this.globSymlink = this.hasGlob && follow ? null : false;

@@ -776,3 +777,5 @@ this.globFilter = this.hasGlob ? anymatch(path) : false;

const st = (stats && stats.mode) & 0o777;
// stats.mode may be bigint
const md = stats && Number.parseInt(stats.mode);
const st = md & 0o777;
const it = parseInt(st.toString(8)[0], 10);

@@ -779,0 +782,0 @@ return Boolean(4 & it);

23

lib/nodefs-handler.js

@@ -294,3 +294,2 @@ 'use strict';

* @param {Boolean} initialAdd was the file added at watch instantiation?
* @param {Function} callback When done processing as a newly seen file
* @returns {Function} closer for the watcher instance

@@ -330,3 +329,3 @@ */

this.fsw._remove(dirname, basename);
}
}
// add is about to be emitted if file not already tracked in parent

@@ -359,3 +358,3 @@ } else if (parent.has(basename)) {

* @param {String} item basename of this item
* @returns {Boolean} true if no more processing is needed for this entry.
* @returns {Promise<Boolean>} true if no more processing is needed for this entry.
*/

@@ -434,3 +433,3 @@ async _handleSymlink(entry, directory, path, item) {

}).on('error', this._boundHandleError);
return new Promise(res =>
return new Promise(res =>
stream

@@ -445,3 +444,3 @@ .on('end', () => {

// and are removed from @watched[directory].
previous.getChildren().filter((item) =>
previous.getChildren().filter((item) =>
item !== directory &&

@@ -473,4 +472,4 @@ !current.has(item) &&

* @param {Object} wh Common watch helpers for this path
* @param {Function} callback Called when dir scan is done
* @returns {Function} closer for the watcher instance.
* @param {String} realpath
* @returns {Promise<Function>} closer for the watcher instance.
*/

@@ -497,3 +496,3 @@ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {

}
closer = this._watchWithNodeFs(dir, (dirPath, stats) => {

@@ -517,4 +516,3 @@ // if current directory is removed, do nothing

* @param {String=} target Child path actually targeted for watch
* @param {Function=} callback Indicates whetehr the path was found or not
* @returns {void}
* @returns {Promise}
*/

@@ -574,3 +572,6 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {

} catch (error) {
if (this.fsw._handleError(error)) return path;
if (this.fsw._handleError(error)) {
ready();
return path;
}
}

@@ -577,0 +578,0 @@ }

{
"name": "chokidar",
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.",
"version": "3.0.1",
"version": "3.0.2",
"homepage": "https://github.com/paulmillr/chokidar",

@@ -16,3 +16,2 @@ "author": "Paul Miller (https://paulmillr.com)",

"anymatch": "^3.0.1",
"async-each": "^1.0.3",
"braces": "^3.0.2",

@@ -23,3 +22,3 @@ "glob-parent": "^5.0.0",

"normalize-path": "^3.0.0",
"readdirp": "^3.0.2"
"readdirp": "^3.1.1"
},

@@ -30,5 +29,5 @@ "optionalDependencies": {

"devDependencies": {
"@types/node": "^11.13.4",
"chai": "^4.2.0",
"coveralls": "^3.0.1",
"@types/node": "^12",
"chai": "^4.2",
"coveralls": "^3",
"dtslint": "0.4.1",

@@ -38,3 +37,3 @@ "jshint": "^2.10.1",

"nyc": "^14.0.0",
"rimraf": "^2.4.3",
"rimraf": "^2.6.3",
"sinon": "^7.3.1",

@@ -41,0 +40,0 @@ "sinon-chai": "^3.3.0",

@@ -7,2 +7,4 @@ # Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) [![Yearly downloads](https://img.shields.io/npm/dy/chokidar.svg)](https://github.com/paulmillr/chokidar)

Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
## Why?

@@ -95,3 +97,3 @@ Node.js `fs.watch`:

.on('ready', () => log('Initial scan complete. Ready for changes'))
.on('raw', (event, path, details) => {
.on('raw', (event, path, details) => { // internal
log('Raw event info:', event, path, details);

@@ -244,3 +246,3 @@ });

Additionally `all` is available which gets emitted with the underlying event
name and path for every event other than `ready`, `raw`, and `error`.
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.

@@ -279,3 +281,3 @@ Takes an array of strings or just one string.

- v3 (Apr 30, 2019): Massive CPU & RAM consumption improvements. 17x package & deps size reduction. Node 8+-only
- v3 (Apr 30, 2019): massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8 and higher.
- v2 (Dec 29, 2017): Globs are now posix-style-only; without windows support. Tons of bugfixes.

@@ -282,0 +284,0 @@ - v1 (Apr 7, 2015): Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported

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