Skip to content

Commit

Permalink
chore: x-unleash-sdk version scheme (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jan 22, 2025
1 parent 7261dc1 commit f3cf9f8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.9.3

* Chore: Sync x-unleash-sdk version scheme with other SDKs

## 1.9.2

* Fix: Skip initial toggles fetch when using updateContext or setContextFields
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ We recommend to set `togglesStorageTTL` to a value greater than the `refreshInte
* Analyse code: `flutter analyze lib test`
* (optional) run example app (from inside the `example` dir): `flutter run`
* Bump up the version in `pubspec.yaml`
* Update the `CHANGELOG.md` and `flutter@version` in unleash_proxy_client_flutter.dart
* Update the `CHANGELOG.md` and `unleash-client-flutter:version` in unleash_proxy_client_flutter.dart
* Create a PR in new branch, merge it to main
* Publish new version from tip of main: `dart pub publish`
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class _MyHomePageState extends State<MyHomePage> {
unleash.updateContext(UnleashContext(
userId: '123',
));
unleash.setContextFields({'userId': '1234'});
void updateCounterEnabled(_) {
final counterEnabled = unleash.isEnabled('counter');
setState(() {
Expand Down
2 changes: 1 addition & 1 deletion lib/unleash_proxy_client_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class UnleashClient extends EventEmitter {
this.customHeaders = const {},
this.impressionDataAll = false,
// bump on each release, overwrite in tests, do not change in client code
this.sdkName = 'unleash-flutter@1.9.2',
this.sdkName = 'unleash-client-flutter:1.9.3',
this.experimental}) {
_init();
metrics = Metrics(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Flutter/Dart client that can be used together with the unleash-pr
homepage: https://github.com/Unleash/unleash_proxy_client_flutter
repository: https://github.com/Unleash/unleash_proxy_client_flutter
issue_tracker: https://github.com/Unleash/unleash_proxy_client_flutter
version: 1.9.2
version: 1.9.3

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down
28 changes: 14 additions & 14 deletions test/unleash_proxy_client_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void main() {
storageProvider: InMemoryStorageProvider(),
sessionIdGenerator: generateSessionId,
idGenerator: () => '1234',
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
fetcher: getMock);

await unleash.start();
Expand All @@ -197,7 +197,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'CustomHeader': 'CustomHeaderValue',
'X-Custom': 'CustomExtension'
}
Expand All @@ -214,7 +214,7 @@ void main() {
headerName: 'CustomHeader',
storageProvider: InMemoryStorageProvider(),
sessionIdGenerator: generateSessionId,
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
idGenerator: () => '1234',
fetcher: getMock);

Expand All @@ -229,7 +229,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'CustomHeader': 'proxy-123',
}
]
Expand Down Expand Up @@ -1149,7 +1149,7 @@ void main() {
refreshInterval: 10,
sessionIdGenerator: generateSessionId,
idGenerator: () => '1234',
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
storageProvider: InMemoryStorageProvider(),
fetcher: getMock);

Expand All @@ -1165,7 +1165,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'Authorization': 'proxy-123',
}
],
Expand All @@ -1177,7 +1177,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'Authorization': 'proxy-123',
'If-None-Match': 'ETagValue'
}
Expand All @@ -1197,7 +1197,7 @@ void main() {
refreshInterval: 10,
sessionIdGenerator: generateSessionId,
idGenerator: () => '1234',
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
storageProvider: InMemoryStorageProvider(),
fetcher: getMock);

Expand All @@ -1213,7 +1213,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'Authorization': 'proxy-123',
}
],
Expand All @@ -1225,7 +1225,7 @@ void main() {
'Cache': 'no-cache',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
'Authorization': 'proxy-123',
}
]
Expand Down Expand Up @@ -1345,7 +1345,7 @@ void main() {
metricsInterval: 10,
sessionIdGenerator: generateSessionId,
idGenerator: () => '1234',
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
storageProvider: InMemoryStorageProvider(),
clock: () => DateTime.utc(2000),
fetcher: getMock,
Expand All @@ -1368,7 +1368,7 @@ void main() {
'Authorization': 'proxy-123',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
},
payload
],
Expand All @@ -1393,7 +1393,7 @@ void main() {
clock: () => DateTime.utc(2000),
sessionIdGenerator: generateSessionId,
idGenerator: () => '1234',
sdkName: 'unleash-flutter@1.0.0',
sdkName: 'unleash-client-flutter:1.0.0',
storageProvider: InMemoryStorageProvider(),
fetcher: getMock,
poster: postMock);
Expand Down Expand Up @@ -1421,7 +1421,7 @@ void main() {
'Authorization': 'proxy-123',
'x-unleash-appname': 'flutter-test',
'x-unleash-connection-id': '1234',
'x-unleash-sdk': 'unleash-flutter@1.0.0',
'x-unleash-sdk': 'unleash-client-flutter:1.0.0',
},
payload
],
Expand Down

0 comments on commit f3cf9f8

Please sign in to comment.