@storm-software/linting-tools 1.107.2 → 1.107.4

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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.107.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-1.107.3-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/lint.cjs CHANGED
@@ -225,38 +225,44 @@ var COLOR_KEYS = [
225
225
  // ../config-tools/src/utilities/get-default-config.ts
226
226
  var import_node_fs2 = require("fs");
227
227
  var import_promises = require("fs/promises");
228
- var import_node_path2 = require("path");
228
+ var import_node_path3 = require("path");
229
229
 
230
230
  // ../config-tools/src/utilities/correct-paths.ts
231
- var import_devkit = require("@nx/devkit");
231
+ var import_node_path = require("path");
232
+ var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
233
+ return osSpecificPath.replace(/^[A-Z]:/, "");
234
+ }, "removeWindowsDriveLetter");
232
235
  var correctPaths = /* @__PURE__ */ __name((path) => {
233
236
  if (!path) {
234
237
  return "";
235
238
  }
236
- if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
237
- path = `C:${path}`;
239
+ if (path.includes("\\")) {
240
+ if (!path.toUpperCase().startsWith("C:")) {
241
+ path = `C:${path}`;
242
+ }
243
+ return path.replaceAll("/", "\\");
238
244
  }
239
- return path.replaceAll("\\", "/");
245
+ return removeWindowsDriveLetter(path).split("\\").join("/");
240
246
  }, "correctPaths");
241
247
  var joinPaths = /* @__PURE__ */ __name((...paths) => {
242
248
  if (!paths || paths.length === 0) {
243
249
  return "";
244
250
  }
245
- return correctPaths((0, import_devkit.joinPathFragments)(...paths.map((path) => correctPaths(path))));
251
+ return correctPaths((0, import_node_path.join)(...paths));
246
252
  }, "joinPaths");
247
253
 
248
254
  // ../config-tools/src/utilities/find-up.ts
249
255
  var import_node_fs = require("fs");
250
- var import_node_path = require("path");
256
+ var import_node_path2 = require("path");
251
257
  var MAX_PATH_SEARCH_DEPTH = 30;
252
258
  var depth = 0;
253
259
  function findFolderUp(startPath, endFileNames) {
254
260
  const _startPath = startPath ?? process.cwd();
255
- if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
261
+ if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
256
262
  return _startPath;
257
263
  }
258
264
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
259
- const parent = (0, import_node_path.join)(_startPath, "..");
265
+ const parent = (0, import_node_path2.join)(_startPath, "..");
260
266
  return findFolderUp(parent, endFileNames);
261
267
  }
262
268
  return void 0;
@@ -353,7 +359,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
353
359
  let namespace = void 0;
354
360
  let repository = void 0;
355
361
  const workspaceRoot = findWorkspaceRoot(root);
