Skip to content

Commit 7b0faec

Browse files
nateboschnex3
authored andcommitted
Migrate to stream_transform extension methods
The non-extension implementation will be removed in the next version. Bump the min SDK to 2.6.0 to reflect the fact that extension methods are used.
1 parent 20978e0 commit 7b0faec

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/src/executable/watch.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,7 @@ class _Watcher {
201201
/// Otherwise, if a file is erased and then rewritten, we can end up reading
202202
/// the intermediate erased version.
203203
Stream<WatchEvent> _debounceEvents(Stream<WatchEvent> events) {
204-
return events
205-
.transform(debounceBuffer(Duration(milliseconds: 25)))
206-
.expand((buffer) {
204+
return events.debounceBuffer(Duration(milliseconds: 25)).expand((buffer) {
207205
var typeForPath = p.PathMap<ChangeType>();
208206
for (var event in buffer) {
209207
var oldType = typeForPath[event.path];

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ executables:
99
sass: sass
1010

1111
environment:
12-
sdk: '>=2.4.0 <3.0.0'
12+
sdk: '>=2.6.0 <3.0.0'
1313

1414
dependencies:
1515
args: ">=1.4.0 <2.0.0"
@@ -23,7 +23,7 @@ dependencies:
2323
source_maps: "^0.10.5"
2424
source_span: "^1.4.0"
2525
stack_trace: ">=0.9.0 <2.0.0"
26-
stream_transform: "^0.0.1"
26+
stream_transform: "^0.0.20"
2727
string_scanner: ">=0.1.5 <2.0.0"
2828
term_glyph: "^1.0.0"
2929
tuple: "^1.0.0"

0 commit comments

Comments
 (0)