chore: set max SDK version to <3.0.0 (dart-lang/source_span#23)
diff --git a/pkgs/source_span/.analysis_options b/pkgs/source_span/.analysis_options deleted file mode 100644 index a10d4c5..0000000 --- a/pkgs/source_span/.analysis_options +++ /dev/null
@@ -1,2 +0,0 @@ -analyzer: - strong-mode: true
diff --git a/pkgs/source_span/CHANGELOG.md b/pkgs/source_span/CHANGELOG.md index 68eafaa..53a700c 100644 --- a/pkgs/source_span/CHANGELOG.md +++ b/pkgs/source_span/CHANGELOG.md
@@ -1,3 +1,7 @@ +# 1.4.1 + +* Set max SDK version to `<3.0.0`, and adjust other dependencies. + # 1.4.0 * The `new SourceFile()` constructor is deprecated. This constructed a source
diff --git a/pkgs/source_span/pubspec.yaml b/pkgs/source_span/pubspec.yaml index 46e3d52..1d53210 100644 --- a/pkgs/source_span/pubspec.yaml +++ b/pkgs/source_span/pubspec.yaml
@@ -1,12 +1,16 @@ name: source_span -version: 1.4.0 -author: Dart Team <misc@dartlang.org> +version: 1.4.1 + description: A library for identifying source spans and locations. +author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/source_span -dependencies: - charcode: '^1.0.0' - path: '>=1.2.0 <2.0.0' + environment: - sdk: '>=1.8.0 <2.0.0' + sdk: '>=1.8.0 <3.0.0' + +dependencies: + charcode: ^1.0.0 + path: '>=1.2.0 <2.0.0' + dev_dependencies: - test: '>=0.12.0 <0.13.0' + test: '>=0.12.0 <2.0.0'
diff --git a/pkgs/source_span/test/file_test.dart b/pkgs/source_span/test/file_test.dart index 3f02a8b..071f3f9 100644 --- a/pkgs/source_span/test/file_test.dart +++ b/pkgs/source_span/test/file_test.dart
@@ -8,7 +8,7 @@ main() { var file; setUp(() { - file = new SourceFile(""" + file = new SourceFile.fromString(""" foo bar baz whiz bang boom zip zap zop""", url: "foo.dart"); @@ -122,7 +122,7 @@ }); test("for span().expand() source URLs must match", () { - var other = new SourceFile(""" + var other = new SourceFile.fromString(""" foo bar baz whiz bang boom zip zap zop""", url: "bar.dart").span(10, 11); @@ -139,11 +139,11 @@ group("new SourceFile()", () { test("handles CRLF correctly", () { - expect(new SourceFile("foo\r\nbar").getLine(6), equals(1)); + expect(new SourceFile.fromString("foo\r\nbar").getLine(6), equals(1)); }); test("handles a lone CR correctly", () { - expect(new SourceFile("foo\rbar").getLine(5), equals(1)); + expect(new SourceFile.fromString("foo\rbar").getLine(5), equals(1)); }); });
diff --git a/pkgs/source_span/test/highlight_test.dart b/pkgs/source_span/test/highlight_test.dart index 08d2e17..ac8334b 100644 --- a/pkgs/source_span/test/highlight_test.dart +++ b/pkgs/source_span/test/highlight_test.dart
@@ -9,7 +9,7 @@ main() { var file; setUp(() { - file = new SourceFile(""" + file = new SourceFile.fromString(""" foo bar baz whiz bang boom zip zap zop @@ -23,7 +23,7 @@ }); test("gracefully handles a missing source URL", () { - var span = new SourceFile("foo bar baz").span(4, 7); + var span = new SourceFile.fromString("foo bar baz").span(4, 7); expect(span.highlight(), equals(""" foo bar baz ^^^""")); @@ -55,26 +55,29 @@ test("works for a point span at the end of the file with no trailing newline", () { - file = new SourceFile("zip zap zop"); + file = new SourceFile.fromString("zip zap zop"); expect(file.location(11).pointSpan().highlight(), equals(""" zip zap zop ^""")); }); test("works for a point span in an empty file", () { - expect(new SourceFile("").location(0).pointSpan().highlight(), equals(""" + expect(new SourceFile.fromString("").location(0).pointSpan().highlight(), + equals(""" ^""")); }); test("works for a single-line file without a newline", () { - expect(new SourceFile("foo bar").span(0, 7).highlight(), equals(""" + expect( + new SourceFile.fromString("foo bar").span(0, 7).highlight(), equals(""" foo bar ^^^^^^^""")); }); test("emits tabs for tabs", () { - expect(new SourceFile(" \t \t\tfoo bar").span(5, 8).highlight(), equals(""" + expect(new SourceFile.fromString(" \t \t\tfoo bar").span(5, 8).highlight(), + equals(""" \t \t\tfoo bar \t \t\t^^^""")); });