diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/js/dist/warning.js --- a/wp/wp-includes/js/dist/warning.js Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/js/dist/warning.js Fri Sep 05 18:40:08 2025 +0200 @@ -1,32 +1,32 @@ -/******/ (function() { // webpackBootstrap +/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ -/******/ !function() { +/******/ (() => { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { +/******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { - "default": function() { return /* binding */ warning; } + "default": () => (/* binding */ warning) }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/warning/build-module/utils.js @@ -43,10 +43,11 @@ * Internal dependencies */ +function isDev() { + // eslint-disable-next-line @wordpress/wp-global-usage + return true === true; +} -function isDev() { - return typeof process !== 'undefined' && process.env && "production" !== 'production'; -} /** * Shows a warning with `message` if environment is not `production`. * @@ -64,28 +65,27 @@ * } * ``` */ - - function warning(message) { if (!isDev()) { return; - } // Skip if already logged. + } - + // Skip if already logged. if (logged.has(message)) { return; - } // eslint-disable-next-line no-console + } + // eslint-disable-next-line no-console + console.warn(message); - console.warn(message); // Throwing an error and catching it immediately to improve debugging + // Throwing an error and catching it immediately to improve debugging // A consumer can use 'pause on caught exceptions' // https://github.com/facebook/react/issues/4216 - try { throw Error(message); - } catch (x) {// Do nothing. + } catch (x) { + // Do nothing. } - logged.add(message); }