Преглед изворни кода

Mise à jour webpack et consort

Sangfroid пре 1 недеља
родитељ
комит
6749285010
9 измењених фајлова са 741 додато и 917 уклоњено
  1. 9 10
      assets/app.js
  2. 1 1
      assets/js/addCollectionVanilla.js
  3. 0 30
      assets/js/filtre.js
  4. 3 3
      composer.json
  5. 43 41
      composer.lock
  6. 10 8
      package.json
  7. 3 3
      symfony.lock
  8. 11 9
      webpack.config.js
  9. 661 812
      yarn.lock

+ 9 - 10
assets/app.js

@@ -1,18 +1,17 @@
 import './stimulus_bootstrap.js';
 import './styles/app.scss';
 import 'bootstrap';
-import 'font-awesome/css/font-awesome.css';
-import 'bootstrap-star-rating';
-import 'bootstrap-star-rating/locales/fr'
-import 'bootstrap-star-rating/js/locales/fr'
+import '@fortawesome/fontawesome-free/css/all.css';
+import 'bootstrap-star-rating/js/star-rating.js';
+import 'bootstrap-star-rating/locales/fr.js'
+import 'bootstrap-star-rating/js/locales/fr.js'
 import 'bootstrap-star-rating/css/star-rating.css';
-import 'bootstrap-star-rating/themes/krajee-fa/theme';
+import 'bootstrap-star-rating/themes/krajee-fa/theme.js';
 import 'bootstrap-star-rating/themes/krajee-fa/theme.css';
-import './js/filtre';
-import './js/colorModeBootstrap'
-import { switchView } from './js/switchViewVanilla';
-import { switchEtat } from './js/switchEtat';
-import './js/addCollectionVanilla'
+import './js/colorModeBootstrap.js'
+import { switchView } from './js/switchViewVanilla.js';
+import { switchEtat } from './js/switchEtat.js';
+import './js/addCollectionVanilla.js'
 
 const sv = switchView("#switchview");
 const se = switchEtat ('[data-fonction="switch"]');

+ 1 - 1
assets/js/addCollectionVanilla.js

