Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

contentful

Package Overview
Dependencies
Maintainers
5
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful - npm Package Compare versions

Comparing version 3.4.1 to 3.4.2

3

dist/create-contentful-api.js

@@ -132,4 +132,5 @@ 'use strict';

var resolveLinks = shouldLinksResolve(query);
var resolveForAllLocales = query.locale && query.locale === '*';
return http.get('entries', (0, _createRequestConfig2.default)({ query: query })).then(function (response) {
return wrapEntryCollection(response.data, resolveLinks);
return wrapEntryCollection(response.data, resolveLinks, resolveForAllLocales);
}, errorHandler);

@@ -136,0 +137,0 @@ }

@@ -128,7 +128,7 @@ 'use strict';

*/
function wrapEntryCollection(data, resolveLinks) {
function wrapEntryCollection(data, resolveLinks, resolveForAllLocales) {
var wrappedData = (0, _stringifySafe2.default)((0, _toPlainObject2.default)((0, _cloneDeep2.default)(data)));
if (resolveLinks) {
var includes = prepareIncludes(wrappedData.includes, wrappedData.items);
(0, _linkGetters2.default)(wrappedData.items, includes);
(0, _linkGetters2.default)(wrappedData.items, includes, resolveForAllLocales);
}

@@ -135,0 +135,0 @@ return (0, _freezeSys2.default)(wrappedData);

@@ -45,6 +45,11 @@ 'use strict';

*/
function mixinLinkGetters(items, includes) {
function mixinLinkGetters(items, includes, resolveForAllLocales) {
var linkGetter = (0, _memoize2.default)(getLinksFromIncludes, memoizationResolver);
(0, _each2.default)(items, function (item) {
return setLocalizedFieldGetters(item.fields, !!item.sys.locale);
// TODO: workaround the preview endpoint extra locale this should be removed when
// it is fixed on the backend
if (resolveForAllLocales && item.sys.locale) {
delete item.sys.locale;
}
setLocalizedFieldGetters(item.fields, !!item.sys.locale);
});

@@ -51,0 +56,0 @@

{
"name": "contentful",
"version": "3.4.1",
"version": "3.4.2",
"description": "Client for Contentful's Content Delivery API",

@@ -5,0 +5,0 @@ "homepage": "https://www.contentful.com/developers/documentation/content-delivery-api/",

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

module.exports = '3.4.1'
module.exports = '3.4.2'

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

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

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