Skip to content

Releases: firefoxic/optimize

Release v5.0.1

09 Dec 10:08

Choose a tag to compare

Fixed

  • The Sharp library has been updated to the latest version 0.34.5.

Release v5.0.0

15 Sep 11:10

Choose a tag to compare

Changed

  • The separate commands optimize favicons and optimize icons have been removed.
  • The optimize all command has been renamed to optimize assets.
  • The -h (--help) flag without specifying a command now only prints general brief help information.
  • The -v (--version) flag in any of the commands now only displays the version and terminates execution.
  • optimize assets command:
    • The -h (--help) flag now only prints detailed help for the optimize assets command.
    • The -r (--remove-origin) flag is now enabled by default (use --no-r to prevent the removal of raster image source files).
    • The -a (--add-origin-format) flag is no longer available.
    • The -i (--input-directory) option is no longer available.
    • The -o (--output-directory) option is no longer available.
    • The new -s (--shared-directory) option is now available with a default value of ./src/shared/.
    • Behavior:
      • Raster and vector images (not icons) must now be located in the <publicDirectory>/images/ directory.
      • The metadata of all raster images from <publicDirectory>/images is now stored in the images field in the <sharedDirectory>/data.json file, with the other fields in that file remaining unchanged.
      • Raster image metadata no longer contains paths and imports.
      • The names of generated custom properties for icons are now lowercase with a hyphen as a word separator, consistent with the style of custom properties generated from design tokens.
      • All generated favicons are now placed directly in <publicDirectory> with names starting with favicon.
      • If manifest.webmanifest already exists, its contents are now saved with only the array in the icons field replaced with the new one.
      • If the name and description fields are missing from manifest.webmanifest, they will now be filled with the values of these fields from the project field in the <sharedDirectory>/data.json file, if they exist.
      • The links.md file is now created in the <sharedDirectory> directory.
  • optimize images command:
    • The -h (--help) flag now only prints detailed help for the optimize images command.
    • The default value of the -i (--input-directory) option is now changed to ./.
    • The default value of the -f (--target-formats) option is now changed to avif.
    • The default value of the -d (--origin-density) option is now changed to 0.
    • The -a (--add-origin-format) flag is no longer available.
    • The -m (--add-meta-data) flag is no longer available.
    • The -p (--public-directory) option is no longer available.

Release v4.0.1

26 Aug 10:19

Choose a tag to compare

Fixed

  • The paths in the metadata are correct again.

Release v4.0.0

25 Aug 12:27

Choose a tag to compare

Changed

  • The repository and CLI command have been renamed to optimize.
  • The optimize command now works with pnpm.
  • Apple touch icons are no longer generated.
  • Webp touch icons are no longer generated.
  • The processing of a specific image will now be skipped if the originDensity specified does not equal the maxDensity value available for that image in the metadata file.
  • The processing of a specific image will now be skipped if the target formats specified do not match those available in the metadata file for that image.
  • The breakpoint suffix in raster image file names must now begin with ~ instead of -. For example, cat-768.png must be renamed to cat~768.png.
  • The -m (--add-meta-data) flag is now enabled by default. Use --no-m (--no-add-meta-data) to disable it.
  • The name of the JSON metadata file now has the suffix .meta.
  • The name of the JS metadata file now has the suffix .imports.
  • The JS metadata file now exports only an array with dynamic imports.
  • The progress bar is now more compact, but also more informative.
  • The minimum required node.js version has been increased to 22.18.0. This has reduced the number of dependencies.

Added

  • The metadata files now include a name field with the image name without suffixes.

Fixed

  • Repeated image optimization runs no longer create duplicates in the sizes field of the metadata file.

Release v3.0.1

25 Dec 05:48

Choose a tag to compare

Fixed

  • The maxDensity field in metadata files when -max-density 1 is specified now gets the correct value instead of the erroneous null.

Release v3.0.0

15 Dec 16:50

Choose a tag to compare

Changed

  • Full option names are now spelled out in the kebab-case.
  • The --target-format option now accepts a single value, but you can specify the option multiple times to pass multiple values. For example, the equivalent of the default: -f avif -f webp.
  • In files generated by the --add-meta-data option, the sizes array is now sorted from smaller breakpoint to larger. The size without a breakpoint is still placed at the end of the array.

Release v2.1.3

06 Nov 16:44

Choose a tag to compare

Fixed

  • The progressbar now fills correctly with the -a flag.

Release v2.1.2

29 Oct 09:20

Choose a tag to compare

Fixed

  • Output directory and file names are now correctly generated when ./ is specified in the -i flag.
  • Progressbar no longer erases error messages.

Release v2.1.1

08 Oct 19:06

Choose a tag to compare

Fixed

  • The images command with the -r flag now removes the source file only if no errors occurred during its processing.
  • Error messages for the images command are now more readable.
  • The verbose and useless images command execution messages have been replaced by a compact and clear progressbar.
  • Source file extensions can now be in uppercase.

Release v2.1.0

13 Aug 11:03

Choose a tag to compare

Added

  • The --addMetaData (-m) flag is now also available for the icons command. Enabling it will create an index.css file in the output directory, which contains registrations of custom properties with paths to icons.
  • The --originDensity (-d) option now takes the value 0. This works like the 1 value, but without adding the density suffix to the filename.