| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-09-06 | 2.6 kB | |
| v7.29.0 source code.tar.gz | 2026-09-06 | 623.5 kB | |
| v7.29.0 source code.zip | 2026-09-06 | 786.9 kB | |
| Totals: 3 Items | 1.4 MB | 3 | |
[7.29.0] - 2026-09-06
Added
- Metro commands contributed by packages - A dependency can ship a
metro_commands.jsonin its package root (entries shaped likecommands.json, butscriptmust name a Dart file directly inside the package's ownbin/folder, e.g."my_command.dart"), and Metro now discovers it automatically through.dart_tool/package_config.jsonvia the newMetroService.discoverPackageCommands. Each discovered command runs asdart run <package>:<executable>from the project's working directory, so its imports resolve through the project rather than the package.MetroService.discoverCustomCommandsnow merges the project's owncommands.jsonwith every package's commands through the newMetroService.mergeCommands, withreservedCommands(built-ins) taking precedence over the project, and the project over packages; a shadowed command is dropped with a console warning naming whether "your project" or which package already claims it.NyCommandgainedpackage(nullfor project commands),description, a computedfullName(category:name), andisFromPackage. The newMetroService.customCommandsMenurenders the menu text, listing project commands under[Custom Commands]and each package's under[<package> Commands], with descriptions aligned in columns MetroService.runProcessWithArguments- Runs an executable with its arguments passed as a list rather than joined into one shell string, so an argument containing spaces survives, and returns the child process's exit code while sharing the terminal's stdio
Changed
MetroService.runCommandreturns the command's exit code - Its return type changed fromFuture<void>toFuture<int>; an action whose result is not anintis treated as success (0). Existing callers that await the call without using its result are unaffectedMetroService.discoverCommandsgainedscriptDirectory,package,defaultCategory, andworkingDirectoryparameters - All optional, so existing calls are unaffected; they let package-contributed commands resolve their scripts from the package's ownbin/folder and run from the project's directory instead of the built-inlib/app/commandsconvention
Fixed
MetroService.discoverCommandstreating same-named commands in different categories as duplicates - Duplicate detection comparednamealone, so{category: "app", name: "sync"}and{category: "demo", name: "sync"}in the samecommands.jsoncollapsed to one entry. The check now keys oncategory:name, matching the identityfullNameand the menu already use