Socket
Socket
Sign inDemoInstall

apollo-cache-inmemory

Package Overview
Dependencies
Maintainers
4
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-cache-inmemory - npm Package Compare versions

Comparing version 1.5.0-beta.0 to 1.5.0-beta.1

jest.config.js

158

lib/bundle.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('apollo-cache'), require('apollo-utilities'), require('optimism')) :
typeof define === 'function' && define.amd ? define(['exports', 'apollo-cache', 'apollo-utilities', 'optimism'], factory) :
(global = global || self, factory((global.apollo = global.apollo || {}, global.apollo.cache = global.apollo.cache || {}, global.apollo.cache.inmemory = {}), global.apolloCache.core, global.apollo.utilities, global.optimism));
}(this, function (exports, apolloCache, apolloUtilities, optimism) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tslib'), require('apollo-cache'), require('apollo-utilities'), require('optimism'), require('ts-invariant')) :
typeof define === 'function' && define.amd ? define(['exports', 'tslib', 'apollo-cache', 'apollo-utilities', 'optimism', 'ts-invariant'], factory) :
(global = global || self, factory(global['apollo-cache-inmemory'] = {}, global.tslib, global.apolloCache.core, global.apollo.utilities, global.optimism, global.invariant));
}(this, function (exports, tslib, apolloCache, apolloUtilities, optimism, tsInvariant) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var testMap = new Map();

@@ -79,3 +39,3 @@ if (testMap.set(1, 2) !== testMap) {

catch (_a) {
var wrap = function (method) {
var wrap$1 = function (method) {
return method && (function (obj) {

@@ -90,8 +50,15 @@ try {

};
Object.freeze = wrap(Object.freeze);
Object.seal = wrap(Object.seal);
Object.preventExtensions = wrap(Object.preventExtensions);
Object.freeze = wrap$1(Object.freeze);
Object.seal = wrap$1(Object.seal);
Object.preventExtensions = wrap$1(Object.preventExtensions);
}
var haveWarned = false;
function shouldWarn() {
var answer = !haveWarned;
if (!apolloUtilities.isTest()) {
haveWarned = true;
}
return answer;
}
var HeuristicFragmentMatcher = (function () {

@@ -115,10 +82,7 @@ function HeuristicFragmentMatcher() {

if (!obj.__typename) {
if (!haveWarned) {
console.warn("You're using fragments in your queries, but either don't have the addTypename:\n true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\n Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\n can accurately match fragments.");
console.warn('Could not find __typename on Fragment ', typeCondition, obj);
console.warn("DEPRECATION WARNING: using fragments without __typename is unsupported behavior " +
if (shouldWarn()) {
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn("You're using fragments in your queries, but either don't have the addTypename:\n true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\n Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\n can accurately match fragments.");
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn('Could not find __typename on Fragment ', typeCondition, obj);
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn("DEPRECATION WARNING: using fragments without __typename is unsupported behavior " +
"and will be removed in future versions of Apollo client. You should fix this and set addTypename to true now.");
if (!apolloUtilities.isTest()) {
haveWarned = true;
}
}

@@ -130,7 +94,9 @@ return 'heuristic';

}
apolloUtilities.warnOnceInDevelopment('You are using the simple (heuristic) fragment matcher, but your ' +
'queries contain union or interface types. Apollo Client will not be ' +
'able to accurately map fragments. To make this error go away, use ' +
'the `IntrospectionFragmentMatcher` as described in the docs: ' +
'https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher', 'error');
if (shouldWarn()) {
process.env.NODE_ENV === "production" || tsInvariant.invariant.error('You are using the simple (heuristic) fragment matcher, but your ' +
'queries contain union or interface types. Apollo Client will not be ' +
'able to accurately map fragments. To make this error go away, use ' +
'the `IntrospectionFragmentMatcher` as described in the docs: ' +
'https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher');
}
return 'heuristic';

@@ -152,5 +118,3 @@ };

IntrospectionFragmentMatcher.prototype.match = function (idValue, typeCondition, context) {
if (!this.isReady) {
throw new Error('FragmentMatcher.match() was called before FragmentMatcher.init()');
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(this.isReady) : tsInvariant.invariant(this.isReady, 'FragmentMatcher.match() was called before FragmentMatcher.init()');
var obj = context.store.get(idValue.id);

@@ -160,5 +124,3 @@ if (!obj) {

}
if (!obj.__typename) {
throw new Error("Cannot match fragment because __typename property is missing: " + JSON.stringify(obj));
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(obj.__typename) : tsInvariant.invariant(obj.__typename, "Cannot match fragment because __typename property is missing: " + JSON.stringify(obj));
if (obj.__typename === typeCondition) {

@@ -307,3 +269,3 @@ return true;

var optsPatch = { returnPartialData: false };
return this.diffQueryAgainstStore(__assign({}, options, optsPatch)).result;
return this.diffQueryAgainstStore(tslib.__assign({}, options, optsPatch)).result;
};

@@ -336,3 +298,3 @@ StoreReader.prototype.diffQueryAgainstStore = function (_a) {

return;
throw new Error("Can't find field " + info.fieldName + " on object " + JSON.stringify(info.object, null, 2) + ".");
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError() : new tsInvariant.InvariantError("Can't find field " + info.fieldName + " on object " + JSON.stringify(info.object, null, 2) + ".");
});

@@ -407,3 +369,3 @@ }

if (!fragment) {
throw new Error("No fragment named " + selection.name.value);
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError() : new tsInvariant.InvariantError("No fragment named " + selection.name.value);
}

@@ -420,4 +382,4 @@ }

if (match === 'heuristic' && fragmentExecResult.missing) {
fragmentExecResult = __assign({}, fragmentExecResult, { missing: fragmentExecResult.missing.map(function (info) {
return __assign({}, info, { tolerable: true });
fragmentExecResult = tslib.__assign({}, fragmentExecResult, { missing: fragmentExecResult.missing.map(function (info) {
return tslib.__assign({}, info, { tolerable: true });
}) });

@@ -507,3 +469,3 @@ }

if (!field.selectionSet && apolloUtilities.isIdValue(value)) {
throw new Error("Missing selection set for object of type " + value.typename + " returned for query field " + field.name.value);
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError() : new tsInvariant.InvariantError("Missing selection set for object of type " + value.typename + " returned for query field " + field.name.value);
}

@@ -515,5 +477,3 @@ }

function assertIdValue(idValue) {
if (!apolloUtilities.isIdValue(idValue)) {
throw new Error("Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.");
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(apolloUtilities.isIdValue(idValue)) : tsInvariant.invariant(apolloUtilities.isIdValue(idValue), "Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.");
}

@@ -596,3 +556,3 @@ function readStoreResolver(object, typename, fieldName, args, context, _a) {

var WriteError = (function (_super) {
__extends(WriteError, _super);
tslib.__extends(WriteError, _super);
function WriteError() {

@@ -675,5 +635,3 @@ var _this = _super !== null && _super.apply(this, arguments) || this;

if (!isDefered && !isClient && context.fragmentMatcherFunction) {
if (!apolloUtilities.isProduction()) {
console.warn("Missing field " + resultFieldKey + " in " + JSON.stringify(result, null, 2).substring(0, 100));
}
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn("Missing field " + resultFieldKey + " in " + JSON.stringify(result, null, 2).substring(0, 100));
}

@@ -689,5 +647,3 @@ }

fragment = (fragmentMap || {})[selection.name.value];
if (!fragment) {
throw new Error("No fragment named " + selection.name.value + ".");
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(fragment) : tsInvariant.invariant(fragment, "No fragment named " + selection.name.value + ".");
}

@@ -703,3 +659,3 @@ var matches = true;

if (!apolloUtilities.isProduction() && match === 'heuristic') {
console.error('WARNING: heuristic fragment matching going on!');
process.env.NODE_ENV === "production" || tsInvariant.invariant.error('WARNING: heuristic fragment matching going on!');
}

@@ -747,5 +703,3 @@ matches = !!match;

var semanticId = dataIdFromObject(value);
if (semanticId && isGeneratedId(semanticId)) {
throw new Error('IDs returned by dataIdFromObject cannot begin with the "$" character.');
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(!semanticId || !isGeneratedId(semanticId)) : tsInvariant.invariant(!semanticId || !isGeneratedId(semanticId), 'IDs returned by dataIdFromObject cannot begin with the "$" character.');
if (semanticId ||

@@ -773,14 +727,4 @@ (typeof semanticId === 'number' && semanticId === 0)) {

var typenameChanged = hadTypename && hasTypename && escapedId.typename !== typename;
if (generated && !escapedId.generated && !typenameChanged) {
throw new Error("Store error: the application attempted to write an object with no provided id" +
(" but the store already contains an id of " + escapedId.id + " for this object. The selectionSet") +
" that was trying to be written is:\n" +
JSON.stringify(field));
}
if (hadTypename && !hasTypename) {
throw new Error("Store error: the application attempted to write an object with no provided typename" +
(" but the store already contains an object with typename of " + escapedId.typename + " for the object of id " + escapedId.id + ". The selectionSet") +
" that was trying to be written is:\n" +
JSON.stringify(field));
}
process.env.NODE_ENV === "production" ? tsInvariant.invariant(!generated || escapedId.generated || typenameChanged) : tsInvariant.invariant(!generated || escapedId.generated || typenameChanged, "Store error: the application attempted to write an object with no provided id but the store already contains an id of " + escapedId.id + " for this object. The selectionSet that was trying to be written is:\n" + JSON.stringify(field));
process.env.NODE_ENV === "production" ? tsInvariant.invariant(!hadTypename || hasTypename) : tsInvariant.invariant(!hadTypename || hasTypename, "Store error: the application attempted to write an object with no provided typename but the store already contains an object with typename of " + escapedId.typename + " for the object of id " + escapedId.id + ". The selectionSet that was trying to be written is:\n" + JSON.stringify(field));
if (escapedId.generated) {

@@ -800,3 +744,3 @@ if (typenameChanged) {

if (!storeObject || !apolloUtilities.isEqual(storeValue, storeObject[storeFieldName])) {
store.set(dataId, __assign({}, storeObject, (_b = {}, _b[storeFieldName] = storeValue, _b)));
store.set(dataId, tslib.__assign({}, storeObject, (_b = {}, _b[storeFieldName] = storeValue, _b)));
}

@@ -857,3 +801,3 @@ };

cache.delete(generatedKey);
var newRealValue = __assign({}, generated, real);
var newRealValue = tslib.__assign({}, generated, real);
if (apolloUtilities.isEqual(newRealValue, real)) {

@@ -902,3 +846,3 @@ return madeChanges;

var OptimisticCacheLayer = (function (_super) {
__extends(OptimisticCacheLayer, _super);
tslib.__extends(OptimisticCacheLayer, _super);
function OptimisticCacheLayer(optimisticId, parent, transaction) {

@@ -912,3 +856,3 @@ var _this = _super.call(this, Object.create(null)) || this;

OptimisticCacheLayer.prototype.toObject = function () {
return __assign({}, this.parent.toObject(), this.data);
return tslib.__assign({}, this.parent.toObject(), this.data);
};

@@ -923,3 +867,3 @@ OptimisticCacheLayer.prototype.get = function (dataId) {

var InMemoryCache = (function (_super) {
__extends(InMemoryCache, _super);
tslib.__extends(InMemoryCache, _super);
function InMemoryCache(config) {

@@ -932,9 +876,9 @@ if (config === void 0) { config = {}; }

_this.silenceBroadcast = false;
_this.config = __assign({}, defaultConfig, config);
_this.config = tslib.__assign({}, defaultConfig, config);
if (_this.config.customResolvers) {
console.warn('customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.');
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn('customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.');
_this.config.cacheRedirects = _this.config.customResolvers;
}
if (_this.config.cacheResolvers) {
console.warn('cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.');
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn('cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.');
_this.config.cacheRedirects = _this.config.cacheResolvers;

@@ -1023,3 +967,3 @@ }

InMemoryCache.prototype.evict = function (query) {
throw new Error("eviction is not implemented on InMemory Cache");
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError() : new tsInvariant.InvariantError("eviction is not implemented on InMemory Cache");
};

@@ -1026,0 +970,0 @@ InMemoryCache.prototype.reset = function () {

@@ -0,0 +0,0 @@ export declare class CacheKeyNode<KeyType = object> {

@@ -0,1 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CacheKeyNode = (function () {

@@ -30,3 +32,3 @@ function CacheKeyNode() {

}());
export { CacheKeyNode };
exports.CacheKeyNode = CacheKeyNode;
//# sourceMappingURL=cacheKeys.js.map

@@ -0,0 +0,0 @@ import { NormalizedCache, NormalizedCacheObject, StoreObject } from './types';

@@ -1,2 +0,4 @@

import { wrap } from 'optimism';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var optimism_1 = require("optimism");
var hasOwn = Object.prototype.hasOwnProperty;

@@ -8,3 +10,3 @@ var DepTrackingCache = (function () {

this.data = data;
this.depend = wrap(function (dataId) { return _this.data[dataId]; }, {
this.depend = optimism_1.wrap(function (dataId) { return _this.data[dataId]; }, {
disposable: true,

@@ -59,6 +61,7 @@ makeCacheKey: function (dataId) {

}());
export { DepTrackingCache };
export function defaultNormalizedCacheFactory(seed) {
exports.DepTrackingCache = DepTrackingCache;
function defaultNormalizedCacheFactory(seed) {
return new DepTrackingCache(seed);
}
exports.defaultNormalizedCacheFactory = defaultNormalizedCacheFactory;
//# sourceMappingURL=depTrackingCache.js.map

@@ -0,0 +0,0 @@ declare const testMap: Map<any, any>;

@@ -0,0 +0,0 @@ import { IdValue } from 'apollo-utilities';

@@ -1,3 +0,13 @@

import { isTest, warnOnceInDevelopment } from 'apollo-utilities';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var apollo_utilities_1 = require("apollo-utilities");
var ts_invariant_1 = require("ts-invariant");
var haveWarned = false;
function shouldWarn() {
var answer = !haveWarned;
if (!apollo_utilities_1.isTest()) {
haveWarned = true;
}
return answer;
}
var HeuristicFragmentMatcher = (function () {

@@ -21,10 +31,7 @@ function HeuristicFragmentMatcher() {

if (!obj.__typename) {
if (!haveWarned) {
console.warn("You're using fragments in your queries, but either don't have the addTypename:\n true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\n Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\n can accurately match fragments.");
console.warn('Could not find __typename on Fragment ', typeCondition, obj);
console.warn("DEPRECATION WARNING: using fragments without __typename is unsupported behavior " +
if (shouldWarn()) {
ts_invariant_1.invariant.warn("You're using fragments in your queries, but either don't have the addTypename:\n true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\n Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\n can accurately match fragments.");
ts_invariant_1.invariant.warn('Could not find __typename on Fragment ', typeCondition, obj);
ts_invariant_1.invariant.warn("DEPRECATION WARNING: using fragments without __typename is unsupported behavior " +
"and will be removed in future versions of Apollo client. You should fix this and set addTypename to true now.");
if (!isTest()) {
haveWarned = true;
}
}

@@ -36,7 +43,9 @@ return 'heuristic';

}
warnOnceInDevelopment('You are using the simple (heuristic) fragment matcher, but your ' +
'queries contain union or interface types. Apollo Client will not be ' +
'able to accurately map fragments. To make this error go away, use ' +
'the `IntrospectionFragmentMatcher` as described in the docs: ' +
'https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher', 'error');
if (shouldWarn()) {
ts_invariant_1.invariant.error('You are using the simple (heuristic) fragment matcher, but your ' +
'queries contain union or interface types. Apollo Client will not be ' +
'able to accurately map fragments. To make this error go away, use ' +
'the `IntrospectionFragmentMatcher` as described in the docs: ' +
'https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher');
}
return 'heuristic';

@@ -46,3 +55,3 @@ };

}());
export { HeuristicFragmentMatcher };
exports.HeuristicFragmentMatcher = HeuristicFragmentMatcher;
var IntrospectionFragmentMatcher = (function () {

@@ -60,5 +69,3 @@ function IntrospectionFragmentMatcher(options) {

IntrospectionFragmentMatcher.prototype.match = function (idValue, typeCondition, context) {
if (!this.isReady) {
throw new Error('FragmentMatcher.match() was called before FragmentMatcher.init()');
}
ts_invariant_1.invariant(this.isReady, 'FragmentMatcher.match() was called before FragmentMatcher.init()');
var obj = context.store.get(idValue.id);

@@ -68,5 +75,3 @@ if (!obj) {

}
if (!obj.__typename) {
throw new Error("Cannot match fragment because __typename property is missing: " + JSON.stringify(obj));
}
ts_invariant_1.invariant(obj.__typename, "Cannot match fragment because __typename property is missing: " + JSON.stringify(obj));
if (obj.__typename === typeCondition) {

@@ -92,3 +97,3 @@ return true;

}());
export { IntrospectionFragmentMatcher };
exports.IntrospectionFragmentMatcher = IntrospectionFragmentMatcher;
//# sourceMappingURL=fragmentMatcher.js.map
declare const query: any;
export default query;
//# sourceMappingURL=fragmentMatcherIntrospectionQuery.d.ts.map

@@ -0,1 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var query = {

@@ -96,3 +98,3 @@ kind: 'Document',

};
export default query;
exports.default = query;
//# sourceMappingURL=fragmentMatcherIntrospectionQuery.js.map

@@ -0,0 +0,0 @@ export { InMemoryCache, InMemoryCacheConfig, defaultDataIdFromObject, } from './inMemoryCache';

@@ -1,6 +0,11 @@

export { InMemoryCache, defaultDataIdFromObject, } from './inMemoryCache';
export * from './readFromStore';
export * from './writeToStore';
export * from './fragmentMatcher';
export * from './objectCache';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inMemoryCache_1 = require("./inMemoryCache");
exports.InMemoryCache = inMemoryCache_1.InMemoryCache;
exports.defaultDataIdFromObject = inMemoryCache_1.defaultDataIdFromObject;
tslib_1.__exportStar(require("./readFromStore"), exports);
tslib_1.__exportStar(require("./writeToStore"), exports);
tslib_1.__exportStar(require("./fragmentMatcher"), exports);
tslib_1.__exportStar(require("./objectCache"), exports);
//# sourceMappingURL=index.js.map

@@ -0,0 +0,0 @@ import './fixPolyfills';

@@ -1,14 +0,17 @@

import * as tslib_1 from "tslib";
import './fixPolyfills';
import { ApolloCache } from 'apollo-cache';
import { addTypenameToDocument } from 'apollo-utilities';
import { wrap } from 'optimism';
import { HeuristicFragmentMatcher } from './fragmentMatcher';
import { StoreReader } from './readFromStore';
import { StoreWriter } from './writeToStore';
import { DepTrackingCache } from './depTrackingCache';
import { CacheKeyNode } from './cacheKeys';
import { ObjectCache } from './objectCache';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
require("./fixPolyfills");
var apollo_cache_1 = require("apollo-cache");
var apollo_utilities_1 = require("apollo-utilities");
var optimism_1 = require("optimism");
var ts_invariant_1 = require("ts-invariant");
var fragmentMatcher_1 = require("./fragmentMatcher");
var readFromStore_1 = require("./readFromStore");
var writeToStore_1 = require("./writeToStore");
var depTrackingCache_1 = require("./depTrackingCache");
var cacheKeys_1 = require("./cacheKeys");
var objectCache_1 = require("./objectCache");
var defaultConfig = {
fragmentMatcher: new HeuristicFragmentMatcher(),
fragmentMatcher: new fragmentMatcher_1.HeuristicFragmentMatcher(),
dataIdFromObject: defaultDataIdFromObject,

@@ -18,3 +21,3 @@ addTypename: true,

};
export function defaultDataIdFromObject(result) {
function defaultDataIdFromObject(result) {
if (result.__typename) {

@@ -30,2 +33,3 @@ if (result.id !== undefined) {

}
exports.defaultDataIdFromObject = defaultDataIdFromObject;
var hasOwn = Object.prototype.hasOwnProperty;

@@ -50,4 +54,4 @@ var OptimisticCacheLayer = (function (_super) {

return OptimisticCacheLayer;
}(ObjectCache));
export { OptimisticCacheLayer };
}(objectCache_1.ObjectCache));
exports.OptimisticCacheLayer = OptimisticCacheLayer;
var InMemoryCache = (function (_super) {

@@ -60,11 +64,11 @@ tslib_1.__extends(InMemoryCache, _super);

_this.typenameDocumentCache = new Map();
_this.cacheKeyRoot = new CacheKeyNode();
_this.cacheKeyRoot = new cacheKeys_1.CacheKeyNode();
_this.silenceBroadcast = false;
_this.config = tslib_1.__assign({}, defaultConfig, config);
if (_this.config.customResolvers) {
console.warn('customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.');
ts_invariant_1.invariant.warn('customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.');
_this.config.cacheRedirects = _this.config.customResolvers;
}
if (_this.config.cacheResolvers) {
console.warn('cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.');
ts_invariant_1.invariant.warn('cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.');
_this.config.cacheRedirects = _this.config.cacheResolvers;

@@ -74,10 +78,10 @@ }

_this.data = _this.config.resultCaching
? new DepTrackingCache()
: new ObjectCache();
? new depTrackingCache_1.DepTrackingCache()
: new objectCache_1.ObjectCache();
_this.optimisticData = _this.data;
_this.storeReader = new StoreReader(_this.cacheKeyRoot);
_this.storeWriter = new StoreWriter();
_this.storeReader = new readFromStore_1.StoreReader(_this.cacheKeyRoot);
_this.storeWriter = new writeToStore_1.StoreWriter();
var cache = _this;
var maybeBroadcastWatch = cache.maybeBroadcastWatch;
_this.maybeBroadcastWatch = wrap(function (c) {
_this.maybeBroadcastWatch = optimism_1.wrap(function (c) {
return maybeBroadcastWatch.call(_this, c);

@@ -92,3 +96,3 @@ }, {

}
if (cache.data instanceof DepTrackingCache) {
if (cache.data instanceof depTrackingCache_1.DepTrackingCache) {
return cache.cacheKeyRoot.lookup(c.query, JSON.stringify(c.variables));

@@ -155,3 +159,3 @@ }

InMemoryCache.prototype.evict = function (query) {
throw new Error("eviction is not implemented on InMemory Cache");
throw new ts_invariant_1.InvariantError("eviction is not implemented on InMemory Cache");
};

@@ -207,3 +211,3 @@ InMemoryCache.prototype.reset = function () {

if (!result) {
result = addTypenameToDocument(document);
result = apollo_utilities_1.addTypenameToDocument(document);
this.typenameDocumentCache.set(document, result);

@@ -231,4 +235,4 @@ this.typenameDocumentCache.set(result, result);

return InMemoryCache;
}(ApolloCache));
export { InMemoryCache };
}(apollo_cache_1.ApolloCache));
exports.InMemoryCache = InMemoryCache;
//# sourceMappingURL=inMemoryCache.js.map

@@ -0,0 +0,0 @@ import { NormalizedCache, NormalizedCacheObject, StoreObject } from './types';

@@ -0,1 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MapCache = (function () {

@@ -35,6 +37,7 @@ function MapCache(data) {

}());
export { MapCache };
export function mapNormalizedCacheFactory(seed) {
exports.MapCache = MapCache;
function mapNormalizedCacheFactory(seed) {
return new MapCache(seed);
}
exports.mapNormalizedCacheFactory = mapNormalizedCacheFactory;
//# sourceMappingURL=mapCache.js.map

@@ -0,0 +0,0 @@ import { NormalizedCache, NormalizedCacheObject, StoreObject } from './types';

@@ -0,1 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ObjectCache = (function () {

@@ -26,6 +28,7 @@ function ObjectCache(data) {

}());
export { ObjectCache };
export function defaultNormalizedCacheFactory(seed) {
exports.ObjectCache = ObjectCache;
function defaultNormalizedCacheFactory(seed) {
return new ObjectCache(seed);
}
exports.defaultNormalizedCacheFactory = defaultNormalizedCacheFactory;
//# sourceMappingURL=objectCache.js.map

@@ -0,0 +0,0 @@ import { IdValue } from 'apollo-utilities';

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

import * as tslib_1 from "tslib";
import { assign, getDefaultValues, getQueryDefinition, isEqual, argumentsObjectFromField, createFragmentMap, getDirectiveInfoFromField, getFragmentDefinitions, getMainDefinition, getStoreKeyName, isField, isIdValue, isInlineFragment, isJsonValue, resultKeyNameFromField, shouldInclude, toIdValue, mergeDeepArray, } from 'apollo-utilities';
import { wrap } from 'optimism';
import { CacheKeyNode } from './cacheKeys';
import { DepTrackingCache } from './depTrackingCache';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var apollo_utilities_1 = require("apollo-utilities");
var optimism_1 = require("optimism");
var cacheKeys_1 = require("./cacheKeys");
var depTrackingCache_1 = require("./depTrackingCache");
var ts_invariant_1 = require("ts-invariant");
var StoreReader = (function () {
function StoreReader(cacheKeyRoot) {
if (cacheKeyRoot === void 0) { cacheKeyRoot = new CacheKeyNode; }
if (cacheKeyRoot === void 0) { cacheKeyRoot = new cacheKeys_1.CacheKeyNode; }
var _this = this;

@@ -13,3 +16,3 @@ this.cacheKeyRoot = cacheKeyRoot;

var executeStoreQuery = reader.executeStoreQuery, executeSelectionSet = reader.executeSelectionSet;
this.executeStoreQuery = wrap(function (options) {
this.executeStoreQuery = optimism_1.wrap(function (options) {
return executeStoreQuery.call(_this, options);

@@ -19,3 +22,3 @@ }, {

var query = _a.query, rootValue = _a.rootValue, contextValue = _a.contextValue, variableValues = _a.variableValues, fragmentMatcher = _a.fragmentMatcher;
if (contextValue.store instanceof DepTrackingCache) {
if (contextValue.store instanceof depTrackingCache_1.DepTrackingCache) {
return reader.cacheKeyRoot.lookup(query, contextValue.store, fragmentMatcher, JSON.stringify(variableValues), rootValue.id);

@@ -26,3 +29,3 @@ }

});
this.executeSelectionSet = wrap(function (options) {
this.executeSelectionSet = optimism_1.wrap(function (options) {
return executeSelectionSet.call(_this, options);

@@ -32,3 +35,3 @@ }, {

var selectionSet = _a.selectionSet, rootValue = _a.rootValue, execContext = _a.execContext;
if (execContext.contextValue.store instanceof DepTrackingCache) {
if (execContext.contextValue.store instanceof depTrackingCache_1.DepTrackingCache) {
return reader.cacheKeyRoot.lookup(selectionSet, execContext.contextValue.store, execContext.fragmentMatcher, JSON.stringify(execContext.variableValues), rootValue.id);

@@ -46,4 +49,4 @@ }

var store = _a.store, query = _a.query, variables = _a.variables, previousResult = _a.previousResult, _b = _a.returnPartialData, returnPartialData = _b === void 0 ? true : _b, _c = _a.rootId, rootId = _c === void 0 ? 'ROOT_QUERY' : _c, fragmentMatcherFunction = _a.fragmentMatcherFunction, config = _a.config;
var queryDefinition = getQueryDefinition(query);
variables = assign({}, getDefaultValues(queryDefinition), variables);
var queryDefinition = apollo_utilities_1.getQueryDefinition(query);
variables = apollo_utilities_1.assign({}, apollo_utilities_1.getDefaultValues(queryDefinition), variables);
var context = {

@@ -71,7 +74,7 @@ store: store,

return;
throw new Error("Can't find field " + info.fieldName + " on object " + JSON.stringify(info.object, null, 2) + ".");
throw new ts_invariant_1.InvariantError("Can't find field " + info.fieldName + " on object " + JSON.stringify(info.object, null, 2) + ".");
});
}
if (previousResult) {
if (isEqual(previousResult, execResult.result)) {
if (apollo_utilities_1.isEqual(previousResult, execResult.result)) {
execResult.result = previousResult;

@@ -87,5 +90,5 @@ }

var query = _a.query, rootValue = _a.rootValue, contextValue = _a.contextValue, variableValues = _a.variableValues, _b = _a.fragmentMatcher, fragmentMatcher = _b === void 0 ? defaultFragmentMatcher : _b;
var mainDefinition = getMainDefinition(query);
var fragments = getFragmentDefinitions(query);
var fragmentMap = createFragmentMap(fragments);
var mainDefinition = apollo_utilities_1.getMainDefinition(query);
var fragments = apollo_utilities_1.getFragmentDefinitions(query);
var fragmentMap = apollo_utilities_1.createFragmentMap(fragments);
var execContext = {

@@ -124,10 +127,10 @@ query: query,

var _a;
if (!shouldInclude(selection, variables)) {
if (!apollo_utilities_1.shouldInclude(selection, variables)) {
return;
}
if (isField(selection)) {
if (apollo_utilities_1.isField(selection)) {
var fieldResult = handleMissing(_this.executeField(object, typename, selection, execContext));
if (typeof fieldResult !== 'undefined') {
objectsToMerge.push((_a = {},
_a[resultKeyNameFromField(selection)] = fieldResult,
_a[apollo_utilities_1.resultKeyNameFromField(selection)] = fieldResult,
_a));

@@ -138,3 +141,3 @@ }

var fragment = void 0;
if (isInlineFragment(selection)) {
if (apollo_utilities_1.isInlineFragment(selection)) {
fragment = selection;

@@ -145,3 +148,3 @@ }

if (!fragment) {
throw new Error("No fragment named " + selection.name.value);
throw new ts_invariant_1.InvariantError("No fragment named " + selection.name.value);
}

@@ -166,3 +169,3 @@ }

});
finalResult.result = mergeDeepArray(objectsToMerge);
finalResult.result = apollo_utilities_1.mergeDeepArray(objectsToMerge);
return finalResult;

@@ -173,6 +176,6 @@ };

var fieldName = field.name.value;
var args = argumentsObjectFromField(field, variables);
var args = apollo_utilities_1.argumentsObjectFromField(field, variables);
var info = {
resultKey: resultKeyNameFromField(field),
directives: getDirectiveInfoFromField(field, variables),
resultKey: apollo_utilities_1.resultKeyNameFromField(field),
directives: apollo_utilities_1.getDirectiveInfoFromField(field, variables),
};

@@ -244,6 +247,6 @@ var readStoreResult = readStoreResolver(object, typename, fieldName, args, contextValue, info);

}());
export { StoreReader };
exports.StoreReader = StoreReader;
function assertSelectionSetForIdValue(field, value) {
if (!field.selectionSet && isIdValue(value)) {
throw new Error("Missing selection set for object of type " + value.typename + " returned for query field " + field.name.value);
if (!field.selectionSet && apollo_utilities_1.isIdValue(value)) {
throw new ts_invariant_1.InvariantError("Missing selection set for object of type " + value.typename + " returned for query field " + field.name.value);
}

@@ -254,7 +257,6 @@ }

}
export function assertIdValue(idValue) {
if (!isIdValue(idValue)) {
throw new Error("Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.");
}
function assertIdValue(idValue) {
ts_invariant_1.invariant(apollo_utilities_1.isIdValue(idValue), "Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.");
}
exports.assertIdValue = assertIdValue;
function readStoreResolver(object, typename, fieldName, args, context, _a) {

@@ -264,3 +266,3 @@ var resultKey = _a.resultKey, directives = _a.directives;

if (args || directives) {
storeKeyName = getStoreKeyName(storeKeyName, args, directives);
storeKeyName = apollo_utilities_1.getStoreKeyName(storeKeyName, args, directives);
}

@@ -279,3 +281,3 @@ var fieldValue = void 0;

getCacheKey: function (storeObj) {
return toIdValue({
return apollo_utilities_1.toIdValue({
id: context.dataIdFromObject(storeObj),

@@ -300,3 +302,3 @@ typename: storeObj.__typename,

}
if (isJsonValue(fieldValue)) {
if (apollo_utilities_1.isJsonValue(fieldValue)) {
fieldValue = fieldValue.json;

@@ -303,0 +305,0 @@ }

@@ -0,0 +0,0 @@ import { DocumentNode } from 'graphql';

@@ -0,1 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

@@ -0,0 +0,0 @@ import { SelectionSetNode, FieldNode, DocumentNode } from 'graphql';

@@ -1,5 +0,8 @@

import * as tslib_1 from "tslib";
import { assign, createFragmentMap, getDefaultValues, getFragmentDefinitions, getOperationDefinition, isField, isIdValue, isInlineFragment, isProduction, resultKeyNameFromField, shouldInclude, storeKeyNameFromField, toIdValue, isEqual, } from 'apollo-utilities';
import { ObjectCache } from './objectCache';
import { defaultNormalizedCacheFactory } from './depTrackingCache';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var apollo_utilities_1 = require("apollo-utilities");
var ts_invariant_1 = require("ts-invariant");
var objectCache_1 = require("./objectCache");
var depTrackingCache_1 = require("./depTrackingCache");
var WriteError = (function (_super) {

@@ -14,4 +17,4 @@ tslib_1.__extends(WriteError, _super);

}(Error));
export { WriteError };
export function enhanceErrorWithDocument(error, document) {
exports.WriteError = WriteError;
function enhanceErrorWithDocument(error, document) {
var enhancedError = new WriteError("Error writing result to store for query:\n " + JSON.stringify(document));

@@ -22,2 +25,3 @@ enhancedError.message += '\n' + error.message;

}
exports.enhanceErrorWithDocument = enhanceErrorWithDocument;
var StoreWriter = (function () {

@@ -27,3 +31,3 @@ function StoreWriter() {

StoreWriter.prototype.writeQueryToStore = function (_a) {
var query = _a.query, result = _a.result, _b = _a.store, store = _b === void 0 ? defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;
var query = _a.query, result = _a.result, _b = _a.store, store = _b === void 0 ? depTrackingCache_1.defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;
return this.writeResultToStore({

@@ -40,4 +44,4 @@ dataId: 'ROOT_QUERY',

StoreWriter.prototype.writeResultToStore = function (_a) {
var dataId = _a.dataId, result = _a.result, document = _a.document, _b = _a.store, store = _b === void 0 ? defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;
var operationDefinition = getOperationDefinition(document);
var dataId = _a.dataId, result = _a.result, document = _a.document, _b = _a.store, store = _b === void 0 ? depTrackingCache_1.defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;
var operationDefinition = apollo_utilities_1.getOperationDefinition(document);
try {

@@ -51,5 +55,5 @@ return this.writeSelectionSetToStore({

processedData: {},
variables: assign({}, getDefaultValues(operationDefinition), variables),
variables: apollo_utilities_1.assign({}, apollo_utilities_1.getDefaultValues(operationDefinition), variables),
dataIdFromObject: dataIdFromObject,
fragmentMap: createFragmentMap(getFragmentDefinitions(document)),
fragmentMap: apollo_utilities_1.createFragmentMap(apollo_utilities_1.getFragmentDefinitions(document)),
fragmentMatcherFunction: fragmentMatcherFunction,

@@ -68,7 +72,7 @@ },

selectionSet.selections.forEach(function (selection) {
if (!shouldInclude(selection, variables)) {
if (!apollo_utilities_1.shouldInclude(selection, variables)) {
return;
}
if (isField(selection)) {
var resultFieldKey = resultKeyNameFromField(selection);
if (apollo_utilities_1.isField(selection)) {
var resultFieldKey = apollo_utilities_1.resultKeyNameFromField(selection);
var value = result[resultFieldKey];

@@ -91,5 +95,3 @@ if (typeof value !== 'undefined') {

if (!isDefered && !isClient && context.fragmentMatcherFunction) {
if (!isProduction()) {
console.warn("Missing field " + resultFieldKey + " in " + JSON.stringify(result, null, 2).substring(0, 100));
}
ts_invariant_1.invariant.warn("Missing field " + resultFieldKey + " in " + JSON.stringify(result, null, 2).substring(0, 100));
}

@@ -100,3 +102,3 @@ }

var fragment = void 0;
if (isInlineFragment(selection)) {
if (apollo_utilities_1.isInlineFragment(selection)) {
fragment = selection;

@@ -106,16 +108,14 @@ }

fragment = (fragmentMap || {})[selection.name.value];
if (!fragment) {
throw new Error("No fragment named " + selection.name.value + ".");
}
ts_invariant_1.invariant(fragment, "No fragment named " + selection.name.value + ".");
}
var matches = true;
if (context.fragmentMatcherFunction && fragment.typeCondition) {
var idValue = toIdValue({ id: 'self', typename: undefined });
var idValue = apollo_utilities_1.toIdValue({ id: 'self', typename: undefined });
var fakeContext = {
store: new ObjectCache({ self: result }),
store: new objectCache_1.ObjectCache({ self: result }),
cacheRedirects: {},
};
var match = context.fragmentMatcherFunction(idValue, fragment.typeCondition.name.value, fakeContext);
if (!isProduction() && match === 'heuristic') {
console.error('WARNING: heuristic fragment matching going on!');
if (!apollo_utilities_1.isProduction() && match === 'heuristic') {
ts_invariant_1.invariant.error('WARNING: heuristic fragment matching going on!');
}

@@ -142,3 +142,3 @@ matches = !!match;

var storeObject;
var storeFieldName = storeKeyNameFromField(field, variables);
var storeFieldName = apollo_utilities_1.storeKeyNameFromField(field, variables);
if (!field.selectionSet || value === null) {

@@ -164,5 +164,3 @@ storeValue =

var semanticId = dataIdFromObject(value);
if (semanticId && isGeneratedId(semanticId)) {
throw new Error('IDs returned by dataIdFromObject cannot begin with the "$" character.');
}
ts_invariant_1.invariant(!semanticId || !isGeneratedId(semanticId), 'IDs returned by dataIdFromObject cannot begin with the "$" character.');
if (semanticId ||

@@ -183,21 +181,11 @@ (typeof semanticId === 'number' && semanticId === 0)) {

var typename = value.__typename;
storeValue = toIdValue({ id: valueDataId, typename: typename }, generated);
storeValue = apollo_utilities_1.toIdValue({ id: valueDataId, typename: typename }, generated);
storeObject = store.get(dataId);
var escapedId = storeObject && storeObject[storeFieldName];
if (escapedId !== storeValue && isIdValue(escapedId)) {
if (escapedId !== storeValue && apollo_utilities_1.isIdValue(escapedId)) {
var hadTypename = escapedId.typename !== undefined;
var hasTypename = typename !== undefined;
var typenameChanged = hadTypename && hasTypename && escapedId.typename !== typename;
if (generated && !escapedId.generated && !typenameChanged) {
throw new Error("Store error: the application attempted to write an object with no provided id" +
(" but the store already contains an id of " + escapedId.id + " for this object. The selectionSet") +
" that was trying to be written is:\n" +
JSON.stringify(field));
}
if (hadTypename && !hasTypename) {
throw new Error("Store error: the application attempted to write an object with no provided typename" +
(" but the store already contains an object with typename of " + escapedId.typename + " for the object of id " + escapedId.id + ". The selectionSet") +
" that was trying to be written is:\n" +
JSON.stringify(field));
}
ts_invariant_1.invariant(!generated || escapedId.generated || typenameChanged, "Store error: the application attempted to write an object with no provided id but the store already contains an id of " + escapedId.id + " for this object. The selectionSet that was trying to be written is:\n" + JSON.stringify(field));
ts_invariant_1.invariant(!hadTypename || hasTypename, "Store error: the application attempted to write an object with no provided typename but the store already contains an object with typename of " + escapedId.typename + " for the object of id " + escapedId.id + ". The selectionSet that was trying to be written is:\n" + JSON.stringify(field));
if (escapedId.generated) {

@@ -216,3 +204,3 @@ if (typenameChanged) {

storeObject = store.get(dataId);
if (!storeObject || !isEqual(storeValue, storeObject[storeFieldName])) {
if (!storeObject || !apollo_utilities_1.isEqual(storeValue, storeObject[storeFieldName])) {
store.set(dataId, tslib_1.__assign({}, storeObject, (_b = {}, _b[storeFieldName] = storeValue, _b)));

@@ -247,3 +235,3 @@ }

}
return toIdValue({ id: itemDataId, typename: item.__typename }, generated);
return apollo_utilities_1.toIdValue({ id: itemDataId, typename: item.__typename }, generated);
});

@@ -253,3 +241,3 @@ };

}());
export { StoreWriter };
exports.StoreWriter = StoreWriter;
function isGeneratedId(id) {

@@ -268,6 +256,6 @@ return id[0] === '$';

var realValue = real[key];
if (isIdValue(value) &&
if (apollo_utilities_1.isIdValue(value) &&
isGeneratedId(value.id) &&
isIdValue(realValue) &&
!isEqual(value, realValue) &&
apollo_utilities_1.isIdValue(realValue) &&
!apollo_utilities_1.isEqual(value, realValue) &&
mergeWithGenerated(value.id, realValue.id, cache)) {

@@ -279,3 +267,3 @@ madeChanges = true;

var newRealValue = tslib_1.__assign({}, generated, real);
if (isEqual(newRealValue, real)) {
if (apollo_utilities_1.isEqual(newRealValue, real)) {
return madeChanges;

@@ -282,0 +270,0 @@ }

{
"name": "apollo-cache-inmemory",
"version": "1.5.0-beta.0",
"version": "1.5.0-beta.1",
"description": "Core abstract of Caching layer for Apollo Client",

@@ -14,5 +14,4 @@ "author": "James Baxley <james@meteor.com>",

"license": "MIT",
"main": "./lib/bundle.umd.js",
"module": "./lib/index.js",
"jsnext:main": "./lib/index.js",
"main": "./lib/bundle.cjs.js",
"module": "./lib/bundle.esm.js",
"typings": "./lib/index.d.ts",

@@ -33,18 +32,17 @@ "sideEffects": [

"coverage": "jest --coverage",
"test": "jest",
"test": "tsc -p tsconfig.json --noEmit && jest",
"lint": "tslint -c \"../../config/tslint.json\" -p tsconfig.json src/*.ts",
"prebuild": "npm run clean",
"build": "tsc -p .",
"build": "tsc -b .",
"postbuild": "npm run bundle",
"bundle": "../../node_modules/rollup/bin/rollup -c rollup.config.js",
"watch": "tsc -w -p .",
"clean": "rm -rf coverage/* && rm -rf lib/*",
"prepublishOnly": "npm run build",
"minify": "../../node_modules/uglify-js/bin/uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.umd.js",
"filesize": "npm run minify"
"clean": "rm -rf coverage/* lib/*",
"prepublishOnly": "npm run build"
},
"dependencies": {
"apollo-cache": "^1.2.0-beta.0",
"apollo-utilities": "^1.2.0-beta.0",
"apollo-cache": "^1.2.0-beta.1",
"apollo-utilities": "^1.2.0-beta.1",
"optimism": "^0.6.9",
"ts-invariant": "^0.2.1",
"tslib": "^1.9.3"

@@ -55,16 +53,3 @@ },

},
"jest": {
"transform": {
".(ts|tsx)": "ts-jest"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
],
"testURL": "http://localhost"
},
"gitHead": "b49a7e851b5637eb9bf3784781fd2c8881a2d2d8"
"gitHead": "ada6057dc4a30ec07b7e8ef2f68e9372e16e1e12"
}

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

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

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