Parcourir la source

update dev dependencies, address ESlint error

null coalescing operator is only available as of ES2020, if we make it an array an or might do
El RIDO il y a 2 mois
Parent
commit
a4bad44334
4 fichiers modifiés avec 170 ajouts et 236 suppressions
  1. 165 232
      js/package-lock.json
  2. 2 1
      js/package.json
  3. 2 2
      js/privatebin.js
  4. 1 1
      lib/Configuration.php

Fichier diff supprimé car celui-ci est trop grand
+ 165 - 232
js/package-lock.json


+ 2 - 1
js/package.json

@@ -9,9 +9,10 @@
   "devDependencies": {
     "@peculiar/webcrypto": "^1.5.0",
     "eslint": "^9.37.0",
-    "jsdom": "^26.0.0",
+    "jsdom": "^26.1.0",
     "jsdom-global": "^3.0.2",
     "jsverify": "^0.8.3",
+    "mime-types": "^3.0.2",
     "mocha": "^11.7.5",
     "nyc": "^17.1.0"
   },

+ 2 - 2
js/privatebin.js

@@ -3075,7 +3075,7 @@ jQuery.PrivateBin = (function($) {
          */
         me.removeAttachmentData = function()
         {
-            files = undefined;
+            files = [];
             attachmentsData = [];
         };
 
@@ -5231,7 +5231,7 @@ jQuery.PrivateBin = (function($) {
                 };
             if (attachmentsData.length) {
                 cipherMessage['attachment'] = attachmentsData;
-                cipherMessage['attachment_name'] = AttachmentViewer.getFiles()?.map((fileInfo => fileInfo.name)) ?? [];
+                cipherMessage['attachment_name'] = AttachmentViewer.getFiles().map(fileInfo => fileInfo.name) || [];
             } else if (AttachmentViewer.hasAttachment()) {
                 // fall back to cloned part
                 let attachments = AttachmentViewer.getAttachments();

+ 1 - 1
lib/Configuration.php

@@ -122,7 +122,7 @@ class Configuration
             'js/kjua-0.10.0.js'      => 'sha512-BYj4xggowR7QD150VLSTRlzH62YPfhpIM+b/1EUEr7RQpdWAGKulxWnOvjFx1FUlba4m6ihpNYuQab51H6XlYg==',
             'js/legacy.js'           => 'sha512-RQEo1hxpNc37i+jz/D9/JiAZhG8GFx3+SNxjYnI7jUgirDIqrCSj6QPAAZeaidditcWzsJ3jxfEj5lVm7ZwTRQ==',
             'js/prettify.js'         => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
-            'js/privatebin.js'       => 'sha512-kRRgq+R3dUScoqqjTQo+re+T+FrsaukqMO7qSMen2fq0Rcgz2S0GnR52sqKukbDDKRr/dDba01WWPccduYr+Jg==',
+            'js/privatebin.js'       => 'sha512-WIuz0gvP6wdiFOIrtIfIA7a5rDl6HdX3sYwbI26K0SR1PsFLLtTAQIb7aXI/dQQSu3d7diQwHDzBczcl4Bsh8A==',
             'js/purify-3.4.1.js'     => 'sha512-280a/Vb6fVFsYaeRrkuDp4EDmdYlt2XS+dlDEO/U9qljPrAraA2bIzHTNmP+9dpwPDDwTML+RS+h5iaagPwTzA==',
             'js/showdown-2.1.0.js'   => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
             'js/zlib-1.3.2.js'       => 'sha512-RAhJgxg9siMIA8ky4c10Rc2zUgnK80olHB8Tt1IOYWY4Eh1WmrviQkDn+sgBlb38ZHq3tzufGC41kP360gmosQ==',

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff