mirror of
https://github.com/flutter/packages.git
synced 2025-08-06 08:53:11 +08:00
[vector_graphics] Initial import (#7941)
Imports https://github.com/dnfield/vector_graphics into this repository, with history, and updates it to follow repository conventions: - Adds missing licence headers. - Removes analysis options and fixes resulting warnings. - Updates min SDKs. - Autoformats. - Updates pubspecs to follow repo standard, including updating the metadata to point to the Flutter repositories. - Allows `xml` as a pinned dependency, and relaxes the pinning requirement in the repo tools to allow an explicit, inclusive-endpoint range. - Skips some unit tests on unsupported platforms. - Adds repo metadata. - Bumps versions and slightly relax version constraints to allow the new versions.
This commit is contained in:
@ -612,7 +612,8 @@ Please move them to dev_dependencies.
|
||||
if (constraint is VersionRange &&
|
||||
constraint.min != null &&
|
||||
constraint.max != null &&
|
||||
constraint.min == constraint.max) {
|
||||
constraint.includeMin &&
|
||||
constraint.includeMax) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1674,7 +1674,8 @@ ${_topicsSection()}
|
||||
);
|
||||
});
|
||||
|
||||
test('passes when a pinned dependency is on the pinned allow list',
|
||||
test(
|
||||
'passes when an exactly-pinned dependency is on the pinned allow list',
|
||||
() async {
|
||||
final RepositoryPackage package =
|
||||
createFakePackage('a_package', packagesDir);
|
||||
@ -1701,6 +1702,34 @@ ${_topicsSection()}
|
||||
);
|
||||
});
|
||||
|
||||
test(
|
||||
'passes when an explicit-range-pinned dependency is on the pinned allow list',
|
||||
() async {
|
||||
final RepositoryPackage package =
|
||||
createFakePackage('a_package', packagesDir);
|
||||
|
||||
package.pubspecFile.writeAsStringSync('''
|
||||
${_headerSection('a_package')}
|
||||
${_environmentSection()}
|
||||
${_dependenciesSection(<String>['allow_pinned: ">=1.0.0 <=1.3.1"'])}
|
||||
${_topicsSection()}
|
||||
''');
|
||||
|
||||
final List<String> output = await runCapturingPrint(runner, <String>[
|
||||
'pubspec-check',
|
||||
'--allow-pinned-dependencies',
|
||||
'allow_pinned'
|
||||
]);
|
||||
|
||||
expect(
|
||||
output,
|
||||
containsAllInOrder(<Matcher>[
|
||||
contains('Running for a_package...'),
|
||||
contains('No issues found!'),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
test('fails when an allowed-when-pinned dependency is unpinned',
|
||||
() async {
|
||||
final RepositoryPackage package =
|
||||
|
Reference in New Issue
Block a user