Repository navigation
Conversation
…file The flat log stores the level uppercased and parseFlatLine lowercased it back, so startGroup, startGroupCollapsed, endGroup, profileEnd and timeEnd came back as startgroup etc. from readAll()/readFiltered(), unlike the live stream. Map those five CDP types back to their canonical spelling. Fixes #1143
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The header and describe title covered only length truncation, and two comments pointed at a LEVEL_DISPLAY map that no longer exists.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1143
LogFileWriterstores the level uppercased, andparseFlatLinelowercased it back. SostartGroup,startGroupCollapsed,endGroup,profileEndandtimeEndcame back all-lowercase fromreadAll()/readFiltered(). The parser now maps those 5 CDP types back to their canonical spelling. The on-disk format is unchanged. A test inlog-file-writer-level.test.tspins all 5 throughreadAll()andreadFiltered()(fails with the fix reverted).The impact today is limited to the contract.
readAll()'s only production caller is the console socket's backlog replay, and nothing has readconsoleSocketUrlsince #66 (filed as #1575).readFiltered()has only test callers.No docs update needed.
Verification
Two throwaway vitest probes, neither committed:
Runtime.consoleAPICalledtypes written through the realLogFileWriter, then compared with whatreadAll()andreadFiltered({ level })return.consoleSocketUrl, emits them again, and compares backlog levels with live levels.Before (fix reverted):
After:
Tests 2 passed (2). Backlog levels equal live levels for all 18 types.Checks:
npx tsc --build: exit 0vitest run test/debugger test/*js-runtime-debugger*.test.ts: 23 files / 252 tests passed