Skip to content

refactor: replace lodash with radash - #16797

Merged
antobinary merged 28 commits into
bigbluebutton:v2.7.x-releasefrom
ramonlsouza:lodash-radash
Apr 5, 2023
Merged

antobinary merged 28 commits into
bigbluebutton:v2.7.x-releasefrom
ramonlsouza:lodash-radash

Conversation

@ramonlsouza

@ramonlsouza ramonlsouza commented Feb 23, 2023 •

Copy link
Copy Markdown
Member

What does this PR do?

Replaces lodash with radash and some native functions.

  • clone
  • compact
  • concat
  • debounce
  • defaultsDeep
  • delay
  • each
  • find
  • groupBy
  • indexOf
  • isArray
  • isEmpty
  • isEqual
  • isFinite
  • isObject
  • isString
  • merge
  • mergeWith
  • omit
  • partition
  • range
  • throttle
  • uniq
  • uniqBy
  • uniqueId
  • upperFirst
  • without
  • lodash/fp
  • remove lodash dependency

Motivation

https://medium.com/vanguards-of-code/lodash-is-dead-long-live-radash-d9d52abf428b

@ramonlsouza ramonlsouza added this to the Release 2.6 milestone Feb 23, 2023
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Comment thread bigbluebutton-html5/package.json Outdated
"immutability-helper": "~2.8.1",
"langmap": "0.0.16",
"lodash": "^4.17.21",
"lodash.throttle": "^4.1.1",

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.

Can we remove "lodash.throttle": "^4.1.1", ?
How come lodash removal does not remove lines from package-lock.json?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lodash is used on another package, I will check if there's a way to remove it

@sonarqubecloud

sonarqubecloud Bot commented Mar 2, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
2.9% 2.9% Duplication

@ramonlsouza
ramonlsouza marked this pull request as ready for review March 2, 2023 16:38
@ramonlsouza
ramonlsouza marked this pull request as draft March 2, 2023 18:02
@ramonlsouza
ramonlsouza changed the base branch from v2.6.x-release to v2.7.x-release March 3, 2023 13:56
@github-actions

github-actions Bot commented Mar 3, 2023

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@antobinary antobinary modified the milestones: Release 2.6, Release 2.7 Mar 30, 2023
@github-advanced-security

Copy link
Copy Markdown

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@sonarqubecloud

sonarqubecloud Bot commented Apr 5, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ramonlsouza
ramonlsouza marked this pull request as ready for review April 5, 2023 14:31
@ramonlsouza
ramonlsouza requested a review from antobinary April 5, 2023 14:43
// to have annotations from different pages
// group annotations by same whiteboardId
_.each(_.groupBy(annotations, "wbId"), (whiteboardAnnotations) => {
const groupedAnnotations = annotations.reduce((r, v, i, a, k = v.wbId) => ((r[k] || (r[k] = [])).push(v), r), {}) //groupBy wbId

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.

Wow, this is fancy 👏

@antobinary
antobinary merged commit 92729a6 into bigbluebutton:v2.7.x-release Apr 5, 2023
@antobinary antobinary mentioned this pull request Sep 7, 2023
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