Skip to content

feat: add query CLI command for querying .nitpicker archives#58

Merged
YusukeHirao merged 5 commits intomainfrom
claude/add-query-cli-command-a34tb
Mar 16, 2026
Merged

feat: add query CLI command for querying .nitpicker archives#58
YusukeHirao merged 5 commits intomainfrom
claude/add-query-cli-command-a34tb

Conversation

@YusukeHirao
Copy link
Copy Markdown
Member

Exposes @nitpicker/query functions via CLI sub-commands (summary, pages,
page-detail, html, links, resources, images, violations, duplicates,
mismatches, headers, resource-referrers). Outputs JSON to stdout.

https://claude.ai/code/session_01RgcxfZHjSbBBcT7df5BymS

claude added 5 commits March 13, 2026 03:49
Exposes @nitpicker/query functions via CLI sub-commands (summary, pages,
page-detail, html, links, resources, images, violations, duplicates,
mismatches, headers, resource-referrers). Outputs JSON to stdout.

https://claude.ai/code/session_01RgcxfZHjSbBBcT7df5BymS
- Add toHaveBeenCalledWith assertions to dispatch-query tests for all sub-commands
- Add dispatchQuery argument verification and ArchiveManager.open failure test to query command tests
- Remove duplicate QueryFlags interface, reuse InferFlags<typeof commandDef.flags>
- Wrap finally close in try/catch to prevent masking original errors
- Use `as const satisfies` for VALID_SUB_COMMANDS type safety
- Add test cases for duplicates with custom field/limit and mismatches with limit/offset

https://claude.ai/code/session_01RgcxfZHjSbBBcT7df5BymS
… CLI

- Add default exhaustive check (never) to dispatchQuery and mapFlagsToQueryOptions switch statements
- Add test for html sub-command with maxLength flag
- Add test for headers sub-command with missingOnly flag
- Add tests for relative and absolute file path resolution in query command

https://claude.ai/code/session_01RgcxfZHjSbBBcT7df5BymS
…d CLAUDE

The query command was added in the previous commits but documentation
was not updated. This adds comprehensive usage documentation including
all 12 sub-commands, option tables, and examples.

https://claude.ai/code/session_01RgcxfZHjSbBBcT7df5BymS
…command-a34tb

# Conflicts:
#	packages/@nitpicker/cli/package.json
#	yarn.lock
@YusukeHirao YusukeHirao merged commit 86cf3a3 into main Mar 16, 2026
3 checks passed
@YusukeHirao YusukeHirao deleted the claude/add-query-cli-command-a34tb branch March 16, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants