Use nullable argument to unawaited (dart-lang/glob#58) Bump min SDK to `2.15.0` which allows a null argument. Avoid creating an unnecessary empty future. Fix analyzer warning by using constructor tearoff syntax for doc reference.
diff --git a/pkgs/glob/.github/workflows/test-package.yml b/pkgs/glob/.github/workflows/test-package.yml index 788bec8..df0041d 100644 --- a/pkgs/glob/.github/workflows/test-package.yml +++ b/pkgs/glob/.github/workflows/test-package.yml
@@ -47,7 +47,7 @@ matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.14.0, dev] + sdk: [2.15.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1.0
diff --git a/pkgs/glob/CHANGELOG.md b/pkgs/glob/CHANGELOG.md index 9bf9bc3..7dd6382 100644 --- a/pkgs/glob/CHANGELOG.md +++ b/pkgs/glob/CHANGELOG.md
@@ -1,6 +1,7 @@ ## 2.0.2 * Drop package:pedantic dependency, use package:lints instead. +* Update SDK lower bound to `2.15.0` ## 2.0.1
diff --git a/pkgs/glob/lib/glob.dart b/pkgs/glob/lib/glob.dart index c241057..a7b92f6 100644 --- a/pkgs/glob/lib/glob.dart +++ b/pkgs/glob/lib/glob.dart
@@ -18,7 +18,7 @@ /// /// A glob matches an entire string as a path. Although the glob pattern uses /// POSIX syntax, it can match against POSIX, Windows, or URL paths. The format -/// it expects paths to use is based on the `context` parameter to [new Glob]; +/// it expects paths to use is based on the `context` parameter to [Glob.new]; /// it defaults to the current system's syntax. /// /// Paths are normalized before being matched against a glob, so for example the
diff --git a/pkgs/glob/lib/src/list_tree.dart b/pkgs/glob/lib/src/list_tree.dart index 2e049e9..ece6f09 100644 --- a/pkgs/glob/lib/src/list_tree.dart +++ b/pkgs/glob/lib/src/list_tree.dart
@@ -345,8 +345,7 @@ var resultGroup = StreamGroup<FileSystemEntity>(); var resultController = StreamController<FileSystemEntity>(sync: true); - // TODO: Remove `??` workaround once 2.15 ships (which allows null). - unawaited(resultGroup.add(resultController.stream) ?? Future.value()); + unawaited(resultGroup.add(resultController.stream)); for (var entity in entities) { var basename = p.relative(entity.path, from: dir); if (_matches(basename)) resultController.add(entity);
diff --git a/pkgs/glob/pubspec.yaml b/pkgs/glob/pubspec.yaml index 79a7c03..728c0d3 100644 --- a/pkgs/glob/pubspec.yaml +++ b/pkgs/glob/pubspec.yaml
@@ -5,7 +5,7 @@ repository: https://github.com/dart-lang/glob environment: - sdk: '>=2.14.0 <3.0.0' + sdk: '>=2.15.0 <3.0.0' dependencies: async: ^2.5.0