auto-cr-cmd 2.0.71 → 2.0.76

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -81,6 +81,10 @@ var consolaLoggers = {
81
81
  warn: consola_1.consola.warn.bind(consola_1.consola),
82
82
  error: consola_1.consola.error.bind(consola_1.consola),
83
83
  };
84
+ var SCANNABLE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx'];
85
+ var isScannableFile = function (filePath) {
86
+ return SCANNABLE_EXTENSIONS.some(function (extension) { return filePath.endsWith(extension); });
87
+ };
84
88
  function run() {
85
89
  return __awaiter(this, arguments, void 0, function (filePaths, ruleDir, format, configPath, ignorePath) {
86
90
  var t, notifications, log, validPaths, ignoreConfig, isIgnored_1, allFiles, _i, validPaths_1, targetPath, stat, directoryFiles, scannableFiles, customRules, rcConfig, rules, filesWithErrors, filesWithWarnings, filesWithOptimizing, totalViolations, totalErrorViolations, totalWarningViolations, totalOptimizingViolations, fileSummaries, _a, scannableFiles_1, file, summary, error_1;
@@ -158,12 +162,12 @@ function run() {
158
162
  }
159
163
  stat = fs_1.default.statSync(targetPath);
160
164
  if (stat.isFile()) {
161
- if (!isIgnored_1(targetPath)) {
165
+ if (!isIgnored_1(targetPath) && isScannableFile(targetPath)) {
162
166
  allFiles.push(targetPath);
163
167
  }
164
168
  }
165
169
  else if (stat.isDirectory()) {
166
- directoryFiles = (0, file_1.getAllFiles)(targetPath, [], ['.ts', '.tsx', '.js', '.jsx'], {
170
+ directoryFiles = (0, file_1.getAllFiles)(targetPath, [], SCANNABLE_EXTENSIONS, {
167
171
  shouldIgnore: function (fullPath) { return isIgnored_1(fullPath); },
168
172
  });
169
173
  allFiles = __spreadArray(__spreadArray([], allFiles, true), directoryFiles, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-cr-cmd",
3
- "version": "2.0.71",
3
+ "version": "2.0.76",
4
4
  "description": "Fast automated code review CLI powered by SWC-based static analysis",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@swc/core": "^1.15.8",
49
49
  "@swc/wasm": "^1.15.8",
50
- "auto-cr-rules": "^2.0.71",
50
+ "auto-cr-rules": "workspace:^",
51
51
  "commander": "^14.0.2",
52
52
  "consola": "^3.4.2",
53
53
  "jsonc-parser": "^3.3.1",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@eslint/js": "^9.39.2",
58
58
  "@swc/types": "^0.1.25",
59
- "@types/node": "^25.0.3",
59
+ "@types/node": "^25.0.9",
60
60
  "@types/picomatch": "^4.0.2",
61
61
  "eslint": "^9.39.2",
62
62
  "eslint-plugin-prettier": "^5.5.4",