From 47274ba94e9e21f829a1f6061a85cd52dd33d202 Mon Sep 17 00:00:00 2001
From: Nikita Hovratov <nikita.h@live.de>
Date: Sat, 9 Oct 2021 20:46:26 +0200
Subject: [PATCH] [TASK] Upgrade @types/bootstrap to 5.1.6

This resolves a todo in Tooltip.ts, where we've waited
for an updated types definition for bootstrap. Now
some new methods, like Tooltip.getOrCreateInstance,
are known to TypeScript and can be used, without
setting an ignore comment.

Command used:
> yarn upgrade @types/bootstrap --latest

Resolves: #95553
Releases: master
Change-Id: I4f9c33c735580ebb02d29b3910403f03c01a5913
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71522
Tested-by: core-ci <typo3@b13.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 .../backend/Resources/Public/TypeScript/Tooltip.ts        | 4 ----
 Build/package.json                                        | 2 +-
 Build/yarn.lock                                           | 8 ++++----
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Tooltip.ts b/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Tooltip.ts
index 2666651fe3b1..b0383961558e 100644
--- a/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Tooltip.ts
+++ b/Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Tooltip.ts
@@ -45,10 +45,6 @@ class Tooltip {
     }
     const elements = document.querySelectorAll(selector);
     for (const element of elements) {
-      // @ts-ignore
-      // todo this method is missing in types/bootstrap.
-      // todo see: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/54289
-      // todo Remove ts-ignore, when it is added.
       // Ensure elements are not initialized multiple times.
       BootstrapTooltip.getOrCreateInstance(element, options);
     }
diff --git a/Build/package.json b/Build/package.json
index 4a36561fdc03..66d6f96f3b14 100644
--- a/Build/package.json
+++ b/Build/package.json
@@ -13,7 +13,7 @@
   },
   "devDependencies": {
     "@rollup/plugin-replace": "^2.4.2",
-    "@types/bootstrap": "^5.1.0",
+    "@types/bootstrap": "^5.1.6",
     "@types/chosen-js": "^1.8.1",
     "@types/chrome": "^0.0.123",
     "@types/ckeditor": "^4.9.10",
diff --git a/Build/yarn.lock b/Build/yarn.lock
index 2a90c018ea7c..36aeecd30d22 100644
--- a/Build/yarn.lock
+++ b/Build/yarn.lock
@@ -638,10 +638,10 @@
   resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
   integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
 
-"@types/bootstrap@^5.1.0":
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/@types/bootstrap/-/bootstrap-5.1.0.tgz#0df3e430ab18b911e549a87bf7bb824bb958bfb2"
-  integrity sha512-cR+eQJ/IrgcJZheb7xkKPiPNOa48zkc6fLZ4U9lDNNQp3qiiq3tW1xgrd+VzVJCram/Bnh+DdBsdsPdXKIYClA==
+"@types/bootstrap@^5.1.6":
+  version "5.1.6"
+  resolved "https://registry.yarnpkg.com/@types/bootstrap/-/bootstrap-5.1.6.tgz#669a0cd7fb37bca12424e0d68f1f4704cfcdb780"
+  integrity sha512-3L6IvOCKyoVd3e4bgQTH7VBPbuYEOG8IQbRcuZ0AbjfwPdRX+kVf5L/7mVt1EVM+D/BVw4+71rtp7Z8yYROlpQ==
   dependencies:
     "@popperjs/core" "^2.9.2"
     "@types/jquery" "*"
-- 
GitLab