diff --git a/debian/control b/debian/control index 3bb0f5cdaf..dcff252364 100644 --- a/debian/control +++ b/debian/control @@ -461,7 +461,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-jquery-ujs, # Broken # node-jquery.waitforimages, - node-js-cookie, + node-js-cookie (>= 3.0~), node-js-yaml (>= 3.13.1~), node-jszip, node-jszip-utils (>= 0.0.2+dfsg-2~), diff --git a/debian/patches/nodejs/0060-use-js-cookie-3.patch b/debian/patches/nodejs/0060-use-js-cookie-3.patch new file mode 100644 index 0000000000..cbe17c0fed --- /dev/null +++ b/debian/patches/nodejs/0060-use-js-cookie-3.patch @@ -0,0 +1,221 @@ +From 810896fdaccdba0e76e5062474420c6ce85493c3 Mon Sep 17 00:00:00 2001 +From: Pirate Praveen +Date: Wed, 20 Apr 2022 14:32:07 +0000 +Subject: [PATCH] Update node module js-cookies from ^2.2.1 to ^3.0.0 + +--- + app/assets/javascripts/lib/utils/common_utils.js | 2 +- + app/assets/javascripts/lib/utils/cookies.js | 8 ++++++++ + app/assets/javascripts/main.js | 4 ---- + .../javascripts/work_items_hierarchy/components/app.vue | 2 +- + .../components/qrtly_reconciliation_alert.vue | 2 +- + .../components/qrtly_reconciliation_alert_spec.js | 4 ++-- + ee/spec/frontend/ee_trial_banner/ee_trial_banner_spec.js | 2 +- + ee/spec/frontend/epic/utils/epic_utils_spec.js | 2 +- + ee/spec/frontend/namespace_storage_limit_alert_spec.js | 2 +- + ee/spec/frontend/namespace_user_cap_reached_alert_spec.js | 2 +- + .../project/project_vulnerability_report_spec.js | 2 +- + ee/spec/frontend/vulnerabilities/resolution_alert_spec.js | 2 +- + package.json | 2 +- + spec/frontend/awards_handler_spec.js | 2 +- + spec/frontend/blob/pipeline_tour_success_modal_spec.js | 2 +- + spec/frontend/broadcast_notification_spec.js | 2 +- + .../design_management/components/design_sidebar_spec.js | 2 +- + spec/frontend/diffs/store/actions_spec.js | 2 +- + spec/frontend/emoji/components/utils_spec.js | 4 ++-- + spec/frontend/groups/landing_spec.js | 2 +- + spec/frontend/merge_conflicts/store/actions_spec.js | 4 ++-- + .../projects/learn_gitlab/components/learn_gitlab_spec.js | 2 +- + .../shared/components/pipeline_schedule_callout_spec.js | 2 +- + .../sidebar/components/issuable_sidebar_root_spec.js | 2 +- + yarn.lock | 8 ++++---- + 25 files changed, 37 insertions(+), 33 deletions(-) + create mode 100644 app/assets/javascripts/lib/utils/cookies.js + +--- a/app/assets/javascripts/lib/utils/common_utils.js ++++ b/app/assets/javascripts/lib/utils/common_utils.js +@@ -4,8 +4,8 @@ + + import { GlBreakpointInstance as breakpointInstance } from '@gitlab/ui/dist/utils'; + import $ from 'jquery'; +-import Cookies from 'js-cookie'; + import { isFunction, defer } from 'lodash'; ++import Cookies from '~/lib/utils/cookies'; + import { SCOPED_LABEL_DELIMITER } from '~/vue_shared/components/sidebar/labels_select_widget/constants'; + import { convertToCamelCase, convertToSnakeCase } from './text_utility'; + import { isObject } from './type_utility'; +--- /dev/null ++++ b/app/assets/javascripts/lib/utils/cookies.js +@@ -0,0 +1,8 @@ ++import CookiesBuilder from 'js-cookie'; ++ ++// set default path for cookies ++const Cookies = CookiesBuilder.withAttributes({ ++ path: gon.relative_url_root || '/', ++}); ++ ++export default Cookies; +--- a/app/assets/javascripts/main.js ++++ b/app/assets/javascripts/main.js +@@ -1,7 +1,6 @@ + /* global $ */ + + import jQuery from 'jquery'; +-import Cookies from 'js-cookie'; + + // bootstrap webpack, common libs, polyfills, and behaviors + import './webpack'; +@@ -169,9 +168,6 @@ + initLayoutNav(); + initAlertHandler(); + +-// Set the default path for all cookies to GitLab's root directory +-Cookies.defaults.path = gon.relative_url_root || '/'; +- + // `hashchange` is not triggered when link target is already in window.location + $body.on('click', 'a[href^="#"]', function clickHashLinkCallback() { + const href = this.getAttribute('href'); +--- a/app/assets/javascripts/work_items_hierarchy/components/app.vue ++++ b/app/assets/javascripts/work_items_hierarchy/components/app.vue +@@ -1,6 +1,6 @@ +