diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..b6ebcbac --- /dev/null +++ b/.eslintrc @@ -0,0 +1,50 @@ +{ + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "script" + }, + "env": { + "node": true, + "es6": true + }, + "rules": { + "array-callback-return": "error", + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-lonely-if": "error", + "no-var": "error", + "object-shorthand": "error", + "prefer-arrow-callback": [ + "error", + { + "allowNamedFunctions": true + } + ], + "prefer-const": [ + "error", + { + "ignoreReadBeforeAssign": true + } + ], + "prefer-destructuring": [ + "error", + { + "object": true, + "array": false + } + ], + "prefer-spread": "error", + "prefer-template": "error", + "radix": "error", + "strict": "error", + "quotes": [ + "error", + "single" + ] + } +} \ No newline at end of file diff --git a/.github/full_changelog.md b/.github/full_changelog.md index 5505f87b..4b562b25 100644 --- a/.github/full_changelog.md +++ b/.github/full_changelog.md @@ -1,3 +1,7 @@ +### Chokidar 3.5.0 (Jan 6, 2021) +- Support for ARM Macs with Apple Silicon. +- Fixed missing removal of symlinks when the target path was deleted (#1042) + ### Chokidar 3.4.3 (Oct 13, 2020) * Circular symlinks that point to some parent directory are no longer watched. This prevents infinite loops. diff --git a/README.md b/README.md index 1ad775f2..5cfb81e7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ # 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) -> A neat wrapper around Node.js fs.watch / fs.watchFile / FSEvents. +> Minimal and efficient cross-platform file watching library [![NPM](https://nodei.co/npm/chokidar.png)](https://www.npmjs.com/package/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? Node.js `fs.watch`: @@ -35,6 +33,8 @@ Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app buil and [many others](https://www.npmjs.com/browse/depended/chokidar). It has proven itself in production environments. +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/) + ## How? Chokidar does still rely on the Node.js core `fs` module, but when using @@ -74,7 +74,7 @@ chokidar.watch('.').on('all', (event, path) => { ## API ```javascript -// Example of a more typical implementation structure: +// Example of a more typical implementation structure // Initialize watcher. const watcher = chokidar.watch('file, dir, glob, or array', { @@ -286,7 +286,8 @@ execute a command on each change, or get a stdio stream of change events. ## Changelog For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md). -- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Macos file replacement fixes. +- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks. +- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement. - **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method. - **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions. - **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%. diff --git a/package.json b/package.json index 22f62f4e..71792927 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "chokidar", - "description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", - "version": "3.4.4", + "description": "Minimal and efficient cross-platform file watching library", + "version": "3.5.0", "homepage": "https://github.com/paulmillr/chokidar", "author": "Paul Miller (https://paulmillr.com)", "contributors": [ @@ -22,7 +22,7 @@ "readdirp": "~3.5.0" }, "optionalDependencies": { - "fsevents": "~2.2.0" + "fsevents": "~2.3.1" }, "devDependencies": { "@types/node": "^14", @@ -65,56 +65,6 @@ "fsevents" ], "types": "./types/index.d.ts", - "eslintConfig": { - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "script" - }, - "env": { - "node": true, - "es6": true - }, - "rules": { - "array-callback-return": "error", - "no-empty": [ - "error", - { - "allowEmptyCatch": true - } - ], - "no-lonely-if": "error", - "no-var": "error", - "object-shorthand": "error", - "prefer-arrow-callback": [ - "error", - { - "allowNamedFunctions": true - } - ], - "prefer-const": [ - "error", - { - "ignoreReadBeforeAssign": true - } - ], - "prefer-destructuring": [ - "error", - { - "object": true, - "array": false - } - ], - "prefer-spread": "error", - "prefer-template": "error", - "radix": "error", - "strict": "error", - "quotes": [ - "error", - "single" - ] - } - }, "nyc": { "include": [ "index.js",