From 7be6da063d170747cf6087d1505880aba23aa092 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Tue, 23 Apr 2024 15:51:44 +0300 Subject: [PATCH] fix: pin-down `react-sortablejs` version --- .../src/repeater/RepeaterComponent.js | 2 ++ package-lock.json | 18 ++++++------------ package.json | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/assets/apps/customizer-controls/src/repeater/RepeaterComponent.js b/assets/apps/customizer-controls/src/repeater/RepeaterComponent.js index afed7dd2fe..1e058b3df6 100644 --- a/assets/apps/customizer-controls/src/repeater/RepeaterComponent.js +++ b/assets/apps/customizer-controls/src/repeater/RepeaterComponent.js @@ -61,6 +61,8 @@ const RepeaterComponent = ({ control }) => { const updateValue = (newVal) => { setValue(newVal); + + // INFO: The version react-sortablejs higher than 6.0.3 will modify the original `value` array. This will add new keys (selected, chosen) which will make the value to be rejected by sanitize_callback in `sanitize_social_icons_repeater` function. control.setting.set(JSON.stringify(newVal)); }; diff --git a/package-lock.json b/package-lock.json index 72b606352a..e125538cd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,14 @@ { "name": "neve", - "version": "3.8.0", + "version": "3.8.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "neve", - "version": "3.8.0", + "version": "3.8.6", "license": "GPL-2.0-or-later", "dependencies": { - "@formbricks/js": "^1.4.1", "@neve-wp/components": "file:./assets/apps/components", "array-move": "^4.0.0", "classnames": "^2.2.6", @@ -17,7 +16,7 @@ "eslint-plugin-prettier": "^5.0.1", "fuse.js": "^7.0.0", "prop-types": "^15.7.2", - "react-sortablejs": "^6.0.0", + "react-sortablejs": "6.0.3", "react-visibility-sensor": "^5.1.1", "sortablejs": "^1.13.0", "tiny-slider": "^2.9.2" @@ -2713,11 +2712,6 @@ "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==", "dev": true }, - "node_modules/@formbricks/js": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@formbricks/js/-/js-1.5.0.tgz", - "integrity": "sha512-Q8kwqwlWk4FAuVnOGeQBD7v160fg1bVgxXSIWy6q7oqb7o9xIxTrG7+tFBln6Os0G7ko9iPKKqcCWXQAoDE+Vg==" - }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", @@ -32199,9 +32193,9 @@ } }, "node_modules/react-sortablejs": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/react-sortablejs/-/react-sortablejs-6.1.4.tgz", - "integrity": "sha512-fc7cBosfhnbh53Mbm6a45W+F735jwZ1UFIYSrIqcO/gRIFoDyZeMtgKlpV4DdyQfbCzdh5LoALLTDRxhMpTyXQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/react-sortablejs/-/react-sortablejs-6.0.3.tgz", + "integrity": "sha512-Aoxl/kuqOA1A2y42Z4E/uZ+eAP2rP11TYM+CZYfs3VoYlh7rzwIdVqrKPibYg1CdzFkJiFb4pYGmMvGKYKv3bA==", "dependencies": { "classnames": "2.3.1", "tiny-invariant": "1.2.0" diff --git a/package.json b/package.json index ca24b71353..425ba56dda 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "eslint-plugin-prettier": "^5.0.1", "fuse.js": "^7.0.0", "prop-types": "^15.7.2", - "react-sortablejs": "^6.0.0", + "react-sortablejs": "6.0.3", "react-visibility-sensor": "^5.1.1", "sortablejs": "^1.13.0", "tiny-slider": "^2.9.2"