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

Stop pulling in aws-lambda which pulls in the huge aws-sdk #330

Closed
voxpelli opened this issue Aug 30, 2022 · 2 comments · Fixed by #331
Closed

Stop pulling in aws-lambda which pulls in the huge aws-sdk #330

voxpelli opened this issue Aug 30, 2022 · 2 comments · Fixed by #331
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@voxpelli
Copy link

What’s missing?

This module itself with all non-optional dependencies is quite small compared to the size of aws-lambda and its dependencies, which is +44x the size.

Since optional dependencies are installed by default and there's no simple way of opting out of specific optional dependencies the change in #283 made most users of this module (and in turn the users of octokit) pull in aws-lambda and in turn aws-sdk, which is likely going to be the heaviest of all the modules in their node_modules folder.

Why?

If aws-lambda needs to be included as a dependency, then make it so that it will only actively be pulled in by those actively wanting it and avoid the drive-by adding of the aws-lambda/aws-sdk to everyone else.

Alternatives you tried

I did try npm ci --no-optional and that worked, but also causes all optionals to be opt outed from, not just this one, and it was very easy to miss that it would help this nested behemoth from being pulled in.

@voxpelli voxpelli added the Type: Feature New feature or request label Aug 30, 2022
@oscard0m oscard0m added Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR and removed Type: Feature New feature or request labels Aug 30, 2022
@oscard0m oscard0m reopened this Aug 30, 2022
@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@oscard0m
Copy link
Member

oscard0m commented Aug 30, 2022

✅ Removed aws-lambda as a dependency of the project but still pending decoupling it from @types/aws-lambda.

With this change we have reduced considerably the install size:

Publish size Install size
@octokit/[email protected]1 153kB 82.6MB
@octokit/[email protected]2 153kB 6.48MB

image

You can subscribe to this issue to follow up on the removal of @types/aws-lambda: #332

I hope this has removed some friction already.

Footnotes

  1. https://packagephobia.com/result?p=@octokit/[email protected]

  2. https://packagephobia.com/result?p=@octokit/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants