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

chore: add compression for build artefacts #193

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thisislawatts
Copy link
Member

@thisislawatts thisislawatts commented Nov 13, 2024

  • Tests written and linted ℹ︎
  • Commits are squashed and tidy and are suitable to become release notes

What this does

This PR updates the .releaserc configuration to include Brotli compression for the generated binaries. The primary purpose is to optimize the binary sizes for different platforms (Alpine, macOS, Linux, and Windows) without compromising performance, which may lead to quicker download and deployment times for the end users.

Example of differences:

  • Before: Linux – 47.840.380 bytes
  • After: Linux – 39.993.548 bytes
  • Savings: ~17%

Notes for the reviewer

To test this update locally:

  1. Run npm i -g [email protected] to ensure the correct version of pkg is installed.
  2. Execute the modified command to build the binaries with Brotli compression:
    pkg . --compress Brotli --options max_old_space_size=32768 -t node14-alpine-x64,node14-linux-x64,node14-macos-x64,node14-win-x64
    
  3. Confirm that the compressed binaries are generated and verify their functionality on each target platform if possible.

Please check that the binary sizes are reduced and that no unexpected issues arise during execution with the compressed binaries.

More information

Screenshots

No visuals for this configuration change.

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.

1 participant