From 99725b2123b25d420b093b60bbf006995d90a170 Mon Sep 17 00:00:00 2001 From: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:18:06 +1100 Subject: [PATCH] Update consent string for using private APIs. --- docs/contributors/code/coding-guidelines.md | 2 +- packages/block-editor/src/lock-unlock.js | 2 +- packages/block-library/src/lock-unlock.js | 2 +- packages/blocks/src/lock-unlock.js | 2 +- packages/commands/src/lock-unlock.js | 2 +- packages/components/src/private-apis.ts | 2 +- packages/core-commands/src/lock-unlock.js | 2 +- packages/core-data/src/private-apis.js | 2 +- packages/customize-widgets/src/lock-unlock.js | 2 +- packages/data/src/lock-unlock.js | 2 +- packages/edit-post/src/lock-unlock.js | 2 +- packages/edit-site/src/lock-unlock.js | 2 +- packages/edit-widgets/src/lock-unlock.js | 2 +- packages/editor/src/lock-unlock.js | 2 +- packages/patterns/src/lock-unlock.js | 2 +- packages/private-apis/README.md | 4 ++-- packages/private-apis/src/implementation.js | 2 +- packages/private-apis/src/test/index.js | 2 +- packages/reusable-blocks/src/lock-unlock.js | 2 +- packages/router/src/lock-unlock.js | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/contributors/code/coding-guidelines.md b/docs/contributors/code/coding-guidelines.md index 90fb5c7adf81f..53f0a0f8d1000 100644 --- a/docs/contributors/code/coding-guidelines.md +++ b/docs/contributors/code/coding-guidelines.md @@ -162,7 +162,7 @@ do so by opting-in to `@wordpress/private-apis`: import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { lock, unlock } = __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, // (not the name of the package whose APIs you want to access) ); diff --git a/packages/block-editor/src/lock-unlock.js b/packages/block-editor/src/lock-unlock.js index 019821d284b36..433a61a12aec0 100644 --- a/packages/block-editor/src/lock-unlock.js +++ b/packages/block-editor/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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' ); diff --git a/packages/block-library/src/lock-unlock.js b/packages/block-library/src/lock-unlock.js index 3fef0820721be..3c18e76b798cd 100644 --- a/packages/block-library/src/lock-unlock.js +++ b/packages/block-library/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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-library' ); diff --git a/packages/blocks/src/lock-unlock.js b/packages/blocks/src/lock-unlock.js index 363b51af7d233..0a98fcfb19d29 100644 --- a/packages/blocks/src/lock-unlock.js +++ b/packages/blocks/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/blocks' ); diff --git a/packages/commands/src/lock-unlock.js b/packages/commands/src/lock-unlock.js index 0665114d842c3..e11bd687d8742 100644 --- a/packages/commands/src/lock-unlock.js +++ b/packages/commands/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/commands' ); diff --git a/packages/components/src/private-apis.ts b/packages/components/src/private-apis.ts index fd61c2564e6b0..fa086f783b4b2 100644 --- a/packages/components/src/private-apis.ts +++ b/packages/components/src/private-apis.ts @@ -34,7 +34,7 @@ import Theme from './theme'; export const { lock, unlock } = __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/components' ); diff --git a/packages/core-commands/src/lock-unlock.js b/packages/core-commands/src/lock-unlock.js index 24973274f1897..6f0712a8069fd 100644 --- a/packages/core-commands/src/lock-unlock.js +++ b/packages/core-commands/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/core-commands' ); diff --git a/packages/core-data/src/private-apis.js b/packages/core-data/src/private-apis.js index a5b93a25dbf77..53f0dc2dfa133 100644 --- a/packages/core-data/src/private-apis.js +++ b/packages/core-data/src/private-apis.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/core-data' ); diff --git a/packages/customize-widgets/src/lock-unlock.js b/packages/customize-widgets/src/lock-unlock.js index f428bbaac936a..01d57a2835d5d 100644 --- a/packages/customize-widgets/src/lock-unlock.js +++ b/packages/customize-widgets/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/customize-widgets' ); diff --git a/packages/data/src/lock-unlock.js b/packages/data/src/lock-unlock.js index 5fdca775a27b8..b5b1f9cbed5a5 100644 --- a/packages/data/src/lock-unlock.js +++ b/packages/data/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/data' ); diff --git a/packages/edit-post/src/lock-unlock.js b/packages/edit-post/src/lock-unlock.js index 172d18df7d1ba..bf65b262d9f48 100644 --- a/packages/edit-post/src/lock-unlock.js +++ b/packages/edit-post/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/edit-post' ); diff --git a/packages/edit-site/src/lock-unlock.js b/packages/edit-site/src/lock-unlock.js index 9934484ea2347..5c335db46b9d4 100644 --- a/packages/edit-site/src/lock-unlock.js +++ b/packages/edit-site/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/edit-site' ); diff --git a/packages/edit-widgets/src/lock-unlock.js b/packages/edit-widgets/src/lock-unlock.js index a13068520e077..003e53788068c 100644 --- a/packages/edit-widgets/src/lock-unlock.js +++ b/packages/edit-widgets/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/edit-widgets' ); diff --git a/packages/editor/src/lock-unlock.js b/packages/editor/src/lock-unlock.js index 5a36d0cd752f4..12df6f4711b23 100644 --- a/packages/editor/src/lock-unlock.js +++ b/packages/editor/src/lock-unlock.js @@ -4,6 +4,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { lock, unlock } = __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/editor' ); diff --git a/packages/patterns/src/lock-unlock.js b/packages/patterns/src/lock-unlock.js index 51adc98f32cac..d727871d71439 100644 --- a/packages/patterns/src/lock-unlock.js +++ b/packages/patterns/src/lock-unlock.js @@ -4,6 +4,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { lock, unlock } = __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/patterns' ); diff --git a/packages/private-apis/README.md b/packages/private-apis/README.md index 9faaada853200..cdc1db2180e2c 100644 --- a/packages/private-apis/README.md +++ b/packages/private-apis/README.md @@ -12,7 +12,7 @@ Every `@wordpress` package wanting to privately access or expose experimental AP import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { lock, unlock } = __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, // (not the name of the package whose APIs you want to access) ); @@ -22,7 +22,7 @@ Each package may only opt in once. The function name communicates that plugins a The function will throw an error if the following conditions are not met: -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` Once the opt-in is complete, the obtained `lock()` and `unlock()` utilities enable hiding `__experimental` APIs from the naked eye: diff --git a/packages/private-apis/src/implementation.js b/packages/private-apis/src/implementation.js index 4f1877bff569e..14d3048eff68b 100644 --- a/packages/private-apis/src/implementation.js +++ b/packages/private-apis/src/implementation.js @@ -51,7 +51,7 @@ const registeredPrivateApis = []; * CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE. */ 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.'; /** @type {boolean} */ let allowReRegistration; diff --git a/packages/private-apis/src/test/index.js b/packages/private-apis/src/test/index.js index 2e73a1a58eaa1..d91f7d3bcdafe 100644 --- a/packages/private-apis/src/test/index.js +++ b/packages/private-apis/src/test/index.js @@ -16,7 +16,7 @@ beforeEach( () => { } ); 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.'; describe( '__dangerousOptInToUnstableAPIsOnlyForCoreModules', () => { it( 'Should require a consent string', () => { diff --git a/packages/reusable-blocks/src/lock-unlock.js b/packages/reusable-blocks/src/lock-unlock.js index c33f209c9d76a..c0bc2d1529f7d 100644 --- a/packages/reusable-blocks/src/lock-unlock.js +++ b/packages/reusable-blocks/src/lock-unlock.js @@ -4,6 +4,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { unlock } = __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/reusable-blocks' ); diff --git a/packages/router/src/lock-unlock.js b/packages/router/src/lock-unlock.js index d148f785fe944..d7f4e92b4a542 100644 --- a/packages/router/src/lock-unlock.js +++ b/packages/router/src/lock-unlock.js @@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri export const { lock, unlock } = __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/router' );