Skip to content

Upgrading string_scanner 0.0 to 0.1

Breaking0.0.3 → 0.1.5Breaking4New7Changed1Fixed1Other1

BreakingUpgrade verdict

4 breaking changes.

  • The constructor's URL argument has a new name, so named-argument callers must rename it.
  • The exception's text field has a new name, so code reading the old field must be updated.
  • The scanner now uses a different library's span type, so code that refers to the old span class must be updated.
  • The exception constructor now expects its arguments in a new order, so code that creates it must be updated.
Top 3 of 4 that need code or config changes

Dart SDK requirement changed in 0.1.3+2: >=1.2.0 <2.0.0 → >=1.8.0 <2.0.0.

Breaking4
Renames StringScanner()'s sourceUrl parameter to make clear it can be safely null.
StringScannersourceUrl
Renames StringScannerException.string to StringScannerException.source to match the FormatException interface.
StringScannerException.stringStringScannerException.sourceFormatException
Switches from source_maps' Span class to source_span's SourceSpan class.
SpanSourceSpan
Changes StringScannerException() to take different arguments in a different order to match SpanFormatException.
StringScannerExceptionSpanFormatException