Skip to content

Commit

Permalink
add support for private apis
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 committed Dec 21, 2023
1 parent 0167c53 commit c2e83c2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/format-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@wordpress/html-entities": "file:../html-entities",
"@wordpress/i18n": "file:../i18n",
"@wordpress/icons": "file:../icons",
"@wordpress/private-apis": "file:../private-apis",
"@wordpress/rich-text": "file:../rich-text",
"@wordpress/url": "file:../url"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/format-library/src/lock-unlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* WordPress dependencies
*/
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';

export const { lock, unlock } =
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
'@wordpress/format-library'
);
1 change: 1 addition & 0 deletions packages/private-apis/src/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const CORE_MODULES_USING_PRIVATE_APIS = [
'@wordpress/edit-site',
'@wordpress/edit-widgets',
'@wordpress/editor',
'@wordpress/format-library',
'@wordpress/patterns',
'@wordpress/reusable-blocks',
'@wordpress/router',
Expand Down

0 comments on commit c2e83c2

Please sign in to comment.