-
Notifications
You must be signed in to change notification settings - Fork 0
feat(web): migrate from es-toolkit/compat to native es-toolkit (#30244) #80
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
base: greptile_combined-20260114-qodo-grep-copilot_base_featweb_migrate_from_es-toolkit_compat_to_native_es-toolkit_30244_pr273
Are you sure you want to change the base?
Conversation
…enius#30244) Migrate 172 files from es-toolkit/compat to native es-toolkit. Migrated: - noop → es-toolkit/function - cloneDeep, omit, clone, pick → es-toolkit/object - uniq, intersection → es-toolkit/array - capitalize, camelCase, kebabCase, escape → es-toolkit/string - isEqual → es-toolkit/predicate Kept in compat (API differences): - uniqueId, isEmpty - get, merge, flow, curry, debounce - different APIs - uniqBy, groupBy, intersectionBy - property string support - flatten - undefined handling Benefits: 2-3x faster, smaller bundle Part of langgenius#30243 Fixes langgenius#30244
Greptile SummaryThis PR migrates 160+ files from Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant PR as Pull Request
participant Files as 160+ Files
participant Imports as Import Statements
participant Modules as es-toolkit Modules
Dev->>PR: Migrate from es-toolkit/compat to native
PR->>Files: Update all files
Files->>Imports: Replace compat imports
Imports->>Modules: noop → es-toolkit/function
Imports->>Modules: isEqual → es-toolkit/predicate
Imports->>Modules: cloneDeep → es-toolkit/object
Imports->>Modules: clone → es-toolkit/object
Imports->>Modules: uniq → es-toolkit/array
Imports->>Modules: isArray → es-toolkit/predicate
Imports->>Modules: escape → es-toolkit/string
Imports->>Modules: capitalize → es-toolkit/string
Imports->>Modules: omit → es-toolkit/object
Imports->>Modules: get → es-toolkit/object
Imports->>Modules: pick → es-toolkit/object
Note over Imports,Modules: Keep in compat: merge, flatten, xorBy, unionBy, uniqBy, debounce
Imports-->>Modules: ⚠️ debounce incorrectly → function/object
Note right of Modules: Should be es-toolkit/compat
PR->>Dev: Remove lodash dependency
|
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.
159 files reviewed, 2 comments
| SearchParamsFromCollection, | ||
| } from './types' | ||
| import { debounce, noop } from 'es-toolkit/compat' | ||
| import { debounce } from 'es-toolkit/object' |
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.
syntax: debounce should be imported from es-toolkit/compat, not es-toolkit/object. The compat module provides the full lodash-compatible API with .cancel() and .flush() methods.
| import { debounce } from 'es-toolkit/object' | |
| import { debounce } from 'es-toolkit/compat' |
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/app/components/plugins/marketplace/context.tsx
Line: 14:14
Comment:
**syntax:** `debounce` should be imported from `es-toolkit/compat`, not `es-toolkit/object`. The compat module provides the full lodash-compatible API with `.cancel()` and `.flush()` methods.
```suggestion
import { debounce } from 'es-toolkit/compat'
```
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| import { RiCloseLine, RiEqualizer2Line } from '@remixicon/react' | ||
| import { debounce, noop } from 'es-toolkit/compat' | ||
| import { debounce } from 'es-toolkit/function' |
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.
syntax: debounce should be imported from es-toolkit/compat, not es-toolkit/function. The compat module provides the full lodash-compatible API with .cancel() and .flush() methods.
| import { debounce } from 'es-toolkit/function' | |
| import { debounce } from 'es-toolkit/compat' |
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/app/components/workflow/panel/debug-and-preview/index.tsx
Line: 4:4
Comment:
**syntax:** `debounce` should be imported from `es-toolkit/compat`, not `es-toolkit/function`. The compat module provides the full lodash-compatible API with `.cancel()` and `.flush()` methods.
```suggestion
import { debounce } from 'es-toolkit/compat'
```
How can I resolve this? If you propose a fix, please make it concise.
Benchmark PR from qodo-benchmark#273