Update dependency dart to v3.12.0 - #139
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.11.6→3.12.0Release Notes
dart-lang/sdk (dart)
v3.12.0Compare Source
Released on: Unreleased
Language
Private named parameters
Dart now supports private named parameters. Before 3.12, it was an error to
have a named parameter that starts with an underscore:
This means that, before 3.12, initializing a private field from
a named parameter required an explicit initializer list:
All the initializer list is doing is removing the leading
_.In Dart 3.12, the language does that for you. Now you can write:
This code behaves exactly like the previous example. The initialized fields are
private, but the argument names written at the call site are public:
Libraries
dart:coreRegExpimplementation now supportsmodifier spans and duplicate named capture groups.
dart:js_interopBreaking change in extension name of
isA:isAis moved fromJSAnyUtilityExtensiontoNullableObjectUtilExtensionto supporttype-checking any
Object?.isA<JSObject>()also now handles JS objectswith no prototypes correctly and
isA<JSAny>()does a non-trivial check tomake sure the value is a JS value. See #56905 for more details. As
JSAnyUtilityExtensionis onJSAny?andNullableObjectUtilExtensionis onthe supertype
Object?, this change is only breaking if users referred to theextension name directly, either through applying the extension directly or
through using
show/hidedirectives.isA<JSExportedDartFunction>()now checks whether the function isactually a JS wrapper function that is returned from
Function.toJSorFunction.toJSCaptureThis.Added
JSIterableProtocol,JSIterable,JSIteratorProtocol,JSIterator,and
JSIteratorResulttypes to model JavaScript's iteration protocols.JSArrayandJSStringnow implementJSIterable.Added extension types to provide
Iterable.toJSIterable,JSIterable.toDartIterable,Iterator.toJSIterator, andJSIterator.toDartIterator.Tools
Analyzer
The new
simple_directive_pathslint and its associated fixflag and simplify unnecessarily complex
importandexportpaths,such as those containing redundant
./or backtracking../segments.Use
dart fix --code=simple_directive_paths(with either--dry-runor--apply) to bulk fix existing lint violations.The
prefer_initializing_formalslint rule highlights named parametersthat could be private named parameters.
Use
dart fix --code=prefer_initializing_formals(with either--dry-runor--apply) to bulk fix existing lint violations.Violations of the
avoid_final_parameterslint can now befixed with
dart fix --code=avoid_final_parameters.The analyzer now warns when a function that contains a
parameter annotated with
@mustBeConstis torn off.The
invalid_runtime_check_with_js_interop_typesrule now checks for JSinterop types used in a catch clause's on-type and instructs users to
use
isAfor type checks instead.Analyzer plugins: Initial support for 'print debugging' via new sections in
the "Plugins" Insights (Diagnostics) page. When a plugin is computing lint
and warning diagnostics,
printcalls are now redirected to the analysisserver, which presents the messages in the appropriate plugin's section on
the Plugins page.
Improved support for extension types in many existing lint rules.
Improved support for null-aware elements in existing lint rules.
The analysis server starts up faster with the help of improved analysis
options file caching. The improvement depends on the number of analysis
options files in the workspace, and the number of
included analysis optionsfiles. The improvement is greater for systems with slower disk access.
Various other improvements to analysis performance.
Pub
dart pub cache repairnow, by default, only repairs thepackages referenced by the current project's
pubspec.lockfile.For the old behavior of repairing all packages, use the
--allflag.dart pub addanddart pub unpacknow accept@as an alternative to:for separating a package name from its version constraint.
dart2wasm
deferred modules. The embedder now takes
loadDeferredModulesinstead ofloadDeferredModulewhere the new function should now expect an array ofmodule names rather than individual module names. All the module loading
functions must now also accept an
instantiatorcallback to which theyshould pass the loaded results.
dart2js
JSExportedDartFunction.toDartsometimes incorrectly returned the originalDart function even if the wrapper JS function was cast from a call to the
deprecated
allowInterop. Instead, to be consistent with DDC and dart2wasm,it now throws if the wrapper JS function wasn't a result of
Function.toJSorFunction.toJSCaptureThis.Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.