kitsu-core
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [10.0.1](https://github.com/wopian/kitsu/compare/v10.0.0...v10.0.1) (2022-08-12) | ||
### Bug Fixes | ||
* **kitsu-core:** prevent relationship mutation during multi-circular deserialisation ([#722](https://github.com/wopian/kitsu/issues/722)) ([d261d4c](https://github.com/wopian/kitsu/commit/d261d4c161f69f98f3f354455a3cc73efddfab82)) | ||
# [10.0.0](https://github.com/wopian/kitsu/compare/v10.0.0-alpha.26...v10.0.0) (2022-08-11) | ||
@@ -8,0 +20,0 @@ |
@@ -15,3 +15,7 @@ 'use strict'; | ||
for (let value of array.data) { | ||
value = linkRelationships.linkRelationships(value, [...array.data, ...(array.included || [])], previouslyLinked, relationshipCache); | ||
const included = [...array.data.map(item => ({ ...item, | ||
relationships: { ...item.relationships | ||
} | ||
})), ...(array.included || [])]; | ||
value = linkRelationships.linkRelationships(value, included, previouslyLinked, relationshipCache); | ||
if (value.attributes) value = deattribute.deattribute(value); | ||
@@ -18,0 +22,0 @@ array.data[array.data.indexOf(value)] = value; |
@@ -150,3 +150,7 @@ (function (global, factory) { | ||
for (let value of array.data) { | ||
value = linkRelationships(value, [...array.data, ...(array.included || [])], previouslyLinked, relationshipCache); | ||
const included = [...array.data.map(item => ({ ...item, | ||
relationships: { ...item.relationships | ||
} | ||
})), ...(array.included || [])]; | ||
value = linkRelationships(value, included, previouslyLinked, relationshipCache); | ||
if (value.attributes) value = deattribute(value); | ||
@@ -153,0 +157,0 @@ array.data[array.data.indexOf(value)] = value; |
{ | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"name": "kitsu-core", | ||
@@ -4,0 +4,0 @@ "description": "Simple, lightweight & framework agnostic JSON:API (de)serialsation components", |
@@ -137,3 +137,3 @@ <h1 align=center>Kitsu Core</h1> | ||
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub") | ||
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub") | ||
@@ -164,3 +164,3 @@ Converts kebab-case and snake_case into camelCase | ||
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub") | ||
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub") | ||
@@ -207,3 +207,3 @@ Hoists attributes to be top-level | ||
[packages/kitsu-core/src/deserialise/index.js:58-73](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/deserialise/index.js#L58-L73 "Source code on GitHub") | ||
[packages/kitsu-core/src/deserialise/index.js:62-77](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/deserialise/index.js#L62-L77 "Source code on GitHub") | ||
@@ -258,3 +258,3 @@ Deserialises a JSON-API response | ||
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub") | ||
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/error/index.js#L27-L33 "Source code on GitHub") | ||
@@ -296,3 +296,3 @@ Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller. | ||
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub") | ||
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/filterIncludes/index.js#L33-L46 "Source code on GitHub") | ||
@@ -337,3 +337,3 @@ Filters includes for the specific relationship requested | ||
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub") | ||
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub") | ||
@@ -356,3 +356,3 @@ Converts camelCase into kebab-case | ||
[packages/kitsu-core/src/linkRelationships/index.js:126-146](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/linkRelationships/index.js#L126-L146 "Source code on GitHub") | ||
[packages/kitsu-core/src/linkRelationships/index.js:126-146](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/linkRelationships/index.js#L126-L146 "Source code on GitHub") | ||
@@ -397,3 +397,3 @@ Links relationships to included data | ||
[packages/kitsu-core/src/query/index.js:33-42](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/query/index.js#L33-L42 "Source code on GitHub") | ||
[packages/kitsu-core/src/query/index.js:33-42](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/query/index.js#L33-L42 "Source code on GitHub") | ||
@@ -426,3 +426,3 @@ Constructs a URL query string for JSON:API parameters | ||
[packages/kitsu-core/src/serialise/index.js:213-224](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/serialise/index.js#L213-L224 "Source code on GitHub") | ||
[packages/kitsu-core/src/serialise/index.js:213-224](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/serialise/index.js#L213-L224 "Source code on GitHub") | ||
@@ -472,3 +472,3 @@ Serialises an object into a JSON-API structure | ||
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub") | ||
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub") | ||
@@ -491,3 +491,3 @@ Converts camelCase into snake_case | ||
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/4a4f64adbd4ab8187ab3d88a964061056ee18be7/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub") | ||
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/d261d4c161f69f98f3f354455a3cc73efddfab82/packages/kitsu-core/src/splitModel/index.js#L29-L39 "Source code on GitHub") | ||
@@ -494,0 +494,0 @@ Split model name from the model's resource URL |
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
96328
1177