remove lodash.escaperegexp, lodash.groupby, and lodash.partition depe… - #1255
Open
SebbeBroman wants to merge 2 commits into
Open
remove lodash.escaperegexp, lodash.groupby, and lodash.partition depe…#1255SebbeBroman wants to merge 2 commits into
SebbeBroman wants to merge 2 commits into
Conversation
gameroman
reviewed
Aug 4, 2026
Comment on lines
+4
to
+7
| /** Escape special characters for use in a RegExp. */ | ||
| const escapeRegExp = (value: string): string => { | ||
| return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| }; |
Contributor
There was a problem hiding this comment.
Also once Node 22 is EOL we can use native RegExp.escape
Author
There was a problem hiding this comment.
Yes, but I did not want to change the supported node version, but this should be functionally the same as lodash. But RegExp.excape is a bit more extensive so that would be a good replacement.
Contributor
There was a problem hiding this comment.
Yep, just saying that we'll able to change it in the future
SebbeBroman
commented
Aug 4, 2026
| const grouped = filteredHeaders.reduce<Record<string, string[]>>((acc, header) => { | ||
| (acc[header] ||= []).push(header); | ||
| return acc; | ||
| }, {}); |
Author
There was a problem hiding this comment.
This could be Object.groupBy in the future, but that would change the minimum node version.
Contributor
There was a problem hiding this comment.
Maybe add a // TODO(major): ... comment to not forget
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.
Removing the last lodash dependencies, should reduce bundle size especially for the parse package.
This would make format and parse dependency free.
All Submissions:
Changes to Core Features: