@volvo-cars/content-delivery-client
Advanced tools
Comparing version 0.1.0 to 0.1.1
# @volvo-cars/content-delivery-client | ||
## 0.1.1 | ||
### Patch Changes | ||
- [#14358](https://github.com/volvo-cars/cdls-mono-volvocars/pull/14358) [`b62661173d`](https://github.com/volvo-cars/cdls-mono-volvocars/commit/b62661173d2f842074cae3cc08f25bf2dd9a086a) Thanks [@jacobrask](https://github.com/jacobrask)! - Fix bug in disabling of entry caching | ||
- [#14220](https://github.com/volvo-cars/cdls-mono-volvocars/pull/14220) [`60e55a12fb`](https://github.com/volvo-cars/cdls-mono-volvocars/commit/60e55a12fbfacd08886d9fa7cd58c334ad306051) Thanks [@gkjain-avanade](https://github.com/gkjain-avanade)! - Minor changes to migrate the Tunisia minitsite to fullsite | ||
## 0.1.0 | ||
@@ -4,0 +12,0 @@ |
@@ -229,3 +229,3 @@ import flatten from 'flat'; | ||
}; | ||
const minisites = ['BW', 'ID', 'KE', 'LK', 'MM', 'MZ', 'NA', 'TN', 'UZ', 'XA', 'XP', 'ZM', 'ZW', 'EC']; | ||
const minisites = ['BW', 'ID', 'KE', 'LK', 'MM', 'MZ', 'NA', 'XA', 'XP', 'ZM', 'ZW', 'EC']; | ||
/** | ||
@@ -1109,3 +1109,3 @@ * @returns Market item name in Sitecore 9 | ||
if (!this.entriesCache || !this.entriesCache.has(cacheKey)) { | ||
if (this.config.revalidate.entries === 0 || !this.entriesCache.has(cacheKey)) { | ||
try { | ||
@@ -1120,6 +1120,2 @@ const entry = await fetchEntry(canonicalName, this.config, options); | ||
} catch (error) { | ||
if (error.errors.some(error => error.status === 404)) { | ||
this.entriesCache.delete(cacheKey); | ||
} | ||
this.logError('entries', operationDetails, error); | ||
@@ -1136,4 +1132,9 @@ throw error; | ||
}).catch(error => { | ||
// Failing to refresh a stale entry is not a fatal error, because | ||
// Remove from cache when revalidating if entry is updated | ||
if (error.status === 404 || error.errors.some(error => error.status === 404)) { | ||
this.entriesCache.delete(cacheKey); | ||
} // Failing to refresh a stale entry is not a fatal error, because | ||
// there's already some content in the cache. | ||
this.logError('entries', operationDetails, error); | ||
@@ -1162,3 +1163,3 @@ }).finally(() => { | ||
if (!this.listEntriesCache || !this.listEntriesCache.has(cacheKey)) { | ||
if (this.config.revalidate.listEntries === 0 || !this.listEntriesCache.has(cacheKey)) { | ||
try { | ||
@@ -1165,0 +1166,0 @@ const entriesList = await listEntries(contentType, this.config, options); |
@@ -253,3 +253,3 @@ var flatten = require('flat'); | ||
}; | ||
const minisites = ['BW', 'ID', 'KE', 'LK', 'MM', 'MZ', 'NA', 'TN', 'UZ', 'XA', 'XP', 'ZM', 'ZW', 'EC']; | ||
const minisites = ['BW', 'ID', 'KE', 'LK', 'MM', 'MZ', 'NA', 'XA', 'XP', 'ZM', 'ZW', 'EC']; | ||
/** | ||
@@ -1133,3 +1133,3 @@ * @returns Market item name in Sitecore 9 | ||
if (!this.entriesCache || !this.entriesCache.has(cacheKey)) { | ||
if (this.config.revalidate.entries === 0 || !this.entriesCache.has(cacheKey)) { | ||
try { | ||
@@ -1144,6 +1144,2 @@ const entry = await fetchEntry(canonicalName, this.config, options); | ||
} catch (error) { | ||
if (error.errors.some(error => error.status === 404)) { | ||
this.entriesCache.delete(cacheKey); | ||
} | ||
this.logError('entries', operationDetails, error); | ||
@@ -1160,4 +1156,9 @@ throw error; | ||
}).catch(error => { | ||
// Failing to refresh a stale entry is not a fatal error, because | ||
// Remove from cache when revalidating if entry is updated | ||
if (error.status === 404 || error.errors.some(error => error.status === 404)) { | ||
this.entriesCache.delete(cacheKey); | ||
} // Failing to refresh a stale entry is not a fatal error, because | ||
// there's already some content in the cache. | ||
this.logError('entries', operationDetails, error); | ||
@@ -1186,3 +1187,3 @@ }).finally(() => { | ||
if (!this.listEntriesCache || !this.listEntriesCache.has(cacheKey)) { | ||
if (this.config.revalidate.listEntries === 0 || !this.listEntriesCache.has(cacheKey)) { | ||
try { | ||
@@ -1189,0 +1190,0 @@ const entriesList = await listEntries(contentType, this.config, options); |
{ | ||
"name": "@volvo-cars/content-delivery-client", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "UNLICENSED", | ||
@@ -38,3 +38,3 @@ "source": "index.ts", | ||
"@vcc-www/utils": "0.0.0", | ||
"@volvo-cars/content-management-client": "0.9.2", | ||
"@volvo-cars/content-management-client": "0.12.0", | ||
"microbundle": "^0.14.2", | ||
@@ -41,0 +41,0 @@ "nock": "^13.0.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
296947
49
2924
3