Repository navigation
Add pre-activation global Flutter commands to package.json - #21
Merged
Merged
Conversation
DanTupBot
commented
Nov 12, 2026
DanTupBot
left a comment
Collaborator
Author
There was a problem hiding this comment.
LGTM!
Reviewed the manifest changes and verified both stages end-to-end in VS Code 1.146.0 (alongside inspecting VS Code's MenuRegistry / CommandService implementation):
- Overlap with
Dart-Code(short-term): Tested in both extension load orders (DartbeforeFlutterandFlutterbeforeDart). Each offlutter.createProject,flutter.doctor, andflutter.upgradeappears once in the Command Palette before and after activation (MenuRegistry._appendImplicitItemsskips commands already present inmenus.commandPalette),vscode.extension-editingreports zeropackage.jsondiagnostics, and VS Code only logs[info]messages for the duplicate command contributions with no warnings, errors, or runtime conflicts. - After removal from
Dart-Code(Dart-Code/Dart-Code#6424): Verified in an empty unactivated window that all three commands still appear in the Command Palette whenFlutteris installed, remain unactivated until selected, and when executed from the Command Palette cleanly activateDart-Code.flutter->Dart-Code.dart-codeand invokeDart-Code'sregisterCommandhandlers (both with and without explicitonCommand:...entries inDart-Code'sactivationEvents). WhenFlutteris not installed, none of the three commands appear in the Command Palette.
DanTup
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Dart-Code/Dart-Code#6379 (part of Dart-Code/Dart-Code#1404; removing the duplicate declarations from
Dart-Codeis tracked forv3.150.0in Dart-Code/Dart-Code#6424).Summary
Adds
flutter.createProject("Create New Project"),flutter.doctor("Run Flutter Doctor"), andflutter.upgrade("Run Flutter Upgrade") tocontributes.commandsinpackage.json(without explicitmenus.commandPaletteentries).All runtime
vs.commands.registerCommand(...)implementations remain inDart-Code. Keeping the declarations inDart-Code/package.jsonthrough thev3.148.0release cycle provides a clean overlap period before Dart-Code/Dart-Code#6424 removes them inv3.150.0, so users who updateDartbeforeFlutter(e.g.Dartpre-releases with StableFlutter) do not lose these commands from the Command Palette.Verification
Verified in VS Code
1.146.0(in an empty window prior to extension activation):With both
Dart-CodeandDart-Code/Flutterdeclaring the 3 commands (overlap), each command appears once in the Command Palette with zero warnings/errors orpackage.jsondiagnostics:With the 3 commands removed from
Dart-Code(andonCommand:...added toDart-Code'sactivationEvents), all 3 commands appear in the Command Palette whenFlutteris installed, activateDart-Code.flutter->Dart-Code.dart-code, and executeDart-Code's handlers directly; whenFlutteris uninstalled, none of the 3 commands appear.