diff --git a/CHANGELOG.md b/CHANGELOG.md index 9553017..dbbe2f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [v1.1.0](https://github.com/AlchemyCMS/alchemy-json_api/tree/v1.0.0) (2022-09-16) + +[Full Changelog](https://github.com/AlchemyCMS/alchemy-json_api/compare/v1.0.0...v1.1.0) + +**Merged pull requests:** + +- JS: Add support for deserializing camelCased attributes [\#65](https://github.com/AlchemyCMS/alchemy-json_api/pull/65) ([tvdeyen](https://github.com/tvdeyen)) + ## [v1.0.0](https://github.com/AlchemyCMS/alchemy-json_api/tree/v1.0.0) (2022-09-09) [Full Changelog](https://github.com/AlchemyCMS/alchemy-json_api/compare/v0.26.0...v1.0.0) diff --git a/dist/alchemy-json_api.js b/dist/alchemy-json_api.js index f99f865..1aa2d81 100644 --- a/dist/alchemy-json_api.js +++ b/dist/alchemy-json_api.js @@ -86,13 +86,15 @@ function findJsonApiIncluded(included, type, id, options) { function filterDeprecatedElements(elements) { const els = []; elements.forEach(element => { - var _element$nested_eleme, _element$essences; - - if (((_element$nested_eleme = element.nested_elements) === null || _element$nested_eleme === void 0 ? void 0 : _element$nested_eleme.length) > 0) { + if (element.nested_elements?.length > 0) { element.nested_elements = filterDeprecatedElements(element.nested_elements); } - if (((_element$essences = element.essences) === null || _element$essences === void 0 ? void 0 : _element$essences.length) > 0) { + if (element.nestedElements?.length > 0) { + element.nestedElements = filterDeprecatedElements(element.nestedElements); + } + + if (element.essences?.length > 0) { element.essences = element.essences.filter(essence => { return !essence.deprecated; }); diff --git a/lib/alchemy/json_api/version.rb b/lib/alchemy/json_api/version.rb index ef3eaa9..e6fa4ab 100644 --- a/lib/alchemy/json_api/version.rb +++ b/lib/alchemy/json_api/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Alchemy module JsonApi - VERSION = "1.0.0" + VERSION = "1.1.0" end end diff --git a/package.json b/package.json index c8d6c73..ccea03a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alchemy_cms/json_api", - "version": "1.0.0", + "version": "1.1.0", "description": "JSON API deserializer for AlchemyCMS", "license": "BSD-3-Clause", "repository": {