Skip to content

Commit 7c4db0f

Browse files
committed
Fix: version key not accepting "latest".
1 parent 2474373 commit 7c4db0f

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.1
2+
3+
- Fix version key not accepting "latest".
4+
15
## 0.1.0
26

37
- Initial release with cli and dart api.

example/pubspec.lock

+1-8
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ packages:
8080
path: ".."
8181
relative: true
8282
source: path
83-
version: "0.1.0"
83+
version: "0.1.1"
8484
fontsource_gen:
8585
dependency: "direct main"
8686
description:
@@ -212,13 +212,6 @@ packages:
212212
url: "https://pub.dartlang.org"
213213
source: hosted
214214
version: "3.1.0"
215-
yaml_edit:
216-
dependency: transitive
217-
description:
218-
name: yaml_edit
219-
url: "https://pub.dartlang.org"
220-
source: hosted
221-
version: "2.0.2"
222215
sdks:
223216
dart: ">=2.15.1 <3.0.0"
224217
flutter: ">=1.17.0"

lib/src/cli/config.dart

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Future<FontsourceConfig> getConfig() async {
9999
}
100100
}
101101
}
102+
String? version = configDynamicMap[id]?['version'];
103+
if (version == 'latest') version = null;
102104
config[id] = FontConfig(
103105
subsets, weights, styles, metadata, configDynamicMap[id]?['version']);
104106
}));

pubspec.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fontsource
22
description: Add Fontsource fonts to your flutter app. Direct access to Fontsource API.
3-
version: 0.1.0
3+
version: 0.1.1
44
repository: https://github.com/fontsource/fontsource-flutter
55

66
environment:
@@ -14,7 +14,6 @@ dependencies:
1414
json2yaml: ^3.0.0
1515
progress_bar: ^1.0.0
1616
yaml: ^3.1.0
17-
yaml_edit: ^2.0.1
1817

1918
dev_dependencies:
2019
flutter_test:

0 commit comments

Comments
 (0)