diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index d172f37..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.14,2.15,2.16,2.17,2.18,2.19,3.0,3.1,3.2 ] + 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/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 diff --git a/analysis_options.yaml b/analysis_options.yaml index dee8927..773ccf5 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,30 +1,28 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). +# This file configures the analyzer, which statically analyzes Dart code to +# check for 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 +# 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`. -# analyzer: -# exclude: -# - path/to/excluded/files/** +# 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 -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints +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 -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +# Additional information about this file can be found at +# https://dart.dev/tools/analysis \ 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 8b33d16..844fd32 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,12 +3,12 @@ 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.14.4 + sdk: ^2.18.0 dev_dependencies: - lints: ^1.0.0 + flutter_lints: ^2.0.2 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);