aslopcleaner 1.0.2 → 1.0.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/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import process from 'node:process';
4
4
  import { readFile, writeFile } from 'node:fs/promises';
5
5
  import * as readline from 'node:readline/promises';
6
- import { R as REPLACEMENT_RULES, s as scanDirectory, d as shouldSkipSensitivePath, b as applyOccurrences, c as countByMatch, a as REPLACEMENT_RULE_MAP } from './scanner-7uDonJVi.mjs';
6
+ import { R as REPLACEMENT_RULES, s as scanDirectory, d as shouldSkipSensitivePath, b as applyOccurrences, c as countByMatch, a as REPLACEMENT_RULE_MAP } from './scanner-i8pYMUhT.mjs';
7
7
  import 'fast-glob';
8
8
 
9
9
  function parseArgs(argv) {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- export { F as FAST_GLOB_IGNORE_PATTERNS, M as MAX_FILE_SIZE_BYTES, R as REPLACEMENT_RULES, a as REPLACEMENT_RULE_MAP, b as applyOccurrences, c as countByMatch, f as findOccurrences, i as isProbablyBinary, n as normalizeGlobPath, s as scanDirectory, d as shouldSkipSensitivePath } from './scanner-7uDonJVi.mjs';
2
+ export { F as FAST_GLOB_IGNORE_PATTERNS, M as MAX_FILE_SIZE_BYTES, R as REPLACEMENT_RULES, a as REPLACEMENT_RULE_MAP, b as applyOccurrences, c as countByMatch, f as findOccurrences, i as isProbablyBinary, n as normalizeGlobPath, s as scanDirectory, d as shouldSkipSensitivePath } from './scanner-i8pYMUhT.mjs';
3
3
  import 'fast-glob';
4
4
  import 'node:path';
5
5
  import 'node:fs/promises';
@@ -87,13 +87,28 @@ const SENSITIVE_SUFFIXES = [
87
87
  ".kdbx"
88
88
  ];
89
89
  const MAX_FILE_SIZE_BYTES = 125 * 1024;
90
- const FAST_GLOB_IGNORE_PATTERNS = SKIPPED_DIRECTORIES.flatMap((directory) => [
91
- `${directory}/**`,
92
- `**/${directory}/**`
93
- ]);
90
+ const FAST_GLOB_IGNORE_PATTERNS = [
91
+ // All dot folders at any depth (and everything inside them)
92
+ ".*/**",
93
+ "**/.*/**",
94
+ // All dot files at any depth
95
+ "**/.*",
96
+ // All .env* files at any depth
97
+ "**/.env*",
98
+ // Explicit directory list
99
+ ...SKIPPED_DIRECTORIES.flatMap((directory) => [
100
+ `${directory}/**`,
101
+ `**/${directory}/**`
102
+ ])
103
+ ];
94
104
  function shouldSkipSensitivePath(filePath) {
95
105
  const baseName = path.basename(filePath).toLowerCase();
96
- if (baseName === ".env" || baseName.startsWith(".env.")) {
106
+ const normalizedPath = filePath.split(path.sep).join("/");
107
+ if (baseName.startsWith(".")) {
108
+ return true;
109
+ }
110
+ const segments = normalizedPath.split("/");
111
+ if (segments.some((seg, i) => i < segments.length - 1 && seg.startsWith("."))) {
97
112
  return true;
98
113
  }
99
114
  if (SENSITIVE_EXACT_BASENAMES.has(baseName)) {
@@ -156,7 +171,6 @@ const REPLACEMENT_RULES = [
156
171
  { match: "\u2012", replacement: "-", description: "figure dash" },
157
172
  { match: "\u2015", replacement: "--", description: "horizontal bar" },
158
173
  { match: "\u2010", replacement: "-", description: "hyphen" },
159
- { match: "-", replacement: "-", description: "non-breaking hyphen" },
160
174
  { match: "\u2043", replacement: "-", description: "hyphen bullet" },
161
175
  { match: "\uFE58", replacement: "-", description: "small em dash" },
162
176
  { match: "\uFE63", replacement: "-", description: "small hyphen-minus" },
@@ -799,6 +813,16 @@ const REPLACEMENT_RULES = [
799
813
  match: "\u254B",
800
814
  replacement: "+",
801
815
  description: "box drawings heavy vertical and horizontal"
816
+ },
817
+ {
818
+ match: "\u2013",
819
+ replacement: "-",
820
+ description: "en dash"
821
+ },
822
+ {
823
+ match: "\u2212",
824
+ replacement: "-",
825
+ description: "minus sign"
802
826
  }
803
827
  ];
804
828
  const REPLACEMENT_RULE_MAP = new Map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aslopcleaner",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "High-performance CLI to replace common LLM/AI Unicode punctuation and symbols with ASCII equivalents.",
5
5
  "type": "module",
6
6
  "bin": {