Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove lodash as a dependency #2378

Merged
merged 9 commits into from
Jul 25, 2023
Merged

feat: remove lodash as a dependency #2378

merged 9 commits into from
Jul 25, 2023

Conversation

ckniffen
Copy link
Collaborator

@ckniffen ckniffen commented Jul 12, 2023

High Level Overview of Change

This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used flatten, flatMap, omitBy, and groupBy.

omitBy and groupBy were recreated while the es2019 implementations of flatten and flatMap are used.

lodash is still used in the tests which is fine because it makes the tests cleaner.

Closes #2118

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Refactor (non-breaking change that only restructures code)

This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
@socket-security
Copy link

socket-security bot commented Jul 12, 2023

No top level dependency changes detected. Learn more about Socket for GitHub ↗︎

@ckniffen ckniffen changed the base branch from main to 3.0 July 17, 2023 14:19
@ckniffen ckniffen added the 3.0 label Jul 17, 2023
acc[key] = obj[key]
return acc
}, {})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add unit tests for these helper functions?

@ckniffen ckniffen merged commit ab3adbe into 3.0 Jul 25, 2023
12 checks passed
@ckniffen ckniffen deleted the feature/remove-lodash branch July 25, 2023 22:07
ckniffen added a commit that referenced this pull request Aug 12, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Aug 15, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Aug 28, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Aug 28, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Sep 1, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Oct 5, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Oct 18, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Oct 25, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Nov 1, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Nov 30, 2023
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
ckniffen added a commit that referenced this pull request Feb 1, 2024
This will reduce the bundle size by ~23%(117kb).

Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.

`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.

`lodash` is still used in the tests which is fine because it makes the
tests cleaner.

Closes #2118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove lodash from the xrpl package
4 participants