@@ -1,4 +1,4 @@
-import { autocomplete } from './autocomplete'
+import { autocomplete } from './autocomplete.js'
 
 (() => {
     document

+ 0 - 30
assets/js/filtre.js

@@ -1,30 +0,0 @@
-(function ($) {
-    $.fn.filtre = function () {
-        let value = $(this).val().toLowerCase();
-        let target = $(this).data('target');
-        $(target + " article").filter(function () {
-            $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
-        });
-    };
-}) (jQuery);
-
-(function ($) {
-    $.fn.filtreParNote = function () {
-        this.each(function() {
-            $(this).val("0");
-            $(this).on("change", function(e) {
-                let value = $(this).val();
-                let target = $(this).data('path');
-                if ($(target + " article").length) {
-                    $(target + " article").filter(function () {
-                        $(this).toggle($("input.rating", this).val() >= value);
-                    });
-                } else {
-                    $(target + "  tr").filter(function () {
-                        $(this).toggle($("td input.rating", this).val() >= value);
-                    });
-                }
-            });
-        });
-    }
-}) (jQuery);

+ 3 - 3
composer.json

@@ -3,7 +3,7 @@
     "type": "project",
     "license": "wtflp",
     "require": {
-        "php": "^8.2",
+        "php": "^8.4",
         "ext-ctype": "*",
         "ext-iconv": "*",
         "beberlei/doctrineextensions": "^1.5",
@@ -31,7 +31,7 @@
         "symfony/runtime": "7.4.*",
         "symfony/security-bundle": "7.4.*",
         "symfony/serializer": "7.4.*",
-        "symfony/stimulus-bundle": "^2.18",
+        "symfony/stimulus-bundle": "^3.6",
         "symfony/translation": "7.4.*",
         "symfony/twig-bundle": "7.4.*",
         "symfony/ux-chartjs": "^2.20",
@@ -56,7 +56,7 @@
     },
     "config": {
         "platform":{
-            "php": "8.2"
+            "php": "8.4"
         },
         "preferred-install": {
             "*": "dist"

+ 43 - 41
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "79f04cee83f5074a0a63323e27915e2d",
+    "content-hash": "cf73bd597f68df986db44433cba13c26",
     "packages": [
         {
             "name": "beberlei/doctrineextensions",
@@ -219,29 +219,29 @@
         },
         {
             "name": "doctrine/collections",
-            "version": "2.6.0",
+            "version": "3.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/collections.git",
-                "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2"
+                "reference": "7c2f25ed928553a3de389ccb99aa46c0eedb2d4d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/collections/zipball/7713da39d8e237f28411d6a616a3dce5e20d5de2",
-                "reference": "7713da39d8e237f28411d6a616a3dce5e20d5de2",
+                "url": "https://api.github.com/repos/doctrine/collections/zipball/7c2f25ed928553a3de389ccb99aa46c0eedb2d4d",
+                "reference": "7c2f25ed928553a3de389ccb99aa46c0eedb2d4d",
                 "shasum": ""
             },
             "require": {
                 "doctrine/deprecations": "^1",
-                "php": "^8.1",
-                "symfony/polyfill-php84": "^1.30"
+                "php": "^8.4",
+                "symfony/polyfill-php86": "^1.36"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^14",
                 "ext-json": "*",
                 "phpstan/phpstan": "^2.1.30",
                 "phpstan/phpstan-phpunit": "^2.0.7",
-                "phpunit/phpunit": "^10.5.58 || ^11.5.42 || ^12.4"
+                "phpunit/phpunit": "^12.4"
             },
             "type": "library",
             "autoload": {
@@ -285,7 +285,7 @@
             ],
             "support": {
                 "issues": "https://github.com/doctrine/collections/issues",
-                "source": "https://github.com/doctrine/collections/tree/2.6.0"
+                "source": "https://github.com/doctrine/collections/tree/3.1.0"
             },
             "funding": [
                 {
@@ -301,7 +301,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2026-01-15T10:01:58+00:00"
+            "time": "2026-04-29T20:41:02+00:00"
         },
         {
             "name": "doctrine/dbal",
@@ -857,30 +857,29 @@
         },
         {
             "name": "doctrine/instantiator",
-            "version": "2.0.0",
+            "version": "2.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/instantiator.git",
-                "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
+                "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
-                "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/23da848e1a2308728fe5fdddabf4be17ff9720c7",
+                "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7",
                 "shasum": ""
             },
             "require": {
-                "php": "^8.1"
+                "php": "^8.4"
             },
             "require-dev": {
-                "doctrine/coding-standard": "^11",
+                "doctrine/coding-standard": "^14",
                 "ext-pdo": "*",
                 "ext-phar": "*",
                 "phpbench/phpbench": "^1.2",
-                "phpstan/phpstan": "^1.9.4",
-                "phpstan/phpstan-phpunit": "^1.3",
-                "phpunit/phpunit": "^9.5.27",
-                "vimeo/psalm": "^5.4"
+                "phpstan/phpstan": "^2.1",
+                "phpstan/phpstan-phpunit": "^2.0",
+                "phpunit/phpunit": "^10.5.58"
             },
             "type": "library",
             "autoload": {
@@ -907,7 +906,7 @@
             ],
             "support": {
                 "issues": "https://github.com/doctrine/instantiator/issues",
-                "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
+                "source": "https://github.com/doctrine/instantiator/tree/2.1.0"
             },
             "funding": [
                 {
@@ -923,7 +922,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-12-30T00:23:10+00:00"
+            "time": "2026-01-05T06:47:08+00:00"
         },
         {
             "name": "doctrine/lexer",
@@ -7166,33 +7165,36 @@
         },
         {
             "name": "symfony/stimulus-bundle",
-            "version": "v2.36.0",
+            "version": "v3.6.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stimulus-bundle.git",
-                "reference": "377a3d1ec5834631a7db53bd275276ff3c5b49df"
+                "reference": "3a042de9aff0ce706990c8cccd70661222c06e9e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/stimulus-bundle/zipball/377a3d1ec5834631a7db53bd275276ff3c5b49df",
-                "reference": "377a3d1ec5834631a7db53bd275276ff3c5b49df",
+                "url": "https://api.github.com/repos/symfony/stimulus-bundle/zipball/3a042de9aff0ce706990c8cccd70661222c06e9e",
+                "reference": "3a042de9aff0ce706990c8cccd70661222c06e9e",
                 "shasum": ""
             },
             "require": {
-                "php": ">=8.1",
-                "symfony/config": "^5.4|^6.0|^7.0|^8.0",
-                "symfony/dependency-injection": "^5.4|^6.0|^7.0|^8.0",
+                "php": ">=8.4",
+                "symfony/config": "^7.4|^8.0",
+                "symfony/dependency-injection": "^7.4|^8.0",
                 "symfony/deprecation-contracts": "^2.0|^3.0",
-                "symfony/finder": "^5.4|^6.0|^7.0|^8.0",
-                "symfony/http-kernel": "^5.4|^6.0|^7.0|^8.0",
-                "twig/twig": "^2.15.3|^3.8"
+                "symfony/finder": "^7.4|^8.0",
+                "symfony/http-kernel": "^7.4|^8.0",
+                "twig/twig": "^2.15.3|^3.8|^4.0"
+            },
+            "conflict": {
+                "symfony/asset-mapper": "<6.4"
             },
             "require-dev": {
-                "symfony/asset-mapper": "^6.3|^7.0|^8.0",
-                "symfony/framework-bundle": "^5.4|^6.0|^7.0|^8.0",
-                "symfony/phpunit-bridge": "^5.4|^6.0|^7.0|^8.0",
-                "symfony/twig-bundle": "^5.4|^6.0|^7.0|^8.0",
-                "zenstruck/browser": "^1.4"
+                "phpunit/phpunit": "^11.1|^12.0",
+                "symfony/asset-mapper": "^7.4|^8.0",
+                "symfony/framework-bundle": "^7.4|^8.0",
+                "symfony/twig-bundle": "^7.4|^8.0",
+                "zenstruck/browser": "^1.9"
             },
             "type": "symfony-bundle",
             "autoload": {
@@ -7215,7 +7217,7 @@
                 "symfony-ux"
             ],
             "support": {
-                "source": "https://github.com/symfony/stimulus-bundle/tree/v2.36.0"
+                "source": "https://github.com/symfony/stimulus-bundle/tree/v3.6.0"
             },
             "funding": [
                 {
@@ -7235,7 +7237,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2026-05-06T04:31:36+00:00"
+            "time": "2026-10-13T08:04:44+00:00"
         },
         {
             "name": "symfony/stopwatch",
@@ -11035,13 +11037,13 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": "^8.2",
+        "php": "^8.4",
         "ext-ctype": "*",
         "ext-iconv": "*"
     },
     "platform-dev": {},
     "platform-overrides": {
-        "php": "8.2"
+        "php": "8.4"
     },
     "plugin-api-version": "2.9.0"
 }

+ 10 - 8
package.json

@@ -1,28 +1,30 @@
 {
     "devDependencies": {
-        "@babel/core": "^7.17.0",
-        "@babel/preset-env": "^7.16.0",
+        "@babel/core": "^8.0.0",
+        "@babel/preset-env": "^8.0.0",
+        "@fortawesome/fontawesome-free": "^7.3.1",
         "@hotwired/stimulus": "^3.0.0",
         "@popperjs/core": "^2.11.8",
-        "@symfony/stimulus-bridge": "^3.2.1",
+        "@symfony/stimulus-bridge": "^4.0.2",
         "@symfony/ux-chartjs": "file:vendor/symfony/ux-chartjs/assets",
-        "@symfony/webpack-encore": "^5.1.0",
+        "@symfony/webpack-encore": "^7.0.0",
+        "babel-plugin-polyfill-corejs3": "^1.0.0",
         "bootstrap": "^5.3.8",
         "bootstrap-star-rating": "^4.1.2",
         "chart.js": "^3.4.1 || ^4.0",
-        "core-js": "^3.38.0",
-        "font-awesome": "^4.7.0",
+        "core-js-pure": "^3.51.0",
         "jquery": "^3.7.1",
         "regenerator-runtime": "^0.13.9",
         "sass": "1.66.1",
         "sass-loader": "^16.0.0",
         "stimulus": "^3.0.1",
-        "webpack": "^5.74.0",
-        "webpack-cli": "^5.1.0",
+        "webpack": "^5.82",
+        "webpack-cli": "^7.0.0",
         "webpack-notifier": "^1.15.0"
     },
     "license": "UNLICENSED",
     "private": true,
+    "type": "module",
     "scripts": {
         "dev-server": "encore dev-server",
         "dev": "encore dev",

+ 3 - 3
symfony.lock

@@ -568,12 +568,12 @@
         ]
     },
     "symfony/webpack-encore-bundle": {
-        "version": "2.3",
+        "version": "2.4",
         "recipe": {
             "repo": "github.com/symfony/recipes",
             "branch": "main",
-            "version": "2.0",
-            "ref": "719f6110345acb6495e496601fc1b4977d7102b3"
+            "version": "2.2",
+            "ref": "b618bf5f17ed61f523da7153025bf58ec9502f65"
         },
         "files": [
             "assets/app.js",

+ 11 - 9
webpack.config.js

@@ -1,4 +1,4 @@
-const Encore = require('@symfony/webpack-encore');
+import Encore from '@symfony/webpack-encore';
 
 // Manually configure the runtime environment if not already configured yet by the "encore" command.
 // It's useful when you use tools that rely on webpack.config.js file.
@@ -48,15 +48,17 @@ Encore
     // enables hashed filenames (e.g. app.abc123.css)
     .enableVersioning(Encore.isProduction())
 
-    // configure Babel
-    // .configureBabel((config) => {
-    //     config.plugins.push('@babel/a-babel-plugin');
+    // Configure JS and CSS minimizers
+    // .configureJsMinimizerPlugin((options, MinimizerPlugin) => {
+    //     options.minify = MinimizerPlugin.esbuildMinify
+    // })
+    // .configureCssMinimizerPlugin((options, MinimizerPlugin) => {
+    //     options.minify = MinimizerPlugin.lightningCssMinify;
     // })
 
-    // enables and configure @babel/preset-env polyfills
-    .configureBabelPresetEnv((config) => {
-        config.useBuiltIns = 'usage';
-        config.corejs = '3.38';
+    // configure Babel
+    .configureBabel((config) => {
+        config.plugins.push(['polyfill-corejs3', { method: 'usage-pure', version: '3.49' }]);
     })
 
     // enables Sass/SCSS support
@@ -76,4 +78,4 @@ Encore
     .autoProvidejQuery()
 ;
 
-module.exports = Encore.getWebpackConfig();
+export default await Encore.getWebpackConfig();

Разлика између датотеке није приказан због своје велике величине
+ 661 - 812
yarn.lock


Неке датотеке нису приказане због велике количине промена