fix(deps): support html-validate v8
This MR contains the following updates:
| Package | Type | Update | Change | 
|---|---|---|---|
| html-validate (source) | peerDependencies | major | ^5 || ^6 || ^7->^5 || ^6 || ^7 || ^8.0.0 | 
| html-validate (source) | devDependencies | major | 7.18.1->8.0.0 | 
Release Notes
html-validate/html-validate
v8.0.0
⚠  BREAKING CHANGES
See {@link migration migration guide} for details.
- 
api: The ConfigFactoryparameter toConfigLoader(and its child classesStaticConfigLoaderandFileSystemConfigLoader) has been removed. No replacement.
If you are using this you are probably better off implementing a fully custom
loader later returning a ResolvedConfig.
- 
api: A new getContextualDocumentationreplaces the now deprecatedgetRuleDocumentationmethod. The context parameter togetRuleDocumentationis now required and must not be omitted.
For rule authors this means you can now rely on the context parameter being
set in the documentation callback.
For IDE integration and toolchain authors this means you should migrate to use
getContextualDocumentation as soon as possible or if you are continuing to use
getRuleDocumentation you are now required to pass the config and context
field from the reported message.
- 
api: This change affect API users only, specifically API users
directly using the Configclass. Additionally when using theStaticConfigLoaderno modules will be resolved usingrequire(..)by default any longer. Instructions for running in a browser is also updated, see below.
To create a Config instance you must now pass in a Resolver (single or
array):
+const resolvers = [ /* ... */ ];
-const config = new Config( /* ... */ );
+const config = new Config(resolvers, /* ... */ );This applies to calls to Config.fromObject(..) as well.
The default resolvers for StaticConfigLoader is StaticResolver and for
FileSystemConfigLoader is NodeJSResolver. Both can optionally take a new set
of resolvers (including custom ones).
Each resolver will, in order, try to load things by name. For instance, when
using the NodeJSResolver it uses require(..) to load new items.
- 
NodeJSResolver- usesrequire(..)
- 
StaticResolver- uses a predefined set of items.
- 
api: The HtmlValidateclass now has aPromisebased API where most methods return a promise. The old synchronous methods are renamed.
Either adapt to the new asynchronous API:
-const result = htmlvalidate.validateFile("my-awesome-file.html");
+const result = await htmlvalidate.validateFile("my-awesome-file.html");or migrate to the synchronous API:
-const result = htmlvalidate.validateFile("my-awesome-file.html");
+const result = htmlvalidate.validateFileSync("my-awesome-file.html");For unittesting with Jest it is recommended to make the entire test-case async:
-it("my awesome test", () => {
+it("my awesome test", async () => {
   const htmlvalidate = new HtmlValidate();
-  const report = htmlvalidate.validateString("...");
+  const report = await htmlvalidate.validateString("...");
   expect(report).toMatchCodeFrame();
});- 
api: ConfigLoadermust returnResolvedConfig. This change affects API users who implements custom configuration loaders.
In the simplest case this only requires to call Config.resolve():
-return config;
+return config.resolve();A resolved configuration cannot further reference any new files to extend, plugins to load, etc.
- 
api: The TemplateExtractorclass has been moved to the@html-validate/plugin-utilspackage. This change only affects API users who use theTemplateExtractorclass, typically this is only used when writing plugins.
- 
config: Deprecated severity alias disabledremoved. If you use this in your configuration you need to update it tooff.
 {
   "rules": {
-    "my-awesome-rule": "disabled"
+    "my-awesome-rule": "off"
   }
 }- 
rules: The voidrule has been removed after being deprecated a long time, it is replaced with the separatevoid-content,void-styleandno-self-closingrules.
- deps: minimum required node version is v16
- deps: minimum required jest version is v27
Features
- 
api: ConfigLoadermust returnResolvedConfig(d685e6a)
- 
api: FileSystemConfigLoadersupports passing a customfs-like object (fac704e)
- 
api: add Promisebased API toHtmlValidateclass (adc7783)
- 
api: add Resolverclasses as a mean to separatefsfrom browser build (3dc1724)
- 
api: new getContextualDocumentationto replacegetRuleDocumentation(60c9a12)
- 
api: remove ConfigFactory(e309d89)
- 
api: remove TemplateExtractorin favour of@html-validate/plugin-utils(a0a512b)
- deps: minimum required jest version is v27 (dc79b6b)
- deps: minimum required node version is v16 (f6ccdb0)
- 
rules: remove deprecated voidrule (3e727d8)
Bug Fixes
- 
config: remove deprecated severity alias disabled(6282293)
Configuration
- 
If you want to rebase/retry this MR, check this box 
This MR has been generated by Renovate Bot.