archfirst / joinjs

A JavaScript library to map complex database joins to nested objects.
MIT License
154 stars 19 forks source link

drop lodash #19

Closed leeoniya closed 5 years ago

leeoniya commented 5 years ago

Hi @nareshbhatia,

I wanted to try joinjs and noticed it carried a lodash dependency but used few of lodash's functions. While this lib is a few KB and 1 file, requiring lodash makes it 1.35MB and 1,053 files. It also has a very heavy and slow Babel build system. All of this seemed like extreme overkill to me, so I have forked this repo [1] and made a more streamlined version that still passes all tests, drops lodash, replaces Babel with Rollup & Buble and removes a bunch of other dev deps, greatly reducing dev install size.

Installed npm i join-js size of node_modules:

Before:      1.35 MB,    1,053 Files,    4 Folders
After:       8.05 KB,        1 Files,    1 Folder

Installed with devDependenices node_modules before & after:

node_modules

even if you're not on board with the devDeps changes, i encourage you to drop lodash from your deps, too.

cheers!

[1] https://github.com/leeoniya/joinjs

FerrielMelarpis commented 5 years ago

@leeoniya Thanks for this. This is really a good idea. @nareshbhatia I agree with the idea of dropping lodash. That way we can make this library with zero deps. Although I'm not sure if there's a big benefit for us to change the dev deps.

nareshbhatia commented 5 years ago

Hi @leeoniya, thanks for the good work. I agree with @FerrielMelarpis. If you can send me a PR for just dropping lodash, I will accept it. Please make sure you run 'npm run commit` to create a properly formatted commit message.

leeoniya commented 5 years ago

after going through the prompts of npm run commit, i get this error: Please add rules to your commitlint.config.js (which does not exist in this repo).

a lot of ceremony and tools for something that should be simple :(

refactor: drop lodash dependency

fix #19

commitlint config js

nareshbhatia commented 5 years ago

Hmmm, not sure about what's going on there. So cut out the ceremony and simply commit with that comment :-)

nareshbhatia commented 5 years ago

:tada: This issue has been resolved in version 1.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: