@wordpress/private-apis 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/implementation.js +13 -29
- package/build/implementation.js.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build-module/implementation.js +13 -24
- package/build-module/implementation.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-types/implementation.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/implementation.js +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/build/implementation.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.__dangerousOptInToUnstableAPIsOnlyForCoreModules = void 0;
|
|
|
7
7
|
exports.allowCoreModule = allowCoreModule;
|
|
8
8
|
exports.resetAllowedCoreModules = resetAllowedCoreModules;
|
|
9
9
|
exports.resetRegisteredPrivateApis = resetRegisteredPrivateApis;
|
|
10
|
-
|
|
11
10
|
/**
|
|
12
11
|
* wordpress/private-apis – the utilities to enable private cross-package
|
|
13
12
|
* exports of private APIs.
|
|
@@ -19,15 +18,16 @@ exports.resetRegisteredPrivateApis = resetRegisteredPrivateApis;
|
|
|
19
18
|
/**
|
|
20
19
|
* The list of core modules allowed to opt-in to the private APIs.
|
|
21
20
|
*/
|
|
22
|
-
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/commands', '@wordpress/components', '@wordpress/core-commands', '@wordpress/core-data', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor', '@wordpress/reusable-blocks', '@wordpress/router'];
|
|
21
|
+
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/commands', '@wordpress/components', '@wordpress/core-commands', '@wordpress/core-data', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor', '@wordpress/patterns', '@wordpress/reusable-blocks', '@wordpress/router'];
|
|
22
|
+
|
|
23
23
|
/**
|
|
24
24
|
* A list of core modules that already opted-in to
|
|
25
25
|
* the privateApis package.
|
|
26
26
|
*
|
|
27
27
|
* @type {string[]}
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
29
|
const registeredPrivateApis = [];
|
|
30
|
+
|
|
31
31
|
/*
|
|
32
32
|
* Warning for theme and plugin developers.
|
|
33
33
|
*
|
|
@@ -42,21 +42,21 @@ const registeredPrivateApis = [];
|
|
|
42
42
|
* WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A
|
|
43
43
|
* CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.
|
|
44
44
|
*/
|
|
45
|
-
|
|
46
45
|
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
|
|
47
|
-
/** @type {boolean} */
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
/** @type {boolean} */
|
|
48
|
+
let allowReRegistration;
|
|
49
|
+
// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE
|
|
50
50
|
// is set to true.
|
|
51
51
|
// For the general use-case, the re-registration should be allowed by default
|
|
52
52
|
// Let's default to true, then. Try/catch will fall back to "true" even if the
|
|
53
53
|
// environment variable is not explicitly defined.
|
|
54
|
-
|
|
55
54
|
try {
|
|
56
55
|
allowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;
|
|
57
56
|
} catch (error) {
|
|
58
57
|
allowReRegistration = true;
|
|
59
58
|
}
|
|
59
|
+
|
|
60
60
|
/**
|
|
61
61
|
* Called by a @wordpress package wishing to opt-in to accessing or exposing
|
|
62
62
|
* private private APIs.
|
|
@@ -65,30 +65,26 @@ try {
|
|
|
65
65
|
* @param {string} moduleName The name of the module that is opting in.
|
|
66
66
|
* @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.
|
|
67
67
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
68
|
const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
|
|
71
69
|
if (!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName)) {
|
|
72
70
|
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
|
|
73
71
|
}
|
|
74
|
-
|
|
75
72
|
if (!allowReRegistration && registeredPrivateApis.includes(moduleName)) {
|
|
76
73
|
// This check doesn't play well with Story Books / Hot Module Reloading
|
|
77
74
|
// and isn't included in the Gutenberg plugin. It only matters in the
|
|
78
75
|
// WordPress core release.
|
|
79
76
|
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
|
|
80
77
|
}
|
|
81
|
-
|
|
82
78
|
if (consent !== requiredConsent) {
|
|
83
79
|
throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.');
|
|
84
80
|
}
|
|
85
|
-
|
|
86
81
|
registeredPrivateApis.push(moduleName);
|
|
87
82
|
return {
|
|
88
83
|
lock,
|
|
89
84
|
unlock
|
|
90
85
|
};
|
|
91
86
|
};
|
|
87
|
+
|
|
92
88
|
/**
|
|
93
89
|
* Binds private data to an object.
|
|
94
90
|
* It does not alter the passed object in any way, only
|
|
@@ -113,21 +109,17 @@ const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) =
|
|
|
113
109
|
* @param {any} object The object to bind the private data to.
|
|
114
110
|
* @param {any} privateData The private data to bind to the object.
|
|
115
111
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
112
|
exports.__dangerousOptInToUnstableAPIsOnlyForCoreModules = __dangerousOptInToUnstableAPIsOnlyForCoreModules;
|
|
119
|
-
|
|
120
113
|
function lock(object, privateData) {
|
|
121
114
|
if (!object) {
|
|
122
115
|
throw new Error('Cannot lock an undefined object.');
|
|
123
116
|
}
|
|
124
|
-
|
|
125
117
|
if (!(__private in object)) {
|
|
126
118
|
object[__private] = {};
|
|
127
119
|
}
|
|
128
|
-
|
|
129
120
|
lockedData.set(object[__private], privateData);
|
|
130
121
|
}
|
|
122
|
+
|
|
131
123
|
/**
|
|
132
124
|
* Unlocks the private data bound to an object.
|
|
133
125
|
*
|
|
@@ -151,27 +143,24 @@ function lock(object, privateData) {
|
|
|
151
143
|
* @param {any} object The object to unlock the private data from.
|
|
152
144
|
* @return {any} The private data bound to the object.
|
|
153
145
|
*/
|
|
154
|
-
|
|
155
|
-
|
|
156
146
|
function unlock(object) {
|
|
157
147
|
if (!object) {
|
|
158
148
|
throw new Error('Cannot unlock an undefined object.');
|
|
159
149
|
}
|
|
160
|
-
|
|
161
150
|
if (!(__private in object)) {
|
|
162
151
|
throw new Error('Cannot unlock an object that was not locked before. ');
|
|
163
152
|
}
|
|
164
|
-
|
|
165
153
|
return lockedData.get(object[__private]);
|
|
166
154
|
}
|
|
167
|
-
|
|
168
155
|
const lockedData = new WeakMap();
|
|
156
|
+
|
|
169
157
|
/**
|
|
170
158
|
* Used by lock() and unlock() to uniquely identify the private data
|
|
171
159
|
* related to a containing object.
|
|
172
160
|
*/
|
|
161
|
+
const __private = Symbol('Private API ID');
|
|
173
162
|
|
|
174
|
-
|
|
163
|
+
// Unit tests utilities:
|
|
175
164
|
|
|
176
165
|
/**
|
|
177
166
|
* Private function to allow the unit tests to allow
|
|
@@ -179,17 +168,14 @@ const __private = Symbol('Private API ID'); // Unit tests utilities:
|
|
|
179
168
|
*
|
|
180
169
|
* @param {string} name The name of the module.
|
|
181
170
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
171
|
function allowCoreModule(name) {
|
|
185
172
|
CORE_MODULES_USING_PRIVATE_APIS.push(name);
|
|
186
173
|
}
|
|
174
|
+
|
|
187
175
|
/**
|
|
188
176
|
* Private function to allow the unit tests to set
|
|
189
177
|
* a custom list of allowed modules.
|
|
190
178
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
179
|
function resetAllowedCoreModules() {
|
|
194
180
|
while (CORE_MODULES_USING_PRIVATE_APIS.length) {
|
|
195
181
|
CORE_MODULES_USING_PRIVATE_APIS.pop();
|
|
@@ -199,8 +185,6 @@ function resetAllowedCoreModules() {
|
|
|
199
185
|
* Private function to allow the unit tests to reset
|
|
200
186
|
* the list of registered private apis.
|
|
201
187
|
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
188
|
function resetRegisteredPrivateApis() {
|
|
205
189
|
while (registeredPrivateApis.length) {
|
|
206
190
|
registeredPrivateApis.pop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/private-apis/src/implementation.js"],"names":["CORE_MODULES_USING_PRIVATE_APIS","registeredPrivateApis","requiredConsent","allowReRegistration","process","env","IS_WORDPRESS_CORE","error","__dangerousOptInToUnstableAPIsOnlyForCoreModules","consent","moduleName","includes","Error","push","lock","unlock","object","privateData","__private","lockedData","set","get","WeakMap","Symbol","allowCoreModule","name","resetAllowedCoreModules","length","pop","resetRegisteredPrivateApis"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMA,+BAA+B,GAAG,CACvC,yBADuC,EAEvC,0BAFuC,EAGvC,mBAHuC,EAIvC,qBAJuC,EAKvC,uBALuC,EAMvC,0BANuC,EAOvC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O,SAASC,uBAAT,GAAmC;AACzC,SAAQ1B,+BAA+B,CAAC2B,MAAxC,EAAiD;AAChD3B,IAAAA,+BAA+B,CAAC4B,GAAhC;AACA;AACD;AACD;AACA;AACA;AACA;;;AACO,SAASC,0BAAT,GAAsC;AAC5C,SAAQ5B,qBAAqB,CAAC0B,MAA9B,EAAuC;AACtC1B,IAAAA,qBAAqB,CAAC2B,GAAtB;AACA;AACD","sourcesContent":["/**\n * wordpress/private-apis – the utilities to enable private cross-package\n * exports of private APIs.\n *\n * This \"implementation.js\" file is needed for the sake of the unit tests. It\n * exports more than the public API of the package to aid in testing.\n */\n\n/**\n * The list of core modules allowed to opt-in to the private APIs.\n */\nconst CORE_MODULES_USING_PRIVATE_APIS = [\n\t'@wordpress/block-editor',\n\t'@wordpress/block-library',\n\t'@wordpress/blocks',\n\t'@wordpress/commands',\n\t'@wordpress/components',\n\t'@wordpress/core-commands',\n\t'@wordpress/core-data',\n\t'@wordpress/customize-widgets',\n\t'@wordpress/data',\n\t'@wordpress/edit-post',\n\t'@wordpress/edit-site',\n\t'@wordpress/edit-widgets',\n\t'@wordpress/editor',\n\t'@wordpress/reusable-blocks',\n\t'@wordpress/router',\n];\n\n/**\n * A list of core modules that already opted-in to\n * the privateApis package.\n *\n * @type {string[]}\n */\nconst registeredPrivateApis = [];\n\n/*\n * Warning for theme and plugin developers.\n *\n * The use of private developer APIs is intended for use by WordPress Core\n * and the Gutenberg plugin exclusively.\n *\n * Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,\n * the WordPress Core philosophy to strive to maintain backward compatibility\n * for third-party developers DOES NOT APPLY to private APIs.\n *\n * THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND\n * WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A\n * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.\n */\nconst requiredConsent =\n\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';\n\n/** @type {boolean} */\nlet allowReRegistration;\n// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE\n// is set to true.\n// For the general use-case, the re-registration should be allowed by default\n// Let's default to true, then. Try/catch will fall back to \"true\" even if the\n// environment variable is not explicitly defined.\ntry {\n\tallowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;\n} catch ( error ) {\n\tallowReRegistration = true;\n}\n\n/**\n * Called by a @wordpress package wishing to opt-in to accessing or exposing\n * private private APIs.\n *\n * @param {string} consent The consent string.\n * @param {string} moduleName The name of the module that is opting in.\n * @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.\n */\nexport const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (\n\tconsent,\n\tmoduleName\n) => {\n\tif ( ! CORE_MODULES_USING_PRIVATE_APIS.includes( moduleName ) ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\". ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif (\n\t\t! allowReRegistration &&\n\t\tregisteredPrivateApis.includes( moduleName )\n\t) {\n\t\t// This check doesn't play well with Story Books / Hot Module Reloading\n\t\t// and isn't included in the Gutenberg plugin. It only matters in the\n\t\t// WordPress core release.\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\" which is already registered. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif ( consent !== requiredConsent ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs without confirming you know the consequences. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on the next WordPress release.'\n\t\t);\n\t}\n\tregisteredPrivateApis.push( moduleName );\n\n\treturn {\n\t\tlock,\n\t\tunlock,\n\t};\n};\n\n/**\n * Binds private data to an object.\n * It does not alter the passed object in any way, only\n * registers it in an internal map of private data.\n *\n * The private data can't be accessed by any other means\n * than the `unlock` function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to bind the private data to.\n * @param {any} privateData The private data to bind to the object.\n */\nfunction lock( object, privateData ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot lock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tobject[ __private ] = {};\n\t}\n\tlockedData.set( object[ __private ], privateData );\n}\n\n/**\n * Unlocks the private data bound to an object.\n *\n * It does not alter the passed object in any way, only\n * returns the private data paired with it using the `lock()`\n * function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to unlock the private data from.\n * @return {any} The private data bound to the object.\n */\nfunction unlock( object ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot unlock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tthrow new Error(\n\t\t\t'Cannot unlock an object that was not locked before. '\n\t\t);\n\t}\n\n\treturn lockedData.get( object[ __private ] );\n}\n\nconst lockedData = new WeakMap();\n\n/**\n * Used by lock() and unlock() to uniquely identify the private data\n * related to a containing object.\n */\nconst __private = Symbol( 'Private API ID' );\n\n// Unit tests utilities:\n\n/**\n * Private function to allow the unit tests to allow\n * a mock module to access the private APIs.\n *\n * @param {string} name The name of the module.\n */\nexport function allowCoreModule( name ) {\n\tCORE_MODULES_USING_PRIVATE_APIS.push( name );\n}\n\n/**\n * Private function to allow the unit tests to set\n * a custom list of allowed modules.\n */\nexport function resetAllowedCoreModules() {\n\twhile ( CORE_MODULES_USING_PRIVATE_APIS.length ) {\n\t\tCORE_MODULES_USING_PRIVATE_APIS.pop();\n\t}\n}\n/**\n * Private function to allow the unit tests to reset\n * the list of registered private apis.\n */\nexport function resetRegisteredPrivateApis() {\n\twhile ( registeredPrivateApis.length ) {\n\t\tregisteredPrivateApis.pop();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"names":["CORE_MODULES_USING_PRIVATE_APIS","registeredPrivateApis","requiredConsent","allowReRegistration","process","env","IS_WORDPRESS_CORE","error","__dangerousOptInToUnstableAPIsOnlyForCoreModules","consent","moduleName","includes","Error","push","lock","unlock","exports","object","privateData","__private","lockedData","set","get","WeakMap","Symbol","allowCoreModule","name","resetAllowedCoreModules","length","pop","resetRegisteredPrivateApis"],"sources":["@wordpress/private-apis/src/implementation.js"],"sourcesContent":["/**\n * wordpress/private-apis – the utilities to enable private cross-package\n * exports of private APIs.\n *\n * This \"implementation.js\" file is needed for the sake of the unit tests. It\n * exports more than the public API of the package to aid in testing.\n */\n\n/**\n * The list of core modules allowed to opt-in to the private APIs.\n */\nconst CORE_MODULES_USING_PRIVATE_APIS = [\n\t'@wordpress/block-editor',\n\t'@wordpress/block-library',\n\t'@wordpress/blocks',\n\t'@wordpress/commands',\n\t'@wordpress/components',\n\t'@wordpress/core-commands',\n\t'@wordpress/core-data',\n\t'@wordpress/customize-widgets',\n\t'@wordpress/data',\n\t'@wordpress/edit-post',\n\t'@wordpress/edit-site',\n\t'@wordpress/edit-widgets',\n\t'@wordpress/editor',\n\t'@wordpress/patterns',\n\t'@wordpress/reusable-blocks',\n\t'@wordpress/router',\n];\n\n/**\n * A list of core modules that already opted-in to\n * the privateApis package.\n *\n * @type {string[]}\n */\nconst registeredPrivateApis = [];\n\n/*\n * Warning for theme and plugin developers.\n *\n * The use of private developer APIs is intended for use by WordPress Core\n * and the Gutenberg plugin exclusively.\n *\n * Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,\n * the WordPress Core philosophy to strive to maintain backward compatibility\n * for third-party developers DOES NOT APPLY to private APIs.\n *\n * THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND\n * WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A\n * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.\n */\nconst requiredConsent =\n\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';\n\n/** @type {boolean} */\nlet allowReRegistration;\n// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE\n// is set to true.\n// For the general use-case, the re-registration should be allowed by default\n// Let's default to true, then. Try/catch will fall back to \"true\" even if the\n// environment variable is not explicitly defined.\ntry {\n\tallowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;\n} catch ( error ) {\n\tallowReRegistration = true;\n}\n\n/**\n * Called by a @wordpress package wishing to opt-in to accessing or exposing\n * private private APIs.\n *\n * @param {string} consent The consent string.\n * @param {string} moduleName The name of the module that is opting in.\n * @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.\n */\nexport const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (\n\tconsent,\n\tmoduleName\n) => {\n\tif ( ! CORE_MODULES_USING_PRIVATE_APIS.includes( moduleName ) ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\". ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif (\n\t\t! allowReRegistration &&\n\t\tregisteredPrivateApis.includes( moduleName )\n\t) {\n\t\t// This check doesn't play well with Story Books / Hot Module Reloading\n\t\t// and isn't included in the Gutenberg plugin. It only matters in the\n\t\t// WordPress core release.\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\" which is already registered. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif ( consent !== requiredConsent ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs without confirming you know the consequences. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on the next WordPress release.'\n\t\t);\n\t}\n\tregisteredPrivateApis.push( moduleName );\n\n\treturn {\n\t\tlock,\n\t\tunlock,\n\t};\n};\n\n/**\n * Binds private data to an object.\n * It does not alter the passed object in any way, only\n * registers it in an internal map of private data.\n *\n * The private data can't be accessed by any other means\n * than the `unlock` function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to bind the private data to.\n * @param {any} privateData The private data to bind to the object.\n */\nfunction lock( object, privateData ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot lock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tobject[ __private ] = {};\n\t}\n\tlockedData.set( object[ __private ], privateData );\n}\n\n/**\n * Unlocks the private data bound to an object.\n *\n * It does not alter the passed object in any way, only\n * returns the private data paired with it using the `lock()`\n * function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to unlock the private data from.\n * @return {any} The private data bound to the object.\n */\nfunction unlock( object ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot unlock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tthrow new Error(\n\t\t\t'Cannot unlock an object that was not locked before. '\n\t\t);\n\t}\n\n\treturn lockedData.get( object[ __private ] );\n}\n\nconst lockedData = new WeakMap();\n\n/**\n * Used by lock() and unlock() to uniquely identify the private data\n * related to a containing object.\n */\nconst __private = Symbol( 'Private API ID' );\n\n// Unit tests utilities:\n\n/**\n * Private function to allow the unit tests to allow\n * a mock module to access the private APIs.\n *\n * @param {string} name The name of the module.\n */\nexport function allowCoreModule( name ) {\n\tCORE_MODULES_USING_PRIVATE_APIS.push( name );\n}\n\n/**\n * Private function to allow the unit tests to set\n * a custom list of allowed modules.\n */\nexport function resetAllowedCoreModules() {\n\twhile ( CORE_MODULES_USING_PRIVATE_APIS.length ) {\n\t\tCORE_MODULES_USING_PRIVATE_APIS.pop();\n\t}\n}\n/**\n * Private function to allow the unit tests to reset\n * the list of registered private apis.\n */\nexport function resetRegisteredPrivateApis() {\n\twhile ( registeredPrivateApis.length ) {\n\t\tregisteredPrivateApis.pop();\n\t}\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMA,+BAA+B,GAAG,CACvC,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAm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CAAC;EACtC;AACD;AACA;AACA;AACA;AACA;AACO,SAASC,0BAA0BA,CAAA,EAAG;EAC5C,OAAQ7B,qBAAqB,CAAC2B,MAAM,EAAG;IACtC3B,qBAAqB,CAAC4B,GAAG,CAAC,CAAC;EAC5B;AACD"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/private-apis/src/index.js"],"
|
|
1
|
+
{"version":3,"names":["_implementation","require"],"sources":["@wordpress/private-apis/src/index.js"],"sourcesContent":["export { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from './implementation';\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA"}
|
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* The list of core modules allowed to opt-in to the private APIs.
|
|
11
11
|
*/
|
|
12
|
-
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/commands', '@wordpress/components', '@wordpress/core-commands', '@wordpress/core-data', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor', '@wordpress/reusable-blocks', '@wordpress/router'];
|
|
12
|
+
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/commands', '@wordpress/components', '@wordpress/core-commands', '@wordpress/core-data', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor', '@wordpress/patterns', '@wordpress/reusable-blocks', '@wordpress/router'];
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* A list of core modules that already opted-in to
|
|
15
16
|
* the privateApis package.
|
|
16
17
|
*
|
|
17
18
|
* @type {string[]}
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
20
|
const registeredPrivateApis = [];
|
|
21
|
+
|
|
21
22
|
/*
|
|
22
23
|
* Warning for theme and plugin developers.
|
|
23
24
|
*
|
|
@@ -32,21 +33,21 @@ const registeredPrivateApis = [];
|
|
|
32
33
|
* WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A
|
|
33
34
|
* CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
36
|
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';
|
|
37
|
-
/** @type {boolean} */
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
/** @type {boolean} */
|
|
39
|
+
let allowReRegistration;
|
|
40
|
+
// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE
|
|
40
41
|
// is set to true.
|
|
41
42
|
// For the general use-case, the re-registration should be allowed by default
|
|
42
43
|
// Let's default to true, then. Try/catch will fall back to "true" even if the
|
|
43
44
|
// environment variable is not explicitly defined.
|
|
44
|
-
|
|
45
45
|
try {
|
|
46
46
|
allowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;
|
|
47
47
|
} catch (error) {
|
|
48
48
|
allowReRegistration = true;
|
|
49
49
|
}
|
|
50
|
+
|
|
50
51
|
/**
|
|
51
52
|
* Called by a @wordpress package wishing to opt-in to accessing or exposing
|
|
52
53
|
* private private APIs.
|
|
@@ -55,30 +56,26 @@ try {
|
|
|
55
56
|
* @param {string} moduleName The name of the module that is opting in.
|
|
56
57
|
* @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.
|
|
57
58
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
59
|
export const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
|
|
61
60
|
if (!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName)) {
|
|
62
61
|
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
|
|
63
62
|
}
|
|
64
|
-
|
|
65
63
|
if (!allowReRegistration && registeredPrivateApis.includes(moduleName)) {
|
|
66
64
|
// This check doesn't play well with Story Books / Hot Module Reloading
|
|
67
65
|
// and isn't included in the Gutenberg plugin. It only matters in the
|
|
68
66
|
// WordPress core release.
|
|
69
67
|
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
|
|
70
68
|
}
|
|
71
|
-
|
|
72
69
|
if (consent !== requiredConsent) {
|
|
73
70
|
throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.');
|
|
74
71
|
}
|
|
75
|
-
|
|
76
72
|
registeredPrivateApis.push(moduleName);
|
|
77
73
|
return {
|
|
78
74
|
lock,
|
|
79
75
|
unlock
|
|
80
76
|
};
|
|
81
77
|
};
|
|
78
|
+
|
|
82
79
|
/**
|
|
83
80
|
* Binds private data to an object.
|
|
84
81
|
* It does not alter the passed object in any way, only
|
|
@@ -103,18 +100,16 @@ export const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, module
|
|
|
103
100
|
* @param {any} object The object to bind the private data to.
|
|
104
101
|
* @param {any} privateData The private data to bind to the object.
|
|
105
102
|
*/
|
|
106
|
-
|
|
107
103
|
function lock(object, privateData) {
|
|
108
104
|
if (!object) {
|
|
109
105
|
throw new Error('Cannot lock an undefined object.');
|
|
110
106
|
}
|
|
111
|
-
|
|
112
107
|
if (!(__private in object)) {
|
|
113
108
|
object[__private] = {};
|
|
114
109
|
}
|
|
115
|
-
|
|
116
110
|
lockedData.set(object[__private], privateData);
|
|
117
111
|
}
|
|
112
|
+
|
|
118
113
|
/**
|
|
119
114
|
* Unlocks the private data bound to an object.
|
|
120
115
|
*
|
|
@@ -138,27 +133,24 @@ function lock(object, privateData) {
|
|
|
138
133
|
* @param {any} object The object to unlock the private data from.
|
|
139
134
|
* @return {any} The private data bound to the object.
|
|
140
135
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
136
|
function unlock(object) {
|
|
144
137
|
if (!object) {
|
|
145
138
|
throw new Error('Cannot unlock an undefined object.');
|
|
146
139
|
}
|
|
147
|
-
|
|
148
140
|
if (!(__private in object)) {
|
|
149
141
|
throw new Error('Cannot unlock an object that was not locked before. ');
|
|
150
142
|
}
|
|
151
|
-
|
|
152
143
|
return lockedData.get(object[__private]);
|
|
153
144
|
}
|
|
154
|
-
|
|
155
145
|
const lockedData = new WeakMap();
|
|
146
|
+
|
|
156
147
|
/**
|
|
157
148
|
* Used by lock() and unlock() to uniquely identify the private data
|
|
158
149
|
* related to a containing object.
|
|
159
150
|
*/
|
|
151
|
+
const __private = Symbol('Private API ID');
|
|
160
152
|
|
|
161
|
-
|
|
153
|
+
// Unit tests utilities:
|
|
162
154
|
|
|
163
155
|
/**
|
|
164
156
|
* Private function to allow the unit tests to allow
|
|
@@ -166,16 +158,14 @@ const __private = Symbol('Private API ID'); // Unit tests utilities:
|
|
|
166
158
|
*
|
|
167
159
|
* @param {string} name The name of the module.
|
|
168
160
|
*/
|
|
169
|
-
|
|
170
|
-
|
|
171
161
|
export function allowCoreModule(name) {
|
|
172
162
|
CORE_MODULES_USING_PRIVATE_APIS.push(name);
|
|
173
163
|
}
|
|
164
|
+
|
|
174
165
|
/**
|
|
175
166
|
* Private function to allow the unit tests to set
|
|
176
167
|
* a custom list of allowed modules.
|
|
177
168
|
*/
|
|
178
|
-
|
|
179
169
|
export function resetAllowedCoreModules() {
|
|
180
170
|
while (CORE_MODULES_USING_PRIVATE_APIS.length) {
|
|
181
171
|
CORE_MODULES_USING_PRIVATE_APIS.pop();
|
|
@@ -185,7 +175,6 @@ export function resetAllowedCoreModules() {
|
|
|
185
175
|
* Private function to allow the unit tests to reset
|
|
186
176
|
* the list of registered private apis.
|
|
187
177
|
*/
|
|
188
|
-
|
|
189
178
|
export function resetRegisteredPrivateApis() {
|
|
190
179
|
while (registeredPrivateApis.length) {
|
|
191
180
|
registeredPrivateApis.pop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/private-apis/src/implementation.js"],"names":["CORE_MODULES_USING_PRIVATE_APIS","registeredPrivateApis","requiredConsent","allowReRegistration","process","env","IS_WORDPRESS_CORE","error","__dangerousOptInToUnstableAPIsOnlyForCoreModules","consent","moduleName","includes","Error","push","lock","unlock","object","privateData","__private","lockedData","set","get","WeakMap","Symbol","allowCoreModule","name","resetAllowedCoreModules","length","pop","resetRegisteredPrivateApis"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMA,+BAA+B,GAAG,CACvC,yBADuC,EAEvC,0BAFuC,EAGvC,mBAHuC,EAIvC,qBAJuC,EAKvC,uBALuC,EAMvC,0BANuC,EAOvC,sBAPuC,EAQvC,8BARuC,EASvC,iBATuC,EAUvC,sBAVuC,EAWvC,sBAXuC,EAYvC,yBAZuC,EAavC,mBAbuC,EAcvC,4BAduC,EAevC,mBAfuC,CAAxC;AAkBA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,qBAAqB,GAAG,EAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,eAAe,GACpB,8GADD;AAGA;;AACA,IAAIC,mBAAJ,C,CACA;AACA;AACA;AACA;AACA;;AACA,IAAI;AACHA,EAAAA,mBAAmB,GAAGC,OAAO,CAACC,GAAR,CAAYC,iBAAZ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AsB,EAAtB;AACA;;AACDC,EAAAA,UAAU,CAACC,GAAX,CAAgBJ,MAAM,CAAEE,SAAF,CAAtB,EAAqCD,WAArC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASF,MAAT,CAAiBC,MAAjB,EAA0B;AACzB,MAAK,CAAEA,MAAP,EAAgB;AACf,UAAM,IAAIJ,KAAJ,CAAW,oCAAX,CAAN;AACA;;AACD,MAAK,EAAIM,SAAS,IAAIF,MAAjB,CAAL,EAAiC;AAChC,UAAM,IAAIJ,KAAJ,CACL,sDADK,CAAN;AAGA;;AAED,SAAOO,UAAU,CAACE,GAAX,CAAgBL,MAAM,CAAEE,SAAF,CAAtB,CAAP;AACA;;AAED,MAAMC,UAAU,GAAG,IAAIG,OAAJ,EAAnB;AAEA;AACA;AACA;AACA;;AACA,MAAMJ,SAAS,GAAGK,MAAM,CAAE,gBAAF,CAAxB,C,CAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,eAAT,CAA0BC,IAA1B,EAAiC;AACvCzB,EAAAA,+BAA+B,CAACa,IAAhC,CAAsCY,IAAtC;AACA;AAED;AACA;AACA;AACA;;AACA,OAAO,SAASC,uBAAT,GAAmC;AACzC,SAAQ1B,+BAA+B,CAAC2B,MAAxC,EAAiD;AAChD3B,IAAAA,+BAA+B,CAAC4B,GAAhC;AACA;AACD;AACD;AACA;AACA;AACA;;AACA,OAAO,SAASC,0BAAT,GAAsC;AAC5C,SAAQ5B,qBAAqB,CAAC0B,MAA9B,EAAuC;AACtC1B,IAAAA,qBAAqB,CAAC2B,GAAtB;AACA;AACD","sourcesContent":["/**\n * wordpress/private-apis – the utilities to enable private cross-package\n * exports of private APIs.\n *\n * This \"implementation.js\" file is needed for the sake of the unit tests. It\n * exports more than the public API of the package to aid in testing.\n */\n\n/**\n * The list of core modules allowed to opt-in to the private APIs.\n */\nconst CORE_MODULES_USING_PRIVATE_APIS = [\n\t'@wordpress/block-editor',\n\t'@wordpress/block-library',\n\t'@wordpress/blocks',\n\t'@wordpress/commands',\n\t'@wordpress/components',\n\t'@wordpress/core-commands',\n\t'@wordpress/core-data',\n\t'@wordpress/customize-widgets',\n\t'@wordpress/data',\n\t'@wordpress/edit-post',\n\t'@wordpress/edit-site',\n\t'@wordpress/edit-widgets',\n\t'@wordpress/editor',\n\t'@wordpress/reusable-blocks',\n\t'@wordpress/router',\n];\n\n/**\n * A list of core modules that already opted-in to\n * the privateApis package.\n *\n * @type {string[]}\n */\nconst registeredPrivateApis = [];\n\n/*\n * Warning for theme and plugin developers.\n *\n * The use of private developer APIs is intended for use by WordPress Core\n * and the Gutenberg plugin exclusively.\n *\n * Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,\n * the WordPress Core philosophy to strive to maintain backward compatibility\n * for third-party developers DOES NOT APPLY to private APIs.\n *\n * THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND\n * WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A\n * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.\n */\nconst requiredConsent =\n\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';\n\n/** @type {boolean} */\nlet allowReRegistration;\n// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE\n// is set to true.\n// For the general use-case, the re-registration should be allowed by default\n// Let's default to true, then. Try/catch will fall back to \"true\" even if the\n// environment variable is not explicitly defined.\ntry {\n\tallowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;\n} catch ( error ) {\n\tallowReRegistration = true;\n}\n\n/**\n * Called by a @wordpress package wishing to opt-in to accessing or exposing\n * private private APIs.\n *\n * @param {string} consent The consent string.\n * @param {string} moduleName The name of the module that is opting in.\n * @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.\n */\nexport const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (\n\tconsent,\n\tmoduleName\n) => {\n\tif ( ! CORE_MODULES_USING_PRIVATE_APIS.includes( moduleName ) ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\". ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif (\n\t\t! allowReRegistration &&\n\t\tregisteredPrivateApis.includes( moduleName )\n\t) {\n\t\t// This check doesn't play well with Story Books / Hot Module Reloading\n\t\t// and isn't included in the Gutenberg plugin. It only matters in the\n\t\t// WordPress core release.\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\" which is already registered. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif ( consent !== requiredConsent ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs without confirming you know the consequences. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on the next WordPress release.'\n\t\t);\n\t}\n\tregisteredPrivateApis.push( moduleName );\n\n\treturn {\n\t\tlock,\n\t\tunlock,\n\t};\n};\n\n/**\n * Binds private data to an object.\n * It does not alter the passed object in any way, only\n * registers it in an internal map of private data.\n *\n * The private data can't be accessed by any other means\n * than the `unlock` function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to bind the private data to.\n * @param {any} privateData The private data to bind to the object.\n */\nfunction lock( object, privateData ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot lock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tobject[ __private ] = {};\n\t}\n\tlockedData.set( object[ __private ], privateData );\n}\n\n/**\n * Unlocks the private data bound to an object.\n *\n * It does not alter the passed object in any way, only\n * returns the private data paired with it using the `lock()`\n * function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to unlock the private data from.\n * @return {any} The private data bound to the object.\n */\nfunction unlock( object ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot unlock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tthrow new Error(\n\t\t\t'Cannot unlock an object that was not locked before. '\n\t\t);\n\t}\n\n\treturn lockedData.get( object[ __private ] );\n}\n\nconst lockedData = new WeakMap();\n\n/**\n * Used by lock() and unlock() to uniquely identify the private data\n * related to a containing object.\n */\nconst __private = Symbol( 'Private API ID' );\n\n// Unit tests utilities:\n\n/**\n * Private function to allow the unit tests to allow\n * a mock module to access the private APIs.\n *\n * @param {string} name The name of the module.\n */\nexport function allowCoreModule( name ) {\n\tCORE_MODULES_USING_PRIVATE_APIS.push( name );\n}\n\n/**\n * Private function to allow the unit tests to set\n * a custom list of allowed modules.\n */\nexport function resetAllowedCoreModules() {\n\twhile ( CORE_MODULES_USING_PRIVATE_APIS.length ) {\n\t\tCORE_MODULES_USING_PRIVATE_APIS.pop();\n\t}\n}\n/**\n * Private function to allow the unit tests to reset\n * the list of registered private apis.\n */\nexport function resetRegisteredPrivateApis() {\n\twhile ( registeredPrivateApis.length ) {\n\t\tregisteredPrivateApis.pop();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"names":["CORE_MODULES_USING_PRIVATE_APIS","registeredPrivateApis","requiredConsent","allowReRegistration","process","env","IS_WORDPRESS_CORE","error","__dangerousOptInToUnstableAPIsOnlyForCoreModules","consent","moduleName","includes","Error","push","lock","unlock","object","privateData","__private","lockedData","set","get","WeakMap","Symbol","allowCoreModule","name","resetAllowedCoreModules","length","pop","resetRegisteredPrivateApis"],"sources":["@wordpress/private-apis/src/implementation.js"],"sourcesContent":["/**\n * wordpress/private-apis – the utilities to enable private cross-package\n * exports of private APIs.\n *\n * This \"implementation.js\" file is needed for the sake of the unit tests. It\n * exports more than the public API of the package to aid in testing.\n */\n\n/**\n * The list of core modules allowed to opt-in to the private APIs.\n */\nconst CORE_MODULES_USING_PRIVATE_APIS = [\n\t'@wordpress/block-editor',\n\t'@wordpress/block-library',\n\t'@wordpress/blocks',\n\t'@wordpress/commands',\n\t'@wordpress/components',\n\t'@wordpress/core-commands',\n\t'@wordpress/core-data',\n\t'@wordpress/customize-widgets',\n\t'@wordpress/data',\n\t'@wordpress/edit-post',\n\t'@wordpress/edit-site',\n\t'@wordpress/edit-widgets',\n\t'@wordpress/editor',\n\t'@wordpress/patterns',\n\t'@wordpress/reusable-blocks',\n\t'@wordpress/router',\n];\n\n/**\n * A list of core modules that already opted-in to\n * the privateApis package.\n *\n * @type {string[]}\n */\nconst registeredPrivateApis = [];\n\n/*\n * Warning for theme and plugin developers.\n *\n * The use of private developer APIs is intended for use by WordPress Core\n * and the Gutenberg plugin exclusively.\n *\n * Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,\n * the WordPress Core philosophy to strive to maintain backward compatibility\n * for third-party developers DOES NOT APPLY to private APIs.\n *\n * THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND\n * WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A\n * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.\n */\nconst requiredConsent =\n\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.';\n\n/** @type {boolean} */\nlet allowReRegistration;\n// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE\n// is set to true.\n// For the general use-case, the re-registration should be allowed by default\n// Let's default to true, then. Try/catch will fall back to \"true\" even if the\n// environment variable is not explicitly defined.\ntry {\n\tallowReRegistration = process.env.IS_WORDPRESS_CORE ? false : true;\n} catch ( error ) {\n\tallowReRegistration = true;\n}\n\n/**\n * Called by a @wordpress package wishing to opt-in to accessing or exposing\n * private private APIs.\n *\n * @param {string} consent The consent string.\n * @param {string} moduleName The name of the module that is opting in.\n * @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.\n */\nexport const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (\n\tconsent,\n\tmoduleName\n) => {\n\tif ( ! CORE_MODULES_USING_PRIVATE_APIS.includes( moduleName ) ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\". ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif (\n\t\t! allowReRegistration &&\n\t\tregisteredPrivateApis.includes( moduleName )\n\t) {\n\t\t// This check doesn't play well with Story Books / Hot Module Reloading\n\t\t// and isn't included in the Gutenberg plugin. It only matters in the\n\t\t// WordPress core release.\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs as module \"${ moduleName }\" which is already registered. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will be removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on one of the next WordPress releases.'\n\t\t);\n\t}\n\tif ( consent !== requiredConsent ) {\n\t\tthrow new Error(\n\t\t\t`You tried to opt-in to unstable APIs without confirming you know the consequences. ` +\n\t\t\t\t'This feature is only for JavaScript modules shipped with WordPress core. ' +\n\t\t\t\t'Please do not use it in plugins and themes as the unstable APIs will removed ' +\n\t\t\t\t'without a warning. If you ignore this error and depend on unstable features, ' +\n\t\t\t\t'your product will inevitably break on the next WordPress release.'\n\t\t);\n\t}\n\tregisteredPrivateApis.push( moduleName );\n\n\treturn {\n\t\tlock,\n\t\tunlock,\n\t};\n};\n\n/**\n * Binds private data to an object.\n * It does not alter the passed object in any way, only\n * registers it in an internal map of private data.\n *\n * The private data can't be accessed by any other means\n * than the `unlock` function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to bind the private data to.\n * @param {any} privateData The private data to bind to the object.\n */\nfunction lock( object, privateData ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot lock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tobject[ __private ] = {};\n\t}\n\tlockedData.set( object[ __private ], privateData );\n}\n\n/**\n * Unlocks the private data bound to an object.\n *\n * It does not alter the passed object in any way, only\n * returns the private data paired with it using the `lock()`\n * function.\n *\n * @example\n * ```js\n * const object = {};\n * const privateData = { a: 1 };\n * lock( object, privateData );\n *\n * object\n * // {}\n *\n * unlock( object );\n * // { a: 1 }\n * ```\n *\n * @param {any} object The object to unlock the private data from.\n * @return {any} The private data bound to the object.\n */\nfunction unlock( object ) {\n\tif ( ! object ) {\n\t\tthrow new Error( 'Cannot unlock an undefined object.' );\n\t}\n\tif ( ! ( __private in object ) ) {\n\t\tthrow new Error(\n\t\t\t'Cannot unlock an object that was not locked before. '\n\t\t);\n\t}\n\n\treturn lockedData.get( object[ __private ] );\n}\n\nconst lockedData = new WeakMap();\n\n/**\n * Used by lock() and unlock() to uniquely identify the private data\n * related to a containing object.\n */\nconst __private = Symbol( 'Private API ID' );\n\n// Unit tests utilities:\n\n/**\n * Private function to allow the unit tests to allow\n * a mock module to access the private APIs.\n *\n * @param {string} name The name of the module.\n */\nexport function allowCoreModule( name ) {\n\tCORE_MODULES_USING_PRIVATE_APIS.push( name );\n}\n\n/**\n * Private function to allow the unit tests to set\n * a custom list of allowed modules.\n */\nexport function resetAllowedCoreModules() {\n\twhile ( CORE_MODULES_USING_PRIVATE_APIS.length ) {\n\t\tCORE_MODULES_USING_PRIVATE_APIS.pop();\n\t}\n}\n/**\n * Private function to allow the unit tests to reset\n * the list of registered private apis.\n */\nexport function resetRegisteredPrivateApis() {\n\twhile ( registeredPrivateApis.length ) {\n\t\tregisteredPrivateApis.pop();\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMA,+BAA+B,GAAG,CACvC,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,CACnB;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,EAAE;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GACpB,8GAA8G;;AAE/G;AACA,IAAIC,mBAAmB;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI;EACHA,mBAAmB,GAAGC,OAAO,CAACC,GAAG,CAACC,iBAAiB,GAAG,KAAK,GAAG,IAAI;AACnE,CAAC,CAAC,OAAQC,KAAK,EAAG;EACjBJ,mBAAmB,GAAG,I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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASF,MAAMA,CAAEC,MAAM,EAAG;EACzB,IAAK,CAAEA,MAAM,EAAG;IACf,MAAM,IAAIJ,KAAK,CAAE,oCAAqC,CAAC;EACxD;EACA,IAAK,EAAIM,SAAS,IAAIF,MAAM,CAAE,EAAG;IAChC,MAAM,IAAIJ,KAAK,CACd,sDACD,CAAC;EACF;EAEA,OAAOO,UAAU,CAACE,GAAG,CAAEL,MAAM,CAAEE,SAAS,CAAG,CAAC;AAC7C;AAEA,MAAMC,UAAU,GAAG,IAAIG,OAAO,CAAC,CAAC;;AAEhC;AACA;AACA;AACA;AACA,MAAMJ,SAAS,GAAGK,MAAM,CAAE,gBAAiB,CAAC;;AAE5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,IAAI,EAAG;EACvCzB,+BAA+B,CAACa,IAAI,CAAEY,IAAK,CAAC;AAC7C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACzC,OAAQ1B,+BAA+B,CAAC2B,MAAM,EAAG;IAChD3B,+BAA+B,CAAC4B,GAAG,CAAC,CAAC;EACtC;AACD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAG;EAC5C,OAAQ5B,qBAAqB,CAAC0B,MAAM,EAAG;IACtC1B,qBAAqB,CAAC2B,GAAG,CAAC,CAAC;EAC5B;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/private-apis/src/index.js"],"
|
|
1
|
+
{"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules"],"sources":["@wordpress/private-apis/src/index.js"],"sourcesContent":["export { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from './implementation';\n"],"mappings":"AAAA,SAASA,gDAAgD,QAAQ,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../src/implementation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../src/implementation.js"],"names":[],"mappings":"AAyMA;;;;;GAKG;AACH,sCAFW,MAAM,QAIhB;AAED;;;GAGG;AACH,gDAIC;AACD;;;GAGG;AACH,mDAIC;AAxJM,0EAJI,MAAM,cACN,MAAM,GACL;IAAC,MAAM,WAAW,CAAC;IAAC,QAAQ,aAAa,CAAA;CAAC,CA6CrD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAHW,GAAG,eACH,GAAG,QAUb;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,gCAHW,GAAG,GACF,GAAG,CAad"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/private-apis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Internal experimental APIs for WordPress core.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "78a288d55b83a713b2f7d98d5a855c0771a2afc6"
|
|
37
37
|
}
|
package/src/implementation.js
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/implementation.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"6668cc82491a9d86594db1b6832ce740614aba9e936bb4b7a9262466809d6731","signature":"142d6426a67811d7bb2211ec07461b73302abc1c58f1b7c62a7f084d05717228"},{"version":"9562b4736c07eaf98388858acff6157eafae0b51df775cbba5bfdf4733de00b3","signature":"af7111a79dd6691e3168ce5b0feb86dc18b4e296e30d4994448b61f899967dd5"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[56]],"referencedMap":[[57,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,56,57,58],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"4.9.5"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","./src/implementation.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"907901bee9eacea7b8e8b04627a94c9db93f12f1307125dff39bd8284080eda1","signature":"142d6426a67811d7bb2211ec07461b73302abc1c58f1b7c62a7f084d05717228"},{"version":"9562b4736c07eaf98388858acff6157eafae0b51df775cbba5bfdf4733de00b3","signature":"af7111a79dd6691e3168ce5b0feb86dc18b4e296e30d4994448b61f899967dd5"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"root":[61,62],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[61]],"referencedMap":[[62,1]],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,61,62,63],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"5.1.6"}
|