Skip to content

chore(layer): reduce size by 3 by removing @types packages #1181

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

Merged
merged 1 commit into from
Nov 23, 2022
Merged

chore(layer): reduce size by 3 by removing @types packages #1181

merged 1 commit into from
Nov 23, 2022

Conversation

flochaz
Copy link
Contributor

@flochaz flochaz commented Nov 23, 2022

Current bundling of lambda layer is including all dependencies from downstream dependencies including @types/node brought in especially by aws-x-ray-sdk-core -> cjs-hooked.

https://npmgraph.js.org/?q=%40aws-lambda-powertools%2Ftracer

Description of your changes

Simply manually removing @types from folder before zipping.

How to verify this change

It is not breaking layer capabilities: https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/3530267827

You can manually verify the improvment by deploying the layer to your own account (cd layer-publisher && cdk deploy) and check either the cdk.out/assets or download the published layer from AWS Console.

Related issues, RFCs

Issue number: #1171

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Nov 23, 2022
@github-actions github-actions bot added the internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) label Nov 23, 2022
@flochaz flochaz marked this pull request as ready for review November 23, 2022 08:22
@flochaz flochaz self-assigned this Nov 23, 2022
@dreamorosi dreamorosi linked an issue Nov 23, 2022 that may be closed by this pull request
2 tasks
@dreamorosi dreamorosi self-requested a review November 23, 2022 13:57
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @flochaz for working on this!

@dreamorosi dreamorosi merged commit cb9eaf9 into aws-powertools:main Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Remove @types/node from Lambda Layers
2 participants