Skip to content
1 change: 0 additions & 1 deletion packages/google_fonts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@
- `Wix Madefor Display`
- `Wix Madefor Text`
- `Ysabeau`

- Removed fonts:
- `Arima Madurai`
- `Fredoka One`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ GoogleMapController is now uniformly driven by implementing `DefaultLifecycleObs
## 0.5.19

* Adds support for toggling Indoor View on or off.

* Allow BitmapDescriptor scaling override

## 0.5.18
Expand Down
1 change: 0 additions & 1 deletion packages/google_sign_in/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ For every platform other than `web`, this version should be identical to `5.4.4`
## 5.1.0

* Add reAuthenticate option to signInSilently to allow re-authentication to be requested

* Updated Android lint settings.

## 5.0.7
Expand Down
1 change: 0 additions & 1 deletion packages/image_picker/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
## 0.8.6+2

* Updates `NSPhotoLibraryUsageDescription` description in README.

* Updates minimum Flutter version to 3.0.

## 0.8.6+1
Expand Down
2 changes: 0 additions & 2 deletions packages/video_player/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,12 @@ DefaultHttpDataSourceFactory by default.
## 0.10.0+8

* iOS: Fix an issue where the player sends initialization message incorrectly.

* Fix a few other IDE warnings.


## 0.10.0+7

* Android: Fix issue where buffering status in percentage instead of milliseconds

* Android: Update buffering status everytime we notify for position change

## 0.10.0+6
Expand Down
1 change: 0 additions & 1 deletion packages/video_player/video_player_android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
## 2.7.2

* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5.

* Re-adds Impeller support.

## 2.7.1
Expand Down
33 changes: 33 additions & 0 deletions script/tool/lib/src/version_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,39 @@ ${indentation}The first version listed in CHANGELOG.md is $fromChangeLog.
}
}

// Check for blank lines between list items in the version section.
// Check for blank lines between list items in the version section.
// We reuse the existing iterator, which is currently positioned at the
// version header line.
bool inList = false;
bool seenBlankLineInList = false;
final RegExp listItemRegex = RegExp(r'^[ \t]*[*+-]\s');

while (iterator.moveNext()) {
final String line = iterator.current;
final bool isListItem = listItemRegex.hasMatch(line);
final bool isBlank = line.trim().isEmpty;

if (isListItem) {
if (seenBlankLineInList) {
printError(
'${indentation}Blank lines found between list items in CHANGELOG.\n'
'${indentation}This creates multiple separate lists on pub.dev.\n'
'${indentation}Remove blank lines to keep all items in a single list.');
return false;
}
inList = true;
} else if (isBlank) {
if (inList) {
seenBlankLineInList = true;
}
} else {
// Any other non-blank, non-list line resets the state (e.g. new headers, text).
inList = false;
seenBlankLineInList = false;
}
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion script/tool/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_plugin_tools
description: Productivity and CI utils for flutter/packages
repository: https://github.com/flutter/packages/tree/main/script/tool
version: 1.0.0
version: 1.0.1
publish_to: none

dependencies:
Expand Down
121 changes: 121 additions & 0 deletions script/tool/test/version_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,127 @@ void main() {
);
});

test('Fail if CHANGELOG list items have a blank line', () async {
const String version = '1.0.1';
final RepositoryPackage plugin =
createFakePlugin('plugin', packagesDir, version: version);

// Blank line breaks the list items.
const String changelog = '''
## $version
* First item.

* Second item.
* Third item.
''';
plugin.changelogFile.writeAsStringSync(changelog);
gitProcessRunner.mockProcessesForExecutable['git-show'] =
<FakeProcessInfo>[
FakeProcessInfo(MockProcess(stdout: 'version: 1.0.0')),
];
Error? commandError;
final List<String> output = await runCapturingPrint(
runner, <String>['version-check', '--base-sha=main'],
errorHandler: (Error e) {
commandError = e;
});

expect(commandError, isA<ToolExit>());
expect(
output,
containsAllInOrder(<Matcher>[
contains('Running for plugin'),
contains('1.0.0 -> 1.0.1'),
contains('Blank lines found between list items in CHANGELOG.'),
contains('CHANGELOG.md failed validation.'),
]),
);
});

test('Fail if CHANGELOG list items have a blank line on a previous version',
() async {
const String version = '1.0.1';
final RepositoryPackage plugin =
createFakePlugin('plugin', packagesDir, version: version);

// Blank line breaks the list items.
const String changelog = '''
## $version
* First item.
* Second item.
* Third item.


## 1.0.0
* First item.

* Second item.
* Third item.
''';
plugin.changelogFile.writeAsStringSync(changelog);
gitProcessRunner.mockProcessesForExecutable['git-show'] =
<FakeProcessInfo>[
FakeProcessInfo(MockProcess(stdout: 'version: 1.0.0')),
];
Error? commandError;
final List<String> output = await runCapturingPrint(
runner, <String>['version-check', '--base-sha=main'],
errorHandler: (Error e) {
commandError = e;
});

expect(commandError, isA<ToolExit>());
expect(
output,
containsAllInOrder(<Matcher>[
contains('Running for plugin'),
contains('1.0.0 -> 1.0.1'),
contains('Blank lines found between list items in CHANGELOG.'),
contains('CHANGELOG.md failed validation.'),
]),
);
});

test('Fail if CHANGELOG list items have a blank line with nested items',
() async {
const String version = '1.0.1';
final RepositoryPackage plugin =
createFakePlugin('plugin', packagesDir, version: version);

// Blank line in nested list items.
const String changelog = '''
## $version
* Top level item.
* Nested item A.

* Nested item B.
* Another top level item.
''';
plugin.changelogFile.writeAsStringSync(changelog);
gitProcessRunner.mockProcessesForExecutable['git-show'] =
<FakeProcessInfo>[
FakeProcessInfo(MockProcess(stdout: 'version: 1.0.0')),
];
Error? commandError;
final List<String> output = await runCapturingPrint(
runner, <String>['version-check', '--base-sha=main'],
errorHandler: (Error e) {
commandError = e;
});

expect(commandError, isA<ToolExit>());
expect(
output,
containsAllInOrder(<Matcher>[
contains('Running for plugin'),
contains('1.0.0 -> 1.0.1'),
contains('Blank lines found between list items in CHANGELOG.'),
contains('CHANGELOG.md failed validation.'),
]),
);
});
// END OF NEW TESTS

test(
'Fail if pubspec version only matches an older version listed in CHANGELOG',
() async {
Expand Down