Build/Test Tools: Support NodeJS 14.x in the 4.6 branch.
This updates the 4.6 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.
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.6, dependencies that were removed in future releases have also been updated to their latest versions.
Props desrosj, dd32, netweb, jorbin.
Merges [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] to the 4.6 branch.
See #52341.
Built from https://develop.svn.wordpress.org/branches/4.6@50206
git-svn-id: http://core.svn.wordpress.org/branches/4.6@49879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 05:17:44 +01:00
|
|
|
var wpCookies={each:function(e,t,n){var i,r;if(!e)return 0;if(n=n||e,void 0!==e.length){for(i=0,r=e.length;i<r;i++)if(!1===t.call(n,e[i],i,e))return 0}else for(i in e)if(e.hasOwnProperty(i)&&!1===t.call(n,e[i],i,e))return 0;return 1},getHash:function(e){var t,e=this.get(e);return e&&this.each(e.split("&"),function(e){e=e.split("="),(t=t||{})[e[0]]=e[1]}),t},setHash:function(e,t,n,i,r,s){var o="";this.each(t,function(e,t){o+=(o?"&":"")+t+"="+e}),this.set(e,o,n,i,r,s)},get:function(e){var t,n=document.cookie,i=e+"=";if(n){if(-1===(t=n.indexOf("; "+i))){if(0!==(t=n.indexOf(i)))return null}else t+=2;return-1===(e=n.indexOf(";",t))&&(e=n.length),decodeURIComponent(n.substring(t+i.length,e))}},set:function(e,t,n,i,r,s){var o=new Date;n="object"==typeof n&&n.toGMTString?n.toGMTString():parseInt(n,10)?(o.setTime(o.getTime()+1e3*parseInt(n,10)),o.toGMTString()):"",document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+n:"")+(i?"; path="+i:"")+(r?"; domain="+r:"")+(s?"; secure":"")},remove:function(e,t,n,i){this.set(e,"",-1e3,t,n,i)}};function getUserSetting(e,t){var n=getAllUserSettings();return n.hasOwnProperty(e)?n[e]:void 0!==t?t:""}function setUserSetting(e,t,n){if("object"!=typeof userSettings)return!1;var i=userSettings.uid,r=wpCookies.getHash("wp-settings-"+i),s=userSettings.url,o=!!userSettings.secure;return e=e.toString().replace(/[^A-Za-z0-9_-]/g,""),t="number"==typeof t?parseInt(t,10):t.toString().replace(/[^A-Za-z0-9_-]/g,""),r=r||{},n?delete r[e]:r[e]=t,wpCookies.setHash("wp-settings-"+i,r,31536e3,s,"",o),wpCookies.set("wp-settings-time-"+i,userSettings.time,31536e3,s,"",o),e}function deleteUserSetting(e){return setUserSetting(e,"",1)}function getAllUserSettings(){return"object"==typeof userSettings&&wpCookies.getHash("wp-settings-"+userSettings.uid)||{}}
|