From ebef2f74cbda256489bc9e5af95dbadaffee2d95 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 7 Feb 2023 15:56:37 +0000 Subject: [PATCH] External Libraries: Update miscellaneous libraries to their latest versions. This updates the following external libraries to their latest versions: - `polyfill-library` from `4.4.0` to `4.7.0`. - `regenerator-runtime` from `0.13.9` to `0.13.11`. These updates are minor without any breaking changes. These libraries are no longer used by Core itself and maintained as a courtesy. Any projects relying on them should reevaluate their usage as modern browsers have made these almost entirely unnecessary. Fixes #57646. Built from https://develop.svn.wordpress.org/trunk@55269 git-svn-id: http://core.svn.wordpress.org/trunk@54802 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../js/dist/vendor/regenerator-runtime.js | 51 +++++++++++-------- .../js/dist/vendor/regenerator-runtime.min.js | 2 +- wp-includes/script-loader.php | 6 +-- wp-includes/version.php | 2 +- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/wp-includes/js/dist/vendor/regenerator-runtime.js b/wp-includes/js/dist/vendor/regenerator-runtime.js index a64424e678..1ea704e901 100644 --- a/wp-includes/js/dist/vendor/regenerator-runtime.js +++ b/wp-includes/js/dist/vendor/regenerator-runtime.js @@ -10,6 +10,7 @@ var runtime = (function (exports) { var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; + var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }; var undefined; // More compressible than void 0. var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; @@ -42,7 +43,7 @@ var runtime = (function (exports) { // The ._invoke method unifies the implementations of the .next, // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); + defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }); return generator; } @@ -103,8 +104,12 @@ var runtime = (function (exports) { var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = GeneratorFunctionPrototype; - define(Gp, "constructor", GeneratorFunctionPrototype); - define(GeneratorFunctionPrototype, "constructor", GeneratorFunction); + defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true }); + defineProperty( + GeneratorFunctionPrototype, + "constructor", + { value: GeneratorFunction, configurable: true } + ); GeneratorFunction.displayName = define( GeneratorFunctionPrototype, toStringTagSymbol, @@ -214,7 +219,7 @@ var runtime = (function (exports) { // Define the unified helper method that is used to implement .next, // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; + defineProperty(this, "_invoke", { value: enqueue }); } defineIteratorMethods(AsyncIterator.prototype); @@ -324,31 +329,32 @@ var runtime = (function (exports) { // delegate iterator, or by modifying context.method and context.arg, // setting context.delegate to null, and returning the ContinueSentinel. function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; + var methodName = context.method; + var method = delegate.iterator[methodName]; if (method === undefined) { // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. + // method, or a missing .next mehtod, always terminate the + // yield* loop. context.delegate = null; - if (context.method === "throw") { - // Note: ["return"] must be used for ES3 parsing compatibility. - if (delegate.iterator["return"]) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); + // Note: ["return"] must be used for ES3 parsing compatibility. + if (methodName === "throw" && delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; } - + } + if (methodName !== "return") { context.method = "throw"; context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); + "The iterator does not provide a '" + methodName + "' method"); } return ContinueSentinel; @@ -452,7 +458,8 @@ var runtime = (function (exports) { this.reset(true); } - exports.keys = function(object) { + exports.keys = function(val) { + var object = Object(val); var keys = []; for (var key in object) { keys.push(key); diff --git a/wp-includes/js/dist/vendor/regenerator-runtime.min.js b/wp-includes/js/dist/vendor/regenerator-runtime.min.js index 66d6caa61d..3e92d4a053 100644 --- a/wp-includes/js/dist/vendor/regenerator-runtime.min.js +++ b/wp-includes/js/dist/vendor/regenerator-runtime.min.js @@ -1 +1 @@ -var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o=(m="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=m.asyncIterator||"@@asyncIterator",a=m.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(e){c=function(t,r,e){return t[r]=e}}function u(t,e,n,o){var i,a,c,u;e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),o=new j(o||[]);return e._invoke=(i=t,a=n,c=o,u=l,function(t,e){if(u===s)throw new Error("Generator is already running");if(u===p){if("throw"===t)throw e;return k()}for(c.method=t,c.arg=e;;){var n=c.delegate;if(n&&(n=function t(e,n){var o=e.iterator[n.method];if(o===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=r,t(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}return"throw"===(o=h(o,e.iterator,n.arg)).type?(n.method="throw",n.arg=o.arg,n.delegate=null,y):(o=o.arg)?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}(n,c),n)){if(n===y)continue;return n}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===l)throw u=p,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(u=s,"normal"===(n=h(i,a,c)).type){if(u=c.done?p:f,n.arg!==y)return{value:n.arg,done:c.done}}else"throw"===n.type&&(u=p,c.method="throw",c.arg=n.arg)}}),e}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",s="executing",p="completed",y={};function g(){}function d(){}function v(){}var m,w,L=((w=(w=(c(m={},o,(function(){return this})),Object.getPrototypeOf))&&w(w(O([]))))&&w!==e&&n.call(w,o)&&(m=w),v.prototype=g.prototype=Object.create(m));function x(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){var e;this._invoke=function(o,i){function a(){return new r((function(e,a){!function e(o,i,a,c){var u;if("throw"!==(o=h(t[o],t,i)).type)return(i=(u=o.arg).value)&&"object"==typeof i&&n.call(i,"__await")?r.resolve(i.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(i).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,c)}));c(o.arg)}(o,i,e,a)}))}return e=e?e.then(a,a):a()}}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e,i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(i=function o(){for(;++e '18.2.0', 'react-dom' => '18.2.0', - 'regenerator-runtime' => '0.13.9', + 'regenerator-runtime' => '0.13.11', 'moment' => '2.29.4', 'lodash' => '4.17.19', 'wp-polyfill-fetch' => '3.6.2', 'wp-polyfill-formdata' => '4.0.10', - 'wp-polyfill-node-contains' => '4.4.0', + 'wp-polyfill-node-contains' => '4.6.0', 'wp-polyfill-url' => '3.6.4', - 'wp-polyfill-dom-rect' => '4.4.0', + 'wp-polyfill-dom-rect' => '4.6.0', 'wp-polyfill-element-closest' => '2.0.2', 'wp-polyfill-object-fit' => '2.3.5', 'wp-polyfill-inert' => '3.1.2', diff --git a/wp-includes/version.php b/wp-includes/version.php index 937104dd03..2226d02265 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55268'; +$wp_version = '6.2-alpha-55269'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.