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

Update lodash.uniq? #31

Closed
ChALkeR opened this issue May 18, 2015 · 11 comments
Closed

Update lodash.uniq? #31

ChALkeR opened this issue May 18, 2015 · 11 comments

Comments

@ChALkeR
Copy link

ChALkeR commented May 18, 2015

Current lodash.uniq version is 3.1.0 now, it has fewer deps and one fourth the size.

@Nyalab
Copy link
Owner

Nyalab commented May 19, 2015

thanks, i will not make a release but this will be in the next one
57d3654

@Nyalab Nyalab closed this as completed May 19, 2015
@ChALkeR
Copy link
Author

ChALkeR commented May 21, 2015

Thanks. The same probably could be done for lodash.memoize, but it's much smaller.

@ooflorent
Copy link
Contributor

You could also add lodash as dependency and use lodash/array/uniq and lodash/function/memoize.

@koistya
Copy link

koistya commented Jun 23, 2015

I'm getting this error:

Error: Cannot find module 'lodash._basebind'
    at Function.Module._resolveFilename (module.js:332:15)
    at Function.Module._load (module.js:282:25)
    at Module.require (module.js:361:17)
    at require (module.js:380:17)
    at Object.<anonymous> (node_modules\cssnext\node_modules\caniuse-api\node_modules\lodash.uniq\node_modules\lodash.createcallback\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\index.js:9:16)
    at Module._compile (module.js:426:26)
    at Module._extensions..js (module.js:444:10)
    at Object.require.extensions.(anonymous function) [as .js] (node_modules\babel\node_modules\babel-core\lib\babel\api\register\node.js:171:7)
    at Module.load (module.js:351:32)
    at Function.Module._load (module.js:306:12)

@koistya
Copy link

koistya commented Jun 23, 2015

@Nyalab @MoOx why don't you use the original lodash package?

$ npm install lodash --save
import unique from 'lodash/array/unique';

@MoOx
Copy link
Collaborator

MoOx commented Jun 23, 2015

@koistya you probably have a local issue. Please try cleaning your local npm cache & reinstall.
Using the entire lodash module just to use 1 or 2 methods seems overkill ^^

@ChALkeR
Copy link
Author

ChALkeR commented Jun 23, 2015

@MoOx Well, actually you currently depend upon 37 unique and 58 total lodash.* modules, counting the nested deps ☺.
Total lodash module size is 868 KiB (2.07 MiB on disk).
Your lodash.* deps size is 687 KiB (1.24 MiB on disk).

The above measurements are valid for the currently released version. After a new version is packaged with an updated lodash.uniq version, things will be a little better: 19 unique and 22 total lodash.* modules, 271 KiB (460 KiB on disk).

If you update lodash.memoize to the current version (and package your updated module, of course), there would be 17 unique and 20 total lodash.* deps, 251 KiB (420 KiB on disk).

@ChALkeR
Copy link
Author

ChALkeR commented Jun 23, 2015

@koistya Just FYI, lodash.uniq 3.1.0 didn't get into any released version of caniuse-api yet.

@koistya
Copy link

koistya commented Jun 23, 2015

Please try cleaning your local npm cache & reinstall.
Using the entire lodash module just to use 1 or 2 methods seems overkill ^^

Cleaning the local npm cache and making clean install doesn't solve this issue (MoOx/postcss-cssnext#151) but PR #33 does.

@koistya
Copy link

koistya commented Jun 23, 2015

@ChALkeR right, it seems like when you install caniuse-api it goes with lodash.uniq 2.4.1 😢

@MoOx
Copy link
Collaborator

MoOx commented Jun 23, 2015

Released as 1.3.2

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

5 participants