mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-16 19:44:14 +00:00
Sync package-lock.json to 0.9.9 and fix flaky menubar test
package-lock.json was stale at 0.9.7 with engines >=22; now matches package.json 0.9.9 / >=22.13.0. The menubar-json CLI test used hardcoded 10:00/11:00 UTC timestamps which fall in the "future" when the test runs before those hours, causing the menubar's todayRange (start..now) to exclude them. Use timestamps relative to now instead.
This commit is contained in:
parent
54e3123cc0
commit
6a12d818d9
2 changed files with 14 additions and 9 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "codeburn",
|
||||
"version": "0.9.7",
|
||||
"version": "0.9.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "codeburn",
|
||||
"version": "0.9.7",
|
||||
"version": "0.9.9",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^5.4.1",
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
"vitest": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
"node": ">=22.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@alcalzone/ansi-tokenize": {
|
||||
|
|
|
|||
|
|
@ -55,16 +55,21 @@ describe('codeburn status --format menubar-json', () => {
|
|||
const projectDir = join(home, '.claude', 'projects', 'myapp')
|
||||
await mkdir(projectDir, { recursive: true })
|
||||
|
||||
const today = new Date()
|
||||
const ymd = `${today.getUTCFullYear()}-${String(today.getUTCMonth() + 1).padStart(2, '0')}-${String(today.getUTCDate()).padStart(2, '0')}`
|
||||
const now = new Date()
|
||||
const h = now.getUTCHours()
|
||||
const base = h >= 2 ? new Date(now.getTime() - 2 * 3600_000) : new Date(now.getTime() - h * 3600_000 - 60_000)
|
||||
const ts1 = base.toISOString().replace(/\.\d+Z$/, 'Z')
|
||||
const ts2 = new Date(base.getTime() + 60_000).toISOString().replace(/\.\d+Z$/, 'Z')
|
||||
const ts3 = new Date(base.getTime() + 120_000).toISOString().replace(/\.\d+Z$/, 'Z')
|
||||
const ts4 = new Date(base.getTime() + 180_000).toISOString().replace(/\.\d+Z$/, 'Z')
|
||||
|
||||
await writeFile(
|
||||
join(projectDir, 'session.jsonl'),
|
||||
[
|
||||
userLine('s1', `${ymd}T10:00:00Z`),
|
||||
assistantLine('s1', `${ymd}T10:01:00Z`, 'msg-1'),
|
||||
userLine('s1', `${ymd}T11:00:00Z`),
|
||||
assistantLine('s1', `${ymd}T11:01:00Z`, 'msg-2'),
|
||||
userLine('s1', ts1),
|
||||
assistantLine('s1', ts2, 'msg-1'),
|
||||
userLine('s1', ts3),
|
||||
assistantLine('s1', ts4, 'msg-2'),
|
||||
].join('\n'),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue