Skip to content

test: drop lodash dependency and use a local sortBy helper instead - #294

Open
yoshinorin wants to merge 1 commit into
masterfrom
chore/drop-lodash
Open

test: drop lodash dependency and use a local sortBy helper instead#294
yoshinorin wants to merge 1 commit into
masterfrom
chore/drop-lodash

Conversation

@yoshinorin

@yoshinorin yoshinorin commented Aug 13, 2026

Copy link
Copy Markdown
Member

check list

  • Add test cases for the changes.
  • Passed the CI test.

Description

Removed lodash from devDependencies:

  • lodash was only used for sortBy(data, '_id') in two test files (test/scripts/query.ts, test/scripts/model.ts) — pulling in the whole package just for a single-key sort is overkill.
  • Added a small sortBy helper in test/helpers.ts and pointed both test files at it instead.

Additional information

see: You-Dont-Need-Lodash-Underscore

@SukkaW SukkaW 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.

I am leaning toward having lodash.sortby as a devDeps.

It is not in deps, so it is never shipped to users. We only use it for testing. By sticking with lodash.sortby we can ensure there are no behavior changes.

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.

3 participants