npm-pkg-lint 4.6.4 → 4.6.5

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/index.js CHANGED
@@ -5493,55 +5493,8 @@ import { createWriteStream, existsSync, promises as fs7, readFileSync } from "no
5493
5493
  import path7 from "node:path";
5494
5494
  import { fileURLToPath as fileURLToPath4 } from "node:url";
5495
5495
 
5496
- // node_modules/kleur/colors.mjs
5497
- var FORCE_COLOR;
5498
- var NODE_DISABLE_COLORS;
5499
- var NO_COLOR;
5500
- var TERM;
5501
- var isTTY = true;
5502
- if (typeof process !== "undefined") {
5503
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
5504
- isTTY = process.stdout && process.stdout.isTTY;
5505
- }
5506
- var $ = {
5507
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
5508
- };
5509
- function init(x, y2) {
5510
- let rgx = new RegExp(`\\x1b\\[${y2}m`, "g");
5511
- let open = `\x1B[${x}m`, close = `\x1B[${y2}m`;
5512
- return function(txt) {
5513
- if (!$.enabled || txt == null) return txt;
5514
- return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
5515
- };
5516
- }
5517
- var reset = init(0, 0);
5518
- var bold = init(1, 22);
5519
- var dim = init(2, 22);
5520
- var italic = init(3, 23);
5521
- var underline = init(4, 24);
5522
- var inverse = init(7, 27);
5523
- var hidden = init(8, 28);
5524
- var strikethrough = init(9, 29);
5525
- var black = init(30, 39);
5526
- var red = init(31, 39);
5527
- var green = init(32, 39);
5528
- var yellow = init(33, 39);
5529
- var blue = init(34, 39);
5530
- var magenta = init(35, 39);
5531
- var cyan = init(36, 39);
5532
- var white = init(37, 39);
5533
- var gray = init(90, 39);
5534
- var grey = init(90, 39);
5535
- var bgBlack = init(40, 49);
5536
- var bgRed = init(41, 49);
5537
- var bgGreen = init(42, 49);
5538
- var bgYellow = init(43, 49);
5539
- var bgBlue = init(44, 49);
5540
- var bgMagenta = init(45, 49);
5541
- var bgCyan = init(46, 49);
5542
- var bgWhite = init(47, 49);
5543
-
5544
5496
  // node_modules/@html-validate/stylish/dist/esm/node.js
5497
+ import { styleText } from "node:util";
5545
5498
  var __create2 = Object.create;
5546
5499
  var __defProp2 = Object.defineProperty;
