Skip to content

Replace lodash with local sortBy and debounce utilities - #1285

Merged
microbit-matt-hillsdon merged 1 commit into
mainfrom
remove-lodash
Aug 31, 2026
Merged

Replace lodash with local sortBy and debounce utilities#1285
microbit-matt-hillsdon merged 1 commit into
mainfrom
remove-lodash

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown
Collaborator

We only used sortBy and debounce, both in their simplest form (function iteratees, trailing-edge debounce with no cancel/flush). The per-method packages we depended on (lodash.debounce, lodash.sortby) are deprecated upstream, so rather than migrating to lodash-es we replace them with small tested utilities in src/common.

Also simplifies sortByStart in the search worker code, whose hand-rolled sort existed only to avoid pulling lodash into the worker bundle.

We only used sortBy and debounce, both in their simplest form (function
iteratees, trailing-edge debounce with no cancel/flush). The per-method
packages we depended on (lodash.debounce, lodash.sortby) are deprecated
upstream, so rather than migrating to lodash-es we replace them with
small tested utilities in src/common.

Also simplifies sortByStart in the search worker code, whose hand-rolled
sort existed only to avoid pulling lodash into the worker bundle.
@github-actions

Copy link
Copy Markdown

Preview build will be at
https://review-python-editor-v3.microbit.org/remove-lodash/

@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit d748fa5 into main Aug 31, 2026
2 checks passed
@microbit-matt-hillsdon
microbit-matt-hillsdon deleted the remove-lodash branch August 31, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant