version function
Returns the version no. for the pubspec.yaml located
at pubspecPath.
Use findPubSpec to find the location.
@Throwing(DuplicateKeyException) @Throwing(NotFoundException) @Throwing(PubSpecException) @Throwing(VersionException)
Implementation
Version? version({required String pubspecPath}) {
final pubspec = PubSpec.loadFromPath(pubspecPath);
return pubspec.version.semVersion;
}