将 react-native-uuid 从 2.x 升级到 3.x
根据 TypeScript 类型自动比较 react-native-uuid 2.0.4 与 3.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 0 |
| 已修改的签名 | 2 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 3 |
| 新增导出 | 27 |
已删除的导出
未发现。
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
react-native-uuid · default | { parse: (s: string, buf?: number[] | undefined, offset?: number | undefined) => number[]; unparse: (buf: number[], offset?: number | undefined) => string; validate: (uuid: string) => boolean; version: (uuid: string) => number; v1: (options?: { node: number[]; clockseq: number; msecs: number; nsecs: number; random: number[]; rng: () => number[]; } | undefined, buf?: Uint8Array<ArrayBufferLike> | undefined, offset?: number | undefined) => string | Uint8Array<ArrayBufferLike>; v3: GenerateUUID; v4: { (options?: string | V4Options | undefined, buf?: undefined, offset?: number | undefined): string… | { parse: <T extends number[] | Uint8Array = number[]>(uuid: string, buf?: T | undefined, offset?: number | undefined) => T; stringify: (arr: ArrayLike<number>, offset?: number | undefined) => string; unparse: (buf: ArrayLike<number>, offset?: number | undefined) => string; validate: (uuid: unknown) => uuid is string; version: (uuid: string) => number; rng: () => Uint8Array<ArrayBufferLike>; randomSource: () => "crypto" | "native" | "Math.random"; v1: { (options?: V1Options | undefined, buf?: undefined, offset?: number | undefined): string; <T extends UUIDBuffer>(options: V1Options | undefined,… |
react-native-uuid · GenerateUUID | (value: string | Uint8Array<ArrayBufferLike>, namespace: string | number[], buf?: number[] | undefined, offset?: number | undefined) => string | number[] | interface |
已删除的类或接口成员
未发现。
已修改的类或接口成员
未发现。
新增弃用
未发现。
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.npm | >=9.0.0 | >=10.0.0 |
engines.node | >=18.0.0 | >=22.0.0 |
peerDependencies.react-native | — | >=0.74.0 |
新增导出 (27)
| import | export | kind |
|---|---|---|
react-native-uuid | v1 | function |
react-native-uuid | v3 | variable |
react-native-uuid | v4 | function |
react-native-uuid | v5 | variable |
react-native-uuid | v6 | function |
react-native-uuid | v7 | function |
react-native-uuid | DNS | variable |
react-native-uuid | MAX | variable |
react-native-uuid | NIL | variable |
react-native-uuid | OID | variable |
react-native-uuid | URL | variable |
react-native-uuid | rng | variable |
react-native-uuid | X500 | variable |
react-native-uuid | uuid | variable |
react-native-uuid | parse | variable |
react-native-uuid | v1ToV6 | function |
react-native-uuid | v6ToV1 | function |
react-native-uuid | unparse | variable |
react-native-uuid | version | variable |
react-native-uuid | validate | variable |
react-native-uuid | V1Options | type |
react-native-uuid | V4Options | type |
react-native-uuid | V6Options | type |
react-native-uuid | V7Options | type |
react-native-uuid | stringify | variable |
react-native-uuid | UUIDBuffer | type |
react-native-uuid | randomSource | variable |
把这些数据交给你的 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-native-uuid 从 2 升级到 3 有哪些不兼容变更?
在 react-native-uuid 2.0.4 与 3.0.0 之间,Vigia 发现 0 个已删除的导出、2 个已修改的签名,以及 0 个已删除或修改的类或接口成员。
react-native-uuid 3 中弃用了哪些内容?
react-native-uuid 3.0.0 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/react-native-uuid/upgrade?from=2.0.4&to=3.0.0