Repository: dart-lang/i18n

Issue:
intl_translation: bump analyzer. Flutter 3.16.0
**Describe the bug**

```
Analyzer language version: 3.1.0
SDK language version: 3.2.0

Please update to the latest `analyzer` version (6.3.0) by running
`flutter packages upgrade`.

If you are not getting the latest version by running the above command, you
can try adding a constraint like the following to your pubspec to start
diagnosing why you can't get the latest version:

dev_dependencies:
  analyzer: ^6.3.0
```

```
Because intl_translation 0.18.2 depends on analyzer ^5.2.0 and no versions of intl_translation match >0.18.2 <0.19.0, intl_translation ^0.18.2 requires analyzer ^5.2.0.
So, because car depends on both intl_translation ^0.18.2 and analyzer ^6.3.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on analyzer: flutter pub add dev:analyzer:^5.13.0
```

**System info**
`flutter doctor `
```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-UA)
```

`pubspec.yaml`
```
dev_dependencies:
  bloc_test: ^9.1.5
  build_runner: ^2.4.6
  drift_dev: ^2.13.1
  flutter_gen_runner: ^5.3.1
  flutter_launcher_icons: ^0.13.1
  flutter_lints: ^3.0.1
  flutter_test:
    sdk: flutter
  freezed: ^2.4.5
  intl_translation: ^0.18.2
  json_serializable: ^6.7.1
  mocktail: ^1.0.1
```



Fix patch:
diff --git a/pkgs/intl_translation/CHANGELOG.md b/pkgs/intl_translation/CHANGELOG.md
index deb284e2..ff46040c 100644
--- a/pkgs/intl_translation/CHANGELOG.md
+++ b/pkgs/intl_translation/CHANGELOG.md
@@ -1,7 +1,9 @@
-## 0.19.0-dev
+## 0.19.0-wip
   * Always generate null safe code, remove `null-safe` flag.
   * Add example for `he` locale.
   * MessageExtraction: add set of error codes to be ignored in analysis.
+  * Upgrade dependencies on `analyzer` and `lints`.
+  * Fix pubspec `repository` url.
 
 ## 0.18.1
   * Update analyzer dependency to `5.2.0`.
diff --git a/pkgs/intl_translation/bin/make_examples_const.dart b/pkgs/intl_translation/bin/make_examples_const.dart
index 0a54de81..bc8404a5 100644
--- a/pkgs/intl_translation/bin/make_examples_const.dart
+++ b/pkgs/intl_translation/bin/make_examples_const.dart
@@ -4,6 +4,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /// Converts the examples parameter for Intl messages to be const.
+library;
+
 import 'dart:io';
 
 import 'package:args/args.dart';
diff --git a/pkgs/intl_translation/bin/rewrite_intl_messages.dart b/pkgs/intl_translation/bin/rewrite_intl_messages.dart
index d2ddcf69..00a385df 100644
--- a/pkgs/intl_translation/bin/rewrite_intl_messages.dart
+++ b/pkgs/intl_translation/bin/rewrite_intl_messages.dart
@@ -10,6 +10,8 @@
 /// It takes as input a single source Dart file and rewrites any
 /// Intl.message or related calls to automatically include the name and args
 /// parameters and writes the result to stdout.
+library;
+
 import 'dart:io';
 
 import 'package:args/args.dart';
diff --git a/pkgs/intl_translation/lib/src/message_rewriter.dart b/pkgs/intl_translation/lib/src/message_rewriter.dart
index 0622e8ee..baf95a79 100644
--- a/pkgs/intl_translation/lib/src/message_rewriter.dart
+++ b/pkgs/intl_translation/lib/src/message_rewriter.dart
@@ -4,6 +4,8 @@
 
 /// Code to rewrite Intl.message calls adding the name and args parameters
 /// automatically, primarily used by the transformer.
+library;
+
 import 'package:analyzer/dart/analysis/utilities.dart';
 
 import '../extract_messages.dart';
