-
Notifications
You must be signed in to change notification settings - Fork 24
chore: reduce dependency count #522
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #522 +/- ##
==========================================
- Coverage 79.87% 79.86% -0.01%
==========================================
Files 122 121 -1
Lines 12013 11995 -18
Branches 841 839 -2
==========================================
- Hits 9595 9580 -15
+ Misses 2415 2412 -3
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reduces the dependency count by removing to-vfile, moving eslint-plugin-react-x to devDependencies, and replacing glob with the smaller and faster tinyglobby library.
Key changes:
- Replaced
to-vfile'sread()function with directVFileconstructor calls and Node.jsfs.promises.readFile() - Replaced
globwithtinyglobbyfor file globbing operations - Inlined the
parseJsSourcefunction intoast-js/index.mjsand removed thejavascript.mjsparser file - Replaced
hast-util-to-stringusage inhighlighter.mjswith direct property access
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/utils/highlighter.mjs |
Removed hast-util-to-string import and changed from toString(preElement) to direct preElement.children[0].value access |
src/parsers/javascript.mjs |
Deleted entire file as the parseJsSource function is no longer needed |
src/generators/jsx-ast/utils/transformer.mjs |
Added TODO comment acknowledging potential for removing toString dependency in the future |
src/generators/ast/index.mjs |
Replaced to-vfile's read() with manual VFile creation and readFile(), replaced glob with tinyglobby |
src/generators/ast-js/index.mjs |
Inlined the JavaScript parsing logic, replaced to-vfile usage, and switched from glob to tinyglobby |
package.json |
Removed to-vfile and glob dependencies, added tinyglobby, moved eslint-plugin-react-x to devDependencies, updated several other dependencies to newer versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c68aec7 to
8292125
Compare
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM tho
This PR removes the
to-vfiledependency, moveseslint-plugin-react-xtodevDependencies, and replacesglobwith the smaller and fastertinyglobby.