dart-decimate 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Cargo.lock CHANGED
@@ -102,7 +102,7 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
102
102
 
103
103
  [[package]]
104
104
  name = "dart-decimate"
105
- version = "0.0.22"
105
+ version = "0.0.23"
106
106
  dependencies = [
107
107
  "clap",
108
108
  "glob",
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "dart-decimate"
3
- version = "0.0.22"
3
+ version = "0.0.23"
4
4
  edition = "2024"
5
5
  rust-version = "1.85"
6
6
  description = "Rust-native codebase intelligence for Dart and Flutter module graphs."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dart-decimate",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Rust-native codebase intelligence for Dart and Flutter module graphs.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -541,6 +541,28 @@ void main(BuildContext context) {
541
541
  .find_map(|child| first_named_node(child, kind))
542
542
  }
543
543
 
544
+ #[test]
545
+ fn object_constructor_names_include_named_argument_arrow_closure_builders()
546
+ -> Result<(), Box<dyn std::error::Error>> {
547
+ let source = r"
548
+ class HomePage extends StatelessWidget {
549
+ const HomePage({super.key});
550
+
551
+ void _show(BuildContext context) {
552
+ showModalBottomSheet<void>(
553
+ context: context,
554
+ builder: (context) => ClosureSheet(label: 'x'),
555
+ );
556
+ }
557
+ }
558
+ ";
559
+ let parsed = parse_tree(Path::new("lib/main.dart"), source)?;
560
+ let names = object_constructor_names(parsed.tree().root_node(), parsed.source());
561
+
562
+ assert!(names.iter().any(|name| name == "ClosureSheet"), "{names:?}");
563
+ Ok(())
564
+ }
565
+
544
566
  #[test]
545
567
  fn object_constructor_names_include_material_page_route_builders()
546
568
  -> Result<(), Box<dyn std::error::Error>> {