Merge pull request #18943 from overleaf/ae-jquery-revert

Revert "Upgrade jQuery to v3 (#18796)"

GitOrigin-RevId: fa7815b7bfe28239c86900b62bdcd3c4dac3a65f
This commit is contained in:
Alf Eaton 2024-06-17 12:11:31 +01:00 committed by Copybot
parent 6ba61f19f4
commit 5a5defee69
3 changed files with 54 additions and 34 deletions

64
package-lock.json generated
View file

@ -15873,9 +15873,9 @@
} }
}, },
"node_modules/backbone": { "node_modules/backbone": {
"version": "1.6.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/backbone/-/backbone-1.6.0.tgz", "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz",
"integrity": "sha512-13PUjmsgw/49EowNcQvfG4gmczz1ximTMhUktj0Jfrjth0MVaTxehpU+qYYX4MxnuIuhmvBLC6/ayxuAGnOhbA==", "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"underscore": ">=1.8.3" "underscore": ">=1.8.3"
@ -19328,12 +19328,14 @@
} }
}, },
"node_modules/daterangepicker": { "node_modules/daterangepicker": {
"name": "bootstrap-daterangepicker",
"version": "2.1.27", "version": "2.1.27",
"resolved": "https://registry.npmjs.org/daterangepicker/-/daterangepicker-2.1.27.tgz", "resolved": "git+ssh://git@github.com/overleaf/daterangepicker.git#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"integrity": "sha512-D12idm34JQYLbhQn9oaZQGuSoLC7C4RQypx4yThqiPO+56ejrWMKN+89/KWf1RwYENwUdWOSSqzF5ZF2EkiE5g==", "integrity": "sha512-vlNvjq6s1I+TIL4BoZkNoZer0liC4Kw/sA6iC3XAX5bHnxzpwV5M0ymHjGEoN5In0uPhO9UMBoMNGCzUriL89A==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"jquery": ">=1.10", "jquery": "^2.2.0",
"moment": "^2.9.0" "moment": "^2.9.0"
} }
}, },
@ -26632,9 +26634,10 @@
} }
}, },
"node_modules/jquery": { "node_modules/jquery": {
"version": "3.7.1", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==",
"dev": true
}, },
"node_modules/js-beautify": { "node_modules/js-beautify": {
"version": "1.14.7", "version": "1.14.7",
@ -43359,6 +43362,11 @@
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
"dev": true "dev": true
}, },
"services/latexqc/node_modules/jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"services/latexqc/node_modules/js-yaml": { "services/latexqc/node_modules/js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@ -44718,7 +44726,7 @@
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"babel-plugin-macros": "^3.1.0", "babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^5.0.0", "babel-plugin-module-resolver": "^5.0.0",
"backbone": "^1.6.0", "backbone": "^1.3.3",
"bootstrap": "^3.4.1", "bootstrap": "^3.4.1",
"bootstrap-5": "npm:bootstrap@^5.3.3", "bootstrap-5": "npm:bootstrap@^5.3.3",
"c8": "^7.2.0", "c8": "^7.2.0",
@ -44737,7 +44745,7 @@
"cypress": "13.6.6", "cypress": "13.6.6",
"cypress-plugin-tab": "^1.0.5", "cypress-plugin-tab": "^1.0.5",
"d3": "^3.5.16", "d3": "^3.5.16",
"daterangepicker": "2.1.27", "daterangepicker": "overleaf/daterangepicker#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"diff": "^5.1.0", "diff": "^5.1.0",
"downshift": "^6.1.0", "downshift": "^6.1.0",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
@ -44755,7 +44763,7 @@
"handlebars-loader": "^1.7.3", "handlebars-loader": "^1.7.3",
"html-webpack-plugin": "^5.5.3", "html-webpack-plugin": "^5.5.3",
"i18next-scanner": "^4.4.0", "i18next-scanner": "^4.4.0",
"jquery": "^3.7.1", "jquery": "^2.2.4",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"less": "^3.13.1", "less": "^3.13.1",
@ -53173,7 +53181,7 @@
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"babel-plugin-macros": "^3.1.0", "babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^5.0.0", "babel-plugin-module-resolver": "^5.0.0",
"backbone": "^1.6.0", "backbone": "^1.3.3",
"base-x": "^4.0.0", "base-x": "^4.0.0",
"basic-auth": "^2.0.1", "basic-auth": "^2.0.1",
"bcrypt": "^5.0.0", "bcrypt": "^5.0.0",
@ -53211,7 +53219,7 @@
"cypress-plugin-tab": "^1.0.5", "cypress-plugin-tab": "^1.0.5",
"d3": "^3.5.16", "d3": "^3.5.16",
"dateformat": "1.0.4-1.2.3", "dateformat": "1.0.4-1.2.3",
"daterangepicker": "2.1.27", "daterangepicker": "overleaf/daterangepicker#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"diff": "^5.1.0", "diff": "^5.1.0",
"downshift": "^6.1.0", "downshift": "^6.1.0",
"east": "^2.0.2", "east": "^2.0.2",
@ -53246,7 +53254,7 @@
"i18next-scanner": "^4.4.0", "i18next-scanner": "^4.4.0",
"joi": "^17.12.0", "joi": "^17.12.0",
"jose": "^4.3.8", "jose": "^4.3.8",
"jquery": "^3.7.1", "jquery": "^2.2.4",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"json2csv": "^4.3.3", "json2csv": "^4.3.3",
@ -60015,9 +60023,9 @@
} }
}, },
"backbone": { "backbone": {
"version": "1.6.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/backbone/-/backbone-1.6.0.tgz", "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz",
"integrity": "sha512-13PUjmsgw/49EowNcQvfG4gmczz1ximTMhUktj0Jfrjth0MVaTxehpU+qYYX4MxnuIuhmvBLC6/ayxuAGnOhbA==", "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"underscore": ">=1.8.3" "underscore": ">=1.8.3"
@ -62621,12 +62629,12 @@
"integrity": "sha1-TBKxAb3buIgMI1babkVEWaXri3U=" "integrity": "sha1-TBKxAb3buIgMI1babkVEWaXri3U="
}, },
"daterangepicker": { "daterangepicker": {
"version": "2.1.27", "version": "git+ssh://git@github.com/overleaf/daterangepicker.git#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"resolved": "https://registry.npmjs.org/daterangepicker/-/daterangepicker-2.1.27.tgz", "integrity": "sha512-vlNvjq6s1I+TIL4BoZkNoZer0liC4Kw/sA6iC3XAX5bHnxzpwV5M0ymHjGEoN5In0uPhO9UMBoMNGCzUriL89A==",
"integrity": "sha512-D12idm34JQYLbhQn9oaZQGuSoLC7C4RQypx4yThqiPO+56ejrWMKN+89/KWf1RwYENwUdWOSSqzF5ZF2EkiE5g==",
"dev": true, "dev": true,
"from": "daterangepicker@overleaf/daterangepicker#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"requires": { "requires": {
"jquery": ">=1.10", "jquery": "^2.2.0",
"moment": "^2.9.0" "moment": "^2.9.0"
} }
}, },
@ -68156,9 +68164,10 @@
"integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==" "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg=="
}, },
"jquery": { "jquery": {
"version": "3.7.1", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==",
"dev": true
}, },
"js-beautify": { "js-beautify": {
"version": "1.14.7", "version": "1.14.7",
@ -69295,6 +69304,11 @@
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
"dev": true "dev": true
}, },
"jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"js-yaml": { "js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",

