diff --git a/.github/workflows/markdown_flutter.yaml b/.github/workflows/markdown_flutter.yaml deleted file mode 100644 index 2cc5b34..0000000 --- a/.github/workflows/markdown_flutter.yaml +++ /dev/null
@@ -1,63 +0,0 @@ -# Run a smoke test against package:flutter_markdown. - -name: "package:markdown: flutter" - -on: - # Run on PRs and pushes to the default branch. - push: - branches: [ main ] - paths: - - '.github/workflows/markdown_flutter.yaml' - - 'pkgs/markdown/**' - pull_request: - branches: [ main ] - paths: - - '.github/workflows/markdown_flutter.yaml' - - 'pkgs/markdown/**' - schedule: - - cron: "0 0 * * 0" - -jobs: - smoke-test: - runs-on: ubuntu-latest - - steps: - - name: clone dart-lang/tools - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - repository: dart-lang/tools - path: tools_repo - - - name: clone flutter/packages - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - repository: flutter/packages - path: flutter_packages - - # Install the Flutter SDK using the subosito/flutter-action GitHub action. - - name: install the flutter sdk - uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 - with: - channel: beta - - - name: flutter --version - run: flutter --version - - - name: create pubspec_overrides.yaml - working-directory: flutter_packages/packages/flutter_markdown - run: | - echo "dependency_overrides:" > pubspec_overrides.yaml - echo " markdown:" >> pubspec_overrides.yaml - echo " path: ../../../tools_repo/pkgs/markdown" >> pubspec_overrides.yaml - - - name: flutter pub get - working-directory: flutter_packages/packages/flutter_markdown - run: flutter pub get - - - name: flutter analyze package:flutter_markdown - working-directory: flutter_packages/packages/flutter_markdown - run: flutter analyze - - - name: flutter test package:flutter_markdown - working-directory: flutter_packages/packages/flutter_markdown - run: flutter test
diff --git a/pkgs/unified_analytics/CHANGELOG.md b/pkgs/unified_analytics/CHANGELOG.md index 3d4c4f2..e5c26c9 100644 --- a/pkgs/unified_analytics/CHANGELOG.md +++ b/pkgs/unified_analytics/CHANGELOG.md
@@ -1,3 +1,6 @@ +## 8.0.2 +- Added `Event.dartMCPEvent` for events from the `dart mcp-server` command. + ## 8.0.1 - Added `Event.flutterInjectDarwinPlugins` event for plugins injected into an iOS/macOS project.
diff --git a/pkgs/unified_analytics/README.md b/pkgs/unified_analytics/README.md index 4263cfb..cc245ec 100644 --- a/pkgs/unified_analytics/README.md +++ b/pkgs/unified_analytics/README.md
@@ -1,4 +1,4 @@ -[](https://github.com/dart-lang/tools/actions/workflows/unified_analytics.yml) +[](https://github.com/dart-lang/tools/actions/workflows/unified_analytics.yaml) [](https://pub.dev/packages/unified_analytics) [](https://pub.dev/packages/unified_analytics/publisher)
diff --git a/pkgs/unified_analytics/lib/src/constants.dart b/pkgs/unified_analytics/lib/src/constants.dart index c6ba749..3d472ea 100644 --- a/pkgs/unified_analytics/lib/src/constants.dart +++ b/pkgs/unified_analytics/lib/src/constants.dart
@@ -87,7 +87,7 @@ const String kLogFileName = 'dart-flutter-telemetry.log'; /// The current version of the package, should be in line with pubspec version. -const String kPackageVersion = '8.0.1'; +const String kPackageVersion = '8.0.2'; /// The minimum length for a session. const int kSessionDurationMinutes = 30;
diff --git a/pkgs/unified_analytics/lib/src/enums.dart b/pkgs/unified_analytics/lib/src/enums.dart index eff8205..b051e84 100644 --- a/pkgs/unified_analytics/lib/src/enums.dart +++ b/pkgs/unified_analytics/lib/src/enums.dart
@@ -55,6 +55,11 @@ description: 'Pub package resolution details', toolOwner: DashTool.dartTool, ), + dartMCPEvent( + label: 'dart_mcp_server', + description: 'Information for a Dart MCP server event', + toolOwner: DashTool.dartTool, + ), // Events for Flutter devtools
diff --git a/pkgs/unified_analytics/lib/src/event.dart b/pkgs/unified_analytics/lib/src/event.dart index 0071ebd..7fcaad6 100644 --- a/pkgs/unified_analytics/lib/src/event.dart +++ b/pkgs/unified_analytics/lib/src/event.dart
@@ -905,6 +905,32 @@ }, ); + /// An event that is sent from the Dart MCP server. + /// + /// The [client] is the name of the client, as given when it connected to the + /// MCP server, and [clientVersion] is the version of the client. + /// + /// The [serverVersion] is the version of the Dart MCP server. + /// + /// The [type] identifies the kind of event this is, and [additionalData] is + /// the actual data for the event. + Event.dartMCPEvent({ + required String client, + required String clientVersion, + required String serverVersion, + required String type, + CustomMetrics? additionalData, + }) : this._( + eventName: DashEvent.dartMCPEvent, + eventData: { + 'client': client, + 'clientVersion': clientVersion, + 'serverVersion': serverVersion, + 'type': type, + ...?additionalData?.toMap(), + }, + ); + @override int get hashCode => Object.hash(eventName, jsonEncode(eventData));
diff --git a/pkgs/unified_analytics/pubspec.yaml b/pkgs/unified_analytics/pubspec.yaml index 8bba462..94b3fe9 100644 --- a/pkgs/unified_analytics/pubspec.yaml +++ b/pkgs/unified_analytics/pubspec.yaml
@@ -5,7 +5,7 @@ # LINT.IfChange # When updating this, keep the version consistent with the changelog and the # value in lib/src/constants.dart. -version: 8.0.1 +version: 8.0.2 # LINT.ThenChange(lib/src/constants.dart) repository: https://github.com/dart-lang/tools/tree/main/pkgs/unified_analytics issue_tracker: https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics
diff --git a/pkgs/unified_analytics/test/event_test.dart b/pkgs/unified_analytics/test/event_test.dart index e8a9f56..9c4a99c 100644 --- a/pkgs/unified_analytics/test/event_test.dart +++ b/pkgs/unified_analytics/test/event_test.dart
@@ -655,6 +655,27 @@ expect(constructedEvent.eventData.length, 20); }); + test('Event.dartMCPEvent constructed', () { + final event = Event.dartMCPEvent( + client: 'test client', + clientVersion: '1.0.0', + serverVersion: '1.1.0', + type: 'some_event', + additionalData: + _TestMetrics(boolField: true, stringField: 'hello', intField: 1)); + expect( + event.eventData, + equals({ + 'client': 'test client', + 'clientVersion': '1.0.0', + 'serverVersion': '1.1.0', + 'type': 'some_event', + 'boolField': true, + 'stringField': 'hello', + 'intField': 1, + })); + }); + test('Confirm all constructors were checked', () { var constructorCount = 0; for (final declaration in reflectClass(Event).declarations.keys) { @@ -667,7 +688,7 @@ // Change this integer below if your PR either adds or removes // an Event constructor - final eventsAccountedForInTests = 28; + final eventsAccountedForInTests = 29; expect(eventsAccountedForInTests, constructorCount, reason: 'If you added or removed an event constructor, ' 'ensure you have updated '