html-validate 7.15.0 → 7.15.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.
@@ -1 +1 @@
1
- {"version":3,"file":"test-utils.js","sources":["../../../src/transform/test-utils.ts"],"sourcesContent":[null],"names":["fs"],"mappings":";;;;;;;;AAqDA;;;;;;;AAOG;SACa,aAAa,CAC5B,EAAe,EACf,QAAgB,EAChB,KAA8D,EAAA;IAE9D,MAAM,IAAI,GAAGA,mBAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChD,IAAA,MAAM,MAAM,GAAW;QACtB,QAAQ;AACR,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,MAAM,EAAE,CAAC;QACT,IAAI;KACJ,CAAC;IACF,OAAO,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;AAOG;SACa,eAAe,CAC9B,EAAe,EACf,IAAY,EACZ,KAA8D,EAAA;AAE9D,IAAA,MAAM,MAAM,GAAW;AACtB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,MAAM,EAAE,CAAC;AACT,QAAA,MAAM,EAAE,CAAC;QACT,IAAI;KACJ,CAAC;IACF,OAAO,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;AAOG;SACa,eAAe,CAC9B,EAAe,EACf,MAAc,EACd,KAA8D,EAAA;IAE9D,MAAM,YAAY,GAAG,CAAC,MAAc,KAAuB,CAAC,MAAM,CAAC,CAAC;AACpE,IAAA,MAAM,OAAO,GAAqB;AACjC,QAAA,QAAQ,6BAA6B,MAAM,IAAI;QAC/C,KAAK,EAAE,KAAK,IAAI,YAAY;KAC5B,CAAC;AACF,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,C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C;AAC7C;;;;;;"}
package/dist/es/core.js CHANGED
@@ -582,6 +582,8 @@ class DOMNode {
582
582
  }
583
583
  /**
584
584
  * Tests if two nodes are the same (references the same object).
585
+ *
586
+ * @since v4.11.0
585
587
  */
