From 8e444dfa269c42a76fd96dbf9547bd01013154f6 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 15 May 2023 12:42:39 -0700 Subject: [PATCH] Remove the matcher export from test_api (#2004) `package:test` exports directly from `package:matcher`. Resolves a cyclic dependency between `matcher` and `test_api`. --- pkgs/test/pubspec.yaml | 4 ++-- pkgs/test_api/CHANGELOG.md | 4 +++- pkgs/test_api/lib/expect.dart | 5 ----- pkgs/test_api/lib/src/expect/async_matcher.dart | 5 ----- pkgs/test_api/lib/test_api.dart | 2 -- pkgs/test_api/pubspec.yaml | 6 +----- pkgs/test_core/lib/test_core.dart | 2 -- pkgs/test_core/pubspec.yaml | 4 +--- 8 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 pkgs/test_api/lib/expect.dart delete mode 100644 pkgs/test_api/lib/src/expect/async_matcher.dart diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml index 8667d3698..00c153a3e 100644 --- a/pkgs/test/pubspec.yaml +++ b/pkgs/test/pubspec.yaml @@ -32,11 +32,11 @@ dependencies: webkit_inspection_protocol: ^1.0.0 yaml: ^3.0.0 # Use an exact version until the test_api and test_core package are stable. - test_api: 0.5.3 + test_api: 0.6.0 test_core: 0.5.3 # Use a tight version constraint to ensure that a constraint on matcher # properly constrains all features it provides. - matcher: '>=0.12.15 <0.12.16' + matcher: '>=0.12.16 <0.12.17' dev_dependencies: fake_async: ^1.0.0 diff --git a/pkgs/test_api/CHANGELOG.md b/pkgs/test_api/CHANGELOG.md index 4d79f0a59..6606ee9a5 100644 --- a/pkgs/test_api/CHANGELOG.md +++ b/pkgs/test_api/CHANGELOG.md @@ -1,5 +1,7 @@ -## 0.5.3-wip +## 0.6.0-wip +* Remove the `package:test_api/expect.dart' library. `test` will export from + `package:matcher` directly. * Fix compatibility with wasm number semantics. ## 0.5.2 diff --git a/pkgs/test_api/lib/expect.dart b/pkgs/test_api/lib/expect.dart deleted file mode 100644 index 5e62622fe..000000000 --- a/pkgs/test_api/lib/expect.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -export 'package:matcher/expect.dart'; diff --git a/pkgs/test_api/lib/src/expect/async_matcher.dart b/pkgs/test_api/lib/src/expect/async_matcher.dart deleted file mode 100644 index 044c1924c..000000000 --- a/pkgs/test_api/lib/src/expect/async_matcher.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -export 'package:matcher/src/expect/async_matcher.dart'; diff --git a/pkgs/test_api/lib/test_api.dart b/pkgs/test_api/lib/test_api.dart index 17a1ef433..7804cda5d 100644 --- a/pkgs/test_api/lib/test_api.dart +++ b/pkgs/test_api/lib/test_api.dart @@ -6,7 +6,5 @@ 'Please use package:test.') library test_api; -export 'package:matcher/expect.dart'; - export 'hooks.dart' show TestFailure; export 'scaffolding.dart'; diff --git a/pkgs/test_api/pubspec.yaml b/pkgs/test_api/pubspec.yaml index 651b4b9c5..84142f903 100644 --- a/pkgs/test_api/pubspec.yaml +++ b/pkgs/test_api/pubspec.yaml @@ -1,5 +1,5 @@ name: test_api -version: 0.5.3-wip +version: 0.6.0-wip description: >- The user facing API for structuring Dart tests and checking expectations. repository: https://github.com/dart-lang/test/tree/master/pkgs/test_api @@ -18,10 +18,6 @@ dependencies: string_scanner: ^1.1.0 term_glyph: ^1.2.0 - # Use a tight version constraint to ensure that a constraint on matcher - # properly constrains all features it provides. - matcher: '>=0.12.15 <0.12.16' - dev_dependencies: analyzer: '>=2.1.0 <6.0.0' fake_async: ^1.2.0 diff --git a/pkgs/test_core/lib/test_core.dart b/pkgs/test_core/lib/test_core.dart index 55c7a5051..01f44542c 100644 --- a/pkgs/test_core/lib/test_core.dart +++ b/pkgs/test_core/lib/test_core.dart @@ -7,7 +7,5 @@ library test_core; export 'package:test_api/hooks.dart' show TestFailure; -// Not yet deprecated, but not exposed through focused libraries. -export 'package:test_api/test_api.dart' show registerException; export 'scaffolding.dart'; diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml index a19ded379..2e5bb2a1b 100644 --- a/pkgs/test_core/pubspec.yaml +++ b/pkgs/test_core/pubspec.yaml @@ -27,10 +27,8 @@ dependencies: stream_channel: ^2.1.0 vm_service: ">=6.0.0 <12.0.0" yaml: ^3.0.0 - # matcher is tightly constrained by test_api - matcher: ^0.12.11 # Use an exact version until the test_api package is stable. - test_api: 0.5.3 + test_api: 0.6.0 dev_dependencies: lints: '>=1.0.0 <3.0.0'