将 react-highlight-words 从 0.x 升级到 1.x
根据 TypeScript 类型自动比较 react-highlight-words 0.21.1 与 1.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 1 |
| 已修改的签名 | 4 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 1 |
| 新增导出 | 1 |
已删除的导出
| import | export | kind | 之前 |
|---|---|---|---|
react-highlight-words | default | function | ({ activeClassName, activeIndex, activeStyle, autoEscape, caseSensitive, className, findChunks, highlightClassName, highlightStyle, highlightTag, sanitize, searchWords, textToHighlight, unhighlightClassName, unhighlightStyle, unhighlightTag, ...rest }: HighlighterProps): ReactElement |
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
react-highlight-words · Chunk | { end: number; start: number; } | FoundChunk |
react-highlight-words · HighlighterProps | Omit<HTMLAttributes<HTMLSpanElement>, "children"> & { activeClassName?: string | undefined; activeIndex?: number | undefined; activeStyle?: any; autoEscape?: boolean | undefined; caseSensitive?: boolean | undefined; className?: string | undefined; findChunks?: ((options: FindChunksOptions) => Chunk[]) | undefined; highlightClassName?: string | Record<string, string> | undefined; highlightStyle?: any; highlightTag?: any; sanitize?: ((text: string) => string) | undefined; searchWords: (string | RegExp)[]; textToHighlight: string; unhighlightClassName?: string | undefined; unhighlightStyle?: any;… | Omit<HTMLAttributes<HTMLSpanElement>, "children"> & { activeClassName?: string | undefined; activeIndex?: number | undefined; activeStyle?: any; autoEscape?: boolean | undefined; caseSensitive?: boolean | undefined; className?: string | undefined; findChunks?: ((options: FindChunksOptions) => FoundChunk[]) | undefined; highlightClassName?: string | Record<string, string> | undefined; highlightStyle?: any; highlightTag?: any; sanitize?: ((text: string) => string) | undefined; searchWords: readonly (string | RegExp)[]; textToHighlight: string; unhighlightClassName?: string | undefined; unhighlig… |
react-highlight-words · FindChunksOptions | { autoEscape?: boolean | undefined; caseSensitive?: boolean | undefined; sanitize?: ((text: string) => string) | undefined; searchWords: (string | RegExp)[]; textToHighlight: string; } | FindChunksOptions |
react-highlight-words · HighlightTagProps | { children: string; className: string; highlightIndex: number; style: CSSProperties; } | { children: string; className: string; highlightIndex: number; searchIndex: number; style: CSSProperties; } |
已删除的类或接口成员
未发现。
已修改的类或接口成员
未发现。
新增弃用
未发现。
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
peerDependencies.react | ^0.14.0 || ^15.0.0 || ^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 | ^16.3.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 |
新增导出 (1)
| import | export | kind |
|---|---|---|
react-highlight-words | FoundChunk | type |
把这些数据交给你的 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" } } }常见问题
将 react-highlight-words 从 0 升级到 1 有哪些不兼容变更?
在 react-highlight-words 0.21.1 与 1.0.0 之间,Vigia 发现 1 个已删除的导出、4 个已修改的签名,以及 0 个已删除或修改的类或接口成员。
react-highlight-words 1 中弃用了哪些内容?
react-highlight-words 1.0.0 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/react-highlight-words/upgrade?from=0.21.1&to=1.0.0