Skip to content

v1.3.0

Choose a tag to compare

@stamat stamat released this 05 Aug 23:46
· 19 commits to main since this release

A misspelt key was silently ignored: "quailty": 60 meant the default quality,
with nothing said about it, and the first sign was output that looked wrong.

Added

  • A JSON Schema for the config, shipped in the
    package at schema/poops-images.schema.json. Point $schema at it and the
    editor completes and checks the whole config as you type — see the Config
    file
    section of the README for both the local and the GitHub URL.
  • Unknown config keys are named as they load: [info] unknown key "quailty" — ignored. Valid: …, with the path for nested ones (in sizes[0]). Key names
    only; a wrong type still throws where it always did. A schema file that
    cannot be read leaves the config to load unadvised rather than taking the run
    down over a warning.

Changed

  • The config is validated once, in the ImageProcessor constructor, which is
    the one place that cannot trust what it is handed — a library caller can
    build a config without going through the file loader at all. loadConfig()
    now returns the file as read, so anything reading a default off its result
    before handing it to the processor sees undefined where it used to see the
    default. The CLI and the documented new ImageProcessor(config) path behave
    as they did, minus the duplicate warnings.

Full Changelog: v1.2.1...v1.3.0