diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc5739..cdb1766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.0 + +* Update internal type annotations for compatibility with [dart-lang/sdk#52801]. + + [dart-lang/sdk#52801]: https://github.com/dart-lang/sdk/issues/52801 + ## 0.3.2 * Declare support for Dart 3. diff --git a/lib/src/extensions/line_stream.dart b/lib/src/extensions/line_stream.dart index 8086bf7..07cec59 100644 --- a/lib/src/extensions/line_stream.dart +++ b/lib/src/extensions/line_stream.dart @@ -28,7 +28,8 @@ import '../util.dart'; /// (as commonly emitted by a shell script). extension LineStreamExtensions on Stream { /// Converts this to a byte stream with newlines baked in. - Stream> get bytes => map((line) => utf8.encode("$line\n")); + Stream> get bytes => + map>((line) => utf8.encode("$line\n")); /// Pipes [this] into [script]'s [stdin] with newlines baked in. /// diff --git a/lib/src/script.dart b/lib/src/script.dart index af40276..31d77bc 100644 --- a/lib/src/script.dart +++ b/lib/src/script.dart @@ -386,7 +386,7 @@ class Script { Script.fromByteTransformer( StreamTransformer.fromBind((stream) => stream.lines .transform(transformer) - .map((line) => utf8.encode("$line\n"))), + .map>((line) => utf8.encode("$line\n"))), name: name ?? transformer.toString()); /// Creates a [Script] from a function that maps strings to strings. diff --git a/pubspec.yaml b/pubspec.yaml index fafae79..10a1e67 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: cli_script -version: 0.3.2 +version: 1.0.0 description: Write scripts that call subprocesses with the ease of shell scripting and the power of Dart. diff --git a/test/pipe_test.dart b/test/pipe_test.dart index 4952fbb..6d210cf 100644 --- a/test/pipe_test.dart +++ b/test/pipe_test.dart @@ -289,9 +289,9 @@ void main() { group("pipes in", () { group("a byte stream", () { test("without errors", () { - var pipeline = - Stream.fromIterable([utf8.encode("foo"), utf8.encode("bar")]) | - mainScript("stdin.pipe(stdout);"); + var pipeline = Stream>.fromIterable( + [utf8.encode("foo"), utf8.encode("bar")]) | + mainScript("stdin.pipe(stdout);"); expect(pipeline.stdout.lines, emitsInOrder(["foobar", emitsDone])); });