Upgrading yaml 2 to 3
Breaking2.2.1 → 3.1.4Breaking3Platform2New4Changed4Fixed4Other2
BreakingUpgrade verdict
3 breaking changes and 2 platform requirement changes.
In plain terms
- Removes support for the .packages file.
- Simplifies API that no longer needs to support two separate files.
- BREAKING The sourceUrl named argument is statically typed as Uri instead of allowing String or Uri.
- You need Dart 3.4 or newer to use this version.
Must act 5 items need code or config changes
Dart SDK requirement changed in 3.1.3: >=2.4.0 <3.0.0 → ^3.4.0.
What you must change
Breaking3
Removes support for the .packages file.
.packagesSimplifies API that no longer needs to support two separate files.
readAnyConfigFilereadConfigFilepreferNewestreadAnyConfigFileUrireadConfigFileUriPackageConfigBREAKING The sourceUrl named argument is statically typed as Uri instead of allowing String or Uri.
sourceUrlUriStringPlatform2
Requires Dart 3.4.
Require Dart 2.19.
API changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- changed:
ctor YamlException(String message, SourceSpan span) → ctor YamlException(super.message, super.span) - changed:
ctor YamlList({sourceUrl}) → ctor YamlList({Object? sourceUrl}) - changed:
ctor YamlList.internal(List<YamlNode> nodes, SourceSpan span, this.style) → ctor YamlList.internal(List<YamlNode> nodes, super.span, this.style) - changed:
ctor YamlList.wrap(List dartList, {sourceUrl}) → ctor YamlList.wrap(List dartList, {Object? sourceUrl, CollectionStyle style = …}) - changed:
ctor YamlMap({sourceUrl}) → ctor YamlMap({Object? sourceUrl}) - changed:
ctor YamlMap.internal(Map<dynamic, YamlNode> nodes, SourceSpan span, this.style) → ctor YamlMap.internal(Map<dynamic, YamlNode> nodes, super.span, this.style) - changed:
ctor YamlMap.wrap(Map dartMap, {sourceUrl}) → ctor YamlMap.wrap(Map dartMap, {Object? sourceUrl, CollectionStyle style = …}) - changed:
ctor YamlScalar.wrap(this.value, {sourceUrl}) → ctor YamlScalar.wrap(this.value, {Object? sourceUrl, this.style = …}) - changed:
field YamlDocument.versionDirective: final VersionDirective → field YamlDocument.versionDirective: final VersionDirective? - changed:
field YamlList.[]: operator → field YamlList.[]: void operator - changed:
function loadYaml(String yaml, {sourceUrl}): dynamic → function loadYaml(String yaml, {Uri? sourceUrl, bool recover = …, ErrorListener? errorListener}): dynamic - changed:
function loadYamlDocument(String yaml, {sourceUrl}): YamlDocument → function loadYamlDocument(String yaml, {Uri? sourceUrl, bool recover = …, ErrorListener? errorListener}): YamlDocument - changed:
function loadYamlDocuments(String yaml, {sourceUrl}): List<YamlDocument> → function loadYamlDocuments(String yaml, {Uri? sourceUrl}): List<YamlDocument> - changed:
function loadYamlNode(String yaml, {sourceUrl}): YamlNode → function loadYamlNode(String yaml, {Uri? sourceUrl, bool recover = …, ErrorListener? errorListener}): YamlNode - changed:
function loadYamlStream(String yaml, {sourceUrl}): YamlList → function loadYamlStream(String yaml, {Uri? sourceUrl}): YamlList - changed:
method YamlMap.operator [](key): dynamic → method YamlMap.operator [](Object? key): dynamic - changed:
typedef YamlWarningCallback = Function(String message, [SourceSpan span]) → typedef YamlWarningCallback = void Function(String message, [SourceSpan? span])