From 309e1bc7b74abbb7c9759b1aa65162d5a1c08719 Mon Sep 17 00:00:00 2001
From: David Breitling <david.breitling@sgalinski.de>
Date: Wed, 25 Aug 2021 17:59:04 +0200
Subject: [PATCH] [TASK] Release version 4.5.0

- rewrote sgYoutubeLightbox as ES6 class
- updated UPGRADE.md for future v5 release
---
 Resources/Public/JavaScript/sgYoutubeLightbox.js | 12 ++++--------
 UPGRADE.md                                       |  4 ++++
 composer.json                                    |  2 +-
 ext_emconf.php                                   |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Resources/Public/JavaScript/sgYoutubeLightbox.js b/Resources/Public/JavaScript/sgYoutubeLightbox.js
index 2dbb0e9..d4f760f 100644
--- a/Resources/Public/JavaScript/sgYoutubeLightbox.js
+++ b/Resources/Public/JavaScript/sgYoutubeLightbox.js
@@ -2,17 +2,13 @@
 
 import LightboxManager from 'lightboxManager';
 
-/** @deprecated */
-module.exports = function() {
-	'use strict';
+export default class SgYoutubeLightbox {
 
 	/**
-	 * Initialize the whole Popup setup
+	 * Initializes the LightboxManager with the necessary parameters.
 	 */
-	function init() {
+	constructor() {
 		LightboxManager.init({type: 'video', glightbox: {selector: '.sg-youtube-item'}});
 	}
-
-	init();
-};
+}
 
diff --git a/UPGRADE.md b/UPGRADE.md
index 14d6b6b..b669916 100644
--- a/UPGRADE.md
+++ b/UPGRADE.md
@@ -1,3 +1,7 @@
+## Version 5
+- `youtubeLightbox.js` (deprecated since 4.4.0) using magnific-popup and jQuery removed in favor of `sgYoutubeLightbox.js` (vanilla JS).
+- Extension `project_theme_lightbox` required starting with version 5.0.0.
+
 ## Version 4.4  ```project_theme_lightbox``` integration
 - The magnific popup integration is deprecated and will be removed in later versions.
 - Implement JavaScript according to the readme after integrating ```project_theme_lightbox```
diff --git a/composer.json b/composer.json
index 6205a43..b18a99e 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
     "description": "Embed YouTube Videos of a Playlist or Channel",
     "homepage": "https://www.sgalinski.de",
     "license": "GPL-2.0-or-later",
-    "version": "4.4.1",
+    "version": "4.5.0",
     "require": {
         "typo3/cms-core": "^9.5.4 || ^10.4.0",
         "sgalinski/project-theme-lightbox": "^1.0.0"
diff --git a/ext_emconf.php b/ext_emconf.php
index 504861c..7713b9e 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -36,7 +36,7 @@ $EM_CONF['sg_youtube'] = [
 	'uploadfolder' => '0',
 	'createDirs' => '',
 	'clearCacheOnLoad' => 0,
-	'version' => '4.4.1',
+	'version' => '4.5.0',
 	'constraints' => [
 		'depends' => [
 			'typo3' => '9.5.0-10.4.99',
-- 
GitLab