Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: paulmillr/chokidar
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.5.3
Choose a base ref
...
head repository: paulmillr/chokidar
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.6.0
Choose a head ref

Commits on Jan 22, 2022

  1. handle MustScanSubDirs

    MarcCelani-at committed Jan 22, 2022
    Copy the full SHA
    2720478 View commit details
  2. move to constants

    MarcCelani-at committed Jan 22, 2022
    Copy the full SHA
    37a2eaa View commit details

Commits on Jan 27, 2022

  1. Copy the full SHA
    495ba39 View commit details

Commits on Jan 28, 2022

  1. Update CI config

    * add `workflow_dispatch`
    * specify `FORCE_COLOR: 2` for colored output
    * update `actions/checkout` to v2
    * update `actions/setup-node` to v2
    * add Node.js 16
    * reduce CI matrix
    XhmikosR committed Jan 28, 2022
    Copy the full SHA
    81d010b View commit details

Commits on Feb 4, 2022

  1. Merge pull request #1199 from XhmikosR/patch-1

    Update CI config
    paulmillr authored Feb 4, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b059841 View commit details
  2. Merge pull request #1198 from XhmikosR/rm-unused-deps

    Remove unused devDependencies
    paulmillr authored Feb 4, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b2c4f24 View commit details

Commits on Jun 24, 2022

  1. Update README.md

    Added some more info to `Why was chokidar named this way?`
    Mutahhar authored Jun 24, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    37c1ee6 View commit details

Commits on Jul 2, 2022

  1. Merge pull request #1226 from Mutahhar/patch-1

    Update README.md
    paulmillr authored Jul 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6147487 View commit details

Commits on Aug 19, 2022

  1. Fix close tests

    Avoid nested async/await and Promise constructors that caused parts of
    the old tests to continue running and interfere with subsequent tests
    zqianem committed Aug 19, 2022
    Copy the full SHA
    62b19c9 View commit details
  2. Fix test case using unsupported option for Node 8

    The `fs.mkdir` function does not take an `options` object until Node 10
    zqianem committed Aug 19, 2022
    Copy the full SHA
    66ed188 View commit details
  3. Merge pull request #1242 from zqianem/fix/tests

    Fix some tests
    paulmillr authored Aug 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2654ca6 View commit details

Commits on Sep 22, 2022

  1. Enable GitHub Sponsors

    paulmillr committed Sep 22, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    paulmillr Paul Miller
    Copy the full SHA
    0f163b8 View commit details

Commits on May 26, 2023

  1. Adjust funding field in pkg

    paulmillr committed May 26, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    paulmillr Paul Miller
    Copy the full SHA
    08318d6 View commit details

Commits on Sep 6, 2023

  1. fix readyCount logic

    JLHwung committed Sep 6, 2023
    Copy the full SHA
    1370123 View commit details
  2. Copy the full SHA
    f022fe7 View commit details
  3. Merge pull request #1288 from JLHwung/fix-ready-count

    fix readyCount logic
    paulmillr authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    399647e View commit details

Commits on Sep 10, 2023

  1. Merge pull request #1197 from MarcCelani-at/handleMustScanSubDirs

    handle MustScanSubDirs
    paulmillr authored Sep 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5589454 View commit details

Commits on Feb 2, 2024

  1. Copy the full SHA
    a0f9e09 View commit details
  2. fix formatting

    ben-polinsky committed Feb 2, 2024
    Copy the full SHA
    29a2f13 View commit details
  3. Merge pull request #1300 from ben-polinsky/fix-fswatcher-types-1299

    update fs.FSWatcher types to satisfy nodejs versions >= 16; fixes #1299
    paulmillr authored Feb 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ab12362 View commit details

Commits on Feb 6, 2024

  1. Add github ci autopublish

    paulmillr committed Feb 6, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    paulmillr Paul Miller
    Copy the full SHA
    112015f View commit details
  2. Release 3.6.0.

    paulmillr committed Feb 6, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    paulmillr Paul Miller
    Copy the full SHA
    7c50e25 View commit details
Showing with 5,453 additions and 86 deletions.
  1. +2 −1 .github/funding.yml
  2. +13 −6 .github/workflows/lint.yml
  3. +27 −10 .github/workflows/nodejs.yml
  4. +23 −0 .github/workflows/publish-npm.yml
  5. +0 −1 .gitignore
  6. +1 −1 README.md
  7. +1 −1 index.js
  8. +1 −0 lib/constants.js
  9. +2 −0 lib/fsevents-handler.js
  10. +5,324 −0 package-lock.json
  11. +5 −20 package.json
  12. +50 −46 test.js
  13. +4 −0 types/index.d.ts
3 changes: 2 additions & 1 deletion .github/funding.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
custom: https://paulmillr.com/funding/
github: paulmillr
# custom: https://paulmillr.com/funding/
19 changes: 13 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
name: Lint
on: [push, pull_request]

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:

env:
CI: true
FORCE_COLOR: 2

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "16"

- name: Install npm dependencies
run: npm install
37 changes: 27 additions & 10 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
name: Node CI
on: [push, pull_request]

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:

env:
CI: true
FORCE_COLOR: 2

jobs:
build:
name: v${{ matrix.node-version }} @ ${{ matrix.os }}
test:
name: Node.js ${{ matrix.node }} @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [8, 10, 12, 14]
os: [ubuntu-latest, windows-latest, macOS-latest]
node: [8, 10, 12, 14, 16]
os: [ubuntu-latest]
include:
- os: windows-latest
node: 8
- os: windows-latest
node: 14
- os: macOS-latest
node: 8
- os: macOS-latest
node: 14

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
- run: npm install
- name: Run mocha tests
run: npm run mocha
23 changes: 23 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Package to npm
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: npm install -g npm
- run: npm ci
- run: npm run build
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*.bak
*.log
/.nyc_output/
/coverage/
/node_modules/
/test-fixtures/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -301,7 +301,7 @@ For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md

Why was chokidar named this way? What's the meaning behind it?

>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four).
>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India.
## License

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -441,7 +441,7 @@ add(paths_, _origAdd, _internal) {

if (this.options.useFsEvents && this._fsEventsHandler) {
if (!this._readyCount) this._readyCount = paths.length;
if (this.options.persistent) this._readyCount *= 2;
if (this.options.persistent) this._readyCount += paths.length;
paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));
} else {
if (!this._readyCount) this._readyCount = 0;
1 change: 1 addition & 0 deletions lib/constants.js
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ exports.FSEVENT_DELETED = 'deleted';
exports.FSEVENT_MOVED = 'moved';
exports.FSEVENT_CLONED = 'cloned';
exports.FSEVENT_UNKNOWN = 'unknown';
exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
exports.FSEVENT_TYPE_FILE = 'file';
exports.FSEVENT_TYPE_DIRECTORY = 'directory';
exports.FSEVENT_TYPE_SYMLINK = 'symlink';
2 changes: 2 additions & 0 deletions lib/fsevents-handler.js
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ const {
FSEVENT_MOVED,
// FSEVENT_CLONED,
FSEVENT_UNKNOWN,
FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
FSEVENT_TYPE_FILE,
FSEVENT_TYPE_DIRECTORY,
FSEVENT_TYPE_SYMLINK,
@@ -148,6 +149,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
rawEmitter,
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
if (!cont.listeners.size) return;
if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
const info = fsevents.getInfo(fullPath, flags);
cont.listeners.forEach(list => {
list(fullPath, flags, info);
Loading