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: 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