Skip to content

Strip unused files from the layer #221

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
Sep 1, 2021

Conversation

DarcyRaynerDD
Copy link
Contributor

What does this PR do?

This PR strips additional unused files from the node layer, including the protobuf cli tool, .d.ts files and source maps.

Motivation

Decompressed layer size drops 10mb to 4.8mb.

Testing Guidelines

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@DarcyRaynerDD DarcyRaynerDD requested a review from a team as a code owner August 31, 2021 14:31
@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2021

Codecov Report

Merging #221 (25860d8) into main (60ddd5d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #221   +/-   ##
=======================================
  Coverage   88.06%   88.06%           
=======================================
  Files          31       31           
  Lines        1198     1198           
  Branches      240      240           
=======================================
  Hits         1055     1055           
  Misses         86       86           
  Partials       57       57           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60ddd5d...25860d8. Read the comment docs.

RUN rm -rf /nodejs/node_modules/protobufjs/cli
RUN find /nodejs/node_modules -name "*.d.ts" -delete
RUN find /nodejs/node_modules -name "*.js.map" -delete
RUN find /nodejs/node_modules -name "*.ts.map" -delete
Copy link
Contributor

Choose a reason for hiding this comment

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

cool! maybe *.ts as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took a look but couldn't find any .ts files in the compiled output.

@maxday maxday self-requested a review August 31, 2021 14:58
@DarcyRaynerDD DarcyRaynerDD merged commit 1ffa8ee into main Sep 1, 2021
@DarcyRaynerDD DarcyRaynerDD deleted the darcy.rayner/strip-unused-files branch September 1, 2021 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants