prjct-cli 1.6.0 → 1.6.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 +25 -0
- package/core/bus/bus.ts +6 -4
- package/dist/bin/prjct.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.1] - 2026-02-06
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- replace console.error with logger in bus.ts (PRJ-72) (#122)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.6.1] - 2026-02-06
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **Replace console.error with logger in bus.ts**: Event bus now uses the centralized `log` module instead of raw `console.error` for error logging. Silent catch block in `logEvent()` now logs at debug level with `getErrorMessage()` context. Production remains quiet by default; enable with `PRJCT_DEBUG=1`.
|
|
15
|
+
|
|
16
|
+
### Test Plan
|
|
17
|
+
|
|
18
|
+
#### For QA
|
|
19
|
+
1. Run `PRJCT_DEBUG=1 bun test` — verify bus errors appear with `[prjct:error]` prefix
|
|
20
|
+
2. Run `bun test` (no debug) — verify bus errors are silent by default
|
|
21
|
+
3. Trigger a listener error — verify it logs via logger, not console.error
|
|
22
|
+
|
|
23
|
+
#### For Users
|
|
24
|
+
- **What changed:** Error logging in event bus uses centralized logger
|
|
25
|
+
- **How to use:** `PRJCT_DEBUG=1` to see bus errors; quiet by default
|
|
26
|
+
- **Breaking changes:** None
|
|
27
|
+
|
|
3
28
|
## [1.6.0] - 2026-02-06
|
|
4
29
|
|
|
5
30
|
### Features
|
package/core/bus/bus.ts
CHANGED
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
import fs from 'node:fs/promises'
|
|
11
11
|
import path from 'node:path'
|
|
12
|
+
import { getErrorMessage } from '../errors'
|
|
12
13
|
import pathManager from '../infrastructure/path-manager'
|
|
13
14
|
import { type EventCallback, type EventData, EventTypes } from '../types'
|
|
15
|
+
import log from '../utils/logger'
|
|
14
16
|
|
|
15
17
|
class EventBus {
|
|
16
18
|
private listeners: Map<string, Set<EventCallback>>
|
|
@@ -108,7 +110,7 @@ class EventBus {
|
|
|
108
110
|
// Log any errors
|
|
109
111
|
results.forEach((result) => {
|
|
110
112
|
if (result.status === 'rejected') {
|
|
111
|
-
|
|
113
|
+
log.error(`Event listener error for ${event}:`, result.reason)
|
|
112
114
|
}
|
|
113
115
|
})
|
|
114
116
|
|
|
@@ -169,7 +171,7 @@ class EventBus {
|
|
|
169
171
|
await result
|
|
170
172
|
}
|
|
171
173
|
} catch (error) {
|
|
172
|
-
|
|
174
|
+
log.error('Event callback error:', error)
|
|
173
175
|
throw error
|
|
174
176
|
}
|
|
175
177
|
}
|
|
@@ -188,8 +190,8 @@ class EventBus {
|
|
|
188
190
|
// Append event
|
|
189
191
|
const line = `${JSON.stringify(eventData)}\n`
|
|
190
192
|
await fs.appendFile(eventsPath, line)
|
|
191
|
-
} catch (
|
|
192
|
-
|
|
193
|
+
} catch (error) {
|
|
194
|
+
log.debug('Failed to log event:', getErrorMessage(error))
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
197
|
|
package/dist/bin/prjct.mjs
CHANGED
|
@@ -28604,7 +28604,7 @@ var require_package = __commonJS({
|
|
|
28604
28604
|
"package.json"(exports, module) {
|
|
28605
28605
|
module.exports = {
|
|
28606
28606
|
name: "prjct-cli",
|
|
28607
|
-
version: "1.6.
|
|
28607
|
+
version: "1.6.1",
|
|
28608
28608
|
description: "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
|
|
28609
28609
|
main: "core/index.ts",
|
|
28610
28610
|
bin: {
|