Skip to content

Latest commit

 

History

History
150 lines (92 loc) · 7.81 KB

File metadata and controls

150 lines (92 loc) · 7.81 KB

Changelog

All notable changes to hihtml are documented in this file, which is (mostly) AI-generated and (always) human-edited. Dependency updates may or may not be called out specifically.

The format is based on Keep a Changelog, and the project adheres to Semantic Versioning.

[1.6.0] - 2026-08-13

Fixed

  • Ensured to fail with a message and a non-zero exit when the input path doesn’t exist or can’t be read; a scripted run pointing at a mistyped path now fails instead of passing

Changed

  • Changed an unusable setting or an unreadable settings file to exit 1, like every other input hihtml can’t work with; 2 is now reserved for a run that fails on its own, such as a checker that can’t be loaded
  • Renamed the positional argument to path in the help output, matching that it takes a directory or a single file

[1.5.0] - 2026-08-12

Added

  • Accepted the input path (directory or file) as a positional argument (e.g., hihtml src), which previously errored out
    • Adjusted to reject a --report value that doesn’t end with a .json filename

[1.4.1] - 2026-08-02

Changed

  • Forced update with the latest dependencies

[1.4.0] - 2026-07-11

Changed

  • Renamed the default settings file from .hihtml.json to hihtml.config.json, following the “.config” convention (.hihtml.json remains supported as a fallback, so existing setups keep working)

[1.3.4] - 2026-07-01

Changed

  • Forced update with the latest dependencies

[1.3.3] - 2026-06-11

Changed

  • Forced update with the latest dependencies

[1.3.2] - 2026-05-18

Fixed

  • Fixed --quiet and --report hint, no longer suggesting -r when already in use
  • Fixed symlinked HTML files being silently skipped during directory traversal; symlinked files whose target resolves within the scanned root are now followed (symlinks pointing outside the root or to directories are skipped)
  • Fixed malformed config values (e.g., non-numeric links.timeout, non-boolean links.warnOnPermanentRedirects) now producing clear error messages instead of silent undefined behavior

Changed

  • Clarified in documentation that ObsoHTML warnings are informational (and exit 0)

[1.3.1-beta] - 2026-05-14

Changed

  • Improved end-of-section summaries across all check types:
    • Validation and deprecated markup sections now end with a line like “30 files validated · 17 with issues, 13 clean” (previously only the clean-file count was shown)
    • Link check summary now includes the per-file breakdown (e.g., “19 with issues, 11 clean”) inline, replacing the separate floating “x files: no issues” line; also fixed “3 broken” → “3 broken links”
  • Numbered output sections when more than one is shown (e.g., “1. Validation”, “2. Deprecated markup”), with the number repeated on the summary line for easier scanning in long output

[1.3.0-beta] - 2026-05-13

Added

  • Added string-based functions to programmatic API:
    • checkCodeString(content, options?) validates an HTML string and checks it for deprecated markup, mirroring checkCode for string-based pipelines
    • checkLinksString(content, options?) checks all external http/https URLs found in an HTML string, mirroring checkLinks for string-based pipelines
    • minifyString(content, options?) minifies an HTML string and returns it, without any file I/O—useful in content-pipeline contexts such as Eleventy transforms, middleware, and SSR handlers
  • Extended URL extraction in link checking to also detect URLs in unquoted attributes (e.g., href=https://example.com, which is valid HTML)

Changed

  • Improved performance across several areas:
    • Directory traversal now fans out subdirectories in parallel (Promise.all)
    • HtmlValidate instances are cached per preset, avoiding re-initialization across calls to validate()/checkCode()
    • URL-extraction regexes in the link checker are compiled once at module load instead of per-call; extraction now uses matchAll
    • HTML Minifier Next import and preset resolution are cached per preset, avoiding repeated work across calls to minifyString()
    • Ignore-list entries are pre-classified into hostnames (Set) and prefix entries once per checkLinks() call, enabling O(1) exact-hostname lookup in the hot path

[1.2.0-beta] - 2026-05-11

Added

  • Added validation.ignore, a list of HTML-validate rule IDs to suppress, mirroring links.ignore
    • Ignored messages appear in validation output (marked as ignored) but are not counted as errors and do not block minification when using --all/-a
    • Supported in configuration (.hihtml.json/package.json) and programmatically via checkCode(files, { ignore: […] })
    • ResultCodeValidation now includes countIgnored; MessageValidation now includes ignored?: boolean
  • Added -s/--settings <file> flag to load configuration from a specific JSON file, overriding the default CWD config lookup
    • Accepts any JSON file, reading the "hihtml" key if present (same convention as package.json), otherwise using the root object
    • loadConfig() now accepts an optional filePath parameter for the same behavior programmatically
  • Added -q/--quiet flag to suppress all output when no issues are found, for cleaner CI and script usage
  • Enhanced progress indicators to show a color-coded dot: blue while processing, green on completion when no issues are found, yellow when issues are found

[1.1.2-beta] - 2026-05-11

Fixed

  • Fixed link extraction incorrectly truncating URLs that contain an apostrophe inside a double-quoted href attribute (e.g., href="https://example.com/you_aren't_gonna_need_it")

[1.1.1-beta] - 2026-05-07

Changed

  • Renamed -c/--check to -c/--check-code for clarity, paralleling -l/--check-links; updated --all description accordingly
  • Renamed programmatic API: checkcheckCode; updated adapter filenames (check.jscheck-code.js, checklinks.jscheck-links.js) for consistency
  • Updated default-mode preamble to “Checking for HTML code issues”
  • Updated report command field (checkcheck-code) and results key (checkcheckCode)

[1.1.0-beta] - 2026-05-05

Added

  • Added -l/--check-links flag to check all http/https links for broken URLs (4xx/5xx responses); exits 1 when broken links are found
    • Link checking is also included automatically in --all/-a (after validation, before minification)
    • Programmatic checkLinks() API: extracts unique http/https URLs from HTML files, checks each once via HEAD (with GET fallback on 405), follows redirects, and maps results back per file; supports timeout, concurrency, warnOnPermanentRedirects, and ignore options
    • links configuration section in .hihtml.json/package.json for timeout, concurrency, warnOnPermanentRedirects, and ignore
    • links.ignore: list of hostnames or URL prefixes to skip; ignored URLs appear as skipped in output and do not affect the exit code

Changed

  • Allowed mode flags to be freely combined; --all/-a takes precedence when used alongside other mode flags
  • Adjusted output to only list files with issues per section; clean files are collapsed into a single “N files: no issues” summary line
  • Ensured running without flags prints a short preamble noting what is being checked, pointing to -a and -h

[1.0.2-beta] - 2026-04-23

Changed

  • Cut directory exclusion defaults to node_modules and .git folders

[1.0.1-beta] - 2026-04-21

Changed

  • Renamed and simplified programmatic API: collectFilescollect, readFilesread, minifyFilesminify; merged validateFiles and checkFiles into a single check that mirrors --check CLI behavior and returns { validation, deprecation }

[1.0.0-beta] - 2026-04-21

Added

  • Released initial version