Nyalab / caniuse-api

request the caniuse data to check browsers compatibilities
MIT License
356 stars 27 forks source link

Use the original `lodash` npm package #33

Closed koistya closed 9 years ago

koistya commented 9 years ago

Ref #31

ben-eb commented 9 years ago

I wouldn't advise this course of action. This change will bloat the download size of caniuse-api and all of its dependent modules, and doesn't add anything positive in return. If the problem is an outdated dependency, the dependency should be updated.

MoOx commented 9 years ago

This looks like a edge case issue with your setup since travis is ok.

MoOx commented 9 years ago

Anyway, it looks like a bug from a small lodash module that doesn't have the right dependency.

koistya commented 9 years ago

This package including all its dependencies weights 3.9MB (unarchived). When lodash.uniq and lodash.memoize are replaced with the full lodash version, it will weight 4.55MB. Not a significant increase in size, IMHO.

Also if a project referencing caniuse-api already has lodash installed (which is greater probability than having lodash.uniq and lodash.memoize installed), it will be even smaller.

MoOx commented 9 years ago

That's not my point. You are not fixing a bug here, just avoiding to trigger it. We should better fix it for real :)

koistya commented 9 years ago

I have tested it. Updating lodash.uniq from 2.4.1 to 3.1.0, or even better 3.9.3 (lodash/array/uniq) fixes the problem with Error: Cannot find module 'lodash._basebind'. Ref cssnext/cssnext#151

MoOx commented 9 years ago

1.3.2 should fix that.