From 90e03354412af3ccd2c9fb15aca10c9d96db2b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Tu=C5=A1ar?= Date: Wed, 3 Apr 2024 13:26:55 +0200 Subject: [PATCH 1/2] :bookmark: release v1.0.1+1 ## 1.0.1+1 - [CHORE] lower meta dependency from ^1.11.0 to ^1.9.1 - [CHORE] update documentation - [CHORE] update example - [CHORE] update readme --- CHANGELOG.md | 7 +++++++ pubspec.yaml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d75e6..95ead1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.0.1+1 + +- [CHORE] lower meta dependency from ^1.11.0 to ^1.9.1 +- [CHORE] update documentation +- [CHORE] update example +- [CHORE] update readme + ## 1.0.1 - [CHORE] add documentation diff --git a/pubspec.yaml b/pubspec.yaml index dd35955..1766043 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: qs_dart description: A query string encoding and decoding library for Dart. Ported from qs for JavaScript. -version: 1.0.1 +version: 1.0.1+1 repository: https://github.com/techouse/qs environment: @@ -9,7 +9,7 @@ environment: dependencies: collection: ^1.18.0 equatable: ^2.0.5 - meta: ^1.11.0 + meta: ^1.9.1 weak_map: ^3.0.1 dev_dependencies: From c1580ada85f6d7b127b4f41320382a2f510b598a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Tu=C5=A1ar?= Date: Wed, 3 Apr 2024 13:31:44 +0200 Subject: [PATCH 2/2] :construction_worker: add compare versions CI script --- scripts/compare_versions.dart | 38 +++++++++++++++++++++++++++++++++++ scripts/pubspec.yaml | 12 +++++++++++ 2 files changed, 50 insertions(+) create mode 100644 scripts/compare_versions.dart create mode 100644 scripts/pubspec.yaml diff --git a/scripts/compare_versions.dart b/scripts/compare_versions.dart new file mode 100644 index 0000000..1f4d03c --- /dev/null +++ b/scripts/compare_versions.dart @@ -0,0 +1,38 @@ +import 'dart:io' show exitCode, stderr, stdout; +import 'package:cli_script/cli_script.dart' show wrapMain; +import 'package:pub_semver/pub_semver.dart' show Version; + +void main(List args) { + wrapMain(() { + exitCode = 0; + + if (args.length != 2) { + stderr.write( + 'Please provide two arguments!\n\nExample usage:\ndart run compare_versions.dart 2.0.0+1 1.9.0+5\n', + ); + exitCode = 1; + return; + } + + late final Version v1; + late final Version v2; + + try { + v1 = Version.parse(args[0]); + } on FormatException catch (e) { + stderr.write('Error parsing version 1: ${e.message}'); + exitCode = 1; + return; + } + + try { + v2 = Version.parse(args[1]); + } on FormatException catch (e) { + stderr.write('Error parsing version 2: ${e.message}'); + exitCode = 1; + return; + } + + stdout.write(v1 > v2 ? 1 : 0); + }); +} diff --git a/scripts/pubspec.yaml b/scripts/pubspec.yaml new file mode 100644 index 0000000..c870324 --- /dev/null +++ b/scripts/pubspec.yaml @@ -0,0 +1,12 @@ +name: compare_versions + +publish_to: 'none' + +version: 1.0.0 + +environment: + sdk: ">=2.17.0 <4.0.0" + +dependencies: + cli_script: ^1.0.0 + pub_semver: ^2.1.4