Skip to content

Commit e126b85

Browse files
committed
v9.0.1: Enhanced fix_data.yaml for comprehensive Command subclass coverage
Added fix transformations for CommandAsync, CommandSync, and UndoableCommand to ensure dart fix properly migrates deprecated API usage when commands are accessed through property getters. This resolves issues where some command usages weren't being fixed by dart fix when the command instance came from a property getter rather than direct variable access.
1 parent d95d538 commit e126b85

File tree

3 files changed

+167
-1
lines changed

3 files changed

+167
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[9.0.1] - 2025-11-14
2+
3+
### Fixes
4+
5+
- **Enhanced fix_data.yaml**: Added comprehensive coverage for all Command subclasses (`CommandAsync`, `CommandSync`, `UndoableCommand`) to ensure `dart fix` properly migrates deprecated API usage when commands are accessed through property getters
6+
17
[9.0.0] - 2025-11-14
28

39
### Breaking Changes - API Terminology Migration (execute → run)

lib/fix_data.yaml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,36 @@ transforms:
2020
- kind: 'rename'
2121
newName: 'run'
2222

23+
- title: 'Rename execute to run (CommandAsync)'
24+
date: 2025-11-13
25+
element:
26+
uris: ['package:command_it/command_it.dart']
27+
method: 'execute'
28+
inClass: 'CommandAsync'
29+
changes:
30+
- kind: 'rename'
31+
newName: 'run'
32+
33+
- title: 'Rename execute to run (CommandSync)'
34+
date: 2025-11-13
35+
element:
36+
uris: ['package:command_it/command_it.dart']
37+
method: 'execute'
38+
inClass: 'CommandSync'
39+
changes:
40+
- kind: 'rename'
41+
newName: 'run'
42+
43+
- title: 'Rename execute to run (UndoableCommand)'
44+
date: 2025-11-13
45+
element:
46+
uris: ['package:command_it/command_it.dart']
47+
method: 'execute'
48+
inClass: 'UndoableCommand'
49+
changes:
50+
- kind: 'rename'
51+
newName: 'run'
52+
2353
- title: 'Rename executeWithFuture to runAsync'
2454
date: 2025-11-13
2555
element:
@@ -30,6 +60,26 @@ transforms:
3060
- kind: 'rename'
3161
newName: 'runAsync'
3262

63+
- title: 'Rename executeWithFuture to runAsync (CommandAsync)'
64+
date: 2025-11-13
65+
element:
66+
uris: ['package:command_it/command_it.dart']
67+
method: 'executeWithFuture'
68+
inClass: 'CommandAsync'
69+
changes:
70+
- kind: 'rename'
71+
newName: 'runAsync'
72+
73+
- title: 'Rename executeWithFuture to runAsync (UndoableCommand)'
74+
date: 2025-11-13
75+
element:
76+
uris: ['package:command_it/command_it.dart']
77+
method: 'executeWithFuture'
78+
inClass: 'UndoableCommand'
79+
changes:
80+
- kind: 'rename'
81+
newName: 'runAsync'
82+
3383
# ============================================================================
3484
# Property/Getter Renames
3585
# ============================================================================
@@ -44,6 +94,36 @@ transforms:
4494
- kind: 'rename'
4595
newName: 'errors'
4696

97+
- title: 'Rename thrownExceptions to errors (CommandAsync)'
98+
date: 2025-11-13
99+
element:
100+
uris: ['package:command_it/command_it.dart']
101+
getter: 'thrownExceptions'
102+
inClass: 'CommandAsync'
103+
changes:
104+
- kind: 'rename'
105+
newName: 'errors'
106+
107+
- title: 'Rename thrownExceptions to errors (CommandSync)'
108+
date: 2025-11-13
109+
element:
110+
uris: ['package:command_it/command_it.dart']
111+
getter: 'thrownExceptions'
112+
inClass: 'CommandSync'
113+
changes:
114+
- kind: 'rename'
115+
newName: 'errors'
116+
117+
- title: 'Rename thrownExceptions to errors (UndoableCommand)'
118+
date: 2025-11-13
119+
element:
120+
uris: ['package:command_it/command_it.dart']
121+
getter: 'thrownExceptions'
122+
inClass: 'UndoableCommand'
123+
changes:
124+
- kind: 'rename'
125+
newName: 'errors'
126+
47127
- title: 'Rename isExecuting to isRunning'
48128
date: 2025-11-13
49129
element:
@@ -54,6 +134,26 @@ transforms:
54134
- kind: 'rename'
55135
newName: 'isRunning'
56136

