Skip to content

Update lodash 2.4.2 -> 4.13.1.#8564

Closed
bcjordan wants to merge 1 commit into
stagingfrom
update-lodash
Closed

Update lodash 2.4.2 -> 4.13.1.#8564
bcjordan wants to merge 1 commit into
stagingfrom
update-lodash

Conversation

@bcjordan

@bcjordan bcjordan commented May 24, 2016

Copy link
Copy Markdown
Contributor

The intent of this upgrade is to enable use of _.mergeWith (introduced in lodash 4.0) in order to define a merge which concats rather than overwrites arrays (https://github.com/code-dot-org/code-dot-org/blob/staging/apps/src/utils.js#L446-L446)

  • change uses of deprecated _.contains -> _.includes
  • update test to remove usage of deprecated boolean option (use explicit object instead)

Used in #8563

One small drawback is this increases the built out lodash size a bit.

To investigate:

  • introduces a few dependency warnings lines during npm install:

image

- contains -> includes
- update test to remove usage of deprecated boolean option (use explicit object instead)
@bcjordan

Copy link
Copy Markdown
Contributor Author

@Bjvanminnen it looks like this causes an issue with npm start as it must be depending on a deprecated lodash method. Going to investigate and see what upgrading would take, otherwise we can pretty easily work around not using _.mergeWith in that other branch.

@Bjvanminnen

Copy link
Copy Markdown
Contributor

If we're upgrading in apps, we should probably upgrade in code-studio as well.

@Bjvanminnen

Copy link
Copy Markdown
Contributor

For the includes stuff, we might be able to get away with [1,2,3].includes(2). I believe this is provided by the babel polyfill, tho we'd want to double check that (i.e. make sure it works on browsers that don't provide includes method yet.

@bcjordan bcjordan closed this May 24, 2016
@bcjordan bcjordan deleted the update-lodash branch May 24, 2016 17:53
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