jstar-reviewer 2.1.0 → 2.1.1

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.
@@ -75,9 +75,11 @@ function ensureSetup() {
75
75
  }
76
76
  // Run setup check
77
77
  ensureSetup();
78
- // Load .env.local first, then .env
79
- dotenv_1.default.config({ path: ".env.local" });
80
- dotenv_1.default.config();
78
+ // Load .env.local first, then .env - USE ABSOLUTE PATHS based on CWD
79
+ // This is critical for global CLI usage where the package is installed elsewhere
80
+ const cwd = process.cwd();
81
+ dotenv_1.default.config({ path: path.join(cwd, ".env.local") });
82
+ dotenv_1.default.config({ path: path.join(cwd, ".env") });
81
83
  /**
82
84
  * Default fallback values.
83
85
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jstar-reviewer",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Local-First, Context-Aware AI Code Reviewer - Works with any language",
5
5
  "bin": {
6
6
  "jstar": "bin/jstar.js"
package/scripts/config.ts CHANGED
@@ -42,9 +42,11 @@ function ensureSetup() {
42
42
  // Run setup check
43
43
  ensureSetup();
44
44
 
45
- // Load .env.local first, then .env
46
- dotenv.config({ path: ".env.local" });
47
- dotenv.config();
45
+ // Load .env.local first, then .env - USE ABSOLUTE PATHS based on CWD
46
+ // This is critical for global CLI usage where the package is installed elsewhere
47
+ const cwd = process.cwd();
48
+ dotenv.config({ path: path.join(cwd, ".env.local") });
49
+ dotenv.config({ path: path.join(cwd, ".env") });
48
50
 
49
51
  /**
50
52
  * Default fallback values.