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

lodash 4 compatibility #165

Open
jtakalai opened this issue Jun 6, 2016 · 0 comments
Open

lodash 4 compatibility #165

jtakalai opened this issue Jun 6, 2016 · 0 comments

Comments

@jtakalai
Copy link

jtakalai commented Jun 6, 2016

Hi,

_setAttr relies on third "context" argument to _.each

This is deprecated in lodash, and the response from there isn't very empathic. Their changelog https://github.com/lodash/lodash/wiki/Changelog#v400 says you could rewrite

_.each(this.relations, function (relation) {
...
}, this);

into

_.each(this.relations, _.bind(function (relation) {
...
}, this));

This would enable using lodash with backbone-associations.

jtakalai added a commit to jtakalai/backbone-associations that referenced this issue Jun 6, 2016
…d instead

Fix suggestion for issue described in dhruvaray#165

I ran the test-suite.html, all tests pass, so the change should not break anything.
jtakalai added a commit to streamr-dev/core-api that referenced this issue Jun 6, 2016
Backbone-associations won't work nicely with lodash 4, filed an issue (with pull request) dhruvaray/backbone-associations#165

I guess there could be hope that backbone-associations fixes their code, so this downgrade need not be forever blocking future upgrades. Lodash 3 is probably still better than underscore.
hpihkala added a commit to streamr-dev/core-api that referenced this issue Jun 16, 2016
* userGuide

* streamr-sidebar.less

* updated list and tablib elements made so that it is possible to have subclasses

* user guide now automagically draws the sidebar by the help-tree

* added user guide link to help menu

* fixed some structure & styling

* Fix indentation

* Start writing chapter on custom modules

* Work on custom module documentation

* userGuide: writing own module (styling needed)

* Add Risto's frozen documents

* Add image of multiply module

* Forgot to add .png to previous commit

* add Working with Streams chapter to guide

* Markdown plugin

* User guide update

* Add module browser link to help (CORE-604)

* Remove padding in scrollspy user guide (CORE-585)

* Image styling examples (CORE-588)

* Add classes to user-guide images (CORE-588)

* Fix anchor links in user guide (CORE-607)

* Renaming markdown files

* userGuide hr style fix

* hr style

* Minor updates to text

* remove style from <hr> tags

* Edited the intro

* Fix syntax highlighting of user guide (CORE-588)

* Remove ugly gray pre background

* Minor changes to text

* Removed H2 dividers, general clean-up

* Minor changes

* Added back Embedded widgets, made a start on subscriptions

* Minor updates

* Add margin to user-guide images

* api docs page basic structure, underscore replaced with lodash

* layout and styling

* help page styling generalization

* apidocs updated

* updated api docs, doc styling tweaks

* Miscellaneous additions and changes

* Downgraded lodash to 3.10.1 to resolve compatibility issue

Backbone-associations won't work nicely with lodash 4, filed an issue (with pull request) dhruvaray/backbone-associations#165

I guess there could be hope that backbone-associations fixes their code, so this downgrade need not be forever blocking future upgrades. Lodash 3 is probably still better than underscore.

* CORE-585: replaced lodash each functions

there's something quite weirdly wrong with our lodash 3.10... straight copy-paste from docs _([1, 2]).forEach(function(value) { console.log(value); }); fails (function argument not called). Replaced each with Javascript native Array.forEach

* Prelaunch documentation cleanup

* Minor edits

* CORE-585: replaced lodash _.each with native Array.forEach

trouble is, in old lodash _.each is lazy, so that function isn't evaluated without call to .value()

* CORE-585: replaced lodash each with non-chaining form

* CORE-585: fixed lodash _.filter

lazy evaluation would require value() in the end of the line

* fixed broken links in user guide

* CORE-585: fix lodash each

for objects, native Array.forEach of course won't work...

* Added basic func tests for user guide page, api docs page, and module browser page

* CORE-639 code blocks not collapsed initially #close

* added title (required by spec) to swagger.json

* docs styling tweaks

* Updated test/functional/core
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

No branches or pull requests

1 participant