356
- if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
362
+ if ((0, import_node_fs2.existsSync)((0, import_node_path3.join)(workspaceRoot, "package.json"))) {
357
363
  const file = await (0, import_promises.readFile)(joinPaths(workspaceRoot, "package.json"), "utf8");
358
364
  if (file) {
359
365
  const packageJson = JSON.parse(file);
package/bin/lint.js CHANGED
@@ -204,38 +204,44 @@ var COLOR_KEYS = [
204
204
  // ../config-tools/src/utilities/get-default-config.ts
205
205
  import { existsSync as existsSync2 } from "node:fs";
206
206
  import { readFile } from "node:fs/promises";
207
- import { join as join2 } from "node:path";
207
+ import { join as join3 } from "node:path";
208
208
 
209
209
  // ../config-tools/src/utilities/correct-paths.ts
210
- import { joinPathFragments } from "@nx/devkit";
210
+ import { join } from "node:path";
211
+ var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
212
+ return osSpecificPath.replace(/^[A-Z]:/, "");
213
+ }, "removeWindowsDriveLetter");
211
214
  var correctPaths = /* @__PURE__ */ __name((path) => {
212
215
  if (!path) {
213
216
  return "";
214
217
  }
215
- if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
216
- path = `C:${path}`;
218
+ if (path.includes("\\")) {
219
+ if (!path.toUpperCase().startsWith("C:")) {
220
+ path = `C:${path}`;
221
+ }
222
+ return path.replaceAll("/", "\\");
217
223
  }
218
- return path.replaceAll("\\", "/");
224
+ return removeWindowsDriveLetter(path).split("\\").join("/");
219
225
  }, "correctPaths");
220
226
  var joinPaths = /* @__PURE__ */ __name((...paths) => {
221
227
  if (!paths || paths.length === 0) {
222
228
  return "";
223
229
  }
224
- return correctPaths(joinPathFragments(...paths.map((path) => correctPaths(path))));
230
+ return correctPaths(join(...paths));
225
231
  }, "joinPaths");
226
232
 
227
233
  // ../config-tools/src/utilities/find-up.ts
228
234
  import { existsSync } from "node:fs";
229
- import { join } from "node:path";
235
+ import { join as join2 } from "node:path";
230
236
  var MAX_PATH_SEARCH_DEPTH = 30;
231
237
  var depth = 0;
232
238
  function findFolderUp(startPath, endFileNames) {
233
239
  const _startPath = startPath ?? process.cwd();
234
- if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
240
+ if (endFileNames.some((endFileName) => existsSync(join2(_startPath, endFileName)))) {
235
241
  return _startPath;
236
242
  }
237
243
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
238
- const parent = join(_startPath, "..");
244
+ const parent = join2(_startPath, "..");
239
245
  return findFolderUp(parent, endFileNames);
240
246
  }
241
247
  return void 0;
@@ -332,7 +338,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
332
338
  let namespace = void 0;
333
339
  let repository = void 0;
334
340
  const workspaceRoot = findWorkspaceRoot(root);
335
- if (existsSync2(join2(workspaceRoot, "package.json"))) {
341
+ if (existsSync2(join3(workspaceRoot, "package.json"))) {
336
342
  const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
337
343
  if (file) {
338
344
  const packageJson = JSON.parse(file);
@@ -1228,13 +1234,13 @@ var transform = /* @__PURE__ */ __name((options) => {
1228
1234
  import { sync } from "fast-glob";
1229
1235
  import fs from "fs-extra";
1230
1236
  import { Octokit } from "octokit";
1231
- import { join as join3 } from "path";
1237
+ import { join as join4 } from "path";
1232
1238
  async function runCodeowners() {
1233
1239
  const config = await getConfig();
1234
1240
  if (!config) {
1235
1241
  throw new Error("Failed to load storm config.");
1236
1242
  }
1237
- const codeowners = fs.readFileSync(fs.existsSync(join3(config.workspaceRoot, ".github", "CODEOWNERS")) ? join3(config.workspaceRoot, ".github", "CODEOWNERS") : join3(config.workspaceRoot, "CODEOWNERS"), "utf8");
1243
+ const codeowners = fs.readFileSync(fs.existsSync(join4(config.workspaceRoot, ".github", "CODEOWNERS")) ? join4(config.workspaceRoot, ".github", "CODEOWNERS") : join4(config.workspaceRoot, "CODEOWNERS"), "utf8");
1238
1244
  const codeownersLines = codeowners.split("\n").filter((line) => line.trim().length > 0 && !line.startsWith("#"));
1239
1245
  const mismatchedPatterns = [];
1240
1246
  const mismatchedOwners = [];
@@ -1259,7 +1265,7 @@ async function runCodeowners() {
1259
1265
  "tmp",
1260
1266
  ".git"
1261
1267
  ],
1262
- cwd: join3(config.workspaceRoot),
1268
+ cwd: join4(config.workspaceRoot),
1263
1269
  onlyFiles: false
1264
1270
  }).length > 0;
1265
1271
  }
package/dist/index.cjs CHANGED
@@ -206,21 +206,27 @@ var _promises = require('fs/promises');
206
206
  var _path = require('path');
207
207
 
208
208
  // ../config-tools/src/utilities/correct-paths.ts
209
- var _devkit = require('@nx/devkit');
209
+
210
+ var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
211
+ return osSpecificPath.replace(/^[A-Z]:/, "");
212
+ }, "removeWindowsDriveLetter");
210
213
  var correctPaths = /* @__PURE__ */ __name((path) => {
211
214
  if (!path) {
212
215
  return "";
213
216
  }
214
- if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
215
- path = `C:${path}`;
217
+ if (path.includes("\\")) {
218
+ if (!path.toUpperCase().startsWith("C:")) {
219
+ path = `C:${path}`;
220
+ }
221
+ return path.replaceAll("/", "\\");
216
222
  }
217
- return path.replaceAll("\\", "/");
223
+ return removeWindowsDriveLetter(path).split("\\").join("/");
218
224
  }, "correctPaths");
219
225
  var joinPaths = /* @__PURE__ */ __name((...paths) => {
220
226
  if (!paths || paths.length === 0) {
221
227
  return "";
222
228
  }
223
- return correctPaths(_devkit.joinPathFragments.call(void 0, ...paths.map((path) => correctPaths(path))));
229
+ return correctPaths(_path.join.call(void 0, ...paths));
224
230
  }, "joinPaths");
225
231
 
226
232
  // ../config-tools/src/utilities/find-up.ts
package/dist/index.js CHANGED
@@ -203,38 +203,44 @@ var COLOR_KEYS = [
203
203
  // ../config-tools/src/utilities/get-default-config.ts
204
204
  import { existsSync as existsSync2 } from "node:fs";
205
205
  import { readFile } from "node:fs/promises";
206
- import { join as join2 } from "node:path";
206
+ import { join as join3 } from "node:path";
207
207
 
208
208
  // ../config-tools/src/utilities/correct-paths.ts
209
- import { joinPathFragments } from "@nx/devkit";
209
+ import { join } from "node:path";
210
+ var removeWindowsDriveLetter = /* @__PURE__ */ __name((osSpecificPath) => {
211
+ return osSpecificPath.replace(/^[A-Z]:/, "");
212
+ }, "removeWindowsDriveLetter");
210
213
  var correctPaths = /* @__PURE__ */ __name((path) => {
211
214
  if (!path) {
212
215
  return "";
213
216
  }
214
- if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
215
- path = `C:${path}`;
217
+ if (path.includes("\\")) {
218
+ if (!path.toUpperCase().startsWith("C:")) {
219
+ path = `C:${path}`;
220
+ }
221
+ return path.replaceAll("/", "\\");
216
222
  }
217
- return path.replaceAll("\\", "/");
223
+ return removeWindowsDriveLetter(path).split("\\").join("/");
218
224
  }, "correctPaths");
219
225
  var joinPaths = /* @__PURE__ */ __name((...paths) => {
220
226
  if (!paths || paths.length === 0) {
221
227
  return "";
222
228
  }
223
- return correctPaths(joinPathFragments(...paths.map((path) => correctPaths(path))));
229
+ return correctPaths(join(...paths));
224
230
  }, "joinPaths");
225
231
 
226
232
  // ../config-tools/src/utilities/find-up.ts
227
233
  import { existsSync } from "node:fs";
228
- import { join } from "node:path";
234
+ import { join as join2 } from "node:path";
229
235
  var MAX_PATH_SEARCH_DEPTH = 30;
230
236
  var depth = 0;
231
237
  function findFolderUp(startPath, endFileNames) {
232
238
  const _startPath = startPath ?? process.cwd();
233
- if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
239
+ if (endFileNames.some((endFileName) => existsSync(join2(_startPath, endFileName)))) {
234
240
  return _startPath;
235
241
  }
236
242
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
237
- const parent = join(_startPath, "..");
243
+ const parent = join2(_startPath, "..");
238
244
  return findFolderUp(parent, endFileNames);
239
245
  }
240
246
  return void 0;
@@ -331,7 +337,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
331
337
  let namespace = void 0;
332
338
  let repository = void 0;
333
339
  const workspaceRoot = findWorkspaceRoot(root);
334
- if (existsSync2(join2(workspaceRoot, "package.json"))) {
340
+ if (existsSync2(join3(workspaceRoot, "package.json"))) {
335
341
  const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
336
342
  if (file) {
337
343
  const packageJson = JSON.parse(file);
@@ -1193,13 +1199,13 @@ var transform = /* @__PURE__ */ __name((options) => {
1193
1199
  import { sync } from "fast-glob";
1194
1200
  import fs from "fs-extra";
1195
1201
  import { Octokit } from "octokit";
1196
- import { join as join3 } from "path";
1202
+ import { join as join4 } from "path";
1197
1203
  async function runCodeowners() {
1198
1204
  const config = await getConfig();
1199
1205
  if (!config) {
1200
1206
  throw new Error("Failed to load storm config.");
1201
1207
  }
1202
- const codeowners = fs.readFileSync(fs.existsSync(join3(config.workspaceRoot, ".github", "CODEOWNERS")) ? join3(config.workspaceRoot, ".github", "CODEOWNERS") : join3(config.workspaceRoot, "CODEOWNERS"), "utf8");
1208
+ const codeowners = fs.readFileSync(fs.existsSync(join4(config.workspaceRoot, ".github", "CODEOWNERS")) ? join4(config.workspaceRoot, ".github", "CODEOWNERS") : join4(config.workspaceRoot, "CODEOWNERS"), "utf8");
1203
1209
  const codeownersLines = codeowners.split("\n").filter((line) => line.trim().length > 0 && !line.startsWith("#"));
1204
1210
  const mismatchedPatterns = [];
1205
1211
  const mismatchedOwners = [];
@@ -1224,7 +1230,7 @@ async function runCodeowners() {
1224
1230
  "tmp",
1225
1231
  ".git"
1226
1232
  ],
1227
- cwd: join3(config.workspaceRoot),
1233
+ cwd: join4(config.workspaceRoot),
1228
1234
  onlyFiles: false
1229
1235
  }).length > 0;
1230
1236
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/linting-tools",
3
- "version": "1.107.2",
3
+ "version": "1.107.4",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.",
6
6
  "repository": {
@@ -133,7 +133,6 @@
133
133
  "vfile-reporter": "8.1.1"
134
134
  },
135
135
  "devDependencies": {
136
- "@storm-software/cspell": "0.8.4",
137
136
  "@types/node": "^22.10.2",
138
137
  "cspell": "8.8.4",
139
138
  "tsup": "8.3.5"