@techdivision/opencode-time-tracking 0.8.0 → 0.8.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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/services/ConfigLoader.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.8.1] - 2025-03-01
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fix `user_email` resolution to read from `.opencode/.env` instead of project root `.env`
|
|
10
|
+
- Previously fell back to system username when `.env` was not found in project root
|
|
11
|
+
|
|
5
12
|
## [0.8.0] - 2025-03-01
|
|
6
13
|
|
|
7
14
|
### Added
|
package/package.json
CHANGED
|
@@ -61,7 +61,7 @@ async function loadEnvValue(
|
|
|
61
61
|
*
|
|
62
62
|
* The `user_email` is resolved from (in order of priority):
|
|
63
63
|
* 1. `OPENCODE_USER_EMAIL` system environment variable
|
|
64
|
-
* 2. `OPENCODE_USER_EMAIL` from
|
|
64
|
+
* 2. `OPENCODE_USER_EMAIL` from `.opencode/.env` file
|
|
65
65
|
* 3. System username (fallback)
|
|
66
66
|
*/
|
|
67
67
|
export class ConfigLoader {
|
|
@@ -94,9 +94,9 @@ export class ConfigLoader {
|
|
|
94
94
|
|
|
95
95
|
// Resolve user_email with fallback chain:
|
|
96
96
|
// 1. System environment variable
|
|
97
|
-
// 2.
|
|
97
|
+
// 2. .opencode/.env file
|
|
98
98
|
// 3. System username
|
|
99
|
-
const envValue = await loadEnvValue(directory
|
|
99
|
+
const envValue = await loadEnvValue(`${directory}/.opencode`, ENV_USER_EMAIL)
|
|
100
100
|
const userEmail =
|
|
101
101
|
process.env[ENV_USER_EMAIL] || envValue || userInfo().username
|
|
102
102
|
|