View file

@ -265,7 +265,7 @@
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"babel-plugin-macros": "^3.1.0", "babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^5.0.0", "babel-plugin-module-resolver": "^5.0.0",
"backbone": "^1.6.0", "backbone": "^1.3.3",
"bootstrap": "^3.4.1", "bootstrap": "^3.4.1",
"bootstrap-5": "npm:bootstrap@^5.3.3", "bootstrap-5": "npm:bootstrap@^5.3.3",
"c8": "^7.2.0", "c8": "^7.2.0",
@ -284,7 +284,7 @@
"cypress": "13.6.6", "cypress": "13.6.6",
"cypress-plugin-tab": "^1.0.5", "cypress-plugin-tab": "^1.0.5",
"d3": "^3.5.16", "d3": "^3.5.16",
"daterangepicker": "2.1.27", "daterangepicker": "overleaf/daterangepicker#e496d2d44ca53e208c930e4cb4bcf29bcefa4550",
"diff": "^5.1.0", "diff": "^5.1.0",
"downshift": "^6.1.0", "downshift": "^6.1.0",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
@ -302,7 +302,7 @@
"handlebars-loader": "^1.7.3", "handlebars-loader": "^1.7.3",
"html-webpack-plugin": "^5.5.3", "html-webpack-plugin": "^5.5.3",
"i18next-scanner": "^4.4.0", "i18next-scanner": "^4.4.0",
"jquery": "^3.7.1", "jquery": "^2.2.4",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"less": "^3.13.1", "less": "^3.13.1",

View file

@ -255,6 +255,18 @@ module.exports = {
}, },
], ],
}, },
{
// Expose jQuery and $ global variables
test: require.resolve('jquery'),
use: [
{
loader: 'expose-loader',
options: {
exposes: ['$', 'jQuery'],
},
},
],
},
], ],
}, },
resolve: { resolve: {
@ -297,12 +309,6 @@ module.exports = {
contextRegExp: /moment$/, contextRegExp: /moment$/,
}), }),
// Set window.$ and window.jQuery
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
}),
// Copy the required files for loading MathJax from MathJax NPM package // Copy the required files for loading MathJax from MathJax NPM package
new CopyPlugin({ new CopyPlugin({
patterns: [ patterns: [