Vigia

Atualizar yaml de 1.x para 2.x

Comparação da API pública de yaml 1.10.3 e 2.9.1, calculada automaticamente a partir dos tipos TypeScript. Uma assinatura alterada é uma possível mudança incompatível, não uma certeza.

Resumo

Caminhos de importação removidos0
Exports removidos6
Assinaturas alteradas4
Membros de classes ou interfaces removidos12
Membros de classes ou interfaces alterados18
Novas descontinuações0
Mudanças de requisitos (engines, dependências peer)1
Novos exports44

Exports removidos

importexportkindAntes
yamlASTnamespacenamespace
yamlOptionsinterfaceinterface
yamlparseCSTfunction(str: string): ParsedCST
yamlcreateNodefunction(value: any, wrapScalars?: true | undefined, tag?: string | undefined): YAMLMap | YAMLSeq | Scalar | (value: any, wrapScalars: false, tag?: string | undefined): string | number | boolean | YAMLMap | YAMLSeq | null
yamlscalarOptionsvariable{ binary: Binary; bool: Bool; int: Int; null: Null; str: Str; }
yamldefaultOptionsvariableOptions

Assinaturas alteradas

exportAntesDepois
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>)[]

Membros de classes ou interfaces removidos

memberimportAntes
Document.tagyamlnever
Document.typeyamlType.DOCUMENT
Document.itemsyamlany[]
Document.parseyaml(cst: Document): Document
Document.anchorsyamlAnchors
Document.cstNodeyamlDocument | undefined
Document.versionyamlstring | undefined
Document.spaceBeforeyamlboolean | undefined
Document.tagPrefixesyamlTagPrefix[]
Document.setTagPrefixyaml(handle: string, prefix: string): void
Document.listNonDefaultTagsyaml(): string[]
Document.directivesEndMarkeryamlboolean | undefined

Membros de classes ou interfaces alterados

memberAntesDepois
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 | undefinedRange | 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.schemaSchema | undefinedSchema
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.commentstring | null | undefinedstring | null
Document.contentsanyStrict 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.commentBeforestring | null | undefinedstring | null

Novas descontinuações

Nenhuma detectada.

Mudanças de requisitos (engines, dependências peer)

AntesDepois
engines.node>= 6>= 14.6
Novos exports (44)
importexportkind
yamlNodetype
yamlPairclass
yamlTagstype
yamlAliasclass
yamlLexerclass
yamlRangetype
yamlTagIdtype
yamlisMapvariable
yamlisSeqvariable
yamlvisitfunction
yamlParserclass
yamlScalarclass
yamlSchemaclass
yamlisNodefunction
yamlisPairvariable
yamlYAMLMapclass
yamlYAMLSeqclass
yamlYAMLSetclass
yamlisAliasvariable
yamlvisitortype
yamlComposerclass
yamlYAMLOMapclass
yamlisScalarvariable
yamlErrorCodetype
yamlScalarTaginterface
yamlYAMLErrorclass
yamlvisitorFntype
yamlParsedNodetype
yamlisDocumentvariable
yamlvisitAsyncfunction
yamlEmptyStreaminterface
yamlLineCounterclass
yamlToJSOptionstype
yamlYAMLWarningclass
yamlParseOptionstype
yamlasyncVisitortype
yamlisCollectionfunction
yamlCollectionTaginterface
yamlSchemaOptionstype
yamlYAMLParseErrorclass
yamlasyncVisitorFntype
yamlDocumentOptionstype
yamlToStringOptionstype
yamlCreateNodeOptionstype

Perguntas frequentes

Quais são as mudanças incompatíveis ao atualizar yaml de 1 para 2?

Entre yaml 1.10.3 e 2.9.1, o Vigia encontrou 6 exports removidos, 4 assinaturas alteradas e 30 membros de classes ou interfaces removidos ou alterados.

O que foi descontinuado em yaml 2?

0 exports ou membros foram marcados como descontinuados em yaml 2.9.1.

Para agentes

GET https://vigia.coredls.cloud/v1/packages/npm/yaml/upgrade?from=1.10.3&to=2.9.1