Vigia

Upgrading js-yaml from 4.x to 5.x

Comparison of the public API of js-yaml 4.3.2 and 5.4.2, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.

Summary

Removed import paths0
Removed exports7
Changed signatures3
Removed class or interface members9
Changed class or interface members3
Newly deprecated2
Requirement changes (engines, peer dependencies)0
New exports94

Removed exports

importexportkindBefore
js-yamlMarkinterfaceinterface
js-yamlTypeclassclass
js-yamlStateinterfaceinterface
js-yamlEventTypetype"open" | "close"
js-yamlDEFAULT_SCHEMAvariableSchema
js-yamlSchemaDefinitioninterfaceinterface
js-yamlTypeConstructorOptionsinterfaceinterface

Changed signatures

exportBeforeAfter
js-yaml · dump(obj: any, opts?: DumpOptions | undefined): string(input: any, options?: DumpOptions | undefined): string
js-yaml · load(str: string, opts?: LoadOptions | undefined): unknown(input: string, options?: LoadOptions | undefined): unknown
js-yaml · loadAll(str: string, iterator?: null | undefined, opts?: LoadOptions | undefined): unknown[] | (str: string, iterator: (doc: unknown) => void, opts?: LoadOptions | undefined): void(input: string, options?: LoadOptions | undefined): unknown[] | (input: string, iterator: null, options?: LoadOptions | undefined): unknown[] | (input: string, iterator: LoadAllIterator, options?: LoadOptions | undefined): void

Removed class or interface members

memberimportBefore
Schema.extendjs-yaml(types: Type | SchemaDefinition | Type[]): Schema
DumpOptions.stylesjs-yaml{ [x: string]: any; } | undefined
DumpOptions.replacerjs-yaml((key: string, value: any) => any) | undefined
DumpOptions.quotingTypejs-yaml"'" | "\"" | undefined
DumpOptions.condenseFlowjs-yamlboolean | undefined
DumpOptions.noCompatModejs-yamlboolean | undefined
DumpOptions.noArrayIndentjs-yamlboolean | undefined
LoadOptions.listenerjs-yaml((this: State, eventType: EventType, state: State) => void) | undefined
LoadOptions.onWarningjs-yaml((this: null, e: YAMLException) => void) | undefined

Changed class or interface members

memberBeforeAfter
Schema.constructor(definition: Type | SchemaDefinition | Type[]): Schema(tags: readonly TagDefinition[]): Schema
YAMLException.markMarkSnippetMark | undefined
YAMLException.constructor(reason?: string | undefined, mark?: Mark | undefined): YAMLException(reason: string, mark?: SnippetMark | undefined): YAMLException

Newly deprecated

export@deprecated
js-yaml · loadAllIterator is not supported.
js-yaml · DumpOptions.sortKeysUse {@link transform} to reorder mapping items.

Requirement changes (engines, peer dependencies)

None detected.

New exports (94)
importexportkind
js-yamlNodetype
js-yamlEventtype
js-yamlvisitfunction
js-yamlmapTagvariable
js-yamlseqTagvariable
js-yamlsetTagvariable
js-yamlstrTagvariable
js-yamlEventIdtype
js-yamlVisitortype
js-yamljsToAstfunction
js-yamlomapTagvariable
js-yamlpresentfunction
js-yamlDocumentinterface
js-yamlEVENT_IDvariable
js-yamlNodeBaseinterface
js-yamlPopEventinterface
js-yamlmergeTagvariable
js-yamlpairsTagvariable
js-yamlAliasNodeinterface
js-yamlEVENT_POPvariable
js-yamlbinaryTagvariable
js-yamlAliasEventinterface
js-yamlScalarNodeinterface
js-yamlVISIT_SKIPvariable
js-yamlintCoreTagvariable
js-yamlintJsonTagvariable
js-yamlrealMapTagvariable
js-yamlDUMP_SCHEMAvariable
js-yamlEVENT_ALIASvariable
js-yamlMappingNodeinterface
js-yamlScalarEventinterface
js-yamlScalarStyletype
js-yamlVISIT_BREAKvariable
js-yamlboolCoreTagvariable
js-yamlboolJsonTagvariable
js-yamleventsToAstfunction
js-yamlnullCoreTagvariable
js-yamlnullJsonTagvariable
js-yamlparseEventsfunction
js-yamlChompingModetype
js-yamlEVENT_SCALARvariable
js-yamlMappingEventinterface
js-yamlNOT_RESOLVEDvariable
js-yamlSCALAR_STYLEvariable
js-yamlScalarLayoutinterface
js-yamlSequenceNodeinterface
js-yamlVisitContextinterface
js-yamlfloatCoreTagvariable
js-yamlfloatJsonTagvariable
js-yamlintYaml11Tagvariable
js-yamllegacyMapTagvariable
js-yamltimestampTagvariable
js-yamlCHOMPING_CLIPvariable
js-yamlCHOMPING_KEEPvariable
js-yamlCHOMPING_MODEvariable
js-yamlDocumentEventinterface
js-yamlEVENT_MAPPINGvariable
js-yamlFromJsOptionsinterface
js-yamlParserOptionsinterface
js-yamlSequenceEventinterface
js-yamlTagDefinitiontype
js-yamlYAML11_SCHEMAvariable
js-yamlboolYaml11Tagvariable
js-yamlnullYaml11Tagvariable
js-yamlCHOMPING_STRIPvariable
js-yamlEVENT_DOCUMENTvariable
js-yamlEVENT_SEQUENCEvariable
js-yamlfloatYaml11Tagvariable
js-yamlgetScalarValuefunction
js-yamlCollectionStyletype
js-yamlScalarStyleRuletype
js-yamldefineScalarTagfunction
js-yamlCOLLECTION_STYLEvariable
js-yamlPresenterOptionsinterface
js-yamlScalarTagOptionsinterface
js-yamldefineMappingTagfunction
js-yamlDocumentDirectivetype
js-yamlFromEventsOptionsinterface
js-yamlMappingTagOptionsinterface
js-yamldefineSequenceTagfunction
js-yamlConstructorOptionsinterface
js-yamlSCALAR_STYLE_PLAINvariable
js-yamlSequenceTagOptionsinterface
js-yamlScalarTagDefinitioninterface
js-yamlconstructFromEventsfunction
js-yamlMappingTagDefinitioninterface
js-yamlCOLLECTION_STYLE_FLOWvariable
js-yamlSequenceTagDefinitioninterface
js-yamlCOLLECTION_STYLE_BLOCKvariable
js-yamlSCALAR_STYLE_FOLDED_BLOCKvariable
js-yamlDEFAULT_SCALAR_STYLE_RULESvariable
js-yamlSCALAR_STYLE_DOUBLE_QUOTEDvariable
js-yamlSCALAR_STYLE_LITERAL_BLOCKvariable
js-yamlSCALAR_STYLE_SINGLE_QUOTEDvariable

Frequently asked questions

What are the breaking changes when upgrading js-yaml from 4 to 5?

Between js-yaml 4.3.2 and 5.4.2, Vigia found 7 removed exports, 3 changed signatures and 12 removed or changed class or interface members.

What became deprecated in js-yaml 5?

2 exports or members are newly marked as deprecated in js-yaml 5.4.2.

For agents

GET https://vigia.coredls.cloud/v1/packages/npm/js-yaml/upgrade?from=4.3.2&to=5.4.2