jstar-reviewer 2.4.1 → 2.4.2

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/bin/jstar.js CHANGED
@@ -29,7 +29,7 @@ function log(msg) {
29
29
 
30
30
  function printHelp() {
31
31
  log(`
32
- ${COLORS.bold}🌟 J-Star Reviewer v2.4.1${COLORS.reset}
32
+ ${COLORS.bold}🌟 J-Star Reviewer v2.4.2${COLORS.reset}
33
33
 
34
34
  ${COLORS.dim}AI-powered code review with local embeddings${COLORS.reset}
35
35
 
@@ -68,9 +68,10 @@ const FILE_RULES = [
68
68
  }
69
69
  ];
70
70
  class Detective {
71
- constructor(directory) {
71
+ constructor(directory, options = {}) {
72
72
  this.directory = directory;
73
73
  this.violations = [];
74
+ this.includeBuildFiles = options.includeBuildFiles ?? false;
74
75
  }
75
76
  async scan() {
76
77
  this.walk(this.directory);
@@ -85,7 +86,8 @@ class Detective {
85
86
  const stat = fs.statSync(filePath);
86
87
  if (stat.isDirectory()) {
87
88
  // Ignore common build/config directories
88
- if (['node_modules', '.git', '.jstar', 'dist', 'coverage'].includes(file)) {
89
+ const ignoredDirs = ['node_modules', '.git', '.jstar', 'dist', 'coverage', '.next'];
90
+ if (!this.includeBuildFiles && ignoredDirs.includes(file)) {
89
91
  continue;
90
92
  }
91
93
  this.walk(filePath);
@@ -156,8 +158,10 @@ class Detective {
156
158
  exports.Detective = Detective;
157
159
  // CLI Integration
158
160
  if (require.main === module) {
161
+ const args = process.argv.slice(2);
162
+ const includeBuildFiles = args.includes('--all');
159
163
  // Scan current directory by default
160
- const detective = new Detective(process.cwd());
164
+ const detective = new Detective(process.cwd(), { includeBuildFiles });
161
165
  detective.scan();
162
166
  detective.report();
163
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jstar-reviewer",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Local-First, Context-Aware AI Code Reviewer - Works with any language",
5
5
  "bin": {
6
6
  "jstar": "bin/jstar.js"
@@ -50,8 +50,11 @@ const FILE_RULES: Rule[] = [
50
50
 
51
51
  export class Detective {
52
52
  violations: Violation[] = [];
53
+ private includeBuildFiles: boolean;
53
54
 
54
- constructor(private directory: string) { }
55
+ constructor(private directory: string, options: { includeBuildFiles?: boolean } = {}) {
56
+ this.includeBuildFiles = options.includeBuildFiles ?? false;
57
+ }
55
58
 
56
59
  async scan(): Promise<Violation[]> {
57
60
  this.walk(this.directory);
@@ -67,7 +70,8 @@ export class Detective {
67
70
 
68
71
  if (stat.isDirectory()) {
69
72
  // Ignore common build/config directories
70
- if (['node_modules', '.git', '.jstar', 'dist', 'coverage'].includes(file)) {
73
+ const ignoredDirs = ['node_modules', '.git', '.jstar', 'dist', 'coverage', '.next'];
74
+ if (!this.includeBuildFiles && ignoredDirs.includes(file)) {
71
75
  continue;
72
76
  }
73
77
  this.walk(filePath);
@@ -142,8 +146,11 @@ export class Detective {
142
146
 
143
147
  // CLI Integration
144
148
  if (require.main === module) {
149
+ const args = process.argv.slice(2);
150
+ const includeBuildFiles = args.includes('--all');
151
+
145
152
  // Scan current directory by default
146
- const detective = new Detective(process.cwd());
153
+ const detective = new Detective(process.cwd(), { includeBuildFiles });
147
154
  detective.scan();
148
155
  detective.report();
149
156
  }