137+
- title: 'Rename isExecuting to isRunning (CommandAsync)'
138+
date: 2025-11-13
139+
element:
140+
uris: ['package:command_it/command_it.dart']
141+
getter: 'isExecuting'
142+
inClass: 'CommandAsync'
143+
changes:
144+
- kind: 'rename'
145+
newName: 'isRunning'
146+
147+
- title: 'Rename isExecuting to isRunning (UndoableCommand)'
148+
date: 2025-11-13
149+
element:
150+
uris: ['package:command_it/command_it.dart']
151+
getter: 'isExecuting'
152+
inClass: 'UndoableCommand'
153+
changes:
154+
- kind: 'rename'
155+
newName: 'isRunning'
156+
57157
- title: 'Rename isExecutingSync to isRunningSync'
58158
date: 2025-11-13
59159
element:
@@ -64,6 +164,36 @@ transforms:
64164
- kind: 'rename'
65165
newName: 'isRunningSync'
66166

167+
- title: 'Rename isExecutingSync to isRunningSync (CommandAsync)'
168+
date: 2025-11-13
169+
element:
170+
uris: ['package:command_it/command_it.dart']
171+
getter: 'isExecutingSync'
172+
inClass: 'CommandAsync'
173+
changes:
174+
- kind: 'rename'
175+
newName: 'isRunningSync'
176+
177+
- title: 'Rename isExecutingSync to isRunningSync (CommandSync)'
178+
date: 2025-11-13
179+
element:
180+
uris: ['package:command_it/command_it.dart']
181+
getter: 'isExecutingSync'
182+
inClass: 'CommandSync'
183+
changes:
184+
- kind: 'rename'
185+
newName: 'isRunningSync'
186+
187+
- title: 'Rename isExecutingSync to isRunningSync (UndoableCommand)'
188+
date: 2025-11-13
189+
element:
190+
uris: ['package:command_it/command_it.dart']
191+
getter: 'isExecutingSync'
192+
inClass: 'UndoableCommand'
193+
changes:
194+
- kind: 'rename'
195+
newName: 'isRunningSync'
196+
67197
- title: 'Rename canExecute to canRun'
68198
date: 2025-11-13
69199
element:
@@ -74,6 +204,36 @@ transforms:
74204
- kind: 'rename'
75205
newName: 'canRun'
76206

207+
- title: 'Rename canExecute to canRun (CommandAsync)'
208+
date: 2025-11-13
209+
element:
210+
uris: ['package:command_it/command_it.dart']
211+
getter: 'canExecute'
212+
inClass: 'CommandAsync'
213+
changes:
214+
- kind: 'rename'
215+
newName: 'canRun'
216+
217+
- title: 'Rename canExecute to canRun (CommandSync)'
218+
date: 2025-11-13
219+
element:
220+
uris: ['package:command_it/command_it.dart']
221+
getter: 'canExecute'
222+
inClass: 'CommandSync'
223+
changes:
224+
- kind: 'rename'
225+
newName: 'canRun'
226+
227+
- title: 'Rename canExecute to canRun (UndoableCommand)'
228+
date: 2025-11-13
229+
element:
230+
uris: ['package:command_it/command_it.dart']
231+
getter: 'canExecute'
232+
inClass: 'UndoableCommand'
233+
changes:
234+
- kind: 'rename'
235+
newName: 'canRun'
236+
77237
# ============================================================================
78238
# Factory Method Parameter Renames (12 methods)
79239
# ============================================================================

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: command_it
22
description: command_it is a way to manage your state based on `ValueListenable` and the `Command` design pattern. It is a rebranding of flutter_command.
3-
version: 9.0.0
3+
version: 9.0.1
44
homepage: https://github.com/flutter-it/command_it
55

66
screenshots:

0 commit comments

Comments
 (0)