将 @types/json-schema 从 6.x 升级到 7.x
根据 TypeScript 类型自动比较 @types/json-schema 6.0.1 与 7.0.15 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 0 |
| 已修改的签名 | 2 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 15 |
| 新增弃用 | 0 |
| 要求变化(engines、peer 依赖) | 0 |
| 新增导出 | 19 |
已删除的导出
未发现。
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
@types/json-schema · JSONSchema4Type | string | number | boolean | object | any[] | null | string | number | boolean | JSONSchema4Object | JSONSchema4Array | null |
@types/json-schema · JSONSchema6Type | string | number | boolean | object | any[] | null | string | number | boolean | JSONSchema6Object | JSONSchema6Array | null |
已删除的类或接口成员
未发现。
已修改的类或接口成员
| member | 之前 | 之后 |
|---|---|---|
JSONSchema4.required | false | string[] | undefined | boolean | string[] | undefined |
JSONSchema6.not | boolean | JSONSchema6 | undefined | JSONSchema6Definition | undefined |
JSONSchema6.allOf | JSONSchema6[] | undefined | JSONSchema6Definition[] | undefined |
JSONSchema6.anyOf | JSONSchema6[] | undefined | JSONSchema6Definition[] | undefined |
JSONSchema6.items | boolean | JSONSchema6 | JSONSchema6[] | undefined | JSONSchema6Definition | JSONSchema6Definition[] | undefined |
JSONSchema6.oneOf | JSONSchema6[] | undefined | JSONSchema6Definition[] | undefined |
JSONSchema6.$schema | "http://json-schema.org/schema#" | "http://json-schema.org/hyper-schema#" | "http://json-schema.org/draft-06/schema#" | "http://json-schema.org/draft-06/hyper-schema#" | undefined | string | undefined |
JSONSchema6.contains | boolean | JSONSchema6 | undefined | JSONSchema6Definition | undefined |
JSONSchema6.properties | { [k: string]: boolean | JSONSchema6; } | undefined | { [k: string]: JSONSchema6Definition; } | undefined |
JSONSchema6.definitions | { [k: string]: boolean | JSONSchema6; } | undefined | { [k: string]: JSONSchema6Definition; } | undefined |
JSONSchema6.dependencies | { [k: string]: boolean | string[] | JSONSchema6; } | undefined | { [k: string]: string[] | JSONSchema6Definition; } | undefined |
JSONSchema6.propertyNames | boolean | JSONSchema6 | undefined | JSONSchema6Definition | undefined |
JSONSchema6.additionalItems | boolean | JSONSchema6 | undefined | JSONSchema6Definition | undefined |
JSONSchema6.patternProperties | { [k: string]: boolean | JSONSchema6; } | undefined | { [k: string]: JSONSchema6Definition; } | undefined |
JSONSchema6.additionalProperties | boolean | JSONSchema6 | undefined | JSONSchema6Definition | undefined |
新增弃用
未发现。
要求变化(engines、peer 依赖)
未发现。
新增导出 (19)
| import | export | kind |
|---|---|---|
@types/json-schema | validate | function |
@types/json-schema | JSONSchema7 | interface |
@types/json-schema | mustBeValid | function |
@types/json-schema | JSONSchema7Type | type |
@types/json-schema | ValidationError | interface |
@types/json-schema | JSONSchema4Array | interface |
@types/json-schema | JSONSchema6Array | interface |
@types/json-schema | JSONSchema7Array | interface |
@types/json-schema | ValidationResult | interface |
@types/json-schema | JSONSchema4Object | interface |
@types/json-schema | JSONSchema6Object | interface |
@types/json-schema | JSONSchema7Object | interface |
@types/json-schema | JSONSchema4Version | type |
@types/json-schema | JSONSchema6Version | type |
@types/json-schema | JSONSchema7Version | type |
@types/json-schema | JSONSchema7TypeName | type |
@types/json-schema | checkPropertyChange | function |
@types/json-schema | JSONSchema6Definition | type |
@types/json-schema | JSONSchema7Definition | type |
常见问题
将 @types/json-schema 从 6 升级到 7 有哪些不兼容变更?
在 @types/json-schema 6.0.1 与 7.0.15 之间,Vigia 发现 0 个已删除的导出、2 个已修改的签名,以及 15 个已删除或修改的类或接口成员。
@types/json-schema 7 中弃用了哪些内容?
@types/json-schema 7.0.15 中有 0 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/@types/json-schema/upgrade?from=6.0.1&to=7.0.15