586
588
  isSameNode(otherNode) {
587
589
  return this.unique === otherNode.unique;
@@ -2474,7 +2476,7 @@ class MetaTable {
2474
2476
  /**
2475
2477
  * Extend validation schema.
2476
2478
  *
2477
- * @internal
2479
+ * @public
2478
2480
  */
2479
2481
  extendValidationSchema(patch) {
2480
2482
  if (patch.properties) {
@@ -2495,7 +2497,7 @@ class MetaTable {
2495
2497
  /**
2496
2498
  * Load metadata table from object.
2497
2499
  *
2498
- * @internal
2500
+ * @public
2499
2501
  * @param obj - Object with metadata to load
2500
2502
  * @param filename - Optional filename used when presenting validation error
2501
2503
  */
@@ -2516,7 +2518,7 @@ class MetaTable {
2516
2518
  /**
2517
2519
  * Load metadata table from filename
2518
2520
  *
2519
- * @internal
2521
+ * @public
2520
2522
  * @param filename - Filename to load
2521
2523
  */
2522
2524
  loadFromFile(filename) {
@@ -10080,7 +10082,7 @@ class Config {
10080
10082
  * A resolved configuration will merge all extended configs and load all
10081
10083
  * plugins and transformers, and normalize the rest of the configuration.
10082
10084
  *
10083
- * @internal
10085
+ * @public
10084
10086
  */
10085
10087
  resolve() {
10086
10088
  return new ResolvedConfig(this.resolveData());
@@ -10361,12 +10363,13 @@ function isValidDirective(action) {
10361
10363
  /**
10362
10364
  * Parse HTML document into a DOM tree.
10363
10365
  *
10364
- * @internal
10366
+ * @public
10365
10367
  */
10366
10368
  class Parser {
10367
10369
  /**
10368
10370
  * Create a new parser instance.
10369
10371
  *
10372
+ * @public
10370
10373
  * @param config - Configuration
10371
10374
  */
10372
10375
  constructor(config) {
@@ -10378,6 +10381,7 @@ class Parser {
10378
10381
  /**
10379
10382
  * Parse HTML markup.
10380
10383
  *
10384
+ * @public
10381
10385
  * @param source - HTML markup.
10382
10386
  * @returns DOM tree representing the HTML markup.
10383
10387
  */
@@ -10468,6 +10472,9 @@ class Parser {
10468
10472
  return Boolean(active.parent && active.parent.is(tagName) && meta.includes(active.tagName));
10469
10473
  }
10470
10474
  }
10475
+ /**
10476
+ * @internal
10477
+ */
10471
10478
  /* eslint-disable-next-line complexity -- there isn't really a good other way to structure this method (that is still readable) */
10472
10479
  consume(source, token, tokenStream) {
10473
10480
  switch (token.type) {
@@ -10505,6 +10512,9 @@ class Parser {
10505
10512
  break;
10506
10513
  }
10507
10514
  }
10515
+ /**
10516
+ * @internal
10517
+ */
10508
10518
  /* eslint-disable-next-line complexity, sonarjs/cognitive-complexity -- technical debt, chould be refactored a bit */
10509
10519
  consumeTag(source, startToken, tokenStream) {
10510
10520
  const tokens = Array.from(this.consumeUntil(tokenStream, TokenType.TAG_CLOSE, startToken.location));
@@ -10570,6 +10580,9 @@ class Parser {
10570
10580
  this.discardForeignBody(source, node.tagName, tokenStream, startToken.location);
10571
10581
  }
10572
10582
  }
10583
+ /**
10584
+ * @internal
10585
+ */
10573
10586
  closeElement(source, node, active, location) {
10574
10587
  /* call processElement hook */
10575
10588
  this.processElement(active, source);
@@ -10605,6 +10618,8 @@ class Parser {
10605
10618
  }
10606
10619
  /**
10607
10620
  * Discard tokens until the end tag for the foreign element is found.
10621
+ *
10622
+ * @internal
10608
10623
  */
10609
10624
  discardForeignBody(source, foreignTagName, tokenStream, errorLocation) {
10610
10625
  /* consume elements until the end tag for this foreign element is found */
@@ -10653,6 +10668,9 @@ class Parser {
10653
10668
  this.closeElement(source, node, active, endToken.location);
10654
10669
  this.dom.popActive();
10655
10670
  }
10671
+ /**
10672
+ * @internal
10673
+ */
10656
10674
  consumeAttribute(source, node, token, next) {
10657
10675
  const keyLocation = this.getAttributeKeyLocation(token);
10658
10676
  const valueLocation = this.getAttributeValueLocation(next);
@@ -10743,6 +10761,9 @@ class Parser {
10743
10761
  offset: begin.offset,
10744
10762
  };
10745
10763
  }
10764
+ /**
10765
+ * @internal
10766
+ */
10746
10767
  consumeDirective(token) {
10747
10768
  const [text, preamble, action, separator1, directive, postamble] = token.data;
10748
10769
  if (!postamble.startsWith("]")) {
@@ -10788,6 +10809,8 @@ class Parser {
10788
10809
  * Consumes conditional comment in tag form.
10789
10810
  *
10790
10811
  * See also the related [[consumeCommend]] method.
10812
+ *
10813
+ * @internal
10791
10814
  */
10792
10815
  consumeConditional(token) {
10793
10816
  const element = this.dom.getActive();
@@ -10802,6 +10825,8 @@ class Parser {
10802
10825
  *
10803
10826
  * Tries to find IE conditional comments and emits conditional token if
10804
10827
  * found. See also the related [[consumeConditional]] method.
10828
+ *
10829
+ * @internal
10805
10830
  */
10806
10831
  consumeComment(token) {
10807
10832
  const comment = token.data[0];
@@ -10816,6 +10841,8 @@ class Parser {
10816
10841
  }
10817
10842
  /**
10818
10843
  * Consumes doctype tokens. Emits doctype event.
10844
+ *
10845
+ * @internal
10819
10846
  */
10820
10847
  consumeDoctype(startToken, tokenStream) {
10821
10848
  const tokens = Array.from(this.consumeUntil(tokenStream, TokenType.DOCTYPE_CLOSE, startToken.location));
@@ -10833,6 +10860,7 @@ class Parser {
10833
10860
  /**
10834
10861
  * Return a list of tokens found until the expected token was found.
10835
10862
  *
10863
+ * @internal
10836
10864
  * @param errorLocation - What location to use if an error occurs
10837
10865
  */
10838
10866
  *consumeUntil(tokenStream, search, errorLocation) {
@@ -10897,6 +10925,7 @@ class Parser {
10897
10925
  /**
10898
10926
  * Defer execution. Will call function sometime later.
10899
10927
  *
10928
+ * @internal
10900
10929
  * @param cb - Callback to execute later.
10901
10930
  */
10902
10931
  defer(cb) {
@@ -11751,7 +11780,7 @@ class HtmlValidate {
11751
11780
  /** @public */
11752
11781
  const name = "html-validate";
11753
11782
  /** @public */
11754
- const version = "7.15.0";
11783
+ const version = "7.15.1";
11755
11784
  /** @public */
11756
11785
  const bugs = "https://gitlab.com/html-validate/html-validate/issues/new";
11757
11786