Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/css_colors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 1.1.5

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
* Moves flutter_test and test dependencies to dev_dependencies.

## 1.1.4

Expand Down
4 changes: 3 additions & 1 deletion packages/css_colors/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: css_colors
description: Defines constant dart:ui Color objects for CSS colors (for use in Flutter code).
repository: https://github.com/flutter/packages/tree/main/packages/css_colors
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+css_colors%22
version: 1.1.4
version: 1.1.5

environment:
sdk: ^3.1.0
Expand All @@ -11,6 +11,8 @@ environment:
dependencies:
flutter:
sdk: flutter

dev_dependencies:
flutter_test:
sdk: flutter

Expand Down
4 changes: 4 additions & 0 deletions packages/web_benchmarks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.2

* Moves flutter_test and test dependencies to dev_dependencies.

## 1.2.1

* Removes a few deprecated API usages.
Expand Down
10 changes: 6 additions & 4 deletions packages/web_benchmarks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: web_benchmarks
description: A benchmark harness for performance-testing Flutter apps in Chrome.
repository: https://github.com/flutter/packages/tree/main/packages/web_benchmarks
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+web_benchmarks%22
version: 1.2.1
version: 1.2.2

environment:
sdk: ^3.3.0
Expand All @@ -12,18 +12,20 @@ dependencies:
collection: ^1.18.0
flutter:
sdk: flutter
flutter_test:
sdk: flutter
logging: ^1.0.2
meta: ^1.7.0
path: ^1.8.0
process: ">=4.2.4 <6.0.0"
shelf: ^1.2.0
shelf_static: ^1.1.0
test: ^1.19.5
web: ^0.5.0
webkit_inspection_protocol: ^1.0.0

dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.19.5

topics:
- benchmarking
- performance
2 changes: 1 addition & 1 deletion script/tool/lib/src/pubspec_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class PubspecCheckCommand extends PackageLoopingCommand {
}

// Ensure that dev-only dependencies aren't in `dependencies`.
const List<String> devOnlyDependencies = <String>['integration_test'];
const Set<String> devOnlyDependencies = <String>{'integration_test', 'test', 'flutter_test'};
// Non-published packages like pidgeon subpackages are allowed to violate
// the dev only dependencies rule.
if (pubspec.publishTo != 'none') {
Expand Down
17 changes: 13 additions & 4 deletions script/tool/test/pubspec_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1735,15 +1735,19 @@ ${_topicsSection()}
);
});

test('fails when integration_test is used in non dev dependency',
test('fails when integration_test, flutter_test or test are used in non dev dependency',
() async {
final RepositoryPackage package =
createFakePackage('a_package', packagesDir, examples: <String>[]);

package.pubspecFile.writeAsStringSync('''
${_headerSection('a_package')}
${_environmentSection()}
${_dependenciesSection(<String>['integration_test: \n sdk: flutter'])}
${_dependenciesSection(<String>[
'integration_test: \n sdk: flutter',
'flutter_test: \n sdk: flutter',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the existing tests are going to change to test more things, then the test descriptions need to change accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated test name to 'fails when integration_test, flutter_test or test are used in non dev dependency'

'test: 1.0.0'
])}
${_devDependenciesSection()}
${_topicsSection()}
''');
Expand All @@ -1761,22 +1765,27 @@ ${_topicsSection()}
containsAllInOrder(<Matcher>[
contains(
'The following unexpected non-local dependencies were found:\n'
' test\n'
' integration_test\n'
' flutter_test\n'
'Please see https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#Dependencies '
'for more information and next steps.'),
]),
);
});

test('passes when integration_test is used in non published package',
test('passes when integration_test or flutter_test are used in non published package',
() async {
final RepositoryPackage package =
createFakePackage('a_package', packagesDir, examples: <String>[]);

package.pubspecFile.writeAsStringSync('''
${_headerSection('a_package', publishable: false)}
${_environmentSection()}
${_dependenciesSection(<String>['integration_test: \n sdk: flutter'])}
${_dependenciesSection(<String>[
'integration_test: \n sdk: flutter',
'flutter_test: \n sdk: flutter'
])}
${_devDependenciesSection()}
${_topicsSection()}
''');
Expand Down