Socket
Socket
Sign inDemoInstall

prismic-javascript

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prismic-javascript - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

4

package.json

@@ -13,3 +13,3 @@ {

],
"version": "2.1.0",
"version": "2.1.1",
"devDependencies": {

@@ -45,5 +45,5 @@ "chai": "^4.1.1",

"dependencies": {
"cross-fetch": "^2.2.0",
"cross-fetch": "^2.2.3",
"promise-polyfill": "8.0.0"
}
}

@@ -1,18 +0,1 @@

import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
// default agent to use see https://nodejs.org/api/http.html#http_class_http_agent for more options
const httpAgent = new HttpAgent({
keepAlive: true,
maxSockets: 20,
});
const httpsAgent = new HttpsAgent({
keepAlive: true,
maxSockets: 20,
});
function changeAgent(parsedUrl: any) {
return (parsedUrl.protocol === 'http:') ? httpAgent : httpsAgent;
}
interface Task {

@@ -37,4 +20,2 @@ url: string;

fetchOptions.agent = options.proxyAgent;
} else {
fetchOptions.agent = changeAgent;
}

@@ -54,10 +35,11 @@

});
} else {
return xhr.json().then((result) => {
const cacheControl = xhr.headers.get('cache-control');
const parsedCacheControl = cacheControl ? /max-age=(\d+)/.exec(cacheControl) : null;
const ttl = parsedCacheControl ? parseInt(parsedCacheControl[1], 10) : undefined;
callback(null, result, xhr, ttl);
});
}
return xhr.json().then((result) => {
const cacheControl = xhr.headers.get('cache-control');
const parsedCacheControl = cacheControl ? /max-age=(\d+)/.exec(cacheControl) : null;
const ttl = parsedCacheControl ? parseInt(parsedCacheControl[1], 10) : undefined;
callback(null, result, xhr, ttl);
});
}).catch(callback);

@@ -64,0 +46,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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

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