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.1.0 to 0.2.0

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## 0.2.0 (2024-07-23)
### 🚀 Features
- **create-query:** throw on error ([205a60b](https://github.com/anymaniax/cf-workers-query/commit/205a60b))
### ❤️ Thank You
- Victor Bury
## 0.1.0 (2024-07-23)

@@ -2,0 +13,0 @@

9

nx.json

@@ -32,3 +32,10 @@ {

}
]
],
"release": {
"changelog": {
"workspaceChangelog": {
"createRelease": "github"
}
}
}
}

2

package.json
{
"name": "cf-workers-query",
"version": "0.1.0",
"version": "0.2.0",
"license": "MIT",

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

@@ -19,2 +19,3 @@ import { getCFExecutionContext } from './context';

cacheName?: string;
throwOnError?: boolean;
};

@@ -32,2 +33,3 @@

cacheName,
throwOnError,
}: CreateQuery<Data, Error>): Promise<{

@@ -88,2 +90,3 @@ data: Data | null;

retryDelay,
throwOnError,
});

@@ -99,2 +102,6 @@

} catch (e) {
if (throwOnError) {
throw e;
}
return { data: null, error: e as Error, invalidate: () => undefined };

@@ -127,2 +134,3 @@ }

retryDelay,
throwOnError,
}: {

@@ -133,2 +141,3 @@ queryFn: () => Promise<Data>;

retryDelay?: RetryDelay<Error>;
throwOnError?: boolean;
}): Promise<{ data: Data | null; error: Error | null }> => {

@@ -158,4 +167,8 @@ try {

if (throwOnError) {
throw e;
}
return { data: null, error: e as Error };
}
};
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