html-validate 8.19.1 → 8.20.1
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 +36 -6
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/jest-diff.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/core.js +36 -6
- package/dist/es/core.js.map +1 -1
- package/dist/es/jest-diff.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +25 -1
- package/dist/types/index.d.ts +25 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest-diff.js","sources":["../../src/jest/utils/diff.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment -- this code needs to work\n * with multiple different versions of jest and it does verification of which\n * one is actually present but the other variants will cause errors, as is expected */\n
|
|
1
|
+
{"version":3,"file":"jest-diff.js","sources":["../../src/jest/utils/diff.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment -- this code needs to work\n * with multiple different versions of jest and it does verification of which\n * one is actually present but the other variants will cause errors, as is expected */\n\nimport jestDiffDefault, * as jestDiff from \"jest-diff\";\n\n/**\n * @internal\n */\nexport interface DiffOptions {\n\taAnnotation?: string;\n\tbAnnotation?: string;\n\texpand?: boolean;\n}\n\n/**\n * @internal\n */\nexport type DiffFunction = (a: any, b: any, options?: DiffOptions) => string | null;\n\n/* ignore typing for compatibility so it will seem \"impossible\" but different\n * version will yield different source */\n/* istanbul ignore next: this is covered by integration tests */\nconst diffCandidates: Array<DiffFunction | undefined> = [\n\t// @ts-ignore\n\tjestDiffDefault?.diff,\n\t// @ts-ignore\n\tjestDiffDefault,\n\t// @ts-ignore\n\tjestDiff?.diff,\n\t// @ts-ignore\n\tjestDiff,\n];\n\nconst isFunction = (fn: unknown): boolean => typeof fn === \"function\";\n\n/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- assume\n * one of the candidate matches, there will be a reasonable error later on if\n * not */\nexport const diff: DiffFunction = diffCandidates.find(isFunction)!;\n"],"names":["jestDiffDefault","jestDiff"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,EAAA,CAAA;AAuBA,MAAM,cAAkD,GAAA;AAAA;AAAA,EAAA,CAEvD,EAAiB,GAAAA,2BAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA;AAAA;AAAA,EAEjBA,2BAAA;AAAA;AAAA,EAEAC,mBAAU,IAAA,IAAA,GAAA,KAAA,CAAA,GAAAA,mBAAA,CAAA,IAAA;AAAA;AAAA,EAEVA,mBAAA;AACD,CAAA,CAAA;AAEA,MAAM,UAAa,GAAA,CAAC,EAAyB,KAAA,OAAO,EAAO,KAAA,UAAA,CAAA;AAK9C,MAAA,IAAA,GAAqB,cAAe,CAAA,IAAA,CAAK,UAAU;;;;"}
|
package/dist/es/core.js
CHANGED
|
@@ -5043,11 +5043,7 @@ class AttributeAllowedValues extends Rule {
|
|
|
5043
5043
|
}
|
|
5044
5044
|
}
|
|
5045
5045
|
getLocation(attr) {
|
|
5046
|
-
|
|
5047
|
-
return attr.valueLocation;
|
|
5048
|
-
} else {
|
|
5049
|
-
return attr.keyLocation;
|
|
5050
|
-
}
|
|
5046
|
+
return attr.valueLocation ?? attr.keyLocation;
|
|
5051
5047
|
}
|
|
5052
5048
|
}
|
|
5053
5049
|
|
|
@@ -12313,6 +12309,18 @@ class StaticConfigLoader extends ConfigLoader {
|
|
|
12313
12309
|
super(defaultResolvers, config);
|
|
12314
12310
|
}
|
|
12315
12311
|
}
|
|
12312
|
+
/**
|
|
12313
|
+
* Set a new configuration for this loader.
|
|
12314
|
+
*
|
|
12315
|
+
* @public
|
|
12316
|
+
* @since 8.20.0
|
|
12317
|
+
* @param config - New configuration to use.
|
|
12318
|
+
*/
|
|
12319
|
+
/* istanbul ignore next -- not testing setters/getters */
|
|
12320
|
+
setConfig(config) {
|
|
12321
|
+
const defaults = Config.empty();
|
|
12322
|
+
this.globalConfig = defaults.merge(this.resolvers, this.loadFromObject(config));
|
|
12323
|
+
}
|
|
12316
12324
|
getConfigFor(_handle, configOverride) {
|
|
12317
12325
|
const override = this.loadFromObject(configOverride ?? {});
|
|
12318
12326
|
if (override.isRootFound()) {
|
|
@@ -12702,6 +12710,28 @@ class HtmlValidate {
|
|
|
12702
12710
|
getConfigForSync(filename, configOverride) {
|
|
12703
12711
|
return this.configLoader.getConfigFor(filename, configOverride);
|
|
12704
12712
|
}
|
|
12713
|
+
/**
|
|
12714
|
+
* Get current configuration loader.
|
|
12715
|
+
*
|
|
12716
|
+
* @public
|
|
12717
|
+
* @since %version%
|
|
12718
|
+
* @returns Current configuration loader.
|
|
12719
|
+
*/
|
|
12720
|
+
/* istanbul ignore next -- not testing setters/getters */
|
|
12721
|
+
getConfigLoader() {
|
|
12722
|
+
return this.configLoader;
|
|
12723
|
+
}
|
|
12724
|
+
/**
|
|
12725
|
+
* Set configuration loader.
|
|
12726
|
+
*
|
|
12727
|
+
* @public
|
|
12728
|
+
* @since %version%
|
|
12729
|
+
* @param loader - New configuration loader to use.
|
|
12730
|
+
*/
|
|
12731
|
+
/* istanbul ignore next -- not testing setters/getters */
|
|
12732
|
+
setConfigLoader(loader) {
|
|
12733
|
+
this.configLoader = loader;
|
|
12734
|
+
}
|
|
12705
12735
|
/**
|
|
12706
12736
|
* Flush configuration cache. Clears full cache unless a filename is given.
|
|
12707
12737
|
*
|
|
@@ -12716,7 +12746,7 @@ class HtmlValidate {
|
|
|
12716
12746
|
}
|
|
12717
12747
|
|
|
12718
12748
|
const name = "html-validate";
|
|
12719
|
-
const version = "8.
|
|
12749
|
+
const version = "8.20.1";
|
|
12720
12750
|
const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
|
|
12721
12751
|
|
|
12722
12752
|
function definePlugin(plugin) {
|