From 1b3d5574c38faced4e2cf6717ce7cffc6d573f04 Mon Sep 17 00:00:00 2001 From: Aritra Banerjee <103491935+AritraLeo@users.noreply.github.com> Date: Sun, 17 Mar 2024 16:16:13 +0530 Subject: [PATCH 1/6] Bootstrap version updated to remove jQuery dependency --- package-lock.json | 77 ++++++++++++++++++----------------------------- package.json | 5 ++- rollup.config.js | 8 +++-- www/index.html | 2 +- 4 files changed, 37 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c1c9cead..a35808aeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,9 +10,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "5.9.0", "@types/fs-extra": "^9.0.11", - "bootstrap": "^4.6.2", - "core-js": "3.30.2", - "jquery": "^3.7.0" + "bootstrap": "^5.0.2", + "core-js": "3.30.2" }, "devDependencies": { "@babel/cli": "^7.21.5", @@ -2940,6 +2939,16 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/plugin-babel": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", @@ -3858,22 +3867,15 @@ "dev": true }, "node_modules/bootstrap": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", - "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ], + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.2.tgz", + "integrity": "sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + }, "peerDependencies": { - "jquery": "1.9.1 - 3", - "popper.js": "^1.16.1" + "@popperjs/core": "^2.9.2" } }, "node_modules/bowser": { @@ -6736,11 +6738,6 @@ "@sideway/pinpoint": "^2.0.0" } }, - "node_modules/jquery": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", - "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" - }, "node_modules/js-md4": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", @@ -7966,17 +7963,6 @@ "node": ">=4.0.0" } }, - "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", @@ -12815,6 +12801,12 @@ "fastq": "^1.6.0" } }, + "@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true + }, "@rollup/plugin-babel": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", @@ -13461,9 +13453,9 @@ "dev": true }, "bootstrap": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", - "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.2.tgz", + "integrity": "sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==", "requires": {} }, "bowser": { @@ -15562,11 +15554,6 @@ "@sideway/pinpoint": "^2.0.0" } }, - "jquery": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", - "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" - }, "js-md4": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", @@ -16484,12 +16471,6 @@ "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", "dev": true }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "peer": true - }, "portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", diff --git a/package.json b/package.json index cbe8f87b9..103c91394 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "5.9.0", "@types/fs-extra": "^9.0.11", - "bootstrap": "^4.6.2", - "core-js": "3.30.2", - "jquery": "^3.7.0" + "bootstrap": "^5.0.2", + "core-js": "3.30.2" }, "devDependencies": { "@babel/cli": "^7.21.5", diff --git a/rollup.config.js b/rollup.config.js index 2db22e889..91ed0d367 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -43,7 +43,9 @@ const config = { copy({ targets: [{ src: ['www/js/lib/*dec-wasm.wasm', 'www/js/lib/libzim-asm.js', 'www/js/lib/libzim-wasm.*', 'www/js/lib/webpHeroBundle*', - 'node_modules/bootstrap/dist/js/bootstrap.bundle.min.*', 'node_modules/jquery/dist/jquery.slim.min.*', '!www/js/lib/libzim-wasm.dev*'], + 'node_modules/bootstrap/dist/js/bootstrap.bundle.min.*', + // 'node_modules/jquery/dist/jquery.slim.min.*', + '!www/js/lib/libzim-wasm.dev*'], dest: 'dist/www/js' }, { src: ['node_modules/bootstrap/dist/css/bootstrap.min.*'], dest: 'dist/www/css' }, @@ -131,7 +133,7 @@ if (process.env.BUILD === 'production') { // Comment out the old app.js link .replace(/( + From 146ff05511dd1242250215bbe22e6f020135c1be Mon Sep 17 00:00:00 2001 From: Aritra Banerjee <103491935+AritraLeo@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:25:34 +0530 Subject: [PATCH 2/6] Button Toggle issue and hover color resolved --- service-worker.js | 2 -- www/index.html | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/service-worker.js b/service-worker.js index 5432d734d..da860fa6e 100644 --- a/service-worker.js +++ b/service-worker.js @@ -151,8 +151,6 @@ const precacheFiles = [ 'node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map', 'node_modules/bootstrap/dist/css/bootstrap.min.css', 'node_modules/bootstrap/dist/css/bootstrap.min.css.map', - 'node_modules/jquery/dist/jquery.slim.min.js', - 'node_modules/jquery/dist/jquery.slim.min.map' ]; if ('WebAssembly' in self) { diff --git a/www/index.html b/www/index.html index 6ae5b94a6..00bcfa725 100644 --- a/www/index.html +++ b/www/index.html @@ -83,8 +83,8 @@