refactor(deps): replace lodash with lodash-es - #288
Merged
Conversation
- Swap lodash 4.18.1 for lodash-es 4.18.1 in core, scatterbrain, and site - Swap @types/lodash for @types/lodash-es (lodash-es ships no declarations) - Convert lodash/<fn> subpath imports to named imports from 'lodash-es' - Point the core tsconfig types entry at lodash-es
…h-es # Conflicts: # packages/core/src/rendering/webgpu/filter/query.ts
froyo-np
approved these changes
Aug 21, 2026
froyo-np
left a comment
Collaborator
There was a problem hiding this comment.
Thank you so much for doing this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the CommonJS
lodashdependency with the ESM-nativelodash-es4.18.1 across the three packages that already used it —core,scatterbrain, andsite. No new packages gain a lodash dependency.How
Manifests
lodash→lodash-es4.18.1 inpackages/core,packages/scatterbrain, andsite(site was on 4.17.23)@types/lodash→@types/lodash-es4.17.12.lodash-esships no declarations of its own, and it's weird that the version number doesn't match up with the latest, but it's all working!Imports (15 files)
lodash-esdoesn't resolve extensionless subpaths, soimport reduce from 'lodash/reduce'becomesimport { reduce } from 'lodash-es'. Tree-shaking is preserved sincelodash-esis real ESM. Two incidental cleanups fell out of the rewrite:scatterbrain/src/renderer.ts— merged two adjacent single-name imports into onescatterbrain/src/shader.ts— replaced the namespace-import-plus-destructure (import * as lodashthenconst { keys, mapValues, reduce } = lodash) with a direct named importConfig
packages/core/tsconfig.json—types: ["@webgpu/types", "lodash"]→"lodash-es"PR Checklist
main?🤖 Generated with Claude Code