From 3210741a724fd0f44ad7a9c42d04b72c7300bdf8 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Tue, 5 Dec 2023 07:30:43 +0100 Subject: [PATCH 1/3] chore: update methods to lodash 4 verios --- views/js/previewer/adapter/test/qtiTest.js | 2 +- views/js/previewer/proxy/item.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/js/previewer/adapter/test/qtiTest.js b/views/js/previewer/adapter/test/qtiTest.js index 32cabe0..91fde72 100644 --- a/views/js/previewer/adapter/test/qtiTest.js +++ b/views/js/previewer/adapter/test/qtiTest.js @@ -60,7 +60,7 @@ define([ const transformConfiguration = config => { const plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins; const { view, readOnly, fullPage, hideActionBars, pluginsOptions } = config; - const options = _.omit({ view, readOnly, fullPage, hideActionBars }, _.isUndefined); + const options = _.omitBy({ view, readOnly, fullPage, hideActionBars }, _.isUndefined); return request({ url: urlUtil.route('configuration', testPreviewerController, taoExtension), diff --git a/views/js/previewer/proxy/item.js b/views/js/previewer/proxy/item.js index 93e0923..8b3d24b 100644 --- a/views/js/previewer/proxy/item.js +++ b/views/js/previewer/proxy/item.js @@ -58,7 +58,7 @@ define([ if (_.isPlainObject(actionParams)) { return _.mapValues(actionParams, (value, key) => { - if (_.contains(stringifyParams, key)) { + if (_.includes(stringifyParams, key)) { return JSON.stringify(value); } return value; From 6a0edef889c5390661574ea4db8166979376a56c Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Thu, 25 Jan 2024 09:44:26 +0100 Subject: [PATCH 2/3] fix: update omit --- views/js/previewer/adapter/test/qtiTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/js/previewer/adapter/test/qtiTest.js b/views/js/previewer/adapter/test/qtiTest.js index 91fde72..32cabe0 100644 --- a/views/js/previewer/adapter/test/qtiTest.js +++ b/views/js/previewer/adapter/test/qtiTest.js @@ -60,7 +60,7 @@ define([ const transformConfiguration = config => { const plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins; const { view, readOnly, fullPage, hideActionBars, pluginsOptions } = config; - const options = _.omitBy({ view, readOnly, fullPage, hideActionBars }, _.isUndefined); + const options = _.omit({ view, readOnly, fullPage, hideActionBars }, _.isUndefined); return request({ url: urlUtil.route('configuration', testPreviewerController, taoExtension), From 0c4e0a957fe3526067e46bdc775680f1f2ba746f Mon Sep 17 00:00:00 2001 From: Sergei Mikhailov Date: Thu, 1 Feb 2024 18:06:52 +0100 Subject: [PATCH 3/3] chore: add an explicit dependency on tao-core that is introducing lodash v4 Signed-off-by: Sergei Mikhailov --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0cbfa8a..f2c9685 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "require": { "oat-sa/oatbox-extension-installer": "~1.1||dev-master", "oat-sa/generis" : ">=15.22", - "oat-sa/tao-core" : ">=50.24.6", + "oat-sa/tao-core" : ">=54.0.0", "oat-sa/extension-tao-item" : ">=11.11.2", "oat-sa/extension-tao-itemqti" : ">=28.22.0", "oat-sa/extension-tao-testqti" : ">=47.2.3",