feat(cli): add packument show command with field projection#22
Merged
feat(cli): add packument show command with field projection#22
Conversation
Extend the projection module to support bracket notation in paths: - time["4.17.21"] for accessing keys with special characters - versions["1.0.0"].dist.integrity for mixed notation - items[0] for numeric array access This enables field selection for packument lookups where version strings contain dots and other special characters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new packument show command for displaying cached packuments with optional field projection: - Parse name@version syntax for version-specific output - Support --select for field projection using selector syntax - Handle bracket notation for version keys (time["4.17.21"]) - Unwrap single-field results for cleaner output Useful for: - Build verification (checking integrity hashes) - Audit scripts (checking publish dates) - Quick lookups (version counts, tarball URLs) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Packument show command: display cached packuments with optional field projection
packument show <name[@version]>command with--selectoptionname@versionsyntax for scoped and unscoped packagesBracket notation in selector paths: access keys containing dots or special characters
time["4.17.21"]syntax for version strings with dotsversions["1.0.0"].dist.integritymixed notation supportitems[0]