Repository navigation
chore(release): version packages - #61
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@klnap/cache-invalidation@0.5.0
Minor Changes
f328658: Framework-agnostic, multi-target cache invalidation.
New
{ secret },{ secret, decode }and{ adapter }. A decoder converts a Standard Webhooks payload that is not CloudEvents; an adapter owns authentication and normalization for any other protocol, such as Sanity or Contentful. Decoder and adapter output is validated as untrusted data and bounded bymaxEvents,maxNormalizedBytesandadapterTimeoutMs. The README includes complete Contentful and Sanity adapters, tested against signatures from the providers' official SDKs.@klnap/cache-invalidation/consumerswithcreateCacheConsumer(): schemas, rules and application-owned executors with no HTTP, Payload or Next.js dependency, and directconsume(events).createNextCacheConsumer()for direct Next.js consumption. The Route Handler is now the same consumer behind the shared receiver.FILTER_FAILED) instead of skipping it.webhooksconfiguration builds the native dispatcher;collections: trueandglobals: trueselect models explicitly;excluderemoves models from every path; per-targetfilter: { collections, globals }routes by model, including media events through their affected models; functional filters cover models shared by several sites;media: falseturns dependency handling off.CacheForbiddenErroris exported.consume()throws it for a disallowed event source.Breaking (pre-1.0)
/dispatchers,/dispatchers/httpand/consumers/httpare replaced by/webhooks.http()is nowcreateWebhookDispatcher(), and theHttp*types areWebhook*.createCacheInvalidationHandler({ cache })replaces{ config: cache.config }.defineCache()no longer returns aconfigproperty, andDefineCacheInputis nowCacheConfig.hooksis removed, and setting it throws. All lifecycle hooks are installed; usefilterto ignore operations.excludeFieldslists combine across the plugin, central, local and media levels instead of the local list replacing the others.resolveExcludeFieldsandreadCacheInvalidationExcludeFieldsare removed from the Payload entrypoint.webhooksanddispatcherwhen enabled.Fixes
maxEventsandmaxNormalizedBytesto every batch, including batches received from a native webhook; the stricter of the handler's and the consumer's limits wins.Uint8Array([1])and{ "0": 1 }as the same data, and comparing duplicate events with very deep data could exhaust the stack.customindependently of the resolved configuration.media.ignoreBOM: true, so a leading byte order mark cannot make different bytes verify as the signed text, and the Contentful adapter reads the signed-header list exactly as the SDK does. The library's native receiver verifies raw bytes and was not affected.