@wordpress/private-apis
Advanced tools
Comparing version 0.25.0 to 0.26.0
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
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']; | ||
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-directory', '@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']; | ||
@@ -37,3 +37,3 @@ /** | ||
*/ | ||
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; | ||
const requiredConsent = 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; | ||
@@ -40,0 +40,0 @@ /** @type {boolean} */ |
@@ -21,3 +21,3 @@ "use strict"; | ||
*/ | ||
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']; | ||
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-directory', '@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']; | ||
@@ -46,3 +46,3 @@ /** | ||
*/ | ||
const requiredConsent = 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; | ||
const requiredConsent = 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; | ||
@@ -49,0 +49,0 @@ /** @type {boolean} */ |
@@ -5,2 +5,4 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
## 0.26.0 (2023-10-18) | ||
## 0.25.0 (2023-10-05) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "@wordpress/private-apis", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"description": "Internal experimental APIs for WordPress core.", | ||
@@ -36,3 +36,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "9b8e598c5418d38fe72197c24ef1d3dd6c712151" | ||
"gitHead": "f83bb1a71e8fa416131b81a9f282a72a1dc6c694" | ||
} |
@@ -15,3 +15,3 @@ # Private APIs | ||
__dangerousOptInToUnstableAPIsOnlyForCoreModules( | ||
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', | ||
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', | ||
'@wordpress/block-editor' // Name of the package calling __dangerousOptInToUnstableAPIsOnlyForCoreModules, | ||
@@ -26,3 +26,3 @@ // (not the name of the package whose APIs you want to access) | ||
1. The first argument must exactly match the required consent string: `'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'`. | ||
1. The first argument must exactly match the required consent string: `'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'`. | ||
2. The second argument must be a known `@wordpress` package that hasn't yet opted into `@wordpress/private-apis` | ||
@@ -101,1 +101,25 @@ | ||
<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p> | ||
### Updating the consent string | ||
The consent string for unlocking private APIs is intended to change on a regular basis. To update the consent string: | ||
1. Come up with a new consent string, the string should mention that themes or plugins opting in to unstable and private features will break in future versions of WordPress. | ||
2. Ensure the consent string has not being used previously. | ||
3. Append the new string to the history list below. | ||
4. Replace the consent string in the following locations: | ||
* twice in the documentation above | ||
* in the `src/implementation.js` file of this package | ||
* in the `src/lock-unlock.js` file located in packages consuming private APIs | ||
* search the full code base for any other occurrences | ||
**Note**: The consent string is not used for user facing content and as such should _not_ be made translatable via the internationalization features of WordPress. | ||
Updating the consent string is considered a task and can be done during the late stages of a WordPress release. | ||
#### Consent string history | ||
The final string in this list is the current version. | ||
1. I know using unstable features means my plugin or theme will inevitably break on the next WordPress release. | ||
2. I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress. |
@@ -13,2 +13,3 @@ /** | ||
const CORE_MODULES_USING_PRIVATE_APIS = [ | ||
'@wordpress/block-directory', | ||
'@wordpress/block-editor', | ||
@@ -55,3 +56,3 @@ '@wordpress/block-library', | ||
const requiredConsent = | ||
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; | ||
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; | ||
@@ -58,0 +59,0 @@ /** @type {boolean} */ |
@@ -19,3 +19,3 @@ /** | ||
const requiredConsent = | ||
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; | ||
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; | ||
@@ -22,0 +22,0 @@ describe( '__dangerousOptInToUnstableAPIsOnlyForCoreModules', () => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109409
959
123