New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nerdwallet/apollo-cache-policies

Package Overview
Dependencies
Maintainers
7
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nerdwallet/apollo-cache-policies - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

4

CHANGELOG.md

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

3.1.1 (Dan Reynolds)
Fix duplicate collection references bug.
3.1.0 (Dan Reynolds)

@@ -2,0 +6,0 @@

@@ -233,6 +233,20 @@ "use strict";

data: (existing, { canRead }) => {
const existingReferences = existing;
let hasDuplicateRef = false;
const existingReferencesById = existingReferences.reduce((acc, ref) => {
const { __ref } = ref;
if (!hasDuplicateRef && acc[__ref]) {
hasDuplicateRef = true;
}
acc[__ref] = ref;
return acc;
}, {});
const newReferences = Object.values(updatedReferences).filter((ref) => !existingReferencesById[ref.__ref] && canRead(ref));
if (!hasDuplicateRef && newReferences.length === 0) {
return existing;
}
return [
...existing,
...Object.values(updatedReferences),
].filter(canRead);
...Object.values(existingReferencesById),
...newReferences,
];
}

@@ -239,0 +253,0 @@ }

2

package.json
{
"name": "@nerdwallet/apollo-cache-policies",
"version": "3.1.0",
"version": "3.1.1",
"description": "An extension to the InMemoryCache from Apollo that adds additional cache policies.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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