feat(views) Relax! 🛋️ views are a useful analysis tool for datasets of unstructured metadata#21
Conversation
Introduces a view abstraction over cached packument data: - View: defines origin + projection over cached data - ViewStore: persists view definitions as JSON - Projection: jq-like field selection with transforms - Query: stream cached packuments through projections - Join: O(1) joins between views using cache key construction Views enable SQL-like queries over registry data without loading everything into memory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Export encodeOrigin from cache module for view system - Add config directory to XDG dirs for view storage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CLI commands for the view system: - view define: create named views with origin and projection - view list: show all defined views - view show: display view configuration - view delete: remove a view definition - view query: stream records from a view - view join: join two views on package name Example usage: _all_docs view define npm-pkgs --origin npm --select 'name, versions|keys' _all_docs view query npm-pkgs --limit 100 _all_docs view join npm-pkgs cgr-pkgs --inner Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add example: find packages with install scripts but no node-gyp dep - Add example: coverage gap analysis between registries - Remove generic "private-pkgs" examples that didn't show real value Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace generic private registry examples with: - Supply chain security: packages with install scripts but no node-gyp - Graph extraction: deps.dev style dependency edges 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.
View system for registry data queries: CouchDB and
jqinspired operations over cached packuments without loading everything into memoryViewclass defines origin filter + field projectionViewStorepersists definitions as JSON in XDG config directoryqueryViewstreams cached packuments through projectionsjoinViewsperforms O(1) joins by constructing cache keys directlyProjection system with
jq-inspired syntax: supports field selection, transforms, and aliasesrepository.url)versions|keys,dependencies|length)versions|keys as versionList)time["4.17.21"])CLI commands for view management: full CRUD plus query and join operations
view definecreates named views with--origin/--registryand--selectview querystreams projected records with--limit,--where,--progressview joinsupports left, inner, right, and full join typesview list,view show,view deletefor managementCache module exports for view integration: exposes internals needed by view system
encodeOriginfor consistent origin key generationconfigto XDG directories for view storage