Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix native app test
  • Loading branch information
t-hamano committed Dec 4, 2023
commit 11fe4d1cf93060164af27035e2ef719c23fe3ec5
10 changes: 10 additions & 0 deletions packages/components/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/components'
);
13 changes: 13 additions & 0 deletions packages/components/src/private-apis.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Internal dependencies
*/
import { kebabCase } from './utils/strings';
import { lock } from './lock-unlock';

/**
* Private @wordpress/block-editor APIs.
*/
export const privateApis = {};
lock( privateApis, {
kebabCase,
} );
7 changes: 1 addition & 6 deletions packages/components/src/private-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ import { ComponentsContext } from './context/context-system-provider';
import Theme from './theme';
import Tabs from './tabs';
import { kebabCase } from './utils/strings';

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/components'
);
import { lock } from './lock-unlock';

export const privateApis = {};
lock( privateApis, {
Expand Down