@expo/entity-secondary-cache-redis 0.60.0 → 0.61.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.
@@ -1,5 +1,6 @@
1
- import { EntityConfiguration, GenericSecondaryEntityCache } from '@expo/entity';
2
- import { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
1
+ import type { EntityConfiguration } from '@expo/entity';
2
+ import { GenericSecondaryEntityCache } from '@expo/entity';
3
+ import type { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
3
4
  /**
4
5
  * A redis GenericSecondaryEntityCache.
5
6
  */
@@ -1,15 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedisSecondaryEntityCache = void 0;
4
- const entity_1 = require("@expo/entity");
5
- const entity_cache_adapter_redis_1 = require("@expo/entity-cache-adapter-redis");
1
+ import { GenericSecondaryEntityCache } from '@expo/entity';
2
+ import { GenericRedisCacher } from '@expo/entity-cache-adapter-redis';
6
3
  /**
7
4
  * A redis GenericSecondaryEntityCache.
8
5
  */
9
- class RedisSecondaryEntityCache extends entity_1.GenericSecondaryEntityCache {
6
+ export class RedisSecondaryEntityCache extends GenericSecondaryEntityCache {
10
7
  constructor(entityConfiguration, genericRedisCacheContext, constructRedisKey) {
11
- super(new entity_cache_adapter_redis_1.GenericRedisCacher(genericRedisCacheContext, entityConfiguration), constructRedisKey);
8
+ super(new GenericRedisCacher(genericRedisCacheContext, entityConfiguration), constructRedisKey);
12
9
  }
13
10
  }
14
- exports.RedisSecondaryEntityCache = RedisSecondaryEntityCache;
15
- //# sourceMappingURL=RedisSecondaryEntityCache.js.map
@@ -2,4 +2,4 @@
2
2
  * @packageDocumentation
3
3
  * @module @expo/entity-secondary-cache-redis
4
4
  */
5
- export * from './RedisSecondaryEntityCache';
5
+ export * from './RedisSecondaryEntityCache.ts';
@@ -1,23 +1,6 @@
1
- "use strict";
2
1
  /* eslint-disable tsdoc/syntax */
3
2
  /**
4
3
  * @packageDocumentation
5
4
  * @module @expo/entity-secondary-cache-redis
6
5
  */
7
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
- if (k2 === undefined) k2 = k;
9
- var desc = Object.getOwnPropertyDescriptor(m, k);
10
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
- desc = { enumerable: true, get: function() { return m[k]; } };
12
- }
13
- Object.defineProperty(o, k2, desc);
14
- }) : (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- o[k2] = m[k];
17
- }));
18
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- __exportStar(require("./RedisSecondaryEntityCache"), exports);
23
- //# sourceMappingURL=index.js.map
6
+ export * from "./RedisSecondaryEntityCache.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/entity-secondary-cache-redis",
3
- "version": "0.60.0",
3
+ "version": "0.61.0",
4
4
  "description": "Redis secondary cache for @expo/entity",
5
5
  "files": [
6
6
  "build",
@@ -19,22 +19,23 @@
19
19
  "integration": "yarn integration:all --rootDir $(pwd)"
20
20
  },
21
21
  "engines": {
22
- "node": ">=16"
22
+ "node": ">=18"
23
23
  },
24
24
  "keywords": [
25
25
  "entity"
26
26
  ],
27
27
  "author": "Expo",
28
28
  "license": "MIT",
29
+ "type": "module",
29
30
  "dependencies": {
30
- "@expo/entity": "^0.60.0",
31
- "@expo/entity-cache-adapter-redis": "^0.60.0"
31
+ "@expo/entity": "^0.61.0",
32
+ "@expo/entity-cache-adapter-redis": "^0.61.0"
32
33
  },
33
34
  "devDependencies": {
35
+ "@expo/nullthrows": "2.1.0",
34
36
  "@jest/globals": "30.2.0",
35
37
  "ioredis": "5.10.0",
36
- "nullthrows": "1.1.1",
37
38
  "typescript": "5.9.3"
38
39
  },
39
- "gitHead": "e36dc81bd22ce92a7a11ccd1976173b464da5e76"
40
+ "gitHead": "a6f1dd723262cb1c3e8022d3a8799c17602cd15b"
40
41
  }
