awslabs / aws-crt-nodejs

NodeJS bindings for the AWS Common Runtime.
Apache License 2.0
40 stars 27 forks source link

Move cmake-js and tar to devDeps #335

Closed trivikr closed 2 years ago

trivikr commented 2 years ago

Issue #, if available: Refs: https://github.com/awslabs/aws-crt-nodejs/issues/333

Description of changes: Moves cmake-js and tar to devDeps

Testing:

The artifact for aws-crt is created by running npm pack in the workspace.

Before:

$ test-aws-crt> rm -rf * && npm init -y

$ test-aws-crt> npm install ../aws-crt-nodejs/aws-crt-1.0.0-dev.tgz

$ test-aws-crt> du -sh node_modules 
28M     node_modules

$ test-aws-crt> find node_modules -type d -maxdepth 1 | wc -l
118

After:

$ test-aws-crt> rm -rf * && npm init -y

$ test-aws-crt> npm install ../aws-crt-nodejs/aws-crt-1.0.0-dev.tgz

$ test-aws-crt> du -sh node_modules 
17M     node_modules

$ test-aws-crt> find node_modules -type d -maxdepth 1 | wc -l
56

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

TwistedTwigleg commented 2 years ago

Unfortunately, currently we cannot remove cmake-js due to it being a build dependency when we need to build from source in a production NPM install. However, we did find a way to remove tar as a dependency.

Thank you for making this PR! While we cannot use it directly, it has been helpful 🙂 Closing in favor of https://github.com/awslabs/aws-crt-nodejs/pull/338