Skip to content

Commit b67a2a5

Browse files
committedMar 3, 2025·
fix(node-runtime): file watcher + chokidar
1 parent f6780d2 commit b67a2a5

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
 

‎.changeset/cool-onions-hear.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@pandacss/node': patch
3+
---
4+
5+
Fix issue where file watching doesn't work due the recent security upgrade of the `chokidar` package.

‎packages/node/src/node-runtime.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export const nodeRuntime: Runtime = {
5050
watch(options) {
5151
const { include, exclude, cwd, poll } = options
5252
const coalesce = poll || process.platform === 'win32'
53-
const watcher = chokidar.watch(include, {
53+
const files = glob.sync(include, { cwd, ignore: exclude })
54+
const watcher = chokidar.watch(files, {
5455
usePolling: poll,
5556
cwd,
5657
ignoreInitial: true,
5758
ignorePermissionErrors: true,
58-
ignored: exclude,
5959
awaitWriteFinish: coalesce ? { stabilityThreshold: 50, pollInterval: 10 } : false,
6060
})
6161

‎packages/studio/styled-system/types/conditions.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export interface Conditions {
146146
"_open": string
147147
/** `&:is([closed], [data-closed], [data-state="closed"])` */
148148
"_closed": string
149-
/** `&is(:fullscreen, [data-fullscreen])` */
149+
/** `&:is(:fullscreen, [data-fullscreen])` */
150150
"_fullscreen": string
151151
/** `&:is([data-loading], [aria-busy=true])` */
152152
"_loading": string

0 commit comments

Comments
 (0)
Please sign in to comment.