diff --git a/gulpfile.ts b/gulpfile.ts index eb770251f5a7d..d7a6b4951eccb 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -100,7 +100,11 @@ export function copyJs() { "./node_modules/jsvectormap/dist/maps/world-merc.js", "./node_modules/select2/dist/js/select2.min.js", "./node_modules/jsbarcode/dist/JsBarcode.all.min.js", - ]). + "./node_modules/jquery/dist/jquery.js", + ], { + // prefer jquery from package.json to foundation-vendored copy + ignore: "./node_modules/foundation-sites/js/vendor/jquery.js", + }). pipe(init()). pipe(terser()). pipe(write(".")). @@ -137,7 +141,6 @@ function buildjQueryUi() { "./node_modules/jquery-ui/ui/position.js", "./node_modules/jquery-ui/ui/keycode.js", "./node_modules/jquery-ui/ui/unique-id.js", - "./node_modules/jquery-ui/ui/safe-active-element.js", "./node_modules/jquery-ui/ui/widgets/autocomplete.js", "./node_modules/jquery-ui/ui/widgets/menu.js", ]). diff --git a/html/js/folksonomy.js b/html/js/folksonomy.js index 048ea40ccbdc6..61c3553eb30a4 100644 --- a/html/js/folksonomy.js +++ b/html/js/folksonomy.js @@ -7,10 +7,10 @@ /* eslint no-unused-expressions: ["error", { "allowTernary": true }] */ // Product Opener (Open Food Facts web app) uses: -// * jQuery 2.1.4: view-source:https://static.openfoodfacts.org/js/dist/jquery.js (~84 KB) -// http://code.jquery.com/jquery-2.1.4.min.js -// * jQuery-UI 1.12.1: view-source:https://static.openfoodfacts.org/js/dist/jquery-ui.js (~82 KB) -// http://code.jquery.com/ui/1.12.1/jquery-ui.min.js +// * jQuery 2.2.4: view-source:https://static.openfoodfacts.org/js/dist/jquery.js (~84 KB) +// http://code.jquery.com/jquery-2.2.4.min.js +// * jQuery-UI 1.14.1: view-source:https://static.openfoodfacts.org/js/dist/jquery-ui.js (~35 KB) +// http://code.jquery.com/ui/1.14.1/jquery-ui.min.js // * Tagify 3.x: https://github.com/yairEO/tagify (~47 KB) // * Foundation 5 CSS Framework: https://sudheerdev.github.io/Foundation5CheatSheet/ // See also: https://github.com/openfoodfacts/openfoodfacts-server/pull/2987 diff --git a/package-lock.json b/package-lock.json index 4698be8e94342..f7ea24e4abec6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,9 +21,10 @@ "cropperjs": "^1.6.1", "foundation-sites": "5.5.3", "highcharts": "^9.2.2", + "jquery": "2.2.4", "jquery-cropper": "^1.0.1", "jquery-form": "^4.3.0", - "jquery-ui": "1.13.3", + "jquery-ui": "1.14.1", "jsbarcode": "^3.11.6", "jsvectormap": "^1.6.0", "leaflet": "^1.7.1", @@ -7200,9 +7201,10 @@ } }, "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", + "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==", + "license": "MIT" }, "node_modules/jquery-cropper": { "version": "1.0.1", @@ -7222,12 +7224,11 @@ } }, "node_modules/jquery-ui": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.3.tgz", - "integrity": "sha512-D2YJfswSJRh/B8M/zCowDpNFfwsDmtfnMPwjJTyvl+CBqzpYwQ+gFYIbUUlzijy/Qvoy30H1YhoSui4MNYpRwA==", - "license": "MIT", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.14.1.tgz", + "integrity": "sha512-DhzsYH8VeIvOaxwi+B/2BCsFFT5EGjShdzOcm5DssWjtcpGWIMsn66rJciDA6jBruzNiLf1q0KvwMoX1uGNvnQ==", "dependencies": { - "jquery": ">=1.8.0 <4.0.0" + "jquery": ">=1.12.0 <5.0.0" } }, "node_modules/js-tokens": { diff --git a/package.json b/package.json index 25e916498d9b8..f4483e36f1925 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,10 @@ "cropperjs": "^1.6.1", "foundation-sites": "5.5.3", "highcharts": "^9.2.2", + "jquery": "2.2.4", "jquery-cropper": "^1.0.1", "jquery-form": "^4.3.0", - "jquery-ui": "1.13.3", + "jquery-ui": "1.14.1", "jsvectormap": "^1.6.0", "leaflet": "^1.7.1", "leaflet.markercluster": "1.5.3",