5547
5500
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -5618,10 +5571,10 @@ var require_text_table = __commonJS2({
5618
5571
  var m2 = /\.[^.]*$/.exec(c);
5619
5572
  return m2 ? m2.index + 1 : c.length;
5620
5573
  }
5621
- function reduce(xs2, f2, init2) {
5622
- if (xs2.reduce) return xs2.reduce(f2, init2);
5574
+ function reduce(xs2, f2, init) {
5575
+ if (xs2.reduce) return xs2.reduce(f2, init);
5623
5576
  var i = 0;
5624
- var acc = arguments.length >= 3 ? init2 : xs2[i++];
5577
+ var acc = arguments.length >= 3 ? init : xs2[i++];
5625
5578
  for (; i < xs2.length; i++) {
5626
5579
  f2(acc, xs2[i], i);
5627
5580
  }
@@ -5644,12 +5597,24 @@ var require_text_table = __commonJS2({
5644
5597
  }
5645
5598
  });
5646
5599
  var import_text_table = __toESM2(require_text_table());
5647
- var reset2 = reset;
5648
- var bold2 = bold;
5649
- var dim2 = dim;
5650
- var underline2 = underline;
5651
- var yellow2 = yellow;
5652
- var red2 = red;
5600
+ function reset(value) {
5601
+ return styleText("reset", value);
5602
+ }
5603
+ function bold(value) {
5604
+ return styleText("bold", value);
5605
+ }
5606
+ function dim(value) {
5607
+ return styleText("dim", value);
5608
+ }
5609
+ function underline(value) {
5610
+ return styleText("underline", value);
5611
+ }
5612
+ function yellow(value) {
5613
+ return styleText("yellow", value);
5614
+ }
5615
+ function red(value) {
5616
+ return styleText("red", value);
5617
+ }
5653
5618
  var Severity = /* @__PURE__ */ ((Severity2) => {
5654
5619
  Severity2[Severity2["OFF"] = 0] = "OFF";
5655
5620
  Severity2[Severity2["WARN"] = 1] = "WARN";
@@ -5660,7 +5625,7 @@ function pluralize(word, count) {
5660
5625
  return count === 1 ? word : `${word}s`;
5661
5626
  }
5662
5627
  function centerLineColumn(el) {
5663
- return el.replace(/(\d+)\s+(\d+)/u, (_m, p1, p2) => dim2(`${p1}:${p2}`));
5628
+ return el.replace(/(\d+)\s+(\d+)/u, (_m, p1, p2) => dim(`${p1}:${p2}`));
5664
5629
  }
5665
5630
  function stripAnsi(text) {
5666
5631
  return text.replaceAll(/\u001B\[[\d;]*m/g, "");
@@ -5671,7 +5636,7 @@ function stylish(results) {
5671
5636
  let warningCount = 0;
5672
5637
  let fixableErrorCount = 0;
5673
5638
  let fixableWarningCount = 0;
5674
- let summaryColor = yellow2;
5639
+ let summaryColor = yellow;
5675
5640
  for (const result of results) {
5676
5641
  const messages = result.messages;
5677
5642
  if (messages.length === 0) {
@@ -5684,10 +5649,10 @@ function stylish(results) {
5684
5649
  const rows = messages.map((message) => {
5685
5650
  let messageType;
5686
5651
  if (Boolean(message.fatal) || message.severity === 2) {
5687
- messageType = red2("error");
5688
- summaryColor = red2;
5652
+ messageType = red("error");
5653
+ summaryColor = red;
5689
5654
  } else {
5690
- messageType = yellow2("warning");
5655
+ messageType = yellow("warning");
5691
5656
  }
5692
5657
  return [
5693
5658
  "",
@@ -5695,7 +5660,7 @@ function stylish(results) {
5695
5660
  message.column ?? 0,
5696
5661
  messageType,
5697
5662
  message.message.replace(/([^ ])\.$/u, "$1"),
5698
- message.ruleId ? dim2(message.ruleId) : ""
5663
+ message.ruleId ? dim(message.ruleId) : ""
5699
5664
  ];
5700
5665
  });
5701
5666
  const options = {
@@ -5705,7 +5670,7 @@ function stylish(results) {
5705
5670
  }
5706
5671
  };
5707
5672
  const formattedTable = (0, import_text_table.default)(rows, options).split("\n").map(centerLineColumn).join("\n");
5708
- output += `${underline2(result.filePath)}
5673
+ output += `${underline(result.filePath)}
5709
5674
  `;
5710
5675
  output += `${formattedTable}
5711
5676
 
@@ -5714,7 +5679,7 @@ function stylish(results) {
5714
5679
  const total = errorCount + warningCount;
5715
5680
  if (total > 0) {
5716
5681
  output += summaryColor(
5717
- bold2(
5682
+ bold(
5718
5683
  [
5719
5684
  "\u2716 ",
5720
5685
  total,
@@ -5731,7 +5696,7 @@ function stylish(results) {
5731
5696
  );
5732
5697
  if (fixableErrorCount > 0 || fixableWarningCount > 0) {
5733
5698
  output += summaryColor(
5734
- bold2(
5699
+ bold(
5735
5700
  [
5736
5701
  " ",
5737
5702
  fixableErrorCount,
@@ -5745,7 +5710,7 @@ function stylish(results) {
5745
5710
  );
5746
5711
  }
5747
5712
  }
5748
- return total > 0 ? reset2(output) : "";
5713
+ return total > 0 ? reset(output) : "";
5749
5714
  }
5750
5715
 
5751
5716
  // node_modules/@humanwhocodes/momoa/dist/momoa.js
@@ -7707,7 +7672,7 @@ import qr from "zlib";
7707
7672
  import { posix as Zt } from "node:path";
7708
7673
  import { basename as wn } from "node:path";
7709
7674
  import fi from "fs";
7710
- import $2 from "fs";
7675
+ import $ from "fs";
7711
7676
  import $s from "path";
7712
7677
  import { win32 as In } from "node:path";
7713
7678
  import sr from "path";
@@ -9165,7 +9130,7 @@ var de = class extends D {
9165
9130
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9166
9131
  }
9167
9132
  [Qi]() {
9168
- $2.lstat(this.absolute, (t, e) => {
9133
+ $.lstat(this.absolute, (t, e) => {
9169
9134
  if (t) return this.emit("error", t);
9170
9135
  this[ei](e);
9171
9136
  });
@@ -9203,7 +9168,7 @@ var de = class extends D {
9203
9168
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9204
9169
  }
9205
9170
  [ji]() {
9206
- $2.readlink(this.absolute, (t, e) => {
9171
+ $.readlink(this.absolute, (t, e) => {
9207
9172
  if (t) return this.emit("error", t);
9208
9173
  this[ts](e);
9209
9174
  });
@@ -9226,7 +9191,7 @@ var de = class extends D {
9226
9191
  this[es]();
9227
9192
  }
9228
9193
  [es]() {
9229
- $2.open(this.absolute, "r", (t, e) => {
9194
+ $.open(this.absolute, "r", (t, e) => {
9230
9195
  if (t) return this.emit("error", t);
9231
9196
  this[is](e);
9232
9197
  });
@@ -9241,14 +9206,14 @@ var de = class extends D {
9241
9206
  [ti]() {
9242
9207
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9243
9208
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9244
- $2.read(t, e, i, r, n, (o, h) => {
9209
+ $.read(t, e, i, r, n, (o, h) => {
9245
9210
  if (o) return this[pt](() => this.emit("error", o));
9246
9211
  this[Ji](h);
9247
9212
  });
9248
9213
  }
9249
9214
  [pt](t = () => {
9250
9215
  }) {
9251
- this.fd !== void 0 && $2.close(this.fd, t);
9216
+ this.fd !== void 0 && $.close(this.fd, t);
9252
9217
  }
9253
9218
  [Ji](t) {
9254
9219
  if (t <= 0 && this.remain > 0) {
@@ -9283,20 +9248,20 @@ var de = class extends D {
9283
9248
  var si = class extends de {
9284
9249
  sync = true;
9285
9250
  [Qi]() {
9286
- this[ei]($2.lstatSync(this.absolute));
9251
+ this[ei]($.lstatSync(this.absolute));
9287
9252
  }
9288
9253
  [ji]() {
9289
- this[ts]($2.readlinkSync(this.absolute));
9254
+ this[ts]($.readlinkSync(this.absolute));
9290
9255
  }
9291
9256
  [es]() {
9292
- this[is]($2.openSync(this.absolute, "r"));
9257
+ this[is]($.openSync(this.absolute, "r"));
9293
9258
  }
9294
9259
  [ti]() {
9295
9260
  let t = true;
9296
9261
  try {
9297
9262
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9298
9263
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9299
- let h = $2.readSync(e, i, r, n, o);
9264
+ let h = $.readSync(e, i, r, n, o);
9300
9265
  this[Ji](h), t = false;
9301
9266
  } finally {
9302
9267
  if (t) try {
@@ -9311,7 +9276,7 @@ var si = class extends de {
9311
9276
  }
9312
9277
  [pt](t = () => {
9313
9278
  }) {
9314
- this.fd !== void 0 && $2.closeSync(this.fd), t();
9279
+ this.fd !== void 0 && $.closeSync(this.fd), t();
9315
9280
  }
9316
9281
  };
9317
9282
  var ri = class extends D {