yaml को 1.x से 2.x पर अपग्रेड करना
yaml 1.10.3 और 2.9.1 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।
सारांश
| हटाए गए इम्पोर्ट पाथ | 0 |
|---|---|
| हटाए गए एक्सपोर्ट | 6 |
| बदले गए सिग्नेचर | 4 |
| क्लास या इंटरफ़ेस के हटाए गए सदस्य | 12 |
| क्लास या इंटरफ़ेस के बदले गए सदस्य | 18 |
| नए डिप्रिकेटेड | 0 |
| आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ) | 1 |
| नए एक्सपोर्ट | 44 |
हटाए गए एक्सपोर्ट
| import | export | kind | पहले |
|---|---|---|---|
yaml | AST | namespace | namespace |
yaml | Options | interface | interface |
yaml | parseCST | function | (str: string): ParsedCST |
yaml | createNode | function | (value: any, wrapScalars?: true | undefined, tag?: string | undefined): YAMLMap | YAMLSeq | Scalar | (value: any, wrapScalars: false, tag?: string | undefined): string | number | boolean | YAMLMap | YAMLSeq | null |
yaml | scalarOptions | variable | { binary: Binary; bool: Bool; int: Int; null: Null; str: Str; } |
yaml | defaultOptions | variable | Options |
बदले गए सिग्नेचर
| export | पहले | बाद में |
|---|---|---|
yaml · parse | (str: string, options?: Options | undefined): any | (src: string, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any | (src: string, reviver: Reviver, options?: (ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions) | undefined): any |
yaml · stringify | (value: any, options?: Options | undefined): string | (value: any, options?: (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions) | undefined): string | (value: any, replacer?: Replacer | null | undefined, options?: string | number | (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions & ToStringOptions) | undefined): string |
yaml · parseDocument | (str: string, options?: Options | undefined): Parsed | <Contents extends Node = ParsedNode, Strict extends boolean = true>(source: string, options?: (ParseOptions & DocumentOptions & SchemaOptions) | undefined): Contents extends ParsedNode ? Parsed<Contents, Strict> : Document<Contents, Strict> |
yaml · parseAllDocuments | (str: string, options?: Options | undefined): Parsed[] | <Contents extends Node = ParsedNode, Strict extends boolean = true>(source: string, options?: (ParseOptions & DocumentOptions & SchemaOptions) | undefined): EmptyStream | (Contents extends ParsedNode ? Parsed<Contents, Strict> : Document<Contents, Strict>)[] |
क्लास या इंटरफ़ेस के हटाए गए सदस्य
| member | import | पहले |
|---|---|---|
Document.tag | yaml | never |
Document.type | yaml | Type.DOCUMENT |
Document.items | yaml | any[] |
Document.parse | yaml | (cst: Document): Document |
Document.anchors | yaml | Anchors |
Document.cstNode | yaml | Document | undefined |
Document.version | yaml | string | undefined |
Document.spaceBefore | yaml | boolean | undefined |
Document.tagPrefixes | yaml | TagPrefix[] |
Document.setTagPrefix | yaml | (handle: string, prefix: string): void |
Document.listNonDefaultTags | yaml | (): string[] |
Document.directivesEndMarker | yaml | boolean | undefined |
क्लास या इंटरफ़ेस के बदले गए सदस्य
| member | पहले | बाद में |
|---|---|---|
Document.get | (key: any, keepScalar?: boolean | undefined): any | (key: unknown, keepScalar?: boolean | undefined): Strict extends true ? unknown : any |
Document.has | (key: any): boolean | (key: unknown): boolean |
Document.set | (key: any, value: any): void | (key: any, value: unknown): void |
Document.addIn | (path: Iterable<any>, value: any): void | (path: Iterable<unknown>, value: unknown): void |
Document.getIn | (path: Iterable<any>, keepScalar?: boolean | undefined): any | (path: Iterable<unknown> | null, keepScalar?: boolean | undefined): Strict extends true ? unknown : any |
Document.hasIn | (path: Iterable<any>): boolean | (path: Iterable<unknown> | null): boolean |
Document.range | [number, number] | null | undefined | Range | undefined |
Document.setIn | (path: Iterable<any>, value: any): void | (path: Iterable<unknown> | null, value: unknown): void |
Document.delete | (key: any): boolean | (key: unknown): boolean |
Document.schema | Schema | undefined | Schema |
Document.toJSON | (arg?: string | undefined, onAnchor?: ((value: any, count: number) => void) | undefined): any | (jsonArg?: string | null | undefined, onAnchor?: ((value: unknown, count: number) => void) | undefined): any |
Document.comment | string | null | undefined | string | null |
Document.contents | any | Strict extends true ? Contents | null : Contents |
Document.deleteIn | (path: Iterable<any>): boolean | (path: Iterable<unknown> | null): boolean |
Document.toString | (): string | (options?: ToStringOptions | undefined): string |
Document.setSchema | (id?: "1.0" | "1.1" | "1.2" | Name | undefined, customTags?: (TagId | Tag)[] | undefined): void | (version: "1.1" | "1.2" | "next" | null, options?: SchemaOptions | undefined): void |
Document.constructor | (options?: Options | undefined): Document | <Contents extends Node = Node, Strict extends boolean = true>(value?: any, options?: (DocumentOptions & SchemaOptions & ParseOptions & CreateNodeOptions) | undefined): Document<Contents, Strict> | <Contents extends Node = Node, Strict extends boolean = true>(value: any, replacer: Replacer | null, op… |
Document.commentBefore | string | null | undefined | string | null |
नए डिप्रिकेटेड
कुछ नहीं मिला।
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)
| पहले | बाद में | |
|---|---|---|
engines.node | >= 6 | >= 14.6 |
नए एक्सपोर्ट (44)
| import | export | kind |
|---|---|---|
yaml | Node | type |
yaml | Pair | class |
yaml | Tags | type |
yaml | Alias | class |
yaml | Lexer | class |
yaml | Range | type |
yaml | TagId | type |
yaml | isMap | variable |
yaml | isSeq | variable |
yaml | visit | function |
yaml | Parser | class |
yaml | Scalar | class |
yaml | Schema | class |
yaml | isNode | function |
yaml | isPair | variable |
yaml | YAMLMap | class |
yaml | YAMLSeq | class |
yaml | YAMLSet | class |
yaml | isAlias | variable |
yaml | visitor | type |
yaml | Composer | class |
yaml | YAMLOMap | class |
yaml | isScalar | variable |
yaml | ErrorCode | type |
yaml | ScalarTag | interface |
yaml | YAMLError | class |
yaml | visitorFn | type |
yaml | ParsedNode | type |
yaml | isDocument | variable |
yaml | visitAsync | function |
yaml | EmptyStream | interface |
yaml | LineCounter | class |
yaml | ToJSOptions | type |
yaml | YAMLWarning | class |
yaml | ParseOptions | type |
yaml | asyncVisitor | type |
yaml | isCollection | function |
yaml | CollectionTag | interface |
yaml | SchemaOptions | type |
yaml | YAMLParseError | class |
yaml | asyncVisitorFn | type |
yaml | DocumentOptions | type |
yaml | ToStringOptions | type |
yaml | CreateNodeOptions | type |
अक्सर पूछे जाने वाले प्रश्न
yaml को 1 से 2 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?
yaml 1.10.3 और 2.9.1 के बीच Vigia को 6 हटाए गए एक्सपोर्ट, 4 बदले गए सिग्नेचर और 30 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।
yaml 2 में क्या डिप्रिकेट हुआ?
yaml 2.9.1 में 0 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।
एजेंटों के लिए
GET https://vigia.coredls.cloud/v1/packages/npm/yaml/upgrade?from=1.10.3&to=2.9.1