@html-validate/prettier-config 3.1.4 → 3.1.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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const path = require("path");
4
- const { spawn } = require("child_process");
3
+ const { spawn } = require("node:child_process");
4
+ const path = require("node:path");
5
5
 
6
6
  const pkgPath = path.dirname(require.resolve("lint-staged/package.json"));
7
7
  const binary = path.join(pkgPath, "bin/lint-staged.js");
package/bin/prettier.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ const { spawn } = require("node:child_process");
3
4
  const path = require("node:path");
4
- const { spawn } = require("child_process");
5
5
 
6
6
  const pkgPath = path.dirname(require.resolve("prettier/package.json"));
7
7
  const binary = path.join(pkgPath, "bin/prettier.cjs");
@@ -201,6 +201,9 @@ var require_identifiers = __commonJS({
201
201
  "use strict";
202
202
  var numeric = /^[0-9]+$/;
203
203
  var compareIdentifiers = (a, b) => {
204
+ if (typeof a === "number" && typeof b === "number") {
205
+ return a === b ? 0 : a < b ? -1 : 1;
206
+ }
204
207
  const anum = numeric.test(a);
205
208
  const bnum = numeric.test(b);
206
209
  if (anum && bnum) {
@@ -307,7 +310,25 @@ var require_semver = __commonJS({
307
310
  if (!(other instanceof _SemVer)) {
308
311
  other = new _SemVer(other, this.options);
309
312
  }
310
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
313
+ if (this.major < other.major) {
314
+ return -1;
315
+ }
316
+ if (this.major > other.major) {
317
+ return 1;
318
+ }
319
+ if (this.minor < other.minor) {
320
+ return -1;
321
+ }
322
+ if (this.minor > other.minor) {
323
+ return 1;
324
+ }
325
+ if (this.patch < other.patch) {
326
+ return -1;
327
+ }
328
+ if (this.patch > other.patch) {
329
+ return 1;
330
+ }
331
+ return 0;
311
332
  }
312
333
  comparePre(other) {
313
334
  if (!(other instanceof _SemVer)) {
@@ -1068,6 +1089,7 @@ var require_range = __commonJS({
1068
1089
  return result;
1069
1090
  };
1070
1091
  var parseComparator = (comp, options) => {
1092
+ comp = comp.replace(re[t.BUILD], "");
1071
1093
  debug("comp", comp, options);
1072
1094
  comp = replaceCarets(comp, options);
1073
1095
  debug("caret", comp);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/prettier-config",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Prettier sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "prettier"
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "lint-staged": "16.2.3",
29
+ "lint-staged": "16.2.4",
30
30
  "prettier": "3.6.2"
31
31
  },
32
32
  "engines": {