appsup-dart / firebase_dart

A pure Dart implementation of the Firebase client
Other
91 stars 30 forks source link

Please upgrade jose package #49

Closed eximius313 closed 11 months ago

eximius313 commented 11 months ago

@rbellens, Because of dependency on X.509 which was throwing warnings:

../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/x509_base.dart:176:59: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
                (sequence.elements[2] as ASN1OctetString).contentBytes()!),
                                                          ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/x509_base.dart:195:62: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
        algorithm, (sequence.elements[1] as ASN1OctetString).contentBytes()!);
                                                             ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/certificate.dart:137:19: Warning: Operand of null-aware operation '!' has type 'BigInt' which excludes null.
 - 'BigInt' is from 'dart:core'.
      version = e.valueAsBigInteger!.toInt() + 1;
                  ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/certificate.dart:154:32: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
            ex = (ASN1Parser(o.contentBytes()!).nextObject() as ASN1Sequence)
                               ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/certificate.dart:164:52: Warning: Operand of null-aware operation '!' has type 'BigInt' which excludes null.
 - 'BigInt' is from 'dart:core'.
        serialNumber: (elements[0] as ASN1Integer).valueAsBigInteger!.toInt(),
                                                   ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/extension.dart:47:54: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
            ASN1Parser(sequence.elements[octetIndex].contentBytes()!)
                                                     ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/extension.dart:355:16: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null.
        cA = o.booleanValue!;
               ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/util.dart:39:50: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
  var privateKey = toBigInt(sequence.elements[1].contentBytes()!);
                                                 ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/util.dart:41:32: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
  var l = sequence.elements[1].contentBytes()!.length;
                               ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/util.dart:55:45: Warning: Operand of null-aware operation '!' has type 'Uint8List' which excludes null.
 - 'Uint8List' is from 'dart:typed_data'.
    var e = ASN1Parser(sequence.elements[i].contentBytes()!).nextObject()
                                            ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/util.dart:101:55: Warning: Operand of null-aware operation '!' has type 'BigInt' which excludes null.
 - 'BigInt' is from 'dart:core'.
  var modulus = (sequence.elements[0] as ASN1Integer).valueAsBigInteger!;
                                                      ^
../../../../.pub-cache/hosted/pub.dev/x509-0.2.3/lib/src/util.dart:102:56: Warning: Operand of null-aware operation '!' has type 'BigInt' which excludes null.
 - 'BigInt' is from 'dart:core'.
  var exponent = (sequence.elements[1] as ASN1Integer).valueAsBigInteger!;

firebase_dart also suffers from it.

Since jose has been already published by you (https://github.com/appsup-dart/jose/issues/53) could you please also upgrade firebase_dart? We'd also love to see intl and http packages upgraded.

Thank you in advance

rbellens commented 11 months ago

firebase_dart has a dependency on jose: ^0.3.2. Which means that the latest version of jose, v0.3.4, is also allowed. So, simply running dart pub upgrade should do the trick for you.