Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dart): update dependency dart to >=2.19.6 <3.0.0 #199

Merged
merged 2 commits into from Nov 16, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 16, 2023

Mend Renovate logo banner

This PR contains the following updates:

Package Update Change
dart (source) minor >=2.12.0 <3.0.0 -> >=2.19.6 <3.0.0

Release Notes

dart-lang/sdk (dart)

v2.19.6

Compare Source

This is a patch release that:

  • Fixes an Out of Memory exception due to a VM bug. (issue #​50537).

v2.19.5

Compare Source

This is a patch release that:

  • Fixes broken usage of Dart_CObject_Type. (issue #​51459).

v2.19.4

Compare Source

This is a patch release that:

  • Fixes mobile devices vm crashes caused by particular use of RegExp. (issue
    #​121270).

v2.19.3

Compare Source

This is a patch release that:

  • Updates DDC test and builder configuration. (issue #​51481).

  • Protects the Dart Analysis Server against extreme memory usage by limiting
    the number of plugins per analysis context to 1. (issue #​50981).

v2.19.2

Compare Source

This is a patch release that:

  • Fixes a VM crash when mixing the use of double and float calculations in
    debug/jit configuration. (issue #​50622).

  • Fixes the compiler crashing when attempting to inline a method with lots of
    optional parameters with distinct default values. (issue #​119220).

  • Fixes the part_of_different_library error encountered when using PackageBuildWorkspace. (issue #​51087).

v2.19.1

Compare Source

This is a patch release that:

  • Fixes pub get behaviour: In Dart 2.19.0 a dart pub get with a
    pubspec.lock created by a 2.18 SDK will unlock all constraints, effectively
    like a pub upgrade (issue #​51166).

  • Stops rewriting SDK constraints: In Dart 3, a SDK constraint like
    >=2.12.0 <3.0.0 gets interpreted by the pub client as >=2.12.0 <4.0.0 to
    allow for backwards compatibility (issue #​51101).

    This change was intended for Dart 3.0.0 and later, but was landed already in
    2.19.0. It is now being removed in 2.19.1, as it can give confusing messages
    such as:

    Because library requires SDK version >=2.19.2 <4.0.0, version solving failed.

    This reinterpretation no longer happens in Dart 2.19.1.

  • Fixes a VM crash caused by incorrect sharing of RegExp between isolates
    (issue #​51130).

v2.19.0

Compare Source

Language
  • Breaking change #​49635: Flag additional code as unreachable due to
    types Null and Never. Several unusual constructs that lead to unreachable
    code are now recognized by flow analysis:

    • Control flow after an expression of the form e ?? other or e ??= other,
      where e has static type Null and other has static type Never, is
      considered unreachable.

    • Control flow predicated on an expression of the form e is Never evaluating
      to true is considered unreachable.

    • Control flow predicated on an expression of the form e is! Never
      evaluating to false is considered unreachable.

    • Control flow on the RHS of a null-aware access such as e?.property...,
      e?.property = ... or e?.method(...), where e has static type Null,
      is considered unreachable (Note: this can arise in the presence of extension
      methods).

    Previously, these behaviors only took effect if e was a reference to a local
    variable.

    Additionally, a type test of the form v is Never (where v is a local
    variable) no longer promotes v to type Never.

  • Breaking Change #​49687: Don't delegate inaccessible private names to
    noSuchMethod. If a concrete class implements an interface containing a
    member with a name that's private to different library, and does not inherit
    an implementation of that interface member, a invocation of that member will
    result in an exception getting thrown. Previously, such attempts would result
    in the call being diverted to the noSuchMethod method.

    This change closes a loophole in Dart's privacy system, where another library
    can provide a different implementation of a supposedly private member using
    noSuchMethod, and paves the way for a future implementation of promotion for
    private final fields (see #​2020).

  • Breaking Change #​50383: Report a compile-time error for all cyclic
    dependencies during top-level type inference.

    Previously, some of these dependencies were ignored, based on an analysis
    determining that they could not influence the inferred type. However, this
    analysis was complex, differed slightly among tools, and had become much more
    complex due to other changes (especially, enhanced flow analysis).

    With this change, all tools treat these cyclic dependencies in the same way,
    the analysis is well-understood, and, arguably, the code is more readable.

    Breakage is mitigated by adding a declared type to one top-level declaration
    per cycle which is now an error.

  • Add support for unnamed libraries. Dart language 2.19 allows a library
    directive to be written without a name (library;). A library directive can
    be used for library-level annotations (such as @deprecated) and for
    library-level documentation comments, and with this new feature, you don't
    have to provide a unique name for each library directive. Instead, a name can
    simply be omitted (see #​1073).
Libraries
dart:convert
  • Breaking change #​34233: The previously deprecated API
    [DEFAULT_BUFFER_SIZE][DEFAULT_BUFFER_SIZE] in JsonUtf8Encoder has been removed.
dart:core
dart:developer
  • Breaking change #​34233: The previously deprecated APIs kInvalidParams,
    kExtensionError, kExtensionErrorMax, and kExtensionErrorMin in
    [ServiceExtensionResponse][ServiceExtensionResponse] have been removed. They have been replaced by
    invalidParams, extensionError, extensionErrorMax, and
    extensionErrorMin.
  • Deprecated UserTag.MAX_USER_TAGS in favor of UserTag.maxUserTags.
dart:ffi
  • Breaking change #​49935: The runtime type argument of Pointer has
    changed to Never in preparation of completely removing the runtime type
    argument. Pointer.toString has changed to not report any type argument.
dart:html
  • Add constructor and slice to SharedArrayBuffer.
  • Deprecated registerElement and registerElement2 in Document and
    HtmlDocument. These APIs were based on the deprecated Web Components v0.5
    specification and are not supported by browsers today. These APIs are expected
    to be deleted in a future release. See the related breaking change request
    #​49536.
dart:io
  • Breaking change #​49305:
    Disallow negative or hexadecimal content-length headers.

  • Breaking change #​49647:
    File.create now takes new optional exclusive bool parameter, and when it
    is true the operation will fail if target file already exists.

  • Breaking change #​49878: Calling ResourceHandle.toFile(),
    ResourceHandle.toSocket(), ResourceHandle.toRawSocket() or
    ResourceHandle.toRawDatagramSocket(), more than once now throws a
    StateError.

    The previous behavior would allow multiple Dart objects to refer to the same
    file descriptor, which would produce errors when one object was closed or
    garbage collected.

  • Adds three new FileSystemException subclasses to handle common error cases:

    • PathAccessException: The necessary access rights are not available.
    • PathExistsException: The path being created already exists.
    • PathNotFoundException: The path being accessed does not exist.
dart:isolate
  • Add Isolate.run to run a function in a new isolate.
  • Breaking change: SendPort.send is again applying strict checks to the
    contents of the message when sending messages between isolates that are not
    known to share the same code (e.g. an isolate spawned via Isolate.spawnUri).
    These checks were accidentally relaxed in an earlier Dart version allowing
    all classes from dart:core and dart:collection through. This for
    example means that you can't send an instance of a HashMap to an isolate
    spawned via Isolate.spawnUri. See [SendPort.send][SendPort.send] documentation for
    the full list of restrictions.
dart:mirrors
  • Breaking change #​34233: The APIs [MirrorsUsed][MirrorsUsed] and [Comment][Comment] have
    been removed. MirrorsUsed was experimental and deprecated; Comment was
    previously used internally in dart2js. Both are no longer functional.
Other libraries
package:js
  • Breaking changes to the preview feature @staticInterop:
    • Classes with this annotation are now disallowed from using external
      generative constructors. Use external factorys for these classes instead,
      and the behavior should be identical. This includes use of synthetic
      constructors. See #​48730 and #​49941 for more details.
    • Classes with this annotation's external extension members are now disallowed
      from using type parameters e.g. external void method<T>(T t). Use a
      non-external extension method for type parameters instead. See #​49350
      for more details.
    • Classes with this annotation should also have the @JS annotation. You can
      also have the @anonymous annotation with these two annotations for an
      object literal constructor, but it isn't required.
    • Classes with this annotation can not be implemented by classes without this
      annotation. This is to avoid confusing type behavior.
Tools
Analyzer
  • add static enforcement of new mustBeOverridden annotation, and quick fixes
  • add quick fixes for many diagnostics including compile-time errors, hints, and
    lints. There are now quick fixes for over 300 diagnostic codes. These lint
    rules have new fixes: combinators_ordering, dangling_library_doc_comments,
    implicit_call_tearoffs, library_annotations, and
    unnecessary_library_directive.
  • add new hints: body_might_complete_normally_catch_error,
    cast_from_null_always_fails, cast_from_nullable_always_fails,
    deprecated_colon_for_default_value, and duplicate_export
  • remove hint: invalid_override_different_default_values
Linter

Updated the Linter to 1.31.0, which includes changes that

  • add new lint: collection_methods_unrelated_type.
  • add new lint: combinators_ordering.
  • add new lint: dangling_library_doc_comments.
  • add new lint: enable_null_safety.
  • add new lint: implicit_call_tearoffs.
  • add new lint: library_annotations.
  • add new lint: unnecessary_library_directive.
  • add new lint: unreachable_from_main.
  • add new lint: use_string_in_part_of_directives.
  • fix no_leading_underscores_for_local_identifiers to not report super formals
    as local variables.
  • fix unnecessary_overrides false negatives.
  • fix cancel_subscriptions for nullable fields.
  • update library_names to support unnamed libraries.
  • fix unnecessary_parenthesis support for as-expressions.
  • fix use_build_context_synchronously to check for context property accesses.
  • fix false positive in comment_references.
  • improved unrelated type checks to handle enums and cascades.
  • fix unnecessary_brace_in_string_interps for this expressions .
  • update use_build_context_synchronously for BuildContext.mounted.
  • improve flutter_style_todos to handle more cases.
  • fix use_build_context_synchronously to check for BuildContexts in named
    expressions.
  • fix exhaustive_cases to check parenthesized expressions
  • update avoid_redundant_argument_values to work with enum declarations.
  • fix avoid_redundant_argument_values when referencing required
    parameters in legacy libraries.
  • fix use_super_parameters false positives with repeated super
    parameter references.
  • update use_late_for_private_fields_and_variables to handle enums.
  • fix prefer_contains false positives when a start index is non-zero.
  • improve noop_primitive_operations to catch .toString()
    in string interpolations.
  • update public_member_api_docs to report diagnostics on extension
    names (instead of bodies).
  • fix use_colored_box and use_decorated_box to not over-report on containers without
    a child.
  • fix unnecessary_parenthesis false positives on a map-or-set literal at the start of
    an expression statement.
  • fix prefer_final_locals false positives reporting on fields.
  • fix unnecessary_overrides to allow overrides on @Protectedmembers.
  • fix avoid_multiple_declarations_per_line false positives in for statements.
  • fix prefer_final_locals false positives on declaration lists with at least one
    non-final variable.
  • fixuse_build_context_synchronously to handle awaits in if conditions.
  • improves performance for:
    • avoid_escaping_inner_quotes.
    • avoid_null_checks_in_equality_operators.
    • avoid_positional_boolean_parameters.
    • avoid_returning_null.
    • avoid_returning_null.
    • avoid_returning_this.
    • cascade_invocations.
    • diagnostic_describe_all_properties.
    • flutter_style_todos.
    • join_return_with_statement.
    • parameter_assignments.
    • prefer_const_constructors.
    • prefer_constructors_over_static_methods.
    • prefer_constructors_over_static_methods.
    • prefer_contains.
    • prefer_foreach.
    • prefer_interpolation_to_compose_strings.
    • prefer_interpolation_to_compose_strings.
    • recursive_getters.
    • tighten_type_of_initializing_formals.
    • unnecessary_lambdas.
    • use_late_for_private_fields_and_variables.
Pub
  • Treats packages with sdk constraint lower bound >=2.12.0 or more and upper
    bound <3.0.0 as compatible with <4.0.0.

  • Introduces content-hashes in pubspec.lock, to protect against corrupted
    package repositories.

    These will show up in the lock file on the first run of dart pub get.

    See https://dart.dev/go/content-hashes for more details.

  • New flag dart pub get --enforce-lockfile will fetch dependencies, but fail
    if anything deviates from pubspec.lock. Useful for ensuring reproducible runs
    in CI and production.

  • Remove remaining support for .packages files. The flag
    --legacy-packages-file is no longer supported.

  • The client will now default to the pub.dev repository instead of pub.dartlang.org.
    This will cause a change in pubspec.lock.

  • Support a new field funding in pubspec.yaml.

  • Validate the CRC32c checksum of downloaded archives and retry on failure.

  • dart pub add foo:<constraint> with an existing dependency will now update
    the constraint rather than fail.

  • Update dart pub publish to allow dependency_overrides in pubspec.yaml.
    They will still cause a publication warning.
    Note that only dependency_overrides from the root package effect resolution.

  • Update dart pub publish to require a working resolution.
    If publishing a breaking release of mutually dependent packages use dependency_overrides
    to obtain a resolution.

  • dart pub add will now allow adding multiple packages from any source using
    the same YAML syntax as in pubspec.yaml.

    For example:

    $ dart pub add retry:^1.0.0 'dev:foo{"git":"https://github.com/foo/foo"}'
  • dart pub publish will now give a warning if dart analyze reports any diagnostics.

  • dart pub get now fails gracefully when run from inside the pub-cache.

  • dart pub publish now shows the file sizes of large files in your package to
    prevent accidental publication of large unrelated files.

  • Fix a bug in dart pub upgrade --major-versions where packages not requiring
    major updates would be held back unless needed.

dart2js
  • Breaking change 49473:
    dart2js no longer supports HTTP URIs as inputs.

v2.18.7

Compare Source

v2.18.6

Compare Source

v2.18.5

Compare Source

  • fixes an error on private variable setters in mixins on dart web
    (issue #​50119).
  • fixes the handling of type parameter nullability in factory constructors
    (issue #​50392).

v2.18.4

Compare Source

This is a patch release that fixes crashes during hot reload
(issue flutter/flutter#113540).

v2.18.3

Compare Source

This is a patch release that fixes a regression in code coverage computation
(issue #​49887).

v2.18.2

Compare Source

This is a patch release that:

  • fixes incorrect behavior in Uri.parse.
  • fixes a compiler crash (issue #​50052).
Libraries
dart:core
  • Security advisory CVE-2022-3095:
    There is a auth bypass vulnerability in Dart SDK, specifically dart:uri core
    library, used to parse and validate URLs. This library is vulnerable to the
    backslash-trick wherein backslash is not recognized as equivalent to forward
    slash in URLs.

    The Uri class has been changed to parse a backslash in the path or the
    authority separator of a URI as a forward slash. This affects the Uri
    constructor's path parameter, and the Uri.parse method.
    This change was made to not diverge as much from the browser URL behavior.
    The Dart Uri class is still not an implementation of the same standard
    as the browser's URL implementation.

v2.18.1

Compare Source

This is a patch release that fixes a crash caused by incorrect type inference
(issues flutter/flutter#110715 and flutter/flutter#111088).

v2.18.0

Compare Source

Language

The following features are new in the Dart 2.18 language version. To use
them, you must set the lower bound on the SDK constraint for your package to
2.18 or greater (sdk: '>=2.18.0 <3.0.0').

  • Enhanced type inference for generic invocations with function literals:
    Invocations of generic methods/constructors that supply function literal
    arguments now have improved type inference. This primarily affects the
    Iterable.fold method. For example, in previous versions of Dart, the
    compiler would fail to infer an appropriate type for the parameter a:

    void main() {
      List<int> ints = [1, 2, 3];
      var maximum = ints.fold(0, (a, b) => a < b ? b : a);
    }

    With this improvement, a receives its type from the initial value, 0.

    On rare occasions, the wrong type will be inferred, leading to a compile-time
    error, for example in this code, type inference will infer that a has a
    type of Null:

    void main() {
      List<int> ints = [1, 2, 3];
      var maximumOrNull = ints.fold(null,
          (a, b) => a == null || a < b ? b : a);
    }

    This can be worked around by supplying the appropriate type as an explicit
    type argument to fold:

    void main() {
      List<int> ints = [1, 2, 3];
      var maximumOrNull = ints.fold<int?>(null,
          (a, b) => a == null || a < b ? b : a);
    }
  • Breaking Change #​48167:
    Mixin of classes that don't extend Object is no longer supported:
    class Base {}
    class Mixin extends Base {}
    class C extends Base with Mixin {}
    This should instead be written using a mixin declaration of Mixin:
    class Base {}
    mixin Mixin on Base {}
    class C extends Base with Mixin {}
    This feature has not been supported in most compilation targets for some
    time but is now completely removed.
Core libraries
dart:async
  • The Stream.fromIterable stream can now be listened to more than once.
dart:collection
  • Deprecates BidirectionalIterator.
dart:core
  • Allow omitting the unencodedPath positional argument to Uri.http and
    Uri.https to default to an empty path.
dart:html
  • Add connectionState attribute and connectionstatechange listener to
    RtcPeerConnection.
dart:io
  • Breaking Change #​49045:
    The uri property of RedirectException in dart:io has been changed to
    be nullable. Programs must be updated to handle the null case.

  • Breaking Change #​34218:
    Constants in dart:io's networking APIs following the SCREAMING_CAPS
    convention have been removed (they were previously deprecated). Please use
    the corresponding lowerCamelCase constants instead.

  • Breaking Change #​45630: The Dart VM no longer automatically restores
    the initial terminal settings upon exit. Programs that change the Stdin
    settings lineMode and echoMode are now responsible for restoring the
    settings upon program exit. E.g. a program disabling echoMode will now
    need to restore the setting itself and handle exiting by the appropriate
    signals if desired:

    import 'dart:io';
    import 'dart:async';
    
    main() {
      bool echoWasEnabled = stdin.echoMode;
      try {
        late StreamSubscription subscription;
        subscription = ProcessSignal.sigint.watch().listen((ProcessSignal signal) {
          stdin.echoMode = echoWasEnabled;
          subscription.cancel();
          Process.killPid(pid, signal); /* Die by the signal. */
        });
        stdin.echoMode = false;
      } finally {
        stdin.echoMode = echoWasEnabled;
      }
    }

    This change is needed to fix #​36453 where the dart programs not caring
    about the terminal settings can inadvertently corrupt the terminal settings
    when e.g. piping into less.

    Furthermore the echoMode setting now only controls the echo local mode
    and no longer sets the echonl local mode on POSIX systems (which controls
    whether newline are echoed even if the regular echo mode is disabled). The
    echonl local mode is usually turned off in common shell environments.
    Programs that wish to control the echonl local mode can use the new
    echoNewlineMode setting.

    The Windows console code pages (if not UTF-8) and ANSI escape code support
    (if disabled) remain restored when the VM exits.

dart:js_util
  • Added dartify and a number of minor helper functions.
Dart VM

Implementation of async/async*/sync* is revamped in Dart VM,
both in JIT and AOT modes. This also affects Flutter except Flutter Web.

Besides smaller code size and better performance of async methods,
the new implementation carries a few subtle changes in behavior:

  • If async method returns before reaching the first await, it now
    returns a completed Future.
    Previously async methods completed resulting Future in separate microtasks.

  • Stack traces no longer have duplicate entries for async methods.

  • New implementation now correctly throws an error if null occurs as
    an argument of a logical expression (&& and ||) which also contains
    an await.

  • New implementation avoids unnecessary extending the liveness of local
    variables in async/async*/sync* methods, which means that unused
    objects stored in local variables in such methods might be garbage
    collected earlier than they were before
    (see issue #​36983
    for details).

Tools
General
  • Breaking Change #​48272:
    The .packages file has been fully discontinued. Historically when the
    commands dart pub get or flutter pub get are executed, pub resolved all
    dependencies, and installs those dependencies to the local pub cache. It
    furthermore created a mapping from each used package to their location on the
    local file system, and wrote that into two files:

    • .dart_tool/package_config.json
    • .packages (deprecated in Dart 2.8.0)

    As of Dart 2.18.0, the .packages is now fully desupported, and all tools
    distributed in, and based on, the Dart SDK no longer support it, and thus
    solely use the .dart_tool/package_config.json file. If you've run dart pub get or flutter pub get with any Dart SDK from the past few years you
    already have a .dart_tool/package_config.json and thus should not be
    impacted. You can delete any old .packages files.

    If you have any third-party tools that for historical reasons depend on a
    .packages we will support the ability to generate a .packages by passing
    the flag --legacy-packages-file to dart pub get. This support will be
    removed in a following stable release.

Dart command line
  • Breaking change #​46100:
    The standalone dart2js and dartdevc tools have been removed as previously
    announced. dart2js is replaced by the dart compile js command, dartdevc
    is no longer exposed as a command-line tool.

  • Breaking change #​46100:
    The standalone dartanalyzer tool has been removed as previously
    announced. dartanalyzer is replaced by the dart analyze command.

Analyzer
Linter

Updated the Linter to 1.25.0, which includes changes that

  • add new lint: discarded_futures.
  • add new lint: unnecessary_null_aware_operator_on_extension_on_nullable.
  • add new lint: unnecessary_to_list_in_spreads.
  • improve message and highlight range for no_duplicate_case_values
  • improve performance for lines_longer_than_80_chars,
    prefer_const_constructors_in_immutables, and
    prefer_initializing_formals.
  • fix prefer_final_parameters to support super parameters.
  • fix unawaited_futures to handle string interpolated
    futures.
  • update use_colored_box to not flag nullable colors,
  • fix no_leading_underscores_for_local_identifiers
    to lint local function declarations.
  • fix avoid_init_to_null to correctly handle super
    initializing defaults that are non-null.
  • update no_leading_underscores_for_local_identifiers
    to allow identifiers with just underscores.
  • fix flutter_style_todos to support usernames that
    start with a digit.
  • update require_trailing_commas to handle functions
    in asserts and multi-line strings.
  • update unsafe_html to allow assignments to
    img.src.
  • fix unnecessary_null_checks to properly handle map
    literal entries.
Pub
  • dart pub get and dart pub upgrade no longer create the
    .packages file. For details, see breaking change #​48272 above.
  • dart pub outdated now shows which of your dependencies are discontinued.
  • dart pub publish will now list all the files it is about to publish.

v2.17.7

Compare Source

This is a patch release that:

  • fixes a crash in the debugger (issue #​49209).

v2.17.6

Compare Source

This is a patch release that:

  • improves code completion for Flutter (issue #​49054).
  • fixes a crash on ARM (issue #​106510).
  • fixes a compiler crash with Finalizable parameters (issue #​49402).

v2.17.5

Compare Source

This is a patch release that:

  • improves analysis of enums and switch (issue #​49188).
  • fixes a compiler crash when initializing Finalizable objects
    (issue #​49075).

v2.17.3

Compare Source

This is a patch release that fixes:

  • a Dart VM compiler crash (issue #​100375).
  • code completion when writing method overrides (issue #​49027).
  • the dart pub login command (issue #​3424).
  • analysis of enhanced enums (issue #​49097).

v2.17.1

Compare Source

This is a patch release that fixes:

  • an analyzer plugin crash (issue #​48682).
  • Dart FFI support for late Finalizable variables (issue #​49024).
  • dart compile on macOS 10.15 (issue #​49010).

v2.17.0

Compare Source

Language

The following features are new in the Dart 2.17 language version. To use
them, you must set the lower bound on the SDK constraint for your package to
2.17 or greater (sdk: '>=2.17.0 <3.0.0').

  • Enhanced enums with members: Enum declarations can now define
    members including fields, constructors, methods, getters, etc. For example:

    enum Water {
      frozen(32),
      lukewarm(100),
      boiling(212);
    
      final int tempInFahrenheit;
      const Water(this.tempInFahrenheit);
    
      @&#8203;override
      String toString() => "The $name water is $tempInFahrenheit F.";
    }

    Constructors must be const since enum values are always constants. If the
    constructor takes arguments, they are passed when the enum value is
    declared.

    The above enum can be used like so:

    void main() {
      print(Water.frozen); // prints "The frozen water is 32 F."
    }
  • Super parameters: When extending a class whose constructor takes
    parameters, the subclass constructor needs to provide arguments for them.
    Often, these are passed as parameters to the subclass constructor, which
    then forwards them to the superclass constructor. This is verbose because
    the subclass constructor must list the name and type of each parameter in
    its parameter list, and then explicitly forward each one as an argument to
    the superclass constructor.

    @​roy-sianez suggested allowing super. before a subclass
    constructor parameter to implicitly forward it to the corresponding
    superclass constructor parameter. Applying this feature to Flutter
    eliminated nearly 2,000 lines of code. For example, before:

    class CupertinoPage<T> extends Page<T> {
      const CupertinoPage({
        required this.child,
        this.maintainState = true,
        this.title,
        this.fullscreenDialog = false,
        LocalKey? key,
        String? name,
        Object? arguments,
        String? restorationId,
      }) : super(
            key: key,
            name: name,
            arguments: arguments,
            restorationId: restorationId,
          );
    
      // ...
    }

    And using super parameters:

    class CupertinoPage<T> extends Page<T> {
      const CupertinoPage({
        required this.child,
        this.maintainState = true,
        this.title,
        this.fullscreenDialog = false,
        super.key,
        super.name,
        super.arguments,
        super.restorationId,
      });
    
      // ...
    }

    From our analysis, over 90% of explicit superclass constructor calls can be
    completely eliminated, using super. parameters instead.

  • Named args everywhere: In a function call, Dart requires positional
    arguments to appear before named arguments. This can be frustrating for
    arguments like collection literals and function expressions that look best
    as the last argument in the argument list but are positional, like the
    test() function in the test package:

    main() {
      test('A test description', () {
        // Very long function body here...
      }, skip: true);
    }

    It would be better if the skip argument appeared at the top of the call
    to test() so that it wasn't easily overlooked, but since it's named and
    the test body argument is positional, skip must be placed at the end.

    Dart 2.17 removes this restriction. Named arguments can be freely
    interleaved with positional arguments, allowing code like:

    main() {
      test(skip: true, 'A test description', () {
        // Very long function body here...
      });
    }
Core libraries
dart:core
  • Add Finalizer and WeakReference which can potentially detect when
    objects are "garbage collected".
  • Add isMimeType method to UriData class, to allow case-insensitive
    checking of the MIME type.
  • Add isCharset and isEncoding methods to UriData class,
    to allow case-insensitive and alternative-encoding-name aware checking
    of the MIME type "charset" parameter.
  • Make UriData.fromString and UriData.fromBytes recognize and omit
    a "text/plain" mimeType even if it is not all lower-case.
dart:ffi
  • Add ref= and []= methods to the StructPointer and UnionPointer
    extensions. They copy a compound instance into a native memory region.
  • Add AbiSpecificIntegers for common C types:
    • char
    • unsigned char
    • signed char
    • short
    • unsigned short
    • int
    • unsigned int
    • long
    • unsigned long
    • long long
    • unsigned long long
    • uintptr_t
    • size_t
    • wchar_t
  • Add NativeFinalizer which can potentially detect when objects are
    "garbage collected". NativeFinalizers run native code where dart:core's
    Finalizers run Dart code on finalization.
dart:html
  • Add scrollIntoViewIfNeeded to Element. Previously, this method was nested
    within scrollIntoView based on the ScrollAlignment value. scrollIntoView
    is unchanged for now, but users who intend to use the native
    Element.scrollIntoViewIfNeeded should use the new scrollIntoViewIfNeeded
    definition instead.
  • Change Performance.mark and Performance.measure to accept their different
    overloads. mark can now accept a markOptions map, and measure can now
    accept a startMark and endMark, or a measureOptions map. Both methods
    return their correct return types now as well - PerformanceEntry? and
    PerformanceMeasure?, respectively.
dart:indexed_db
  • IdbFactory.supportsDatabaseNames has been deprecated. It will always return
    false.
dart:io
  • Breaking Change #​47887:
    HttpClient has a new connectionFactory property, which allows socket
    creation to be customized. Classes that implement HttpClient may be broken
    by this change. Add the following method to your classes to fix them:

    void set connectionFactory(
        Future<ConnectionTask<Socket>> Function(
                Uri url, String? proxyHost, int? proxyPort)?
            f) =>
        throw UnsupportedError("connectionFactory not implemented");
  • Breaking Change #​48093:
    HttpClient has a new keyLog property, which allows TLS keys to be logged
    for debugging purposes. Classes that implement HttpClient may be broken by
    this change. Add the following method to your classes to fix them:

    void set keyLog(Function(String line)? callback) =>
        throw UnsupportedError("keyLog not implemented");
  • Breaking Change #​34218:
    Constants in dart:io following the SCREAMING_CAPS convention have been
    removed (they were previously deprecated). Please use the corresponding
    lowerCamelCase constants instead.

  • Breaking Change #​48513:
    Add a new allowLegacyUnsafeRenegotiation property to SecurityContext,
    which allows TLS renegotiation for client secure sockets.

  • Add a optional keyLog parameter to SecureSocket.connect and
    SecureSocket.startConnect.

  • Deprecate SecureSocket.renegotiate and RawSecureSocket.renegotiate,
    which were no-ops.

Tools
Dart command line
  • Breaking change #​46100:
    The standalone dart2js tool has been
    marked deprecated as previously announced.
    Its replacement is the dart compile js command.
    Should you find any issues, or missing features, in the replacement
    command, kindly file an issue.

  • Breaking change #​46100:
    The standalone dartdevc tool has been marked deprecated as previously
    announced and will be deleted in a future Dart stable release. This tool
    was intended for use only by build systems like bazel, build_web_compilers
    and flutter_tools. The functionality remains available for those systems,
    but it is no longer exposed as a command-line tool in the SDK.
    Please share any concerns in the
    breaking change tracking issue.

  • Breaking change #​46100:
    The standalone dartdoc tool has been removed as
    previously announced. Its replacement is the dart doc command.

  • The template names used in the dart create command have been simplified,
    and the current template names are now the set shown below. (Note: for
    backwards compatibility the former template names can still be used.)

          [console] (default)    A command-line application.
          [package]              A package containing shared Dart libraries.
          [server-shelf]         A server app using package:shelf.
          [web]                  A web app that uses only core Dart libraries.
Analyzer
Linter

Updated the Linter to 1.22.0, which includes changes that

  • fixes null-safe variance exceptions in invariant_booleans.
  • updates depend_on_referenced_packages to treat flutter_gen as a virtual
    package, not needing an explicit dependency.
  • updates unnecessary_null_checks and
    null_check_on_nullable_type_parameter to handle
    list/set/map literals, and yield and await expressions.
  • fixes unnecessary_null_aware_assignments property-access
    false positives.
  • adds new lint: use_super_parameters.
  • adds new lint: use_enums.
  • adds new lint: use_colored_box.
  • improves performance for sort_constructors.
  • improves docs for always_use_package_imports,
    avoid_print, and avoid_relative_lib_imports .
  • updates avoid_void_async to skip main functions.
  • updates prefer_final_parameters to not super on super params.
  • updates lints for enhanced-enums and super-initializer language
    features.
  • updates unnecessary_late to report on variable names.
  • marks null_check_on_nullable_type_parameter stable.
Dartdoc

Updated dartdoc to 5.1.0, which includes changes that

  • support the enhanced enums feature
  • remove superfluous [...] links
  • fix categoryOrder option
  • display categorized extensions
  • add annotations to extensions
  • make minor improvements to performance

v2.16.2

Compare Source

This is a patch release that fixes a dart2js crash when building some Flutter
web apps (issue #​47916).

v2.16.1

Compare Source

This is a patch release that fixes an AOT precompiler crash when building some
Flutter apps (issue flutter/flutter#97301).

v2.16.0

Compare Source

Core libraries
dart:core
  • Add Error.throwWithStackTrace which can throw an
    error with an existing stack trace, instead of creating
    a new stack trace.
dart:ffi
  • Add Abi and AbiSpecificInteger. These enable specifying integers which
    have different sizes/signs per ABI (hardware and OS combination).
dart:io
  • Security advisory
    CVE-2022-0451,
    breaking change #​45410:
    HttpClient no longer transmits some headers (i.e. authorization,
    www-authenticate, cookie, cookie2) when processing redirects to a
    different domain.
  • Breaking change #​47653:
    On Windows, Directory.rename will no longer delete a directory if
    newPath specifies one. Instead, a FileSystemException will be thrown.
  • Breaking change #​47769:
    The Platform.packageRoot API has been removed. It had been marked deprecated
    in 2018, as it doesn't work with any Dart 2.x release.
  • Add optional sourcePort parameter to Socket.connect, Socket.startConnect, RawSocket.connect and RawSocket.startConnect
dart:isolate
  • Breaking change #​47769:
    The Isolate.packageRoot API has been removed. It had been marked deprecated
    in 2018, as it doesn't work with any Dart 2.x release.
Tools
Dart command line
  • Breaking change #​46100:
    The standalone dartanalyzer tool has been
    marked deprecated as previously announced.
    Its replacement is the dart analyze command.
    Should you find any issues, or missing features, in the replacement
    command, kindly file an issue.
  • Breaking change #​46100:
    The standalone dartdoc tool has been
    marked deprecated as previously announced.
    Its replacement is the dart doc command.
    Should you find any issues, or missing features, in the replacement
    command, kindly file an issue.
  • Breaking Change #​46100:
    The deprecated standalone pub tool has been removed.
    Its replacement is the dart pub command.
    Should you find any issues, or missing features, in the replacement
    command, kindly file an issue.
Pub
  • Fixed race conditions in dart pub get, dart run and dart pub global run.
    It should now be safe to run these concurrently.

  • If (when) Pub crashes it will save a verbose log in
    $PUB_CACHE/log/pub_log.txt This can be used for filing issues to the issue
    tracker.

    dart --verbose pub [command] will also cause the log file to be written.

  • dart pub global activate --source=git now takes arguments --git-path to
    specify the path of the activated package in the pubspec and --git-ref to
    specify the branch or revision to check out.

  • dart pub add can now add multiple packages in one command.

  • dart pub token add can now add a token for pub.dev.

  • dart pub uploader has been removed. To manage uploaders for a package use
    the https://pub.dev/<packagename>/admin web-interface.

  • Pub now supports a separate pubspec_overrides.yaml file that can contain
    dependency_overrides. This makes it easier to avoid checking the local
    overrides into version control.

Linter

Updated the Linter to 1.18.0, which includes changes that

  • extends camel_case_types to cover enums.
  • fixes no_leading_underscores_for_local_identifiers to not
    mis-flag field formal parameters with default values.
  • fixes prefer_function_declarations_over_variables to not
    mis-flag non-final fields.
  • improves performance for prefer_contains.
  • updates exhaustive_cases to skip deprecated values that
    redirect to other values.
  • adds new lint: unnecessary_late.
  • improves docs for prefer_initializing_formals.
  • updates secure_pubspec_urls to check issue_tracker and
    repository entries.
  • adds new lint: conditional_uri_does_not_exist.
  • improves performance for
    missing_whitespace_between_adjacent_strings.
  • adds new lint: avoid_final_parameters.
  • adds new lint: no_leading_underscores_for_library_prefixes.
  • adds new lint: no_leading_underscores_for_local_identifiers.
  • adds new lint: secure_pubspec_urls.
  • adds new lint: sized_box_shrink_expand.
  • adds new lint: use_decorated_box.
  • improves docs for omit_local_variable_types.

v2.15.1

Compare Source

This is a patch release that fixes:

  • an AOT compilation failure in some Flutter apps (issue #​47878).
  • dart pub publish for servers with a path in the URL (pr
    dart-lang/pub#3244).

v2.15.0

Compare Source

  • Security advisory
    CVE-2021-22567:
    Bidirectional Unicode text can be interpreted and compiled differently than
    how it appears in editors and code-review tools. Exploiting this an attacker
    could embed source that is invisible to a code reviewer but that modifies the
    behavior of a program in unexpected ways. Dart 2.15.0 introduces new analysis
    warnings that flags the use of these.

  • Security advisory
    CVE-2021-22568:
    A malicious third-party package repository may impersonate a user on pub.dev
    for up to one hour after the user has published a package to that third-party
    package repository using dart pub publish. As of Dart SDK version 2.15.0
    requests to third-party package repositories will no longer include an OAuth2
    access_token intended for pub.dev.

Language

The following features are new in the Dart 2.15 language version. To use
them, you must set the lower bound on the SDK constraint for your package to
2.15 or greater (sdk: '>=2.15.0 <3.0.0').

  • [Constructor tear-offs][]: Previous Dart versions allowed a method on an
    instance to be passed as a closure, and similarly for static methods. This is
    commonly referred to as "closurizing" or "tearing off" a method. Constructors
    were not previously eligible for closurization, forcing users to explicitly
    write wrapper functions when using constructo

Configuration

📅 Schedule: Branch creation - "after 6pm every weekday,every weekend" in timezone Australia/Sydney, Automerge - "after 6pm every weekday,every weekend" in timezone Australia/Sydney.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3254ec9) 100.00% compared to head (096b0fc) 100.00%.
Report is 2 commits behind head on main.

❗ Current head 096b0fc differs from pull request most recent head 6210a0b. Consider uploading reports for the commit 6210a0b to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #199   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           31        31           
=========================================
  Hits            31        31           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zeshuaro zeshuaro merged commit 0c170be into main Nov 16, 2023
7 checks passed
@zeshuaro zeshuaro deleted the renovate/dart-sdk branch November 16, 2023 12:27
zeshuaro pushed a commit that referenced this pull request Nov 16, 2023
## [2.4.0](v2.3.1...v2.4.0) (2023-11-16)

### Features

* **dart:** update dependency dart to >=2.19.6 <3.0.0 ([#199](#199)) ([0c170be](0c170be))

### Bug Fixes

* **deps:** update dependency cloud_firestore to ^4.12.2 ([#200](#200)) ([a51ab56](a51ab56))

### Miscellaneous Chores

* **deps:** lock file maintenance ([#172](#172)) ([1f6ebf1](1f6ebf1))
* **deps:** lock file maintenance ([#174](#174)) ([fdd243c](fdd243c))
* **deps:** lock file maintenance ([#180](#180)) ([a33009c](a33009c))
* **deps:** lock file maintenance ([#184](#184)) ([f77d536](f77d536))
* **deps:** lock file maintenance ([#188](#188)) ([b30c00a](b30c00a))
* **deps:** lock file maintenance ([#192](#192)) ([3ea7f43](3ea7f43))
* **deps:** lock file maintenance ([#195](#195)) ([5c9c305](5c9c305))
* **deps:** update dependency flutter_lints to v3 ([#187](#187)) ([a0a9c97](a0a9c97))
* **deps:** update dependency flutter_lints to v3.0.1 ([#194](#194)) ([524339e](524339e))
* **deps:** update dependency mocktail to v1.0.1 ([#173](#173)) ([8e45113](8e45113))
* **deps:** update dependency semantic-release to v22.0.4 ([#170](#170)) ([1d41ac6](1d41ac6))
* **deps:** update dependency semantic-release to v22.0.5 ([#171](#171)) ([977dc60](977dc60))
* **deps:** update dependency semantic-release to v22.0.6 ([#191](#191)) ([6593761](6593761))
* **deps:** update dependency semantic-release to v22.0.7 ([#193](#193)) ([b29e6a7](b29e6a7))
* **deps:** update dependency semantic-release-pub to v0.3.2 ([#176](#176)) ([d1c57c7](d1c57c7))
* **deps:** update dependency semantic-release-pub to v0.3.3 ([#182](#182)) ([158ca26](158ca26))
* **node:** update dependency node to v20 ([#185](#185)) ([b29d3d4](b29d3d4))
* **node:** update node.js to >=18.18.1 ([#179](#179)) ([9641769](9641769))
* pin node to 18.18.0 in `.nvmrc` ([#196](#196)) ([b0314a8](b0314a8))

### Continuous Integration

* **deps:** update actions/checkout digest to b4ffde6 ([#183](#183)) ([f0936d1](f0936d1))
* **deps:** update actions/setup-node action to v4 ([#186](#186)) ([ded64ca](ded64ca))
* **deps:** update subosito/flutter-action action to v2.11.0 ([#177](#177)) ([bd42950](bd42950))
* **deps:** update subosito/flutter-action action to v2.12.0 ([#189](#189)) ([0f48620](0f48620))
* **deps:** update zeshuaro/github-actions-workflows digest to 4acc72d ([#197](#197)) ([3254ec9](3254ec9))
* **deps:** update zeshuaro/github-actions-workflows digest to 68a82af ([#175](#175)) ([513bdc1](513bdc1))
* **deps:** update zeshuaro/github-actions-workflows digest to a7f44cd ([#178](#178)) ([33b5b03](33b5b03))
* **deps:** update zeshuaro/github-actions-workflows digest to cba152d ([#190](#190)) ([98d9bbc](98d9bbc))
* **renovate:** add `flutterVersion` preset ([#198](#198)) ([8609f3f](8609f3f))
@zeshuaro
Copy link
Owner

🎉 This PR is included in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant