Skip to content
Open
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
1 change: 0 additions & 1 deletion packages/google_fonts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,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 @@ -611,7 +611,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 @@ -191,7 +191,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 @@ -129,7 +129,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 @@ -605,14 +605,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 @@ -203,7 +203,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
29 changes: 29 additions & 0 deletions script/tool/lib/src/version_check_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,35 @@ ${indentation}The first version listed in CHANGELOG.md is $fromChangeLog.
}
}

// Check for blank lines between list items in the version section.
bool inList = false;
bool seenBlankLineInList = false;
final RegExp listItemRegex = RegExp(r'^\s*[*+-]\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
74 changes: 74 additions & 0 deletions script/tool/test/version_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,80 @@ 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('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('Blank lines found between list items in CHANGELOG.'),
contains('CHANGELOG.md failed validation.'),
]),
);
});

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