New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cf-workers-query

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-workers-query - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

src/chunk-PF5BVFLN.js

15

CHANGELOG.md

@@ -0,1 +1,16 @@

## 0.8.0 (2025-01-02)
### 🚀 Features
- **create-query:** new revalidate mode probabilistic ([264b6b9](https://github.com/anymaniax/cf-workers-query/commit/264b6b9))
### 🩹 Fixes
- **build:** better handling commonjs ([a0c85f1](https://github.com/anymaniax/cf-workers-query/commit/a0c85f1))
### ❤️ Thank You
- Victor Bury
## 0.7.1 (2024-09-26)

@@ -2,0 +17,0 @@

2

package.json
{
"name": "cf-workers-query",
"version": "0.7.1",
"version": "0.8.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Automatically cache and revalidate data in Cloudflare Workers. Using the Cache API and Execution Context",

@@ -38,3 +38,3 @@ # Cf-Workers-Query

});
return new Response(JSON.stringify(data), {

@@ -70,3 +70,3 @@ headers: {

},
cacheKey: (ctx) => ['user', ctx.req.param('id')],
cacheKey: (ctx) => ['user', ctx.req.param('id')],
cacheTime: 60 * 60,

@@ -106,2 +106,8 @@ staleTime: 60

### revalidateMode
Type: default | probabilistic
Description: Optional. If probabilistic if data is stale will use a probabilistic function to maybe revalidate data. Based on https://blog.cloudflare.com/sometimes-i-cache
### retry

@@ -108,0 +114,0 @@ Type: number | ((failureCount: number, error: Error) => boolean)

@@ -1,3 +0,3 @@

import { Q as QueryKey } from './create-query-njGTTuc4.js';
export { C as CacheApiAdaptor, c as createQuery, d as defineCFExecutionContext, g as getCFExecutionContext } from './create-query-njGTTuc4.js';
import { Q as QueryKey } from './create-query-BP--HoKq.js';
export { C as CacheApiAdaptor, c as createQuery, d as defineCFExecutionContext, g as getCFExecutionContext } from './create-query-BP--HoKq.js';

@@ -4,0 +4,0 @@ declare const invalidateQuery: ({ queryKey, cacheName, }: {

@@ -7,3 +7,3 @@ import {

getCFExecutionContext
} from "./chunk-2FX6XZNP.js";
} from "./chunk-PF5BVFLN.js";

@@ -10,0 +10,0 @@ // src/lib/invalidate-query.ts

import { MiddlewareHandler, Handler, Context } from 'hono';
import { a as CreateQuery, Q as QueryKey } from '../create-query-njGTTuc4.js';
import { a as CreateQuery, Q as QueryKey } from '../create-query-BP--HoKq.js';

@@ -4,0 +4,0 @@ type CacheKey = QueryKey | ((ctx: Context) => QueryKey);

import {
__name,
createQuery
} from "../chunk-2FX6XZNP.js";
} from "../chunk-PF5BVFLN.js";

@@ -6,0 +6,0 @@ // node_modules/hono/dist/http-exception.js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc