Build/Test Tools: Support NodeJS 14.x in the 4.4 branch.
This updates the 4.4 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 also replaces the `npm-shrinkwrap.json` with a `package-lock.json` file. Lock files were not supported in earlier versions of NPM, but can now be used.
In addition to backporting the package updates that happened after branching 4.4, dependencies that were removed in future releases have also been updated to their latest versions.
Props desrosj, dd32, netweb, jorbin.
Merges [35859,35862,36860-36865,36935,36978-36979,37017,37019-37020,37212,37612,38111,38688,39110,39113-39119,39478,42460-42461,42463,42887,43320,43323,43977,44219,44233,44728,45321,45765,46404,46408-46409,47404,47867-47869,47872-47873,48705,49636,49933,49937,49939,50017,50126,50176,50185,50192] to the 4.4 branch.
See #52341.
Built from https://develop.svn.wordpress.org/branches/4.4@50210
git-svn-id: http://core.svn.wordpress.org/branches/4.4@49881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-04 23:23:43 -05:00
|
|
|
var commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,editPermalink,makeSlugeditClickable=editPermalink=function(){};window.wp=window.wp||{},function(a){var t=!1;commentsBox={st:0,get:function(t,e){var i=this.st;return e=e||20,this.st+=e,this.total=t,a("#commentsdiv .spinner").addClass("is-active"),e={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:i,number:e},a.post(ajaxurl,e,function(t){return t=wpAjax.parseAjaxResponse(t),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof t&&t.responses[0]?(a("#the-comment-list").append(t.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm))):void(1!=t?a("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>"):a("#show-comments").html(postL10n.endcomm))}),!1},load:function(t){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(t)}},WPSetThumbnailHTML=function(t){a(".inside","#postimagediv").html(t)},WPSetThumbnailID=function(t){var e=a('input[value="_thumbnail_id"]',"#list-table");0<e.size()&&a("#meta\\["+e.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(t)},WPRemoveThumbnail=function(t){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:t,cookie:encodeURIComponent(document.cookie)},function(t){"0"==t?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(t)})},a(document).on("heartbeat-send.refresh-lock",function(t,e){var i=a("#active_post_lock").val(),s=a("#post_ID").val(),n={};s&&a("#post-lock-dialog").length&&(n.post_id=s,i&&(n.lock=i),e["wp-refresh-post-lock"]=n)}).on("heartbeat-tick.refresh-lock",function(t,e){var i,s;e["wp-refresh-post-lock"]&&((i=e["wp-refresh-post-lock"]).lock_error?(s=a("#post-lock-dialog")).length&&!s.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),s.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),s.addClass("saving"),wp.autosave.server.triggerSave()),i.lock_error.avatar_src&&(e=a('<img class="avatar avatar-64 photo" width="64" height="64" alt="" />').attr("src",i.lock_error.avatar_src.replace(/&/g,"&")),s.find("div.post-locked-avatar").empty().append(e)),s.show().find(".currently-editing").text(i.lock_error.text),s.find(".wp-tab-first").focus()):i.new_lock&&a("#active_post_lock").val(i.new_lock))}).on("before-autosave.update-post-slug",function(){t=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){a("#edit-slug-box > *").length||t||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(t){"-1"!=t&&a("#edit-slug-box").html(t)})})}(jQuery),function(n){var a,t;function i(){a=!1,window.clearTimeout(t),t=window.setTimeout(function(){a=!0},3e5)}n(document).on("heartbeat-send.wp-refresh-nonces",function(t,e){var i,s=n("#wp-auth-check-wrap");(a||s.length&&!s.hasClass("hidden"))&&(i=n("#post_ID").val())&&n("#_wpnonce").val()&&(e["wp-refresh-post-nonces"]={post_id:i})}).on("heartbeat-tick.wp-refresh-nonces",function(t,e){e=e["wp-refresh-post-nonces"];e&&(i(),e.replace&&n.each(e.replace,function(t,e){n("#"+t).val(e)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){i()})}(jQuery),jQuery(document).ready(function(u){var d,e,i,s,n,a,o,l,t,c,p,r="",h=u("#content"),v=u(document),f=u("#post_ID").val()||0,m=u("#submitpost"),w=!0,b=u("#post-visibility-select"),g=u("#timestampdiv"),k=u("#post-status-select"),y=!!window.navigator.platform&&-1!==window.navigator.platform.indexOf("Mac");function _(t){c.hasClass("wp-editor-expand")||(l?a.theme.resizeTo(null,o+t.pageY):h.height(Math.max(50,o+t.pageY)),t.preventDefault())}function x(){var t;c.hasClass("wp-editor-expand")||(t=l?(a.focus(),((t=parseInt(u("#wp-con
|