Skip to content

perf: remove lodash#3038

Merged
dummdidumm merged 7 commits into
sveltejs:masterfrom
ghostdevv:lodash
Jun 23, 2026
Merged

perf: remove lodash#3038
dummdidumm merged 7 commits into
sveltejs:masterfrom
ghostdevv:lodash

Conversation

@ghostdevv

@ghostdevv ghostdevv commented Jun 1, 2026

Copy link
Copy Markdown
Member

Remove the dependency on lodash replacing with native code and defu for merging objects. The only thing I'm not certain is replacing _.merge with defu as there could be different behavior, but I think it'll be fine. The new tests are AI generated, checked by me, and run both before and after this PR to help ensure I didn't break anything

@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1d8172c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-language-server Patch

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

@ghostdevv

This comment was marked as resolved.

@ghostdevv ghostdevv marked this pull request as ready for review June 1, 2026 21:04
@ghostdevv ghostdevv marked this pull request as draft June 1, 2026 21:11
@ghostdevv ghostdevv force-pushed the lodash branch 2 times, most recently from e0d377c to 3fd27e2 Compare June 1, 2026 21:56
@ghostdevv ghostdevv marked this pull request as ready for review June 1, 2026 21:57

@dummdidumm dummdidumm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good except groupBy. groupBy creates an array per entry with all the objects that match the key

@ghostdevv

Copy link
Copy Markdown
Member Author

looks good except groupBy. groupBy creates an array per entry with all the objects that match the key

yea! that's what it should do. It matches the Object.groupBy behaviour which appears to also match the lodash behaviour

@dummdidumm

Copy link
Copy Markdown
Member

Sorry that sentence was unclear - your implementation is not doing what it's supposed to. Instead of creating an array per entry it just takes the first occurrence of a match and assigns it to the key

@ghostdevv

Copy link
Copy Markdown
Member Author

Sorry that sentence was unclear - your implementation is not doing what it's supposed to. Instead of creating an array per entry it just takes the first occurrence of a match and assigns it to the key

omg yea 🤦‍♀️

@dummdidumm dummdidumm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@dummdidumm dummdidumm merged commit 7659b0f into sveltejs:master Jun 23, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
@ghostdevv ghostdevv deleted the lodash branch June 23, 2026 19:16
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.

2 participants