Skip to content
  • David Sveningsson's avatar
    chore(release): 4.0.0 · d286669e
    David Sveningsson authored and HTML-validate's avatar HTML-validate committed
    ## [4.0.0](v3.5.0...v4.0.0) (2020-11-07)
    
    ###  BREAKING CHANGES
    
    * **config:** With this release any custom configuration files will no longer
    automatically extend `html-validate:recommended`.
    
    The previous behaviour was to to always merge with the default configuration
    containing `extends: ["html-validate:recommended"]`. This is counter-intuitive
    when adding a blank `{}` `.htmlvalidate.json` configuration file (or a file with
    `extends: []`). The new behaviour is to not apply default configuration if
    another configuration is found.
    
    To retain the previous behaviour you must ensure your configuration contains
    `extends: ["html-validate:recommended"]`. Users who have `root: true` are not
    affected. *If unsure: test your configuration by deliberatly introducing and
    error and verify it is detected*.
    
    For CLI users: ensure your `.htmlvalidate.json` configuration files are updated.
    
    For IDE integration users: ensure your `.htmlvalidate.json` configuration files
    are updated.
    
    For `CLI` API users: same as with CLI the configuration loading has changed and
    all users must update their `.htmlvalidate.json` accordingly.
    
    For `HtmlValidate` API users: you are most likely not affected, only if both of
    the following conditions are true you need to take care to ensure any
    `.htmlvalidate.json` is updated:
    
    1. you are using `validateFile` or supply filenames to other validation
       functions.
    2. you allow user-supplied configurations (or use them yourself) via
       `.htmlvalidate.json` (default unless `root: true` is set in the configuration
       object passed to `new HtmlValidate(..)`)
    
    The `ConfigLoader` API has also been updated and `fromTarget` may now return
    `null` if no configuration file was found.
    * The `build` folder has been renamed to `dist`.
    
    This affects API users only and in general should not be an issue unless
    importing files via full path. In that case replace `import
    'html-validate/build/...'` with `import 'html-validate/dist/...` but in general
    those imports are discouraged.
    
    Instead users should import only via `import { ... } from "html-validate"` and file an issue
    if an export is missing.
    
    This does not affect the `elements` imports which is considered a safe to import
    as-is.
    * Only node 10 or later is supported
    
    ### Features
    
    * new utility function `ruleExists` to test presence of bundled rules ([09aad040](09aad040))
    * **rules:** new helper `isHTMLHidden` ([ae20335f](ae20335f))
    * **shim:** add new export `html-validate/test-utils` exposing test-utils ([30f5d403](30f5d403))
    * **shim:** expose all event structures in shim ([294bb0d9](294bb0d9))
    * **shim:** expose metadata structures ([271e5217](271e5217))
    
    ### Bug Fixes
    
    * **config:** dont automatically apply `extends: ["html-validate:recommended"]` ([fcad0b2a](fcad0b2a)), closes [#98](#98)
    * require node 10 ([d1a48b18](d1a48b18))
    * **rules:** `input-missing-label` handles multiple labels ([a6af2da3](a6af2da3))
    * **rules:** `input-missing-label` ignores hidden `<input>` ([41c39e91](41c39e91))
    * **rules:** `input-missing-label` requires label to be non-hidden ([ff5e8559](ff5e8559)), closes [#99](#99)
    
    ### Miscellaneous Chores
    
    * migrate to `dist` folder ([3c6787c2](3c6787c2))
    d286669e