@@ -1,5 +1,7 @@
1
- import { EntityConfiguration, GenericSecondaryEntityCache } from '@expo/entity';
2
- import { GenericRedisCacheContext, GenericRedisCacher } from '@expo/entity-cache-adapter-redis';
1
+ import type { EntityConfiguration } from '@expo/entity';
2
+ import { GenericSecondaryEntityCache } from '@expo/entity';
3
+ import type { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
4
+ import { GenericRedisCacher } from '@expo/entity-cache-adapter-redis';
3
5
 
4
6
  /**
5
7
  * A redis GenericSecondaryEntityCache.
@@ -1,27 +1,22 @@
1
- import {
2
- AuthorizationResultBasedEntityLoader,
3
- EntityConstructionUtils,
4
- EntitySecondaryCacheLoader,
5
- mapMapAsync,
6
- ViewerContext,
7
- } from '@expo/entity';
8
- import {
9
- GenericRedisCacheContext,
10
- RedisCacheInvalidationStrategy,
11
- } from '@expo/entity-cache-adapter-redis';
1
+ import type { AuthorizationResultBasedEntityLoader, EntityConstructionUtils } from '@expo/entity';
2
+ import { EntitySecondaryCacheLoader, mapMapAsync, ViewerContext } from '@expo/entity';
3
+ import type { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
4
+ import { RedisCacheInvalidationStrategy } from '@expo/entity-cache-adapter-redis';
5
+ import nullthrows from '@expo/nullthrows';
12
6
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
13
- import Redis from 'ioredis';
14
- import nullthrows from 'nullthrows';
7
+ import { Redis } from 'ioredis';
15
8
  import { URL } from 'url';
16
9
 
17
- import { RedisSecondaryEntityCache } from '../RedisSecondaryEntityCache';
10
+ import { RedisSecondaryEntityCache } from '../RedisSecondaryEntityCache.ts';
11
+ import type {
12
+ RedisTestEntityFields,
13
+ RedisTestEntityPrivacyPolicy,
14
+ } from '../__testfixtures__/RedisTestEntity.ts';
18
15
  import {
19
16
  RedisTestEntity,
20
17
  redisTestEntityConfiguration,
21
- RedisTestEntityFields,
22
- RedisTestEntityPrivacyPolicy,
23
- } from '../__testfixtures__/RedisTestEntity';
24
- import { createRedisIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createRedisIntegrationTestEntityCompanionProvider';
18
+ } from '../__testfixtures__/RedisTestEntity.ts';
19
+ import { createRedisIntegrationTestEntityCompanionProvider } from '../__testfixtures__/createRedisIntegrationTestEntityCompanionProvider.ts';
25
20
 
26
21
  class TestViewerContext extends ViewerContext {}
27
22
 
@@ -1,12 +1,11 @@
1
+ import type { EntityCompanionDefinition, ViewerContext } from '@expo/entity';
1
2
  import {
2
3
  AlwaysAllowPrivacyPolicyRule,
3
4
  Entity,
4
- EntityCompanionDefinition,
5
5
  EntityConfiguration,
6
6
  EntityPrivacyPolicy,
7
7
  StringField,
8
8
  UUIDField,
9
- ViewerContext,
10
9
  } from '@expo/entity';
11
10
 
12
11
  export type RedisTestEntityFields = {
@@ -1,12 +1,7 @@
1
- import {
2
- NoOpEntityMetricsAdapter,
3
- IEntityMetricsAdapter,
4
- EntityCompanionProvider,
5
- } from '@expo/entity';
6
- import {
7
- GenericRedisCacheContext,
8
- RedisCacheAdapterProvider,
9
- } from '@expo/entity-cache-adapter-redis';
1
+ import type { IEntityMetricsAdapter } from '@expo/entity';
2
+ import { NoOpEntityMetricsAdapter, EntityCompanionProvider } from '@expo/entity';
3
+ import type { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
4
+ import { RedisCacheAdapterProvider } from '@expo/entity-cache-adapter-redis';
10
5
  import { StubDatabaseAdapterProvider, StubQueryContextProvider } from '@expo/entity-testing-utils';
11
6
 
12
7
  const queryContextProvider = new StubQueryContextProvider();
package/src/index.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * @module @expo/entity-secondary-cache-redis
5
5
  */
6
6
 
7
- export * from './RedisSecondaryEntityCache';
7
+ export * from './RedisSecondaryEntityCache.ts';
@@ -1 +0,0 @@
1
- {"version":3,"file":"RedisSecondaryEntityCache.js","sourceRoot":"","sources":["../../src/RedisSecondaryEntityCache.ts"],"names":[],"mappings":";;;AAAA,yCAAgF;AAChF,iFAAgG;AAEhG;;GAEG;AACH,MAAa,yBAIX,SAAQ,oCAA2D;IACnE,YACE,mBAA2D,EAC3D,wBAAkD,EAClD,iBAA4D;QAE5D,KAAK,CAAC,IAAI,+CAAkB,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,CAAC;IAClG,CAAC;CACF;AAZD,8DAYC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC;;;GAGG;;;;;;;;;;;;;;;;AAEH,8DAA4C"}