[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:
stuartmorgan
2024-10-31 10:35:33 -07:00
committed by GitHub
111 changed files with 33382 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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 =