File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.3.25
2
+
3
+ - Switch to pub.dev API in ` package:firehose ` .
4
+
1
5
## 0.3.24
2
6
3
7
- Fix [ #137 ] ( https://github.com/dart-lang/ecosystem/issues/137 ) .
Original file line number Diff line number Diff line change @@ -13,14 +13,16 @@ class Pub {
13
13
14
14
Future <bool > hasPublishedVersion (String name, String version) async {
15
15
var response =
16
- await httpClient.get (Uri .parse ('https://pub.dev/packages/$name .json ' ));
16
+ await httpClient.get (Uri .parse ('https://pub.dev/api/ packages/$name ' ));
17
17
if (response.statusCode != 200 ) {
18
18
return false ;
19
19
}
20
20
21
- var json = jsonDecode (response.body) as Map ;
22
- var versions = json['versions' ] as List ;
23
- return versions.contains (version);
21
+ var json = jsonDecode (response.body) as Map <String , dynamic >;
22
+ return (json['versions' ] as List )
23
+ .map ((versionObject) =>
24
+ (versionObject as Map <String , dynamic >)['version' ])
25
+ .contains (version);
24
26
}
25
27
26
28
void close () {
Original file line number Diff line number Diff line change 1
1
name : firehose
2
2
description : A tool to automate publishing of Pub packages from GitHub actions.
3
- version : 0.3.24
3
+ version : 0.3.25
4
4
repository : https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments