html-validate 8.19.1 → 8.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/core.js CHANGED
@@ -12323,6 +12323,18 @@ class StaticConfigLoader extends ConfigLoader {
12323
12323
  super(defaultResolvers, config);
12324
12324
  }
12325
12325
  }
12326
+ /**
12327
+ * Set a new configuration for this loader.
12328
+ *
12329
+ * @public
12330
+ * @since 8.20.0
12331
+ * @param config - New configuration to use.
12332
+ */
12333
+ /* istanbul ignore next -- not testing setters/getters */
12334
+ setConfig(config) {
12335
+ const defaults = Config.empty();
12336
+ this.globalConfig = defaults.merge(this.resolvers, this.loadFromObject(config));
12337
+ }
12326
12338
  getConfigFor(_handle, configOverride) {
12327
12339
  const override = this.loadFromObject(configOverride ?? {});
12328
12340
  if (override.isRootFound()) {
@@ -12712,6 +12724,28 @@ class HtmlValidate {
12712
12724
  getConfigForSync(filename, configOverride) {
12713
12725
  return this.configLoader.getConfigFor(filename, configOverride);
12714
12726
  }
12727
+ /**
12728
+ * Get current configuration loader.
12729
+ *
12730
+ * @public
12731
+ * @since %version%
12732
+ * @returns Current configuration loader.
12733
+ */
12734
+ /* istanbul ignore next -- not testing setters/getters */
12735
+ getConfigLoader() {
12736
+ return this.configLoader;
12737
+ }
12738
+ /**
12739
+ * Set configuration loader.
12740
+ *
12741
+ * @public
12742
+ * @since %version%
12743
+ * @param loader - New configuration loader to use.
12744
+ */
12745
+ /* istanbul ignore next -- not testing setters/getters */
12746
+ setConfigLoader(loader) {
12747
+ this.configLoader = loader;
12748
+ }
12715
12749
  /**
12716
12750
  * Flush configuration cache. Clears full cache unless a filename is given.
12717
12751
  *
@@ -12726,7 +12760,7 @@ class HtmlValidate {
12726
12760
  }
12727
12761
 
12728
12762
  const name = "html-validate";
12729
- const version = "8.19.1";
12763
+ const version = "8.20.0";
12730
12764
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
12731
12765
 
12732
12766
  function definePlugin(plugin) {