Browse Source

Add removal version number for global deprecations

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v19.0.0beta1
Christoph Wurst 4 years ago
parent
commit
80450427d1
No account linked to committer's email address
3 changed files with 13 additions and 13 deletions
  1. 1
    1
      core/js/dist/main.js
  2. 1
    1
      core/js/dist/main.js.map
  3. 11
    11
      core/src/globals.js

+ 1
- 1
core/js/dist/main.js View File

@@ -1099,7 +1099,7 @@ o.a.ajaxSetup({contents:{script:!1}}),o.a.globalEval=function(){}},function(e,n,
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var ne=function(){void 0===window.TESTING&&console.warn.apply(console,arguments)},ie=function(e,t,n){var i=e,r=function(){return ne("The ".concat(t," library is deprecated! It will be removed in nextcloud ").concat(n,".")),i.apply(this,arguments)};return Object.assign(r,i),r},re=function(e,t,n){(Array.isArray(e)?e:[e]).map((function(e){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return ne(n?"".concat(e," is deprecated: ").concat(n):"".concat(e," is deprecated")),t()}})}))};window._=l.a,re(["$","jQuery"],(function(){return u.a}),"The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own."),re("autosize",(function(){return h.a}),"please ship your own, this will be removed in Nextcloud 20"),re("Backbone",(function(){return p.a}),"please ship your own, this will be removed in Nextcloud 20"),re(["Clipboard","ClipboardJS"],(function(){return g.a}),"please ship your own, this will be removed in Nextcloud 20"),window.dav=_.a,re("DOMPurify",(function(){return b.a}),"The global DOMPurify is deprecated, ship your own"),re("Handlebars",(function(){return x.a}),"please ship your own, this will be removed in Nextcloud 20"),re(["jstz","jstimezonedetect"],(function(){return M.a}),"please ship your own, this will be removed in Nextcloud 20"),window.marked=ie(L.a,"marked",19),re("md5",(function(){return D.a}),"please ship your own, this will be removed in Nextcloud 20"),re("moment",(function(){return Y.a}),"please ship your own, this will be removed in Nextcloud 20"),window.OC=E.a,re("initCore",(function(){return s.a}),"this is an internal function"),re("oc_appswebroots",(function(){return E.a.appswebroots}),"use OC.appswebroots instead"),re("oc_capabilities",E.a.getCapabilities,"use OC.getCapabilities instead"),re("oc_config",(function(){return E.a.config}),"use OC.config instead"),re("oc_current_user",(function(){return E.a.getCurrentUser().uid}),"use OC.getCurrentUser().uid instead"),re("oc_debug",(function(){return E.a.debug}),"use OC.debug instead"),re("oc_defaults",(function(){return E.a.theme}),"use OC.theme instead"),re("oc_isadmin",E.a.isUserAdmin,"use OC.isUserAdmin() instead"),re("oc_requesttoken",(function(){return Object(ee.a)()}),"use OC.requestToken instead"),re("oc_webroot",(function(){return E.a.webroot}),"use OC.getRootPath() instead"),re("OCDialogs",(function(){return E.a.dialogs}),"use OC.dialogs instead"),window.OCP=Z,window.OCA=$.a,window.escapeHTML=ie(W.a,"escapeHTML",19),window.formatDate=ie((
var ne=function(){void 0===window.TESTING&&console.warn.apply(console,arguments)},ie=function(e,t,n){var i=e,r=function(){return ne("The ".concat(t," library is deprecated! It will be removed in nextcloud ").concat(n,".")),i.apply(this,arguments)};return Object.assign(r,i),r},re=function(e,t,n){(Array.isArray(e)?e:[e]).map((function(e){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return ne(n?"".concat(e," is deprecated: ").concat(n):"".concat(e," is deprecated")),t()}})}))};window._=l.a,re(["$","jQuery"],(function(){return u.a}),"The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own."),re("autosize",(function(){return h.a}),"please ship your own, this will be removed in Nextcloud 20"),re("Backbone",(function(){return p.a}),"please ship your own, this will be removed in Nextcloud 20"),re(["Clipboard","ClipboardJS"],(function(){return g.a}),"please ship your own, this will be removed in Nextcloud 20"),window.dav=_.a,re("DOMPurify",(function(){return b.a}),"The global DOMPurify is deprecated, this will be removed in Nextcloud 21"),re("Handlebars",(function(){return x.a}),"please ship your own, this will be removed in Nextcloud 20"),re(["jstz","jstimezonedetect"],(function(){return M.a}),"please ship your own, this will be removed in Nextcloud 20"),window.marked=ie(L.a,"marked",19),re("md5",(function(){return D.a}),"please ship your own, this will be removed in Nextcloud 20"),re("moment",(function(){return Y.a}),"please ship your own, this will be removed in Nextcloud 20"),window.OC=E.a,re("initCore",(function(){return s.a}),"this is an internal function"),re("oc_appswebroots",(function(){return E.a.appswebroots}),"use OC.appswebroots instead, this will be removed in Nextcloud 20"),re("oc_capabilities",E.a.getCapabilities,"use OC.getCapabilities instead, this will be removed in Nextcloud 20"),re("oc_config",(function(){return E.a.config}),"use OC.config instead, this will be removed in Nextcloud 20"),re("oc_current_user",(function(){return E.a.getCurrentUser().uid}),"use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20"),re("oc_debug",(function(){return E.a.debug}),"use OC.debug instead, this will be removed in Nextcloud 20"),re("oc_defaults",(function(){return E.a.theme}),"use OC.theme instead, this will be removed in Nextcloud 20"),re("oc_isadmin",E.a.isUserAdmin,"use OC.isUserAdmin() instead, this will be removed in Nextcloud 20"),re("oc_requesttoken",(function(){return Object(ee.a)()}),"use OC.requestToken instead, this will be removed in Nextcloud 20"),re("oc_webroot",(function(){return E.a.webroot}),"use OC.getRootPath() instead, this will be removed in Nextcloud 20"),re("OCDialogs",(function(){return E.a.dialogs}),"use OC.dialogs instead, this will be removed in Nextcloud 20"),window.OCP=Z,window.OCA=$.a,window.escapeHTML=ie(W.a,"escapeHTML",19),window.formatDate=ie((
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*

+ 1
- 1
core/js/dist/main.js.map
File diff suppressed because it is too large
View File


+ 11
- 11
core/src/globals.js View File

@@ -111,7 +111,7 @@ setDeprecatedProp('autosize', () => autosize, 'please ship your own, this will b
setDeprecatedProp('Backbone', () => Backbone, 'please ship your own, this will be removed in Nextcloud 20')
setDeprecatedProp(['Clipboard', 'ClipboardJS'], () => ClipboardJS, 'please ship your own, this will be removed in Nextcloud 20')
window['dav'] = dav
setDeprecatedProp('DOMPurify', () => DOMPurify, 'The global DOMPurify is deprecated, ship your own')
setDeprecatedProp('DOMPurify', () => DOMPurify, 'The global DOMPurify is deprecated, this will be removed in Nextcloud 21')
setDeprecatedProp('Handlebars', () => Handlebars, 'please ship your own, this will be removed in Nextcloud 20')
setDeprecatedProp(['jstz', 'jstimezonedetect'], () => jstimezonedetect, 'please ship your own, this will be removed in Nextcloud 20')
window['marked'] = deprecate(marked, 'marked', 19)
@@ -120,16 +120,16 @@ setDeprecatedProp('moment', () => moment, 'please ship your own, this will be re

window['OC'] = OC
setDeprecatedProp('initCore', () => initCore, 'this is an internal function')
setDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead')
setDeprecatedProp('oc_capabilities', OC.getCapabilities, 'use OC.getCapabilities instead')
setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead')
setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead')
setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead')
setDeprecatedProp('oc_defaults', () => OC.theme, 'use OC.theme instead')
setDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead')
setDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead')
setDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead')
setDeprecatedProp('OCDialogs', () => OC.dialogs, 'use OC.dialogs instead')
setDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_capabilities', OC.getCapabilities, 'use OC.getCapabilities instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_defaults', () => OC.theme, 'use OC.theme instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead, this will be removed in Nextcloud 20')
setDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead, this will be removed in Nextcloud 20')
setDeprecatedProp('OCDialogs', () => OC.dialogs, 'use OC.dialogs instead, this will be removed in Nextcloud 20')
window['OCP'] = OCP
window['OCA'] = OCA
window['escapeHTML'] = deprecate(escapeHTML, 'escapeHTML', 19)

Loading…
Cancel
Save