Skip to content

Commit 454a024

Browse files
committed
refactor(fs): upgrade chokidar to v5
1 parent b3dc1cf commit 454a024

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"dependencies": {
4545
"anymatch": "^3.1.3",
46-
"chokidar": "^4.0.3",
46+
"chokidar": "^5.0.0",
4747
"destr": "^2.0.5",
4848
"h3": "^1.15.5",
4949
"lru-cache": "^10.4.3",

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/drivers/fs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync, promises as fsp, Stats } from "node:fs";
22
import { resolve, relative, join } from "node:path";
3-
import { FSWatcher, type ChokidarOptions, watch } from "chokidar";
3+
import type { FSWatcher, ChokidarOptions } from "chokidar";
44
import anymatch from "anymatch";
55
import { createError, createRequiredError, defineDriver } from "./utils";
66
import {
@@ -110,6 +110,7 @@ export default defineDriver((userOptions: FSStorageOptions = {}) => {
110110
if (_watcher) {
111111
return _unwatch;
112112
}
113+
const { watch } = await import("chokidar");
113114
await new Promise<void>((resolve, reject) => {
114115
const watchOptions: ChokidarOptions = {
115116
ignoreInitial: true,

0 commit comments

Comments
 (0)