-
Notifications
You must be signed in to change notification settings - Fork 38
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
Dev dependencies listed as dependencies #174
Comments
7 tasks
austin-denoble
pushed a commit
that referenced
this issue
Dec 14, 2023
## Problem The purpose of this change is to significantly reduce the size of the package when installed. The issue is fully described in #174. ## Solution The solution is to move the non-runtime related dependencies into the `devDependencies` section of the `package.json` file so that npm doesn't try to install them in a nested `node_modules` folder. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [x] None of the above: dependency tweaks ## Test Plan The code compiled and the unit checks passed. The packages moved are either entirely type declaration files (i.e., `<name>.d.ts`) and/or needed only for compilation (and would be likely be included in the parent package anyway if actually needed). That said, if there's any doubts, we'd know for sure if it'd work after pruning the dev dependencies and trying it out.
Good catch, thank you for contributing! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like the following packages are listed as dependencies, but can be moved to devDependencies:
This would help immensely reduce the size of the package after installing, as npm will install these inside the package folder under a nested node_modules folder if the parent package doesn't have a compatible version. Since TypeScript itself isn't really used during runtime of most node apps (and TypeScript 5 is now available), this results in an extra ~80 MB being taken up.
I noticed this because I'm using the client in an AWS lambda layer and it made the lambda layer too big to be uploaded for use. Luckily, these packages should only be needed for compilation, so there shouldn't be any complications from moving them to devDependencies.
The text was updated successfully, but these errors were encountered: