@prismakit/redis 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismakit/redis",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Redis CacheAdapter for @prismakit/core",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -24,10 +24,10 @@
24
24
  "README.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@prismakit/core": "3.1.0"
27
+ "@prismakit/core": "3.2.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@prismakit/core": ">=3.1.0 <4",
30
+ "@prismakit/core": ">=3.2.0 <4",
31
31
  "ioredis": ">=5.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -1,12 +1,23 @@
1
1
  import { afterAll, describe, expect, it } from 'vitest';
2
2
  import { RedisCacheAdapter } from '../redis-cache-adapter';
3
3
 
4
- const hasRedis = Boolean(process.env.REDIS_URL);
4
+ function requireRedisUrl(): string | undefined {
5
+ const value = process.env.REDIS_URL;
6
+ if (value) return value;
7
+ if (process.env.FORCE_INTEGRATION === '1' || process.env.CI === 'true') {
8
+ throw new Error(
9
+ '[PrismaKit] REDIS_URL is required for integration tests when CI=true or FORCE_INTEGRATION=1',
10
+ );
11
+ }
12
+ return undefined;
13
+ }
5
14
 
6
- describe.skipIf(!hasRedis)('RedisCacheAdapter (integration)', () => {
15
+ const redisUrl = requireRedisUrl();
16
+
17
+ describe.skipIf(!redisUrl)('RedisCacheAdapter (integration)', () => {
7
18
  const prefix = `pk-it-${Date.now()}`;
8
19
  const adapter = new RedisCacheAdapter({
9
- url: process.env.REDIS_URL,
20
+ url: redisUrl,
10
21
  prefix,
11
22
  });
12
23