@Nullable
private static Map<String, Object> loadPubspecYamlInfo(final @NotNull String pubspecYamlFileContents) {
// see com.google.dart.tools.core.utilities.yaml.PubYamlUtils#parsePubspecYamlToMap()
// deprecated constructor used to be compatible with old snakeyaml version in testng.jar (it wins when running from sources or tests)
//noinspection deprecation
final Yaml yaml = new Yaml(new Loader(new Constructor()), new Dumper(new Representer(), new DumperOptions()), new Resolver() {
@Override
protected void addImplicitResolvers() {
addImplicitResolver(Tag.NULL, NULL, "~nN\0");
addImplicitResolver(Tag.NULL, EMPTY, null);
addImplicitResolver(Tag.VALUE, VALUE, "=");