Update usage of json_annotatoin, bump pkg:lints (dart-lang/pubspec_parse#89)

diff --git a/pkgs/pubspec_parse/.github/workflows/test-package.yml b/pkgs/pubspec_parse/.github/workflows/test-package.yml
index bdb6946..0dab9a9 100644
--- a/pkgs/pubspec_parse/.github/workflows/test-package.yml
+++ b/pkgs/pubspec_parse/.github/workflows/test-package.yml
@@ -46,7 +46,7 @@
       fail-fast: false
       matrix:
         os: [ubuntu-latest]
-        sdk: [2.17.0, dev]
+        sdk: [2.18.0, dev]
     steps:
       - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
       - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
diff --git a/pkgs/pubspec_parse/CHANGELOG.md b/pkgs/pubspec_parse/CHANGELOG.md
index 117fd12..5cf26e0 100644
--- a/pkgs/pubspec_parse/CHANGELOG.md
+++ b/pkgs/pubspec_parse/CHANGELOG.md
@@ -1,7 +1,7 @@
 ## 1.2.2-dev
 
-- Update SDK requirement to `2.17.0`.
-- Fix the unit tests for Dart 3.0.0.
+- Require Dart SDK >= 2.18.0
+- Required `json_annotation: ^4.8.0`
 
 ## 1.2.1
 
diff --git a/pkgs/pubspec_parse/analysis_options.yaml b/pkgs/pubspec_parse/analysis_options.yaml
index fdc60e0..cf5c91f 100644
--- a/pkgs/pubspec_parse/analysis_options.yaml
+++ b/pkgs/pubspec_parse/analysis_options.yaml
@@ -35,7 +35,6 @@
     - prefer_const_declarations
     - prefer_expression_function_bodies
     - prefer_final_locals
-    - prefer_interpolation_to_compose_strings
     - prefer_relative_imports
     - require_trailing_commas
     - sort_pub_dependencies
@@ -43,7 +42,6 @@
     - throw_in_finally
     - unnecessary_await_in_return
     - unnecessary_lambdas
-    - unnecessary_null_aware_assignments
     - unnecessary_parenthesis
     - unnecessary_statements
     - use_string_buffers
diff --git a/pkgs/pubspec_parse/lib/src/dependency.dart b/pkgs/pubspec_parse/lib/src/dependency.dart
index 8b59f73..e345dfd 100644
--- a/pkgs/pubspec_parse/lib/src/dependency.dart
+++ b/pkgs/pubspec_parse/lib/src/dependency.dart
@@ -223,7 +223,7 @@
   @JsonKey(fromJson: parseGitUriOrNull, disallowNullValue: true)
   final Uri? url;
 
-  @JsonKey(ignore: true)
+  @JsonKey(includeFromJson: false, includeToJson: false)
   String? _nameOfPackage;
 
   /// The name of this package on the package repository.
diff --git a/pkgs/pubspec_parse/pubspec.yaml b/pkgs/pubspec_parse/pubspec.yaml
index 03f61bd..9614044 100644
--- a/pkgs/pubspec_parse/pubspec.yaml
+++ b/pkgs/pubspec_parse/pubspec.yaml
@@ -6,19 +6,19 @@
 repository: https://github.com/dart-lang/pubspec_parse
 
 environment:
-  sdk: '>=2.17.0 <3.0.0'
+  sdk: '>=2.18.0 <3.0.0'
 
 dependencies:
   checked_yaml: ^2.0.1
   collection: ^1.15.0
-  json_annotation: ^4.6.0
+  json_annotation: ^4.8.0
   pub_semver: ^2.0.0
   yaml: ^3.0.0
 
 dev_dependencies:
   build_runner: ^2.0.3
   build_verify: '>=2.0.0 <4.0.0'
-  json_serializable: ^6.0.0
+  json_serializable: ^6.6.0
   lints: ^2.0.0
   path: ^1.5.1
   # Needed because we are configuring `combining_builder`