diff --git a/examples/counter/pubspec.yaml b/examples/counter/pubspec.yaml index 1fbc08ec0..270a678a0 100644 --- a/examples/counter/pubspec.yaml +++ b/examples/counter/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: dev_dependencies: build_runner: ^2.3.3 - custom_lint: ^0.5.2 + custom_lint: ^0.6.0 flutter_test: sdk: flutter freezed: ^2.3.2 diff --git a/packages/riverpod_analyzer_utils/pubspec.yaml b/packages/riverpod_analyzer_utils/pubspec.yaml index d328ce5d8..1586ee861 100644 --- a/packages/riverpod_analyzer_utils/pubspec.yaml +++ b/packages/riverpod_analyzer_utils/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: analyzer: ">=5.12.0 <7.0.0" collection: ^1.16.0 crypto: ^3.0.2 - custom_lint_core: ^0.5.2 + custom_lint_core: ^0.6.0 freezed_annotation: ^2.2.0 meta: ^1.7.0 path: ^1.8.0 diff --git a/packages/riverpod_lint/pubspec.yaml b/packages/riverpod_lint/pubspec.yaml index b8c926a17..cf8de0e54 100644 --- a/packages/riverpod_lint/pubspec.yaml +++ b/packages/riverpod_lint/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: analyzer: ">=6.0.0 <7.0.0" analyzer_plugin: ^0.11.2 collection: ^1.16.0 - custom_lint_builder: ^0.5.2 + custom_lint_builder: ^0.6.0 meta: ^1.7.0 path: ^1.8.1 riverpod: ^2.5.0 diff --git a/packages/riverpod_lint_flutter_test/pubspec.yaml b/packages/riverpod_lint_flutter_test/pubspec.yaml index c989f14da..e3d37c6fb 100644 --- a/packages/riverpod_lint_flutter_test/pubspec.yaml +++ b/packages/riverpod_lint_flutter_test/pubspec.yaml @@ -15,8 +15,8 @@ dependencies: dev_dependencies: build_runner: ^2.4.6 - custom_lint: ^0.5.2 - custom_lint_core: ^0.5.14 + custom_lint: ^0.6.0 + custom_lint_core: ^0.6.0 freezed: ^2.3.2 json_serializable: ^6.6.1 riverpod_lint: diff --git a/packages/riverpod_lint_flutter_test/test/golden.dart b/packages/riverpod_lint_flutter_test/test/golden.dart index ba6130218..1a50c4225 100644 --- a/packages/riverpod_lint_flutter_test/test/golden.dart +++ b/packages/riverpod_lint_flutter_test/test/golden.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:test/test.dart'; @@ -36,28 +35,30 @@ void testGolden( result as ResolvedUnitResult; final changes = await body(result).then((value) => value.toList()); + final source = file.readAsStringSync(); try { expect( changes, matcherNormalizedPrioritizedSourceChangeSnapshot( fileName, - encoder: const JsonEncoder.withIndent(' '), + sources: {'**': source}, + relativePath: Directory.current.path, ), ); } on TestFailure { // ignore: deprecated_member_use_from_same_package if (!goldenWrite) rethrow; - final file = File('test/$fileName'); - final source = File(sourcePath).readAsStringSync(); final result = encodePrioritizedSourceChanges( changes, - source: source, + sources: {'**': source}, + relativePath: Directory.current.path, ); - file + final golden = File('test/$fileName'); + golden ..createSync(recursive: true) ..writeAsStringSync(result); return;