diff --git a/pkgs/intl_translation/lib/src/messages/complex_message.dart b/pkgs/intl_translation/lib/src/messages/complex_message.dart
index f1f982b9..00f678cc 100644
--- a/pkgs/intl_translation/lib/src/messages/complex_message.dart
+++ b/pkgs/intl_translation/lib/src/messages/complex_message.dart
@@ -7,7 +7,7 @@ import 'message.dart';
 /// Abstract class for messages with internal structure, representing the
 /// main Intl.message call, plurals, and genders.
 abstract class ComplexMessage extends Message {
-  ComplexMessage(parent) : super(parent);
+  ComplexMessage(super.parent);
 
   /// When we create these from strings or from AST nodes, we want to look up
   /// and set their attributes by string names, so we override the indexing
diff --git a/pkgs/intl_translation/lib/src/messages/composite_message.dart b/pkgs/intl_translation/lib/src/messages/composite_message.dart
index b122b276..76191947 100644
--- a/pkgs/intl_translation/lib/src/messages/composite_message.dart
+++ b/pkgs/intl_translation/lib/src/messages/composite_message.dart
@@ -9,9 +9,7 @@ import 'message.dart';
 class CompositeMessage extends Message {
   List<Message> pieces;
 
-  CompositeMessage.withParent(parent)
-      : pieces = const [],
-        super(parent);
+  CompositeMessage.withParent(super.parent) : pieces = const [];
   CompositeMessage(this.pieces, [super.parent]) {
     for (var x in pieces) {
       x.parent = this;
diff --git a/pkgs/intl_translation/lib/src/messages/submessages/gender.dart b/pkgs/intl_translation/lib/src/messages/submessages/gender.dart
index 3be28549..5a8bd64a 100644
--- a/pkgs/intl_translation/lib/src/messages/submessages/gender.dart
+++ b/pkgs/intl_translation/lib/src/messages/submessages/gender.dart
@@ -15,8 +15,7 @@ class Gender extends SubMessage {
   /// clauses. Each clause is expected to be a list whose first element is a
   /// variable name and whose second element is either a [String] or
   /// a list of strings and [Message] or [VariableSubstitution].
-  Gender.from(String mainArgument, List clauses, [Message? parent])
-      : super.from(mainArgument, clauses, parent);
+  Gender.from(super.mainArgument, super.clauses, [super.parent]) : super.from();
 
   Message? female;
   Message? male;
diff --git a/pkgs/intl_translation/lib/src/messages/submessages/plural.dart b/pkgs/intl_translation/lib/src/messages/submessages/plural.dart
index dad36c92..3a2ebdc7 100644
--- a/pkgs/intl_translation/lib/src/messages/submessages/plural.dart
+++ b/pkgs/intl_translation/lib/src/messages/submessages/plural.dart
@@ -7,8 +7,7 @@ import 'submessage.dart';
 
 class Plural extends SubMessage {
   Plural() : super.from('', [], null);
-  Plural.from(String mainArgument, List clauses, [Message? parent])
-      : super.from(mainArgument, clauses, parent);
+  Plural.from(super.mainArgument, super.clauses, [super.parent]) : super.from();
 
   Message? zero;
   Message? one;
diff --git a/pkgs/intl_translation/lib/src/messages/submessages/select.dart b/pkgs/intl_translation/lib/src/messages/submessages/select.dart
index b92ef724..e3682d4a 100644
--- a/pkgs/intl_translation/lib/src/messages/submessages/select.dart
+++ b/pkgs/intl_translation/lib/src/messages/submessages/select.dart
@@ -17,8 +17,7 @@ class Select extends SubMessage {
   /// clauses. Each clause is expected to be a list whose first element is a
   /// variable name and whose second element is either a String or
   /// a list of strings and [Message]s or [VariableSubstitution]s.
-  Select.from(String mainArgument, List clauses, [Message? parent])
-      : super.from(mainArgument, clauses, parent);
+  Select.from(super.mainArgument, super.clauses, [super.parent]) : super.from();
 
   Map<String, Message> cases = <String, Message>{};
 
diff --git a/pkgs/intl_translation/pubspec.yaml b/pkgs/intl_translation/pubspec.yaml
index 36483ad4..860f68bf 100644
--- a/pkgs/intl_translation/pubspec.yaml
+++ b/pkgs/intl_translation/pubspec.yaml
@@ -1,21 +1,21 @@
 name: intl_translation
-version: 0.19.0-dev
+version: 0.19.0-wip
 description: >-
   Contains code to deal with internationalized/localized messages,
   date and number formatting and parsing, bi-directional text, and
   other internationalization issues.
-repository: https://github.com/dart-lang/intl_translation
+repository: https://github.com/dart-lang/i18n/tree/main/pkgs/intl_translation
 
 environment:
-  sdk: '>=2.18.0 <3.0.0'
+  sdk: '>=2.19.0 <4.0.0'
 
 dependencies:
-  analyzer: ^5.2.0
+  analyzer: ^6.3.0
   args: ^2.0.0
   dart_style: ^2.0.0
   intl: ^0.18.0
   path: ^1.0.0
 
 dev_dependencies:
-  lints: ^2.0.0
+  lints: ^3.0.0
   test: ^1.0.0


Test patch:
diff --git a/pkgs/intl_translation/test/generate_localized/code_map_test.dart b/pkgs/intl_translation/test/generate_localized/code_map_test.dart
index 3ca1aafd..8c180f20 100644
--- a/pkgs/intl_translation/test/generate_localized/code_map_test.dart
+++ b/pkgs/intl_translation/test/generate_localized/code_map_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /// An application using the code map messages.
+library;
+
 import 'package:intl/intl.dart';
 import 'package:test/test.dart';
 
diff --git a/pkgs/intl_translation/test/message_extraction/examples_parsing_test.dart b/pkgs/intl_translation/test/message_extraction/examples_parsing_test.dart
index 471956c7..de4f493e 100644
--- a/pkgs/intl_translation/test/message_extraction/examples_parsing_test.dart
+++ b/pkgs/intl_translation/test/message_extraction/examples_parsing_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@Timeout(Duration(seconds: 180))
-
 /// Test for parsing the examples argument from an Intl.message call. Very
 /// minimal so far.
+@Timeout(Duration(seconds: 180))
+library;
 
 import 'dart:io';
 
diff --git a/pkgs/intl_translation/test/message_extraction/make_hardcoded_translation.dart b/pkgs/intl_translation/test/message_extraction/make_hardcoded_translation.dart
index 9a8c63b2..b83bd4cb 100644
--- a/pkgs/intl_translation/test/message_extraction/make_hardcoded_translation.dart
+++ b/pkgs/intl_translation/test/message_extraction/make_hardcoded_translation.dart
@@ -7,6 +7,7 @@
 /// extract_message.dart for the files sample_with_messages.dart and
 /// part_of_sample_with_messages.dart and writing out hard-coded translations
 /// for German and French locales.
+library;
 
 import 'dart:convert';
 import 'dart:io';
diff --git a/pkgs/intl_translation/test/message_extraction/message_extraction_flutter_test.dart b/pkgs/intl_translation/test/message_extraction/message_extraction_flutter_test.dart
index 816d185a..f811e3f5 100644
--- a/pkgs/intl_translation/test/message_extraction/message_extraction_flutter_test.dart
+++ b/pkgs/intl_translation/test/message_extraction/message_extraction_flutter_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@Timeout(Duration(seconds: 180))
-
 /// A test for message extraction and code generation using generated
 /// JSON rather than functions
+@Timeout(Duration(seconds: 180))
+library;
 
 import 'package:test/test.dart';
 
diff --git a/pkgs/intl_translation/test/message_extraction/message_extraction_json_test.dart b/pkgs/intl_translation/test/message_extraction/message_extraction_json_test.dart
index a2c7d521..25961546 100644
--- a/pkgs/intl_translation/test/message_extraction/message_extraction_json_test.dart
+++ b/pkgs/intl_translation/test/message_extraction/message_extraction_json_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-@Timeout(Duration(seconds: 180))
-
 /// A test for message extraction and code generation using generated
 /// JSON rather than functions
+@Timeout(Duration(seconds: 180))
+library;
 
 import 'package:test/test.dart';
 
diff --git a/pkgs/intl_translation/test/message_extraction/part_of_sample_with_messages.dart b/pkgs/intl_translation/test/message_extraction/part_of_sample_with_messages.dart
index d99aa584..20daed4a 100644
--- a/pkgs/intl_translation/test/message_extraction/part_of_sample_with_messages.dart
+++ b/pkgs/intl_translation/test/message_extraction/part_of_sample_with_messages.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.part of sample;
 
-part of sample;
+part of 'sample_with_messages.dart';
 
 class Person {
   String name;
diff --git a/pkgs/intl_translation/test/two_components/component.dart b/pkgs/intl_translation/test/two_components/component.dart
index 737927c4..8ffa360b 100644
--- a/pkgs/intl_translation/test/two_components/component.dart
+++ b/pkgs/intl_translation/test/two_components/component.dart
@@ -4,6 +4,8 @@
 
 /// A component which should have its own separate messages, with their own
 /// translations.
+library;
+
 import 'package:intl/intl.dart';
 
 import 'component_messages_all.dart';
diff --git a/pkgs/intl_translation/test/two_components/initialize_child_test.dart b/pkgs/intl_translation/test/two_components/initialize_child_test.dart
index e56cb349..106b6ffc 100644
--- a/pkgs/intl_translation/test/two_components/initialize_child_test.dart
+++ b/pkgs/intl_translation/test/two_components/initialize_child_test.dart
@@ -7,6 +7,8 @@
 /// This is not actually related to the two components testing, but it's
 /// convenient to put it here because there's already a hard-coded
 /// message here.
+library;
+
 import 'package:intl/intl.dart';
 import 'package:test/test.dart';
 
diff --git a/pkgs/intl_translation/test/two_components/main_app_test.dart b/pkgs/intl_translation/test/two_components/main_app_test.dart
index 262ad482..98d55822 100644
--- a/pkgs/intl_translation/test/two_components/main_app_test.dart
+++ b/pkgs/intl_translation/test/two_components/main_app_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /// An application using the component
+library;
+
 import 'package:intl/intl.dart';
 import 'package:test/test.dart';