From f60e4858d735a4198a7e35f6dc561ddc105c36ff Mon Sep 17 00:00:00 2001 From: v1rtl Date: Sun, 13 Oct 2024 12:28:52 +0300 Subject: [PATCH] feat: bump chokidar v4 (#489) --- package.json | 2 +- pnpm-lock.yaml | 18 ++++++++++++++++-- src/drivers/fs.ts | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d14ddfb7..d5a06a1a 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "anymatch": "^3.1.3", - "chokidar": "^3.6.0", + "chokidar": "^4.0.1", "destr": "^2.0.3", "h3": "^1.13.0", "listhen": "^1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d97e1ba2..865b6853 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^3.1.3 version: 3.1.3 chokidar: - specifier: ^3.6.0 - version: 3.6.0 + specifier: ^4.0.1 + version: 4.0.1 destr: specifier: ^2.0.3 version: 2.0.3 @@ -1586,6 +1586,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -3569,6 +3573,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.1: + resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} + engines: {node: '>= 14.16.0'} + readline-sync@1.4.10: resolution: {integrity: sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==} engines: {node: '>= 0.8.0'} @@ -5894,6 +5902,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.1: + dependencies: + readdirp: 4.0.1 + chownr@2.0.0: {} ci-info@4.0.0: {} @@ -8093,6 +8105,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.1: {} + readline-sync@1.4.10: {} redis-errors@1.2.0: {} diff --git a/src/drivers/fs.ts b/src/drivers/fs.ts index 519e67c6..315d8e63 100644 --- a/src/drivers/fs.ts +++ b/src/drivers/fs.ts @@ -1,6 +1,6 @@ import { existsSync, promises as fsp, Stats } from "node:fs"; import { resolve, relative, join } from "node:path"; -import { FSWatcher, WatchOptions, watch } from "chokidar"; +import { FSWatcher, ChokidarOptions, watch } from "chokidar"; import { createError, createRequiredError, defineDriver } from "./utils"; import { readFile, @@ -16,7 +16,7 @@ export interface FSStorageOptions { ignore?: string[]; readOnly?: boolean; noClear?: boolean; - watchOptions?: WatchOptions; + watchOptions?: ChokidarOptions; } const PATH_TRAVERSE_RE = /\.\.:|\.\.$/;