Add compact metadata fetch input - #276
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
FetchMetadataInputmetadataInputFromResolvedArchiveas the explicit archive-reader adapterResolvedMetadataresults and bump the fetched entity schema to version 4Why
The previous input accepted
ResolvedMetadataor anything carrying it, which made archive-reader's rich result entity double as the metadata-fetcher's query model. Providers only understood a small subset of those fields, while the public API implied that covers, descriptions, subjects, layout metadata, and format-specific values were meaningful lookup inputs.This change makes the intended asymmetry explicit: a small lookup-and-matching input goes into providers, and rich catalog metadata comes back.
Breaking changes
This is a clean API break and requires a semver-major release:
fetchMetadataandMetadataProvider.searchnow accept onlyFetchMetadataInputscoreMetadataCandidateacceptsFetchMetadataInputplus a rich candidateauthors,publisher, andpublishedYearprojectGutenbergLookupFromMetadatais renamed toprojectGutenbergLookupFromInputpublisher/publishedYearquery parametersValidation
npm run tsc— all 8 TypeScript projects passednpm test --workspace @prose-reader/metadata-fetcher— 98 tests passednpm test --workspace prose-reader-metadata-fetcher-api— 32 tests passednpm run build --workspace @prose-reader/metadata-fetcher— production build passed