-
-
Notifications
You must be signed in to change notification settings - Fork 449
fix(ui~cli): file watcher ignore directory logic #1549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ui~cli): file watcher ignore directory logic #1549
Conversation
- Added new directories to the exclusion list in consts.ts. - Introduced an `allowedExtensions` array to manage file types for processing. - Updated the `dev`, `generateClassList`, and `findFiles` commands to utilize the new `allowedExtensions` for improved file filtering
🦋 Changeset detectedLatest commit: 9874f51 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request addresses issues within the file watcher logic. The updates refine the criteria for ignoring directories by switching from a path-ending check to a base name inclusion check. In addition, hardcoded file extension filters have been replaced with a dynamically managed constant, Changes
Sequence Diagram(s)sequenceDiagram
participant W as File Watcher
participant S as Search Function
participant C as Config (excludeDirs & allowedExtensions)
participant FS as File System
W->>S: File event received
S->>C: Retrieve excludeDirs & allowedExtensions
S->>S: Extract basename of directory
alt Basename is in excludeDirs
S-->>W: Skip monitoring directory
else File extension not in allowedExtensions
S-->>W: Skip processing file
else
S->>FS: Process file event
end
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
packages/ui/src/cli/commands/dev.tsOops! Something went wrong! :( ESLint: 8.57.0 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "/packages/ui".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react" was referenced from the config file in "packages/ui/.eslintrc.cjs". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/ui/src/cli/commands/generate-class-list.tsOops! Something went wrong! :( ESLint: 8.57.0 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "/packages/ui".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react" was referenced from the config file in "packages/ui/.eslintrc.cjs". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/ui/src/cli/consts.tsOops! Something went wrong! :( ESLint: 8.57.0 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "/packages/ui".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react" was referenced from the config file in "packages/ui/.eslintrc.cjs". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code Definitions (3)packages/ui/src/cli/utils/find-files.ts (1)
packages/ui/src/cli/commands/generate-class-list.ts (1)
packages/ui/src/cli/commands/dev.ts (1)
🔇 Additional comments (10)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit