Skip to content

Commit 88e60e6

Browse files
committed
Lint
1 parent adce6ea commit 88e60e6

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

packages/nextjs-cache-handler/src/handlers/cache-handler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,10 @@ export class CacheHandler implements NextCacheHandler {
663663
"prepare",
664664
`Error: ${result.reason}`,
665665
);
666-
} else if (result.status === "fulfilled" && result.value !== undefined) {
666+
} else if (
667+
result.status === "fulfilled" &&
668+
result.value !== undefined
669+
) {
667670
console.info(
668671
"[CacheHandler] [handler: %s] [method: %s] %s",
669672
handlersList[index]?.name ?? `unknown-${index}`,

packages/nextjs-cache-handler/src/handlers/cache-handler.types.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export type CacheHandlerParametersGetWithTags = [
5050
* Context information provided during cache set operations.
5151
*/
5252
export type SetContext = {
53-
5453
/**
5554
* When true, the cache write should only occur if the key does not already exist.
5655
* Cache handlers should use non-destructive write operations (e.g., Redis NX)
@@ -154,7 +153,11 @@ export type Handler = {
154153
*
155154
* Use the absolute time (`expireAt`) to set and expiration time for the cache entry in your cache store to be in sync with the file system cache.
156155
*/
157-
set: (key: string, value: CacheHandlerValue, ctx?: SetContext) => Promise<void>;
156+
set: (
157+
key: string,
158+
value: CacheHandlerValue,
159+
ctx?: SetContext,
160+
) => Promise<void>;
158161
/**
159162
* Deletes all cache entries that are associated with the specified tag.
160163
* See [fetch `options.next.tags` and `revalidateTag` ↗](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag)

packages/nextjs-cache-handler/src/helpers/getClientInfoTag.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ describe("getClientInfoTag", () => {
2121
expect(result1).toBe(result2);
2222
});
2323
});
24-

packages/nextjs-cache-handler/src/helpers/getClientInfoTag.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { resolve } from "node:path";
33

44
function getPackageVersion(): string | undefined {
55
try {
6-
const packageJsonPath = resolve(__dirname, '..', '..', 'package.json')
7-
const content = readFileSync(packageJsonPath, 'utf-8')
8-
const packageJson = JSON.parse(content) as { version: string }
9-
return packageJson.version
6+
const packageJsonPath = resolve(__dirname, "..", "..", "package.json");
7+
const content = readFileSync(packageJsonPath, "utf-8");
8+
const packageJson = JSON.parse(content) as { version: string };
9+
return packageJson.version;
1010
} catch {
11-
return undefined
11+
return undefined;
1212
}
1313
}
1414

@@ -40,4 +40,3 @@ export function getClientInfoTag(): string {
4040
}
4141
return "nextjs-cache-handler";
4242
}
43-

0 commit comments

Comments
 (0)