NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #4046 most downloaded on pub.dev
Write and run automated code modifications on a codebase. Primarily geared towards updating and refactoring Dart code, but can modify any files.
Last release 14 days ago
23 Sep 2026
Release timing varies
gaps range from 3 weeks to 2.4 years
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
17 releases · first in 2019
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#97 Remove keywords from PR template
#98 Upgrade to analyzer ^14.0.0
#99 RM-396600 Release dart_codemod 1.2.2
Notes created on Wednesday, September 23 10:41 PM UTC
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#81 FEDX-685-take1 : GHA OSS changes to dart_codemod
#93 Allow analyzer 10
#94 RM-230186 Release dart_codemod 1.2.1
Notes created on Tuesday, April 28 02:00 PM UTC
One column per quarter.
Build: https://ci.webfilings.com/build/5317099 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5317099/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/5317099
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5317099/latest
Pipeline: No Pipeline
This minor release includes the following changes:
Notes created on Monday, December 18 05:58 PM UTC
PackageContextForTest to package:codemod/test.dart to help test
suggestors that require a fully resolved AST from the analyzer (for example:
suggestors using the AstVisitingSuggestor mixin with shouldResolveAst
enabled).Build: https://ci.webfilings.com/build/5138313 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5138313/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/5138313
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5138313/latest
Pipeline: No Pipeline
This minor release includes the following changes:
#66 Raise analyzer minimum & unpin meta
#67 Pin mockito 5
#69 Rollout Analyzer 5
#72 Dart 2.19
#73 RM-161448 Release dart_codemod 1.1.0 with Dart 3 support
Notes created on Tuesday, October 31 06:07 PM UTC
Build: https://ci.webfilings.com/build/3932548 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3932548/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/3932548
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3932548/latest
Pipeline: No Pipeline
This patch release includes the following changes:
#64 Analyzer v3, v4, and v5
#65 RM-161063 Release dart_codemod 1.0.11
Notes created on Thursday, September 22 10:39 PM UTC
Build: https://ci.webfilings.com/build/3924638 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3924638/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/3924638
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3924638/latest
Pipeline: No Pipeline
This patch release includes the following changes:
Notes created on Tuesday, September 20 08:57 PM UTC
Raise Dart SDK minimum to 2.11.0
Include file path in error message when parsing a Dart file fails.
AstVisitingSuggestor.context will throw a StateError if accessed outside one of the visitor methods.
AstVisitingSuggestor.context will throw a StateError if accessed outside
one of the visitor methods.Fix invalid file path error on windows when applying patches.
Breaking: runInteractiveCodemod and runInteractiveCodemodSequence are both now async.
Breaking: runInteractiveCodemod and runInteractiveCodemodSequence are
both now async.
Breaking: Suggestor is now a function typedef instead of a class.
Addtionally, it takes the new FileContext type as its only parameter
(previously the generatePatches method took a SourceFile) and now must
return a Stream<Patch> instead of Iterable<Patch>.
If you were extending Suggestor, you can either change the class to a
function like so:
final String licenseHeader = '...';
- class LicenseHeaderInserter implements Suggestor {
- @override
- bool shouldSkip(String sourceFileContents) =>
- sourceFileContents.trimLeft().startsWith(licenseHeader);
-
- @override
- Iterable<Patch> generatePatches(SourceFile sourceFile) sync* {
- yield Patch(sourceFile, sourceFile.span(0, 0), licenseHeader);
- }
- }
+ Stream<Patch> licenseHeaderInserter(FileContext context) async* {
+ // Skip if license header already exists.
+ if (context.sourceText.trimLeft().startsWith(licenseHeader)) return;
+
+ yield Patch(licenseHeader, 0, 0);
+ }
Or rename the generatePatches() method to call() so that the
class is callable like a function:
final String licenseHeader = '...';
- class LicenseHeaderInserter implements Suggestor {
+ class LicenseHeaderInserter {
- @override
bool shouldSkip(String sourceFileContents) =>
sourceFileContents.trimLeft().startsWith(licenseHeader);
- @override
- Iterable<Patch> generatePatches(SourceFile sourceFile) sync* {
+ Stream<Patch> call(FileContext context) async* {
+ if (shouldSkip(context.sourceText)) return;
- yield Patch(sourceFile, sourceFile.span(0, 0), licenseHeader);
+ yield Patch(licenseHeader, 0, 0);
}
}
Breaking: Simplify the Patch class to now only encapsulate the updated
text, start offset, and end offset.
- yield Patch(sourceFile, sourceFile.span(5, 10), 'updated text');
+ yield Patch('updated text', 5, 10);
Breaking: Rename AstVisitingSuggestorMixin to AstVisitingSuggestor
since the Mixin suffix was redundant.
Breaking: Remove AggregateSuggestor class in favor of an
aggregate(Iterable<Suggestor> suggestors) function.
Breaking: Move applyPatches from the main package:codemod/codemod.dart
entrypoint to the new package:codemod/test.dart entrypoint to make its
intended usage clear.
Add a shouldResolveAst(FileContext context) method to
AstVisitingSuggestor. Defaults to false (since resolving is slower), but can
be overridden to true if the fully resolved AST is needed.
Add package:codemod/test.dart entrypoint for testing suggestors. This
entrypoint exports three functions:
Future<FileContext> fileContextForTest(String name, String contents)
void expectSuggestorGeneratesPatches(Suggestor suggestor, FileContext context, dynamic resultMatcher)
String applyPatches(SourceFile sourceFile, Iterable<Patch> patches)
The first two should be sufficient for testing most suggestors.
Use GitHub Actions for CI (remove Travis CI).
Breaking Change: remove the FileQuery class. The runInteractiveCodemod() function now expects an Iterable instead of a FileQuery. This is intended to…
Breaking Change: remove the FileQuery class. The
runInteractiveCodemod() function now expects an Iterable<File> instead of a
FileQuery. This is intended to simplify consumption; package:glob
can be used to easily query for the desired files.
Breaking Change: remove createPathFilter() - this was used with FileQuery and can be replaced by custom logic now that
runInteractiveCodemod() accepts an Iterable<File>.
Breaking Change: remove isDartFile() - use package:glob
instead to target files with the .dart extension (e.g. Glob('**.dart')).
Add a filePathsFromGlob() utility function that takes a Glob instance and
returns the file paths matched by the glob, but filtered to exclude hidden
files (e.g. files in .dart_tool/). This is intended to serve the most common
use case of running codemods on Dart projects, e.g.:
runInteractiveCodemod(
filePathsFromGlob(Glob('**.dart', recursive: true)),
suggestor);
Widen Analyzer dependency range to include 0.39.x.
Make Patch override operator == and hashCode so that instances can be
compared for equality. If two Patch instances target the same span in the same
file and have the same updatedText, they are considered equal.
AstVisitingSuggestorMixin now de-duplicates patches suggested for each
source file. This can be useful for recursive and generalizing AST visitors that
may end up suggesting duplicate patches in parts of the AST that get handled by
multiple visit methods.
Improve the error/help output when overlapping patches are found.
Widen Analyzer dependency range from ^0.37.0 to >=0.37.0 <0.39.0.
Widen Analyzer dependency range from ^0.37.0 to >=0.37.0 <0.39.0.
Exclude build/ folder when a codemod gets run.
Prompts the user to either skip overlapping patches or quit when they are found.
Codemod authors can now augment the help output and the changes required output via runInteractiveCodemod() and runInteractiveCodemodSequence() using
Codemod authors can now augment the help output and the changes required
output via runInteractiveCodemod() and runInteractiveCodemodSequence()
using the optional additionalHelpOutput and changesRequiredOutput params.
If additionalHelpOutput is given, it will be printed to stderr after the
default help output when the codemod is run with the -h|--help flag.
If changesRequiredOutput is given, it will be printed to stderr after the
default output when the codemod is run with the --fail-on-changes flag and
changes are in fact required.
Fix a typing issue with the AggregateSuggestor's constructor param.
Fix a typing issue with the AggregateSuggestor's constructor param.
Add tests for AggregateSuggestor and AstVisitingSuggestorMixin
Update pubspec.yaml for initial OSS release.
pubspec.yaml for initial OSS release.Your coding agent can read these notes before it upgrades. Set up the MCP server →