From 2968ec486b6fba1ee243384c8770a05dea4b2429 Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Sun, 11 Jun 2023 09:59:10 +0200 Subject: [PATCH] migrate to latest dart version. --- CHANGELOG.md | 4 + analysis_options.yaml | 6 +- example/pubspec.lock | 105 +++++++++++++++++--------- lib/src/crypto/key_encrypter_kdf.dart | 2 +- lib/src/kdbx_var_dictionary.dart | 14 ++-- pubspec.yaml | 6 +- 6 files changed, 87 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27caa9a..a09dbc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.4.0 + +- Migrate to latest dart version. + ## 2.3.0 - Mark objects only as clean when saving was successful. diff --git a/analysis_options.yaml b/analysis_options.yaml index 0a92642..d3426df 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -4,9 +4,6 @@ include: package:flutter_lints/flutter.yaml analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false errors: # treat missing required parameters as a warning (not a hint) missing_required_param: warning @@ -14,6 +11,9 @@ analyzer: missing_return: warning # allow having TODOs in the code todo: ignore + language: + strict-casts: true + strict-raw-types: true linter: rules: diff --git a/example/pubspec.lock b/example/pubspec.lock index 0df396f..e9e5e72 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,105 +5,120 @@ packages: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: a92e39b291073bb840a72cf43d96d2a63c74e9a485d227833e8ea0054d16ad16 + url: "https://pub.dev" source: hosted version: "3.1.2" argon2_ffi_base: dependency: transitive description: name: argon2_ffi_base - url: "https://pub.dartlang.org" + sha256: afb48b48cb418fe632863983a54c231c097f495129d3fc9d758d17d209663977 + url: "https://pub.dev" source: hosted version: "1.1.0+1" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "3d82ff8620ec576fd38f6cec0df45a7c088b8704eb1c63d4c336392e5efca6ca" + url: "https://pub.dev" source: hosted version: "2.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" source: hosted version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: "6021e0172ab6e6eaa1d391afed0a99353921f00c54385c574dc53e55d67c092c" + url: "https://pub.dev" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "6d4193120997ecfd09acf0e313f13dc122b119e5eca87ef57a7d065ec9183762" + url: "https://pub.dev" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: f08428ad63615f96a27e34221c65e1a451439b5f26030f78d790f461c686d65d + url: "https://pub.dev" source: hosted version: "3.0.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: cf75650c66c0316274e21d7c43d3dea246273af5955bd94e8184837cd577575c + url: "https://pub.dev" source: hosted version: "3.0.1" dio: dependency: transitive description: name: dio - url: "https://pub.dartlang.org" + sha256: bf173c8bc66b776e3c2892b6ac56ac1a5ad73d21dd06d337f9fe656f63612947 + url: "https://pub.dev" source: hosted version: "4.0.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "35d0f481d939de0d640b3db9a7aa36a52cd22054a798a73b4f50bdad5ce12678" + url: "https://pub.dev" source: hosted version: "1.1.2" flutter_lints: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted version: "4.0.0" intl: dependency: transitive description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" isolates: dependency: transitive description: name: isolates - url: "https://pub.dartlang.org" + sha256: ce89e4141b27b877326d3715be2dceac7a7ba89f3229785816d2d318a75ddf28 + url: "https://pub.dev" source: hosted version: "3.0.3+8" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: d9bdfd70d828eeb352390f81b18d6a354ef2044aa28ef25682079797fa7cd174 + url: "https://pub.dev" source: hosted version: "0.6.3" kdbx: @@ -112,132 +127,150 @@ packages: path: ".." relative: true source: path - version: "2.2.0" + version: "2.3.0" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "0520a4826042a8a5d09ddd4755623a50d37ee536d79a70452aff8c8ad7bb6c27" + url: "https://pub.dev" source: hosted version: "1.0.1" logging_appenders: dependency: transitive description: name: logging_appenders - url: "https://pub.dartlang.org" + sha256: "013e8548b79e3b8dc0333f3efae706184356b5926c6bea59150efa126c91598c" + url: "https://pub.dev" source: hosted version: "1.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "2e2c34e631f93410daa3ee3410250eadc77ac6befc02a040eda8a123f34e6f5a" + url: "https://pub.dev" source: hosted version: "0.12.11" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "5202fdd37b4da5fd14a237ed0a01cad6c1efd4c99b5b5a0d3c9237f3728c9485" + url: "https://pub.dev" source: hosted version: "1.7.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "2ad4cddff7f5cc0e2d13069f2a3f7a73ca18f66abd6f5ecf215219cdb3638edb" + url: "https://pub.dev" source: hosted version: "1.8.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "3abc4a0f06dccb2348ebdab9f5b9cc88bb64bfc830bed6351040ca42722044a6" + url: "https://pub.dev" source: hosted version: "4.2.0" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" source: hosted - version: "3.3.4" + version: "3.7.3" quiver: dependency: transitive description: name: quiver - url: "https://pub.dartlang.org" + sha256: "5e592c348a6c528fb8deb7cc7d85a7097ce65bf2349121ad004d1fc5d5905eaa" + url: "https://pub.dev" source: hosted version: "3.0.1" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a + url: "https://pub.dev" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: f8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774 + url: "https://pub.dev" source: hosted version: "1.10.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: dd11571b8a03f7cadcf91ec26a77e02bfbd6bbba2a512924d3116646b4198fc4 + url: "https://pub.dev" source: hosted version: "1.1.0" supercharged_dart: dependency: transitive description: name: supercharged_dart - url: "https://pub.dartlang.org" + sha256: "9d6d4fa1736d07f0506ce2713e5f9815b20bcd741c0d53e9b56c265458c3ce05" + url: "https://pub.dev" source: hosted version: "2.0.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.dartlang.org" + sha256: "271977ff1e9e82ceefb4f08424b8839f577c1852e0726b5ce855311b46d3ef83" + url: "https://pub.dev" source: hosted version: "3.0.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830 + url: "https://pub.dev" source: hosted version: "1.2.0" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + url: "https://pub.dev" source: hosted version: "1.3.0" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "0ea20bfc625477e17f08a92d112272a071609b275ce4ca10ad853e1426ca3758" + url: "https://pub.dev" source: hosted version: "3.0.4" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "925e1d7923773fef2f90c5c9ad0f496630f63e03f974a0aaa5fb50c60640c570" + url: "https://pub.dev" source: hosted version: "5.2.0" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=2.14.0 <4.0.0" diff --git a/lib/src/crypto/key_encrypter_kdf.dart b/lib/src/crypto/key_encrypter_kdf.dart index 03a9dec..94dcb85 100644 --- a/lib/src/crypto/key_encrypter_kdf.dart +++ b/lib/src/crypto/key_encrypter_kdf.dart @@ -17,7 +17,7 @@ enum KdfType { Aes, } -class KdfField { +class KdfField { KdfField(this.field, this.type); final String field; diff --git a/lib/src/kdbx_var_dictionary.dart b/lib/src/kdbx_var_dictionary.dart index e22765e..ee8724c 100644 --- a/lib/src/kdbx_var_dictionary.dart +++ b/lib/src/kdbx_var_dictionary.dart @@ -20,37 +20,37 @@ class ValueType { final Decoder decoder; final Encoder? encoder; - static final typeUInt32 = ValueType( + static final typeUInt32 = ValueType( 0x04, (reader, _) => reader.readUint32(), (writer, value) => writer.writeUint32(value, writer._lengthWriter()), ); - static final typeUInt64 = ValueType( + static final typeUInt64 = ValueType( 0x05, (reader, _) => reader.readUint64(), (writer, value) => writer.writeUint64(value, writer._lengthWriter()), ); - static final typeBool = ValueType( + static final typeBool = ValueType( 0x08, (reader, _) => reader.readUint8() != 0, (writer, value) => writer.writeUint8(value ? 1 : 0, writer._lengthWriter()), ); - static final typeInt32 = ValueType( + static final typeInt32 = ValueType( 0x0C, (reader, _) => reader.readInt32(), (writer, value) => writer.writeInt32(value, writer._lengthWriter()), ); - static final typeInt64 = ValueType( + static final typeInt64 = ValueType( 0x0D, (reader, _) => reader.readInt64(), (writer, value) => writer.writeInt64(value, writer._lengthWriter()), ); - static final typeString = ValueType( + static final typeString = ValueType( 0x18, (reader, length) => reader.readString(length), (writer, value) => writer.writeString(value, writer._lengthWriter()), ); - static final typeBytes = ValueType( + static final typeBytes = ValueType( 0x42, (reader, length) => reader.readBytes(length), (writer, value) => writer.writeBytes(value, writer._lengthWriter()), diff --git a/pubspec.yaml b/pubspec.yaml index 11f4125..23eff22 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,15 +1,15 @@ name: kdbx description: KeepassX format implementation in pure dart. (kdbx 3.x and 4.x support). -version: 2.3.0 +version: 2.4.0 homepage: https://github.com/authpass/kdbx.dart environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: logging: '>=0.11.3+2 <2.0.0' crypto: '>=2.0.0 <4.0.0' - pointycastle: '>=3.0.0 <4.0.0' + pointycastle: '>=3.4.0 <4.0.0' xml: '>=4.4.0 <7.0.0' uuid: ">=3.0.0 <5.0.0" meta: '>=1.0.0 <2.0.0'