feat(build,ljm) don't expose jquery

lib-jitsi-meet no longer requires it.
This commit is contained in:
Saúl Ibarra Corretgé 2022-08-30 10:47:55 +02:00 committed by Saúl Ibarra Corretgé
parent 45c0597aff
commit 7e7107d45a
13 changed files with 24 additions and 62 deletions

2
app.js
View File

@ -1,7 +1,5 @@
/* application specific logic */
import 'jquery';
import '@matrix-org/olm';
import 'focus-visible';

View File

@ -1,10 +1,11 @@
/* global APP, $, config */
/* global APP, config */
const UI = {};
import Logger from '@jitsi/logger';
import EventEmitter from 'events';
import $ from 'jquery';
import { isMobileBrowser } from '../../react/features/base/environment/utils';
import { setColorAlpha } from '../../react/features/base/util';

View File

@ -1,4 +1,6 @@
/* global $, APP, interfaceConfig */
/* global APP, interfaceConfig */
import $ from 'jquery';
import { getSharedDocumentUrl, setDocumentEditingState } from '../../../react/features/etherpad';
import { getToolboxHeight } from '../../../react/features/toolbox/functions.web';

View File

@ -1,4 +1,4 @@
/* global $ */
import $ from 'jquery';
/**
* Created by hristo on 12/22/14.

View File

@ -1,4 +1,6 @@
/* global $, APP, interfaceConfig */
/* global APP, interfaceConfig */
import $ from 'jquery';
import { getVerticalFilmstripVisibleAreaWidth, isFilmstripVisible } from '../../../react/features/filmstrip';

View File

@ -1,6 +1,7 @@
/* global $, APP */
/* global APP */
/* eslint-disable no-unused-vars */
import Logger from '@jitsi/logger';
import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import { I18nextProvider } from 'react-i18next';

View File

@ -1,6 +1,7 @@
/* global $, APP, interfaceConfig */
/* global APP, interfaceConfig */
/* eslint-disable no-unused-vars */
import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';

View File

@ -1,10 +1,10 @@
/* @flow */
import $ from 'jquery';
import jqueryI18next from 'jquery-i18next';
import { i18next } from '../../react/features/base/i18n';
declare var $: Function;
type DocumentElement = {
lang: string

37
package-lock.json generated
View File

@ -65,7 +65,7 @@
"i18next-browser-languagedetector": "3.0.1",
"i18next-xhr-backend": "3.0.0",
"image-capture": "0.4.0",
"jquery": "3.5.1",
"jquery": "3.6.1",
"jquery-i18next": "1.2.1",
"js-md5": "0.6.1",
"js-sha512": "0.8.0",
@ -161,7 +161,6 @@
"eslint-plugin-react": "7.26.1",
"eslint-plugin-react-native": "3.11.0",
"eslint-plugin-typescript-sort-keys": "2.1.0",
"expose-loader": "3.0.0",
"imports-loader": "0.7.1",
"jetifier": "1.6.4",
"metro-react-native-babel-preset": "0.67.0",
@ -9789,22 +9788,6 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/expose-loader": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-3.0.0.tgz",
"integrity": "sha512-X7ncrzmiQbJHOyLwuymECHk4NYvoPFwnsINMYFaRrm4fxuxR59hV1v65bho3TpIoWieP8WZmhz6micKny8orWg==",
"dev": true,
"engines": {
"node": ">= 12.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"webpack": "^5.0.0"
}
},
"node_modules/express": {
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz",
@ -11968,9 +11951,9 @@
}
},
"node_modules/jquery": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
"integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
},
"node_modules/jquery-i18next": {
"version": "1.2.1",
@ -27242,12 +27225,6 @@
}
}
},
"expose-loader": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-3.0.0.tgz",
"integrity": "sha512-X7ncrzmiQbJHOyLwuymECHk4NYvoPFwnsINMYFaRrm4fxuxR59hV1v65bho3TpIoWieP8WZmhz6micKny8orWg==",
"dev": true
},
"express": {
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz",
@ -28883,9 +28860,9 @@
}
},
"jquery": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
"integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
},
"jquery-i18next": {
"version": "1.2.1",

View File

@ -70,7 +70,7 @@
"i18next-browser-languagedetector": "3.0.1",
"i18next-xhr-backend": "3.0.0",
"image-capture": "0.4.0",
"jquery": "3.5.1",
"jquery": "3.6.1",
"jquery-i18next": "1.2.1",
"js-md5": "0.6.1",
"js-sha512": "0.8.0",
@ -166,7 +166,6 @@
"eslint-plugin-react": "7.26.1",
"eslint-plugin-react-native": "3.11.0",
"eslint-plugin-typescript-sort-keys": "2.1.0",
"expose-loader": "3.0.0",
"imports-loader": "0.7.1",
"jetifier": "1.6.4",
"metro-react-native-babel-preset": "0.67.0",

View File

@ -1,16 +1,5 @@
import './native';
// The library lib-jitsi-meet (externally) depends on the libraries jQuery
(global => {
// jQuery
if (typeof global.$ === 'undefined') {
const jQuery = require('jquery');
jQuery(global);
global.$ = jQuery;
}
})(global || window || this); // eslint-disable-line no-invalid-this
// Re-export JitsiMeetJS from the library lib-jitsi-meet to (the other features
// of) the project jitsi-meet.
//

View File

@ -1,5 +1,7 @@
// @flow
import $ from 'jquery';
import { getMultipleVideoSendingSupportFeatureFlag } from '../base/config/functions.any';
import { openDialog } from '../base/dialog';
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
@ -39,7 +41,6 @@ import logger from './logger';
let permissionsReplyListener, receiverEndpointMessageListener, stopListener;
declare var APP: Object;
declare var $: Function;
/**
* Signals that the remote control authorization dialog should be displayed.

View File

@ -141,15 +141,6 @@ function getConfig(options = {}) {
]
},
test: /\.jsx?$/
}, {
// TODO: get rid of this.
// Expose jquery as the globals $ and jQuery because it is expected
// to be available in such a form by lib-jitsi-meet.
loader: 'expose-loader',
options: {
exposes: [ '$', 'jQuery' ]
},
test: require.resolve('jquery')
}, {
// Allow CSS to be imported into JavaScript.