将 @wordpress/components 从 43.x 升级到 44.x
根据 TypeScript 类型自动比较 @wordpress/components 43.0.0 与 44.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 0 |
| 已修改的签名 | 3 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 5 |
| 要求变化(engines、peer 依赖) | 4 |
| 新增导出 | 0 |
已删除的导出
未发现。
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
@wordpress/components · Autocomplete | ({ children, isSelected, ...options }: AutocompleteProps): any | <TReplacement = RichTextValue>({ children, isSelected, ...options }: AutocompleteProps<TReplacement>): any |
@wordpress/components · CustomGradientPicker | ({ value, onChange, enableAlpha, __experimentalIsRenderedInSidebar, }: CustomGradientPickerProps): any | (props: CustomGradientPickerProps): any |
@wordpress/components · __unstableUseAutocompleteProps | (options: Omit<UseAutocompleteProps, "contentRef">): { ref: any; children?: undefined; 'aria-autocomplete'?: undefined; 'aria-haspopup'?: undefined; 'aria-controls'?: undefined; 'aria-owns'?: undefined; 'aria-activedescendant'?: undefined; } | { ref: any; children: any; 'aria-autocomplete': "list" | undefined; 'aria-haspopup': "listbox" | undefined; 'aria-controls': string | undefined; 'aria-owns': string | undefined; 'aria-activedescendant': string | undefined; } | <TReplacement = RichTextValue>(options: Omit<UseAutocompleteProps<TReplacement>, "contentRef">): { ref: any; children?: undefined; 'aria-autocomplete'?: undefined; 'aria-haspopup'?: undefined; 'aria-controls'?: undefined; 'aria-owns'?: undefined; 'aria-activedescendant'?: undefined; } | { ref: any; children: any; 'aria-autocomplete': "list" | undefined; 'aria-haspopup': "listbox" | undefined; 'aria-controls': string | undefined; 'aria-owns': string | undefined; 'aria-activedescendant': string | undefined; } |
已删除的类或接口成员
未发现。
已修改的类或接口成员
未发现。
新增弃用
| export | @deprecated |
|---|---|
@wordpress/components · Tooltip | Use `Tooltip` from `@wordpress/ui` instead. |
@wordpress/components · FormToggle | Use `Switch` from `@wordpress/ui` instead. ```jsx import { FormToggle } from '@wordpress/components'; import { useState } from '@wordpress/element'; const MyFormToggle = () => { const [ isChecked, setChecked ] = useState( true ); return ( <FormToggle checked={ isChecked } onChange={ () => setChec… |
@wordpress/components · ProgressBar | Use `Progress` from `@wordpress/ui` instead. ```jsx import { ProgressBar } from '@wordpress/components'; const MyLoadingComponent = () => { return <ProgressBar />; }; ``` |
@wordpress/components · TabbableContainer | ```jsx import { TabbableContainer, Button, } from '@wordpress/components'; function onNavigate( index, target ) { console.log( `Navigates to ${ index }`, target ); } const MyTabbableContainer = () => ( <div> <span>Tabbable Container:</span> <TabbableContainer onNavigate… |
@wordpress/components · CustomGradientPicker | Use `GradientPicker` with `clearable={ false }` instead. ```jsx import { GradientPicker } from '@wordpress/components'; import { useState } from '@wordpress/element'; const MyGradientEditor = () => { const [ gradient, setGradient ] = useState(); return ( <GradientPicker clearable={ false } value=… |
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.node | >=22.13.0 | — |
peerDependencies.react | ^18 || ^19 | — |
peerDependencies.react-dom | ^18 || ^19 | — |
peerDependencies.@types/react | ^18 || ^19 | — |
把这些数据交给你的 AI 智能体
Vigia 是免费的 MCP 服务器:你的编程智能体在写代码之前就能检查版本、不兼容变更和安全漏洞。无需注册,无需 API 密钥。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
添加到 Cursor添加到 VS Code★ 在 GitHub 上加星
任何其他 MCP 客户端
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }常见问题
将 @wordpress/components 从 43 升级到 44 有哪些不兼容变更?
在 @wordpress/components 43.0.0 与 44.0.0 之间,Vigia 发现 0 个已删除的导出、3 个已修改的签名,以及 0 个已删除或修改的类或接口成员。
@wordpress/components 44 中弃用了哪些内容?
@wordpress/components 44.0.0 中有 5 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/@wordpress/components/upgrade?from=43.0.0&to=44.0.0