From a1b24650a474cf4d7430c8d1e4c3ef317fcd63bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 07:53:16 +0000 Subject: [PATCH 1/7] Update dependency lints to v4 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 8b33d16..4928096 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,6 +9,6 @@ environment: sdk: ^2.14.4 dev_dependencies: - lints: ^1.0.0 + lints: ^4.0.0 test: ^1.16.0 From aeb6acc5388f5e0759390422af98b3c1c7ecf385 Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:08:13 +0300 Subject: [PATCH 2/7] upgrade to use flutter lint instead of lints --- analysis_options.yaml | 31 +------------------------------ example/xid_example.dart | 4 +++- pubspec.yaml | 2 +- test/xid_test.dart | 4 ++-- 4 files changed, 7 insertions(+), 34 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index dee8927..a3be6b8 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,30 +1 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/example/xid_example.dart b/example/xid_example.dart index 3b53f8c..b1a6be0 100644 --- a/example/xid_example.dart +++ b/example/xid_example.dart @@ -1,6 +1,8 @@ +import 'dart:developer'; + import 'package:xid/xid.dart'; void main() { var xid = Xid(); - print('generated id: $xid'); + log('generated id: $xid'); } diff --git a/pubspec.yaml b/pubspec.yaml index 4928096..113472d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,6 +9,6 @@ environment: sdk: ^2.14.4 dev_dependencies: - lints: ^4.0.0 + flutter_lints: ^4.0.0 test: ^1.16.0 diff --git a/test/xid_test.dart b/test/xid_test.dart index 1467571..5997c8b 100644 --- a/test/xid_test.dart +++ b/test/xid_test.dart @@ -20,7 +20,7 @@ void main() { 0x2d, 0xc9 ]; - final idString = "9m4e2mr0ui3e8a215n4g"; + const idString = "9m4e2mr0ui3e8a215n4g"; test('Encoding works well', () { expect(base32encode(idBytes), idString.toUpperCase()); expect(Xid.fromString(idString).toBytes(), idBytes); @@ -42,7 +42,7 @@ void main() { 0x2d, 0xc9 ]; - final decodeIdString = "9m4e2mr0ui3e8a215n4g"; + const decodeIdString = "9m4e2mr0ui3e8a215n4g"; test('Decoding works well', () { expect(base32decode(decodeIdString), decodeIdBytes); From a4d6d8ea82328fcfd53b666946341bf8e750499b Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:11:11 +0300 Subject: [PATCH 3/7] upgrade version of sdk supported --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 113472d..62aeb7c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ description: | version: 1.1.2 repository: https://github.com/pitabwire/xid environment: - sdk: ^2.14.4 + sdk: ^2.17.0 dev_dependencies: flutter_lints: ^4.0.0 From d94a655b9198fa6573178794a1fcfc9b7520624c Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:26:47 +0300 Subject: [PATCH 4/7] remove unsupported dart versions in the tests --- .github/workflows/run_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index d172f37..ba814f3 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -7,7 +7,7 @@ jobs: build: strategy: matrix: - dart_version: [ 2.14,2.15,2.16,2.17,2.18,2.19,3.0,3.1,3.2 ] + dart_version: [ 2.17,2.18,2.19,3.0,3.1,3.2,3.3 ] runs-on: ubuntu-latest container: image: dart:${{ matrix.dart_version }} From 57ff55ddd04d528442d6f047cdc60fd382da4228 Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:32:06 +0300 Subject: [PATCH 5/7] update changelog file --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a2bf2e..0b2e2c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.2.0 + +- stop supporting dart versions prior to 2.17.0 +- switch to using flutter_lint away from lints +- optimize memory usage when declaring binary structure + ## 1.1.2 - fix issue related to missing gh permission From 1c54b43994b5833e3ac36a7850ec39fc797197a7 Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:39:54 +0300 Subject: [PATCH 6/7] upgrade version of dart supported to 2.18 --- .github/workflows/run_tests.yaml | 2 +- analysis_options.yaml | 29 ++++++++++++++++++++++++++++- pubspec.yaml | 4 ++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index ba814f3..30a373b 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -7,7 +7,7 @@ jobs: build: strategy: matrix: - dart_version: [ 2.17,2.18,2.19,3.0,3.1,3.2,3.3 ] + dart_version: [ 2.18,2.19,3.0,3.1,3.2,3.3 ] runs-on: ubuntu-latest container: image: dart:${{ matrix.dart_version }} diff --git a/analysis_options.yaml b/analysis_options.yaml index a3be6b8..773ccf5 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1,28 @@ -include: package:flutter_lints/flutter.yaml \ No newline at end of file +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/tools/linter-rules. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/tools/analysis \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 62aeb7c..d47ed3b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,9 +6,9 @@ description: | version: 1.1.2 repository: https://github.com/pitabwire/xid environment: - sdk: ^2.17.0 + sdk: ^2.18.0 dev_dependencies: - flutter_lints: ^4.0.0 + flutter_lints: ^2.0.2 test: ^1.16.0 From cdda7ccaa03d60132b535d3aaff6a642da49afa5 Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Tue, 14 May 2024 11:41:08 +0300 Subject: [PATCH 7/7] update version file --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d47ed3b..844fd32 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: | Xid is a globally unique id generator. Xids are small, fast to generate, sortable, compact URL-safe string with no configuration or central generator server. -version: 1.1.2 +version: 1.2.0 repository: https://github.com/pitabwire/xid environment: sdk: ^2.18.0