mirror of
https://github.com/flutter/packages.git
synced 2025-06-22 08:00:16 +08:00
[flutter_plugin_tools] Add a new 'make-deps-path-based' command (#4575)
Adds a new command that adds `dependency_overrides` to any packages in the repository that depend on a list of target packages, including an option to target packages that will publish a non-breaking change in a given diff. Adds a new CI step that uses the above in conjunction with a new `--run-on-dirty-packages` to adjust the dependencies of anything in the repository that uses a to-be-published package and then re-run analysis on just those packages. This will allow us to catch in presubmit any changes that are not breaking from a semver standpoint, but will break us due to our strict analysis in CI. Fixes https://github.com/flutter/flutter/issues/89862
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_plugin_tools/src/common/repository_package.dart';
|
||||
import 'package:pubspec_parse/pubspec_parse.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../util.dart';
|
||||
@ -155,4 +156,23 @@ void main() {
|
||||
expect(RepositoryPackage(plugin).isPlatformImplementation, true);
|
||||
});
|
||||
});
|
||||
|
||||
group('pubspec', () {
|
||||
test('file', () async {
|
||||
final Directory plugin = createFakePlugin('a_plugin', packagesDir);
|
||||
|
||||
final File pubspecFile = RepositoryPackage(plugin).pubspecFile;
|
||||
|
||||
expect(pubspecFile.path, plugin.childFile('pubspec.yaml').path);
|
||||
});
|
||||
|
||||
test('parsing', () async {
|
||||
final Directory plugin = createFakePlugin('a_plugin', packagesDir,
|
||||
examples: <String>['example1', 'example2']);
|
||||
|
||||
final Pubspec pubspec = RepositoryPackage(plugin).parsePubspec();
|
||||
|
||||
expect(pubspec.name, 'a_plugin');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user