TL;DR: Please focus on gradually reducing the number of dependencies going forward.
I was looking at using the @google-cloud/pubsub module and wanted to dive deeper into how auth worked and ended up in @google-cloud/common. It turns out that @google-cloud/common alone downloads about 39 MiB (~5MB) of files. Awesome! 👍
I don't have any solid recommendations for reducing the number of dependencies but just wanted to bring this up as something to think about going forward.
For instance, did you know that @google-cloud/common indirectly depends on three separate versions of request?
$ find ./node_modules -name request
./node_modules/google-auth-library/node_modules/request
./node_modules/grpc/node_modules/node-pre-gyp/node_modules/request
./node_modules/request
$ cat ./node_modules/google-auth-library/node_modules/request/package.json | jq .version
"2.60.0"
$ cat ./node_modules/grpc/node_modules/node-pre-gyp/node_modules/request/package.json | jq .version
"2.72.0"
$ cat ./node_modules/request/package.json | jq .version
"2.74.0"
Take a look at this awesome dependency visualization of @google-cloud/common if you have a minute.
http://npm.anvaka.com/#/view/2d/%2540google-cloud%252Fcommon
TL;DR: Please focus on gradually reducing the number of dependencies going forward.
I was looking at using the
@google-cloud/pubsubmodule and wanted to dive deeper into how auth worked and ended up in@google-cloud/common. It turns out that@google-cloud/commonalone downloads about 39 MiB (~5MB) of files. Awesome! 👍I don't have any solid recommendations for reducing the number of dependencies but just wanted to bring this up as something to think about going forward.
For instance, did you know that
@google-cloud/commonindirectly depends on three separate versions of request?Take a look at this awesome dependency visualization of
@google-cloud/commonif you have a minute.http://npm.anvaka.com/#/view/2d/%2540google-cloud%252Fcommon