JonasKruckenberg / imagetools

Load and transform images using a toolbox :toolbox: of custom import directives!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

imagetools-core 4.0.4 `resolveConfigs` behavior change, `format` directive no longer working

moorejs opened this issue · comments

Hi, in 4.0.3:

resolveConfigs([ [ 'w', [ '5', '10' ] ], [ 'format', [ 'webp', 'avif', 'png' ] ] ], {})

equals

[
  { w: '5', format: 'webp' },
  { w: '5', format: 'avif' },
  { w: '5', format: 'png' },
  { w: '10', format: 'webp' },
  { w: '10', format: 'avif' },
  { w: '10', format: 'png' }
]

However, in 4.0.4, format is no longer parsing:

[
  { w: '5' },
  { w: '5' },
  { w: '5' },
  { w: '10' },
  { w: '10' },
  { w: '10' }
]

I don't see any notes on format's behavior changing. I believe this diff might be the cause of this new behavior:
https://github.com/JonasKruckenberg/imagetools/pull/583/files#diff-eb99c1eca6cc7f63c9eac72310407235a40762ebe6169de94d2b79102afd7d3e