Comparing version 1.9.0 to 1.9.1
{ | ||
".": "1.9.0" | ||
".": "1.9.1" | ||
} |
# Changelog | ||
## [1.9.1](https://github.com/mathematic-inc/ts-japi/compare/v1.9.0...v1.9.1) (2023-10-11) | ||
### Bug Fixes | ||
* fix logic where nested includes were not calculated correctly. Fixes [#68](https://github.com/mathematic-inc/ts-japi/issues/68) ([#69](https://github.com/mathematic-inc/ts-japi/issues/69)) ([701a7e6](https://github.com/mathematic-inc/ts-japi/commit/701a7e61d8239abbe54ba88bcf65f8fb7552ad79)) | ||
## [1.9.0](https://github.com/mathematic-inc/ts-japi/compare/v1.8.1...v1.9.0) (2023-09-04) | ||
@@ -4,0 +11,0 @@ |
@@ -42,9 +42,11 @@ "use strict"; | ||
const shouldBuildRelatedCache = (!includeFields || | ||
includeFields?.filter((i) => i.field === relator.relatedName)?.[i]?.hasMore) ?? | ||
includeFields | ||
?.filter((i) => i.field === relator.relatedName) | ||
?.some((i) => i.hasMore)) ?? | ||
false; | ||
const resource = await relator.getRelatedResource(cache[i], undefined, undefined, | ||
// Only build the cache for the nexty iteration if needed. | ||
// Only build the cache for the next iteration if needed. | ||
shouldBuildRelatedCache ? newRelatorDataCache : undefined); | ||
// Include if, | ||
// - includeFields == undefined | ||
// - includeFields !== undefined | ||
// - includeFields has entry where field = relatedName | ||
@@ -51,0 +53,0 @@ if (!includeFields || includeFields.map((i) => i.field).includes(relator.relatedName)) { |
{ | ||
"name": "ts-japi", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "A highly-modular (typescript-friendly)-framework agnostic library for serializing data to the JSON:API specification", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
231202
3440