html-validate 9.1.1 → 9.1.2

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
@@ -441,7 +441,7 @@ class UserError extends NestedError {
441
441
  */
442
442
  /* istanbul ignore next: default implementation */
443
443
  prettyFormat() {
444
- return void 0;
444
+ return undefined;
445
445
  }
446
446
  }
447
447
 
@@ -944,7 +944,7 @@ const ajvRegexpValidate = function(data, dataCxt) {
944
944
  ajvRegexpValidate.errors = [
945
945
  {
946
946
  instancePath: dataCxt?.instancePath,
947
- schemaPath: void 0,
947
+ schemaPath: undefined,
948
948
  keyword: "type",
949
949
  message: "should be a regular expression",
950
950
  params: {
@@ -971,7 +971,7 @@ const ajvFunctionValidate = function(data, dataCxt) {
971
971
  /* istanbul ignore next */
972
972
  dataCxt?.instancePath
973
973
  ),
974
- schemaPath: void 0,
974
+ schemaPath: undefined,
975
975
  keyword: "type",
976
976
  message: "should be a function",
977
977
  params: {
@@ -1026,7 +1026,7 @@ function isSet(value) {
1026
1026
  return typeof value !== "undefined";
1027
1027
  }
1028
1028
  function flag(value) {
1029
- return value ? true : void 0;
1029
+ return value ? true : undefined;
1030
1030
  }
1031
1031
  function stripUndefined(src) {
1032
1032
  const entries = Object.entries(src).filter(([, value]) => isSet(value));
@@ -1036,8 +1036,8 @@ function migrateSingleAttribute(src, key) {
1036
1036
  const result = {};
1037
1037
  result.deprecated = flag(src.deprecatedAttributes?.includes(key));
1038
1038
  result.required = flag(src.requiredAttributes?.includes(key));
1039
- result.omit = void 0;
1040
- const attr = src.attributes ? src.attributes[key] : void 0;
1039
+ result.omit = undefined;
1040
+ const attr = src.attributes ? src.attributes[key] : undefined;
1041
1041
  if (typeof attr === "undefined") {
1042
1042
  return stripUndefined(result);
1043
1043
  }
@@ -1093,7 +1093,7 @@ function migrateElement(src) {
1093
1093
  const result = {
1094
1094
  ...src,
1095
1095
  ...{
1096
- formAssociated: void 0
1096
+ formAssociated: undefined
1097
1097
  },
1098
1098
  attributes: migrateAttributes(src),
1099
1099
  textContent: src.textContent,
@@ -1631,7 +1631,7 @@ class DOMNode {
1631
1631
  if (this.cache) {
1632
1632
  return this.cache.get(key);
1633
1633
  } else {
1634
- return void 0;
1634
+ return undefined;
1635
1635
  }
1636
1636
  }
1637
1637
  cacheSet(key, value) {
@@ -1891,7 +1891,7 @@ function parseCombinator(combinator, pattern) {
1891
1891
  return 5 /* SCOPE */;
1892
1892
  }
1893
1893
  switch (combinator) {
1894
- case void 0:
1894
+ case undefined:
1895
1895
  case null:
1896
1896
  case "":
1897
1897
  return 1 /* DESCENDANT */;
@@ -2123,7 +2123,7 @@ class AttrMatcher extends Matcher {
2123
2123
  const attr = node.getAttribute(this.key, true);
2124
2124
  return attr.some((cur) => {
2125
2125
  switch (this.op) {
2126
- case void 0:
2126
+ case undefined:
2127
2127
  return true;
2128
2128
  /* attribute exists */
2129
2129
  case "=":
@@ -2596,7 +2596,7 @@ class HtmlElement extends DOMNode {
2596
2596
  */
2597
2597
  get role() {
2598
2598
  const cached = this.cacheGet(ROLE);
2599
- if (cached !== void 0) {
2599
+ if (cached !== undefined) {
2600
2600
  return cached;
2601
2601
  }
2602
2602
  const role = this.getAttribute("role");
@@ -2654,7 +2654,7 @@ class HtmlElement extends DOMNode {
2654
2654
  */
2655
2655
  get tabIndex() {
2656
2656
  const cached = this.cacheGet(TABINDEX);
2657
- if (cached !== void 0) {
2657
+ if (cached !== undefined) {
2658
2658
  return cached;
2659
2659
  }
2660
2660
  const tabindex = this.getAttribute("tabindex");
@@ -11940,7 +11940,7 @@ class Parser {
11940
11940
  */
11941
11941
  getAttributeLocation(key, value) {
11942
11942
  const begin = key.location;
11943
- const end = value && value.type === TokenType.ATTR_VALUE ? value.location : void 0;
11943
+ const end = value && value.type === TokenType.ATTR_VALUE ? value.location : undefined;
11944
11944
  return {
11945
11945
  filename: begin.filename,
11946
11946
  line: begin.line,
@@ -11979,8 +11979,8 @@ class Parser {
11979
11979
  actionOffset,
11980
11980
  actionOffset + action.length
11981
11981
  );
11982
- const optionsLocation = data ? sliceLocation(token.location, optionsOffset, optionsOffset + data.length) : void 0;
11983
- const commentLocation = comment ? sliceLocation(token.location, commentOffset, commentOffset + comment.length) : void 0;
11982
+ const optionsLocation = data ? sliceLocation(token.location, optionsOffset, optionsOffset + data.length) : undefined;
11983
+ const commentLocation = comment ? sliceLocation(token.location, commentOffset, commentOffset + comment.length) : undefined;
11984
11984
  this.trigger("directive", {
11985
11985
  action,
11986
11986
  data,
@@ -12921,13 +12921,13 @@ function isConfigData(value) {
12921
12921
  class HtmlValidate {
12922
12922
  configLoader;
12923
12923
  constructor(arg) {
12924
- const [loader, config] = arg instanceof ConfigLoader ? [arg, void 0] : [void 0, arg];
12924
+ const [loader, config] = arg instanceof ConfigLoader ? [arg, undefined] : [undefined, arg];
12925
12925
  this.configLoader = loader ?? new StaticConfigLoader(config);
12926
12926
  }
12927
12927
  /* eslint-enable @typescript-eslint/unified-signatures */
12928
12928
  validateString(str, arg1, arg2, arg3) {
12929
12929
  const filename = typeof arg1 === "string" ? arg1 : "inline";
12930
- const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : void 0;
12930
+ const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : undefined;
12931
12931
  const hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;
12932
12932
  const source = {
12933
12933
  data: str,
@@ -12942,7 +12942,7 @@ class HtmlValidate {
12942
12942
  /* eslint-enable @typescript-eslint/unified-signatures */
12943
12943
  validateStringSync(str, arg1, arg2, arg3) {
12944
12944
  const filename = typeof arg1 === "string" ? arg1 : "inline";
12945
- const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : void 0;
12945
+ const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : undefined;
12946
12946
  const hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;
12947
12947
  const source = {
12948
12948
  data: str,
@@ -13323,7 +13323,7 @@ class HtmlValidate {
13323
13323
  }
13324
13324
 
13325
13325
  const name = "html-validate";
13326
- const version = "9.1.1";
13326
+ const version = "9.1.2";
13327
13327
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
13328
13328
 
13329
13329
  function definePlugin(plugin) {
@@ -14410,35 +14410,6 @@ if (
14410
14410
  || isNotRelative(path);
14411
14411
  }
14412
14412
 
14413
- function importFunction(id) {
14414
- return import(id);
14415
- }
14416
-
14417
- async function internalImport(id) {
14418
- const { default: defaultImport } = await importFunction(id);
14419
- if (!defaultImport) {
14420
- throw new UserError(`"${id}" does not have a default export`);
14421
- }
14422
- return defaultImport;
14423
- }
14424
- function esmResolver() {
14425
- return {
14426
- name: "esm-resolver",
14427
- resolveElements(id) {
14428
- return internalImport(id);
14429
- },
14430
- resolveConfig(id) {
14431
- return internalImport(id);
14432
- },
14433
- resolvePlugin(id) {
14434
- return internalImport(id);
14435
- },
14436
- async resolveTransformer(id) {
14437
- return internalImport(id);
14438
- }
14439
- };
14440
- }
14441
-
14442
14413
  var workerPath = "./jest-worker.js";
14443
14414
 
14444
14415
  exports.Attribute = Attribute;
@@ -14479,7 +14450,6 @@ exports.deepmerge = deepmerge;
14479
14450
  exports.defineConfig = defineConfig;
14480
14451
  exports.definePlugin = definePlugin;
14481
14452
  exports.ensureError = ensureError;
14482
- exports.esmResolver = esmResolver;
14483
14453
  exports.factory = factory;
14484
14454
  exports.getFormatter = getFormatter;
14485
14455
  exports.isThenable = isThenable;