@nerdwallet/apollo-cache-policies
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,9 @@ | ||
1.2.0 (Dan Reynolds) | ||
- Update to TypeScript ^4.0 | ||
1.1.0 (Dan Reynolds) | ||
- Rename library to Apollo Cache Policies and release under the NerdWallet org at `@nerdwallet/apollo-cache-policies` | ||
1.0.0-beta16 (Dan Reynolds) | ||
@@ -2,0 +10,0 @@ |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidationPolicyCacheAuditor = void 0; | ||
var InvalidationPolicyCacheAuditor_1 = require("./InvalidationPolicyCacheAuditor"); | ||
Object.defineProperty(exports, "InvalidationPolicyCacheAuditor", { enumerable: true, get: function () { return InvalidationPolicyCacheAuditor_1.default; } }); | ||
Object.defineProperty(exports, "InvalidationPolicyCacheAuditor", { enumerable: true, get: function () { return __importDefault(InvalidationPolicyCacheAuditor_1).default; } }); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidationPolicyCache = void 0; | ||
var InvalidationPolicyCache_1 = require("./InvalidationPolicyCache"); | ||
Object.defineProperty(exports, "InvalidationPolicyCache", { enumerable: true, get: function () { return InvalidationPolicyCache_1.default; } }); | ||
Object.defineProperty(exports, "InvalidationPolicyCache", { enumerable: true, get: function () { return __importDefault(InvalidationPolicyCache_1).default; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -33,3 +33,4 @@ "use strict"; | ||
// is being deleted so do nothing | ||
return storeFieldName !== "__typename" && ((_a = incomingStoreObject[storeFieldName]) === null || _a === void 0 ? void 0 : _a.__typename); | ||
return storeFieldName !== "__typename" && | ||
((_a = incomingStoreObject[storeFieldName]) === null || _a === void 0 ? void 0 : _a.__typename); | ||
}) | ||
@@ -36,0 +37,0 @@ .forEach((storeFieldName) => { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EntityTypeMap = exports.EntityStoreWatcher = void 0; | ||
var EntityStoreWatcher_1 = require("./EntityStoreWatcher"); | ||
Object.defineProperty(exports, "EntityStoreWatcher", { enumerable: true, get: function () { return EntityStoreWatcher_1.default; } }); | ||
Object.defineProperty(exports, "EntityStoreWatcher", { enumerable: true, get: function () { return __importDefault(EntityStoreWatcher_1).default; } }); | ||
var EntityTypeMap_1 = require("./EntityTypeMap"); | ||
Object.defineProperty(exports, "EntityTypeMap", { enumerable: true, get: function () { return EntityTypeMap_1.default; } }); | ||
Object.defineProperty(exports, "EntityTypeMap", { enumerable: true, get: function () { return __importDefault(EntityTypeMap_1).default; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -42,3 +42,3 @@ import { NormalizedCacheObject } from "@apollo/client/core"; | ||
export interface NormalizedCacheObjectWithInvalidation extends NormalizedCacheObject { | ||
invalidation: { | ||
invalidation?: { | ||
entitiesById: EntitiesById; | ||
@@ -45,0 +45,0 @@ }; |
@@ -29,3 +29,4 @@ "use strict"; | ||
// https://github.com/apollographql/apollo-client/blob/master/src/utilities/common/maybeDeepFreeze.ts#L20:L20 | ||
exports.maybeDeepClone = (obj) => lodash_1.default.isPlainObject(obj) && Object.isFrozen(obj) ? lodash_1.default.cloneDeep(obj) : obj; | ||
const maybeDeepClone = (obj) => lodash_1.default.isPlainObject(obj) && Object.isFrozen(obj) ? lodash_1.default.cloneDeep(obj) : obj; | ||
exports.maybeDeepClone = maybeDeepClone; | ||
exports.TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i; | ||
@@ -32,0 +33,0 @@ function fieldNameFromStoreName(storeFieldName) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RenewalPolicy = exports.InvalidationPolicyEvent = exports.InvalidationPolicyCacheAuditor = exports.InvalidationPolicyCache = void 0; | ||
var cache_1 = require("./cache"); | ||
@@ -4,0 +5,0 @@ Object.defineProperty(exports, "InvalidationPolicyCache", { enumerable: true, get: function () { return cache_1.InvalidationPolicyCache; } }); |
@@ -17,3 +17,3 @@ import { InvalidationPolicyEvent, InvalidationPolicyManagerConfig, PolicyActionMeta } from "./types"; | ||
private runPolicyEvent; | ||
getRenewalPolicyForType(typename: string): RenewalPolicy.AccessOnly | RenewalPolicy; | ||
getRenewalPolicyForType(typename: string): RenewalPolicy; | ||
runWritePolicy(typeName: string, policyMeta: PolicyActionMeta): void; | ||
@@ -20,0 +20,0 @@ runEvictPolicy(typeName: string, policyMeta: PolicyActionMeta): void; |
{ | ||
"name": "@nerdwallet/apollo-cache-policies", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "An extension to the InMemoryCache from Apollo that adds additional cache policies.", | ||
@@ -38,3 +38,3 @@ "main": "dist/index.js", | ||
"lodash": "^4.17.20", | ||
"typescript": "^3.9.9", | ||
"typescript": "^4.3.2", | ||
"uuid": "^7.0.3" | ||
@@ -41,0 +41,0 @@ }, |
@@ -5,2 +5,4 @@ ![Build](https://github.com/NerdWalletOSS/apollo-cache-policies/workflows/Build/badge.svg) | ||
> Update: This library is now called Apollo Cache Policies and available at `@nerdwallet/apollo-cache-policies`. | ||
An extension of the [Apollo 3.0 cache](https://blog.apollographql.com/previewing-the-apollo-client-3-cache-565fadd6a01e) that provides a framework for managing the lifecycle and relationships of cache data through the use of additional cache policies. | ||
@@ -7,0 +9,0 @@ |
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
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
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
Sorry, the diff of this file is not supported yet
1682
300
201628
+ Addedtypescript@4.9.5(transitive)
- Removedtypescript@3.9.10(transitive)
Updatedtypescript@^4.3.2