Skip to content

Releases: benelan/build-sizes

v3.2.2

14 Jul 02:17
a693a59
Compare
Choose a tag to compare

Fixes

  • Disabled the loading animation by default for more stability compatibility with devices and tools. The animation can be enabled with the --loader or -l flag.

v3.2.1

13 Jul 07:18
2a2964d
Compare
Choose a tag to compare

Performance

  • Fewer iterations when recursively finding build files

v3.2.0

01 Mar 18:30
Compare
Choose a tag to compare

Enhancements

  • CLI Syntax highlighting for the build size numbers
  • Better error messages
  • Cleanup CLI log formatting

v3.1.0

28 Feb 05:46
Compare
Choose a tag to compare

Enhancements

  • Add a loading animation

v3.0.0

27 Feb 22:09
Compare
Choose a tag to compare

Breaking changes

  • Deprecated and removed getFileSizes function. getFiles now returns a size property
  • Need to use the -f or --filetype flag when specifying a main bundle filetype from the CLI (previously was the second CLI argument)
  • Use base 10 (previously base 2) as the default for converting bytes into a human readable format in the formatBytes function. Base 10 is what operating systems use in file explorers

Enhancements

CLI

  • Added support for CLI flags instead of passing arguments in a specific order (use the -h or --help flag for usage info)
  • Added -d and --decimals CLI flags for specifying decimals places when formatting bytes
  • Added -b and --binary CLI flags for converting bytes to a human readable format in base 2
  • Added -o and --outfile CLI flags for saving the build size data to CSV
  • Log build on-disk size to the console for non-windows machines (uses du)
  • Log compressed main bundle sizes to the console
  • Spiffed up the build-sizes formatting that is logged to the console

New exported functions

  • saveBuildSizes: saves build-sizes data to CSV
  • getFileSizeGzip: calculates a file's gzipped size (with zlib defaults)
  • getFileSizeBrotli: calculates a file's brotli compressed size (with zlib defaults)

New function return properties

  • mainBundleSizeGzip (from getBuildSizes): main bundle's gzipped size
  • mainBundleSizeBrotli from getBuildSizes): main bundle's brotli compressed size
  • buildSizeOnDisk (from getBuildSizes): build's on-disk size (NaN on windows since it uses a unix command)
  • size (from getFiles): file's uncompressed byte size

Fixes

  • Use the correct formula for converting bytes to a human readable format in base 10
  • The on-disk size was actually byte size. I changed it to "size" and added "on-disk size" for non-window machines
  • Some error handling issues are resolved

v2.4.0

19 Feb 23:52
Compare
Choose a tag to compare

Publishing to get the jsdoc on the npm page

Enhancements

Misc

  • Cleaned up jsdoc syntax
  • Removed function reference section from readme

v2.3.0

19 Feb 07:32
Compare
Choose a tag to compare

Enhancements

  • specify the file type of the main bundle as a function or CLI argument

v2.2.0

18 Feb 02:14
Compare
Choose a tag to compare

Enhancements

  • Exposed filterFilesByType and getFileSizes functions

v2.1.0

17 Feb 23:03
Compare
Choose a tag to compare

Enhancements

  • Exposed formatBytes and getFiles functions

Misc

  • Cleaned up code and doc

v2.0.1

17 Feb 12:23
Compare
Choose a tag to compare

Misc

Doc and code clean up. Fixed some typos and unclear explanations.