Skip to content

Commit

Permalink
[flutter_tools] pin package intl and roll pub packages (#117168)
Browse files Browse the repository at this point in the history
* pin package intl and roll pub packages

* add test

* fix analysis
  • Loading branch information
christopherfujino committed Dec 16, 2022
1 parent a34e419 commit c7cb5f3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dev/integration_tests/gradle_deprecated_settings/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
dependencies:
flutter:
sdk: flutter
camera: 0.10.0+4
camera: 0.10.0+5

camera_android: 0.10.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
camera_avfoundation: 0.9.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
Expand All @@ -31,4 +31,4 @@ dependencies:
flutter:
uses-material-design: true

# PUBSPEC CHECKSUM: 7ef1
# PUBSPEC CHECKSUM: 6cf2
2 changes: 2 additions & 0 deletions packages/flutter_tools/lib/src/commands/update_packages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const Map<String, String> kManuallyPinnedDependencies = <String, String>{
'archive': '3.3.2',
// https://github.com/flutter/flutter/issues/116376
'path_provider_android': '2.0.21',
// https://github.com/flutter/flutter/issues/117163
'intl': '0.17.0',
};

class UpdatePackagesCommand extends FlutterCommand {
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_tools/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
browser_launcher: 1.1.1
dds: 2.5.0
dwds: 16.0.1
completion: 1.0.0
completion: 1.0.1
coverage: 1.6.1
crypto: 3.0.2
file: 6.1.4
Expand Down Expand Up @@ -102,4 +102,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true

# PUBSPEC CHECKSUM: 1fee
# PUBSPEC CHECKSUM: 59ef
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:flutter_tools/src/project.dart';
import 'package:test/fake.dart';
import 'package:yaml/yaml.dart';

import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/test_flutter_command_runner.dart';

Expand Down Expand Up @@ -75,14 +74,6 @@ dependencies:
''';

void main() {
testWithoutContext('kManuallyPinnedDependencies pins are actually pins', () {
expect(
kManuallyPinnedDependencies.values,
isNot(contains(anyOf('any', startsWith('^'), startsWith('>'), startsWith('<')))),
reason: 'Version pins in kManuallyPinnedDependencies must be specific pins, not ranges.',
);
});

group('update-packages', () {
late FileSystem fileSystem;
late Directory flutterSdk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,27 @@ void main() {
flutter.childFile('pubspec.yaml').writeAsStringSync(kFlutterPubspecYaml);
});

testWithoutContext('kManuallyPinnedDependencies pins are actually pins', () {
expect(
kManuallyPinnedDependencies.values,
isNot(contains(anyOf('any', startsWith('^'), startsWith('>'), startsWith('<')))),
reason: 'Version pins in kManuallyPinnedDependencies must be specific pins, not ranges.',
);
expect(
kManuallyPinnedDependencies.keys,
unorderedEquals(const <String>[
'flutter_gallery_assets',
'flutter_template_images',
'video_player',
'material_color_utilities',
'url_launcher_android',
'archive',
'path_provider_android',
'intl',
]),
);
});

testWithoutContext(
'createTemporaryFlutterSdk creates an unpinned flutter SDK', () {
// A stray extra package should not cause a crash.
Expand Down

0 comments on commit c7cb5f3

Please sign in to comment.