Build/Test Tools: Support NodeJS 14.x in the 3.7 branch.
This updates the 3.7 branch to support the latest LTS version of NodeJS (currently 14.x), allowing the same version to be used across all WordPress branches that receive security updates as a courtesy.
Because older branches use (really) old versions of NodeJS, the local Docker environment cannot be backported since the needed dependencies will not run on these older versions (see #48301). This also blocks the ability to move automated testing over to GitHub Actions (see #50401).
This change also introduces a `packager-lock.json` file to the branch.
In addition to backporting the package updates that happened after branching 3.7, dependencies that were removed in future releases have also been updated to their latest versions.
Props desrosj, dd32, netweb, jorbin.
Merges [27053,27299,27721,27848,28796,29270,30060,30062-30063,30066,31557,31650,32356,32988,33726,35513,35521,35538,35540-35541,36861-36865,37019-37020,37212,37612,38111,39113,39115-39117,39478,42460-42461,42887,42989,43320,43323,43977,44219,45446,45765,46408-46409,47867,47872,48705,49636,49933,49939,50185] to the 3.7 branch.
See #52341.
Built from https://develop.svn.wordpress.org/branches/3.7@50224
git-svn-id: http://core.svn.wordpress.org/branches/3.7@49888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-04 23:48:20 -05:00
|
|
|
!function(r){var e,t,i,s,o=wp.media,n=o.model.Attachment,a=o.model.Attachments,l=(o.model.Query,o.view.l10n="undefined"==typeof _wpMediaViewsL10n?{}:_wpMediaViewsL10n);o.view.settings=l.settings||{},delete l.settings,o.model.settings.post=o.view.settings.post,r.support.transition=(e=document.documentElement.style,t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},(i=_.find(_.keys(t),function(t){return!_.isUndefined(e[t])}))&&{end:t[i]}),o.transition=function(t,e){var i=r.Deferred();return e=e||2e3,r.support.transition?((t=!(t instanceof r)?r(t):t).first().one(r.support.transition.end,i.resolve),_.delay(i.resolve,e)):i.resolve(),i.promise()},o.controller.Region=function(t){_.extend(this,_.pick(t||{},"id","view","selector"))},o.controller.Region.extend=Backbone.Model.extend,_.extend(o.controller.Region.prototype,{mode:function(t){return t?(t===this._mode||(this.trigger("deactivate"),this._mode=t,this.render(t),this.trigger("activate")),this):this._mode},render:function(t){if(t&&t!==this._mode)return this.mode(t);t={view:null};return this.trigger("create",t),t=t.view,this.trigger("render",t),t&&this.set(t),this},get:function(){return this.view.views.first(this.selector)},set:function(t,e){return e&&(e.add=!1),this.view.views.set(this.selector,t,e)},trigger:function(t){if(this._mode){var e=_.toArray(arguments),i=this.id+":"+t;return e[0]=i+":"+this._mode,this.view.trigger.apply(this.view,e),e[0]=i,this.view.trigger.apply(this.view,e),this}}}),o.controller.StateMachine=function(t){this.states=new Backbone.Collection(t)},o.controller.StateMachine.extend=Backbone.Model.extend,_.extend(o.controller.StateMachine.prototype,Backbone.Events,{state:function(t){return this.states=this.states||new Backbone.Collection,(t=t||this._state)&&!this.states.get(t)&&this.states.add({id:t}),this.states.get(t)},setState:function(t){var e=this.state();return e&&t===e.id||!this.states||!this.states.get(t)||(e&&(e.trigger("deactivate"),this._lastState=e.id),this._state=t,this.state().trigger("activate")),this},lastState:function(){if(this._lastState)return this.state(this._lastState)}}),_.each(["on","off","trigger"],function(t){o.controller.StateMachine.prototype[t]=function(){return this.states=this.states||new Backbone.Collection,this.states[t].apply(this.states,arguments),this}}),o.controller.State=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(t){t.$el.text(this.get("title")||"")},_router:function(){var t=this.frame.router,e=this.get("router");this.frame.$el.toggleClass("hide-router",!e),e&&(this.frame.router.render(e),(t=t.get())&&t.select&&t.select(this.frame.content.mode()))},_menu:function(){var t=this.frame.menu,e=this.get("menu");e&&(t.mode(e),(t=t.get())&&t.select&&t.select(this.id))},_updateMenu:func
|