wp/wp-includes/js/dist/warning.js
author ymh <ymh.work@gmail.com>
Mon, 08 Sep 2025 19:44:41 +0200
changeset 23 417f20492bf7
parent 22 8c2e4d02f4ef
permissions -rw-r--r--
Update Docker configuration and plugin versions - Upgrade MariaDB from 10.6 to 11 with auto-upgrade support - Add WordPress debug environment variable to FPM container - Update PHP-FPM Dockerfile base image - Update Include Mastodon Feed plugin with bug fixes and improvements - Update Portfolio plugin (v2.58) with latest translations and demo data enhancements - Remove old README.md from Mastodon Feed plugin 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
     1
/******/ (() => { // webpackBootstrap
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     2
/******/ 	"use strict";
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     3
/******/ 	// The require scope
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     4
/******/ 	var __webpack_require__ = {};
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     5
/******/ 	
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     6
/************************************************************************/
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     7
/******/ 	/* webpack/runtime/define property getters */
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
     8
/******/ 	(() => {
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     9
/******/ 		// define getter functions for harmony exports
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    10
/******/ 		__webpack_require__.d = (exports, definition) => {
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    11
/******/ 			for(var key in definition) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    12
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    13
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    14
/******/ 				}
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    15
/******/ 			}
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
/******/ 		};
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    17
/******/ 	})();
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    18
/******/ 	
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    19
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    20
/******/ 	(() => {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    21
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    22
/******/ 	})();
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    23
/******/ 	
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
/************************************************************************/
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    25
var __webpack_exports__ = {};
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    27
// EXPORTS
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    28
__webpack_require__.d(__webpack_exports__, {
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    29
  "default": () => (/* binding */ warning)
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    30
});
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
22
8c2e4d02f4ef Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents: 21
diff changeset
    32
;// ./node_modules/@wordpress/warning/build-module/utils.js
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    33
/**
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    34
 * Object map tracking messages which have been logged, for use in ensuring a
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    35
 * message is only logged once.
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    36
 */
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    37
const logged = new Set();
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    38
22
8c2e4d02f4ef Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents: 21
diff changeset
    39
;// ./node_modules/@wordpress/warning/build-module/index.js
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    40
/**
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    41
 * Internal dependencies
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    42
 */
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    44
function isDev() {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    45
  // eslint-disable-next-line @wordpress/wp-global-usage
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    46
  return true === true;
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    47
}
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
/**
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
 * Shows a warning with `message` if environment is not `production`.
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
 *
22
8c2e4d02f4ef Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents: 21
diff changeset
    52
 * @param message Message to show in the warning.
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
 * @example
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
 * ```js
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
 * import warning from '@wordpress/warning';
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
 * function MyComponent( props ) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
 *   if ( ! props.title ) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
 *     warning( '`props.title` was not passed' );
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
 *   }
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
 *   ...
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
 * }
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
 * ```
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
 */
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
function warning(message) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
  if (!isDev()) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
    return;
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    69
  }
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    70
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    71
  // Skip if already logged.
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    72
  if (logged.has(message)) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    73
    return;
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    74
  }
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    76
  // eslint-disable-next-line no-console
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    77
  console.warn(message);
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    79
  // Throwing an error and catching it immediately to improve debugging
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
  // A consumer can use 'pause on caught exceptions'
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
  // https://github.com/facebook/react/issues/4216
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
  try {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
    throw Error(message);
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    84
  } catch (x) {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    85
    // Do nothing.
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
  }
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    87
  logged.add(message);
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
}
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    90
(window.wp = window.wp || {}).warning = __webpack_exports__["default"];
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    91
/******/ })()
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    92
;