From 26346dc120d28740e41b6d74cbf7b956b2fd9ac1 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Fri, 11 Oct 2024 19:30:17 -0500 Subject: [PATCH] Fix build, update deps, clean up CLI samples --- .github/workflows/dart.yml | 76 ++++++++--------- command_line/README.md | 3 + command_line/lib/src/formatter.dart | 21 ++--- command_line/lib/src/options.dart | 8 +- command_line/lib/src/util.dart | 81 +++++-------------- command_line/pubspec.yaml | 8 +- enhanced_enums/pubspec.yaml | 6 +- extension_methods/lib/some_api.dart | 2 +- extension_methods/pubspec.yaml | 4 +- ffi/hello_world/pubspec.yaml | 6 +- ffi/primitives/pubspec.yaml | 8 +- ffi/structs/pubspec.yaml | 8 +- .../README.md | 0 .../analysis_options.yaml | 0 .../linux.dart | 0 .../macos.dart | 0 .../mono_pkg.yaml | 0 .../pubspec.yaml | 8 +- .../win32ui.dart | 0 .../windows.dart | 0 ffi/test_utils/pubspec.yaml | 4 +- isolates/pubspec.yaml | 6 +- native_app/pubspec.yaml | 4 +- null_safety/calculate_lix/pubspec.yaml | 6 +- package_constraint_solver/pubspec.yaml | 6 +- parameters/pubspec.yaml | 6 +- server/google_apis/pubspec.yaml | 12 +-- server/simple/pubspec.yaml | 14 ++-- tool/ci.sh | 2 +- 29 files changed, 136 insertions(+), 163 deletions(-) rename ffi/{system-command => system_command}/README.md (100%) rename ffi/{system-command => system_command}/analysis_options.yaml (100%) rename ffi/{system-command => system_command}/linux.dart (100%) rename ffi/{system-command => system_command}/macos.dart (100%) rename ffi/{system-command => system_command}/mono_pkg.yaml (100%) rename ffi/{system-command => system_command}/pubspec.yaml (77%) rename ffi/{system-command => system_command}/win32ui.dart (100%) rename ffi/{system-command => system_command}/windows.dart (100%) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 1c69608..7b1e6b9 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 name: Dart CI on: push: @@ -33,20 +33,20 @@ jobs: name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.1 + run: dart pub global activate mono_repo 6.6.2 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analysis; Dart dev; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system-command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, package_constraint_solver, parameters, server/google_apis, server/simple; `dart analyze --fatal-infos .`" + name: "analysis; Dart dev; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system_command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, package_constraint_solver, parameters, server/google_apis, server/simple; `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -111,15 +111,15 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.ffi_structs_pub_upgrade.conclusion == 'success'" working-directory: ffi/structs - - id: ffi_system-command_pub_upgrade - name: "ffi/system-command; dart pub upgrade" + - id: ffi_system_command_pub_upgrade + name: ffi/system_command; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: ffi/system-command - - name: "ffi/system-command; dart analyze --fatal-infos ." + working-directory: ffi/system_command + - name: "ffi/system_command; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.ffi_system-command_pub_upgrade.conclusion == 'success'" - working-directory: ffi/system-command + if: "always() && steps.ffi_system_command_pub_upgrade.conclusion == 'success'" + working-directory: ffi/system_command - id: ffi_test_utils_pub_upgrade name: ffi/test_utils; dart pub upgrade run: dart pub upgrade @@ -195,16 +195,16 @@ jobs: needs: - job_001 job_003: - name: "analysis; Dart dev; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system-command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, package_constraint_solver, parameters, server/google_apis, server/simple; `dart format --output=none --set-exit-if-changed .`" + name: "analysis; Dart dev; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system_command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, package_constraint_solver, parameters, server/google_apis, server/simple; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-package_constraint_solver-parameters-server/google_apis-server/simple os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -269,15 +269,15 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.ffi_structs_pub_upgrade.conclusion == 'success'" working-directory: ffi/structs - - id: ffi_system-command_pub_upgrade - name: "ffi/system-command; dart pub upgrade" + - id: ffi_system_command_pub_upgrade + name: ffi/system_command; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: ffi/system-command - - name: "ffi/system-command; dart format --output=none --set-exit-if-changed ." + working-directory: ffi/system_command + - name: "ffi/system_command; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.ffi_system-command_pub_upgrade.conclusion == 'success'" - working-directory: ffi/system-command + if: "always() && steps.ffi_system_command_pub_upgrade.conclusion == 'success'" + working-directory: ffi/system_command - id: ffi_test_utils_pub_upgrade name: ffi/test_utils; dart pub upgrade run: dart pub upgrade @@ -353,16 +353,16 @@ jobs: needs: - job_001 job_004: - name: "analysis; Dart stable; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system-command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, parameters, server/google_apis, server/simple; `dart analyze --fatal-infos .`" + name: "analysis; Dart stable; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system_command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, parameters, server/google_apis, server/simple; `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -427,15 +427,15 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.ffi_structs_pub_upgrade.conclusion == 'success'" working-directory: ffi/structs - - id: ffi_system-command_pub_upgrade - name: "ffi/system-command; dart pub upgrade" + - id: ffi_system_command_pub_upgrade + name: ffi/system_command; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: ffi/system-command - - name: "ffi/system-command; dart analyze --fatal-infos ." + working-directory: ffi/system_command + - name: "ffi/system_command; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.ffi_system-command_pub_upgrade.conclusion == 'success'" - working-directory: ffi/system-command + if: "always() && steps.ffi_system_command_pub_upgrade.conclusion == 'success'" + working-directory: ffi/system_command - id: ffi_test_utils_pub_upgrade name: ffi/test_utils; dart pub upgrade run: dart pub upgrade @@ -502,16 +502,16 @@ jobs: needs: - job_001 job_005: - name: "analysis; Dart stable; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system-command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, parameters, server/google_apis, server/simple; `dart format --output=none --set-exit-if-changed .`" + name: "analysis; Dart stable; PKGS: command_line, enhanced_enums, extension_methods, ffi/hello_world, ffi/primitives, ffi/structs, ffi/system_command, ffi/test_utils, isolates, native_app, null_safety/calculate_lix, parameters, server/google_apis, server/simple; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system-command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:command_line-enhanced_enums-extension_methods-ffi/hello_world-ffi/primitives-ffi/structs-ffi/system_command-ffi/test_utils-isolates-native_app-null_safety/calculate_lix-parameters-server/google_apis-server/simple os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -576,15 +576,15 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.ffi_structs_pub_upgrade.conclusion == 'success'" working-directory: ffi/structs - - id: ffi_system-command_pub_upgrade - name: "ffi/system-command; dart pub upgrade" + - id: ffi_system_command_pub_upgrade + name: ffi/system_command; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: ffi/system-command - - name: "ffi/system-command; dart format --output=none --set-exit-if-changed ." + working-directory: ffi/system_command + - name: "ffi/system_command; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.ffi_system-command_pub_upgrade.conclusion == 'success'" - working-directory: ffi/system-command + if: "always() && steps.ffi_system_command_pub_upgrade.conclusion == 'success'" + working-directory: ffi/system_command - id: ffi_test_utils_pub_upgrade name: ffi/test_utils; dart pub upgrade run: dart pub upgrade diff --git a/command_line/README.md b/command_line/README.md index f2e6576..966efc5 100644 --- a/command_line/README.md +++ b/command_line/README.md @@ -1,10 +1,12 @@ # Command line app sample + This sample demonstrates how to parse command line options into Dart objects using [`package:build_cli_annotations`][build-cli], read environment variables, use third-party packages like `package:github` and use core library APIs like DateTime. ## Adding new CLI options + To add new command line options to `lib/src/options.dart`, update the `Options` class and re-run `build_runner`: @@ -13,6 +15,7 @@ dart run build_runner build ``` ## About this project + `bin/github_activity.dart` is a command line application that fetches stats for a GitHub user and prints them to the console. diff --git a/command_line/lib/src/formatter.dart b/command_line/lib/src/formatter.dart index 4634dc6..34de2d8 100644 --- a/command_line/lib/src/formatter.dart +++ b/command_line/lib/src/formatter.dart @@ -11,10 +11,10 @@ abstract class EventFormatter { String format(Event event); } -/// Returns a formatted string of the form `Friday, October 18 at 13:55 PM: -/// opened `. +/// Returns a formatted string of the form: +/// `Friday, October 18 at 13:55 PM: opened `. class DefaultEventFormatter implements EventFormatter { - static final dateFormat = DateFormat("EEEE, MMMM d 'at' HH:mm a"); + static final DateFormat dateFormat = DateFormat("EEEE, MMMM d 'at' HH:mm a"); const DefaultEventFormatter(); @@ -23,30 +23,31 @@ class DefaultEventFormatter implements EventFormatter { var date = dateFormat.format(event.createdAt!.toLocal()); var type = event.type; var username = event.actor!.login; - var url = util.getUrl(event); + var url = util.extractUrl(event); if (url == null) { return '$date: [$type]'; } - var action = util.getAction(event); + var action = util.extractAction(event); return '$date: $username $action $url'; } } class MarkdownEventFormatter implements EventFormatter { - static final dateFormat = DateFormat('EEE, M/d/y'); + static final DateFormat dateFormat = DateFormat('EEE, M/d/y'); + @override String format(Event event) { var date = dateFormat.format(event.createdAt!.toLocal()); var type = event.type; - var action = util.getAction(event); - var url = util.getUrl(event); + var action = util.extractAction(event); + var url = util.extractUrl(event); if (url == null) { return '- ($date): [$type]'; } - var title = util.getTitle(event); + var title = util.extractTitle(event); var repoName = event.repo!.name; - var issueNumber = util.getIssueNumber(event); + var issueNumber = util.extractIssueNumber(event); return '- ($date): $action "$title" ([$repoName/$issueNumber]($url))'; } diff --git a/command_line/lib/src/options.dart b/command_line/lib/src/options.dart index 274574d..74a807f 100644 --- a/command_line/lib/src/options.dart +++ b/command_line/lib/src/options.dart @@ -44,5 +44,11 @@ class Options { enum Interval { day, week, - month, + month; + + Duration get duration => switch (this) { + Interval.day => const Duration(days: 1), + Interval.week => const Duration(days: 7), + Interval.month => const Duration(days: 30), + }; } diff --git a/command_line/lib/src/util.dart b/command_line/lib/src/util.dart index eefff8e..ac5e2d9 100644 --- a/command_line/lib/src/util.dart +++ b/command_line/lib/src/util.dart @@ -6,62 +6,25 @@ import 'package:github/github.dart'; import 'options.dart'; -String? getAction(Event event) { - return event.payload!['action']; -} - -String? getUrl(Event event) { - var type = event.type; - - if (type == 'PullRequestEvent') { - return event.payload!['pull_request']['html_url']; - } - - if (type == 'IssuesEvent') { - return event.payload!['issue']['html_url']; - } - - return null; -} - -String? getTitle(Event event) { - var type = event.type; - - if (type == 'PullRequestEvent') { - return event.payload!['pull_request']['title']; - } - - if (type == 'IssuesEvent') { - return event.payload!['issue']['title']; - } - - return null; -} - -int? getIssueNumber(Event event) { - var type = event.type; - - if (type == 'PullRequestEvent') { - return event.payload!['pull_request']['number']; - } - - if (type == 'IssuesEvent') { - return event.payload!['issue']['number']; - } - - return null; -} - -bool isTooOld(DateTime? date, Interval interval) { - var now = DateTime.now(); - switch (interval) { - case Interval.day: - return date!.isBefore(now.subtract(Duration(days: 1))); - case Interval.week: - return date!.isBefore(now.subtract(Duration(days: 7))); - case Interval.month: - return date!.isBefore(now.subtract(Duration(days: 30))); - default: - return true; - } -} +String? extractAction(Event event) => event.payload!['action']; + +String? extractUrl(Event event) => switch (event.type) { + 'PullRequestEvent' => event.payload!['pull_request']['html_url'], + 'IssuesEvent' => event.payload!['issue']['html_url'], + _ => null, + }; + +String? extractTitle(Event event) => switch (event.type) { + 'PullRequestEvent' => event.payload!['pull_request']['title'], + 'IssuesEvent' => event.payload!['issue']['title'], + _ => null, + }; + +int? extractIssueNumber(Event event) => switch (event.type) { + 'PullRequestEvent' => event.payload!['pull_request']['number'], + 'IssuesEvent' => event.payload!['issue']['number'], + _ => null, + }; + +bool isTooOld(DateTime? date, Interval interval) => + date?.isBefore(DateTime.now().subtract(interval.duration)) ?? true; diff --git a/command_line/pubspec.yaml b/command_line/pubspec.yaml index 4b019c7..7c9c020 100644 --- a/command_line/pubspec.yaml +++ b/command_line/pubspec.yaml @@ -7,7 +7,7 @@ description: >- publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: args: ^2.5.0 @@ -17,9 +17,9 @@ dependencies: dev_dependencies: build_cli: ^2.2.3 - build_runner: ^2.4.10 - lints: ^4.0.0 - test: ^1.25.0 + build_runner: ^2.4.13 + lints: ^5.0.0 + test: ^1.25.8 executables: github_activity: github_activity diff --git a/enhanced_enums/pubspec.yaml b/enhanced_enums/pubspec.yaml index e44b9b1..1fec478 100644 --- a/enhanced_enums/pubspec.yaml +++ b/enhanced_enums/pubspec.yaml @@ -5,8 +5,8 @@ description: Samples that demonstrates the enhanced enums syntax publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 diff --git a/extension_methods/lib/some_api.dart b/extension_methods/lib/some_api.dart index 87a65ae..1b799ef 100644 --- a/extension_methods/lib/some_api.dart +++ b/extension_methods/lib/some_api.dart @@ -7,7 +7,7 @@ /// /// Imagine that this code is coming from a different package, so we can't /// directly change it. -library some_api; +library; final betty = Person('Betty Holberton', DateTime(1917, 3, 7)); diff --git a/extension_methods/pubspec.yaml b/extension_methods/pubspec.yaml index 7727936..4ad72b1 100644 --- a/extension_methods/pubspec.yaml +++ b/extension_methods/pubspec.yaml @@ -6,8 +6,8 @@ description: >- publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dev_dependencies: - lints: ^4.0.0 + lints: ^5.0.0 test: ^1.25.0 diff --git a/ffi/hello_world/pubspec.yaml b/ffi/hello_world/pubspec.yaml index 4789962..293dfb4 100644 --- a/ffi/hello_world/pubspec.yaml +++ b/ffi/hello_world/pubspec.yaml @@ -7,14 +7,14 @@ description: >- publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: path: ^1.9.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 # test_utils depends on code elsewhere in the samples repository. # You can reference it for useful cross-platform testing functionality # or remove it if you want to use this example standalone. diff --git a/ffi/primitives/pubspec.yaml b/ffi/primitives/pubspec.yaml index 0da3bc6..b812ce6 100644 --- a/ffi/primitives/pubspec.yaml +++ b/ffi/primitives/pubspec.yaml @@ -5,15 +5,15 @@ description: A super simple example of calling C code from Dart with FFI publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: - ffi: ^2.1.0 + ffi: ^2.1.3 path: ^1.9.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 # test_utils depends on code elsewhere in the samples repository. # You can reference it for useful cross-platform testing functionality # or remove it if you want to use this example standalone. diff --git a/ffi/structs/pubspec.yaml b/ffi/structs/pubspec.yaml index 15935cf..0f09148 100644 --- a/ffi/structs/pubspec.yaml +++ b/ffi/structs/pubspec.yaml @@ -7,15 +7,15 @@ description: >- publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: - ffi: ^2.1.0 + ffi: ^2.1.3 path: ^1.9.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 # test_utils depends on code elsewhere in the samples repository. # You can reference it for useful cross-platform testing functionality # or remove it if you want to use this example standalone. diff --git a/ffi/system-command/README.md b/ffi/system_command/README.md similarity index 100% rename from ffi/system-command/README.md rename to ffi/system_command/README.md diff --git a/ffi/system-command/analysis_options.yaml b/ffi/system_command/analysis_options.yaml similarity index 100% rename from ffi/system-command/analysis_options.yaml rename to ffi/system_command/analysis_options.yaml diff --git a/ffi/system-command/linux.dart b/ffi/system_command/linux.dart similarity index 100% rename from ffi/system-command/linux.dart rename to ffi/system_command/linux.dart diff --git a/ffi/system-command/macos.dart b/ffi/system_command/macos.dart similarity index 100% rename from ffi/system-command/macos.dart rename to ffi/system_command/macos.dart diff --git a/ffi/system-command/mono_pkg.yaml b/ffi/system_command/mono_pkg.yaml similarity index 100% rename from ffi/system-command/mono_pkg.yaml rename to ffi/system_command/mono_pkg.yaml diff --git a/ffi/system-command/pubspec.yaml b/ffi/system_command/pubspec.yaml similarity index 77% rename from ffi/system-command/pubspec.yaml rename to ffi/system_command/pubspec.yaml index e4b5238..06c8d27 100644 --- a/ffi/system-command/pubspec.yaml +++ b/ffi/system_command/pubspec.yaml @@ -5,11 +5,11 @@ description: A FFI application that invokes system commands. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: - ffi: ^2.1.0 + ffi: ^2.1.3 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 diff --git a/ffi/system-command/win32ui.dart b/ffi/system_command/win32ui.dart similarity index 100% rename from ffi/system-command/win32ui.dart rename to ffi/system_command/win32ui.dart diff --git a/ffi/system-command/windows.dart b/ffi/system_command/windows.dart similarity index 100% rename from ffi/system-command/windows.dart rename to ffi/system_command/windows.dart diff --git a/ffi/test_utils/pubspec.yaml b/ffi/test_utils/pubspec.yaml index 17d704d..47835e8 100644 --- a/ffi/test_utils/pubspec.yaml +++ b/ffi/test_utils/pubspec.yaml @@ -4,10 +4,10 @@ name: test_utils publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: path: ^1.9.0 dev_dependencies: - lints: ^4.0.0 + lints: ^5.0.0 diff --git a/isolates/pubspec.yaml b/isolates/pubspec.yaml index 0b3180a..882d88e 100644 --- a/isolates/pubspec.yaml +++ b/isolates/pubspec.yaml @@ -3,11 +3,11 @@ description: A sample command-line application. publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: async: ^2.11.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 diff --git a/native_app/pubspec.yaml b/native_app/pubspec.yaml index e088828..3c6b1a1 100644 --- a/native_app/pubspec.yaml +++ b/native_app/pubspec.yaml @@ -7,10 +7,10 @@ description: >- publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dev_dependencies: - lints: ^4.0.0 + lints: ^5.0.0 executables: main: hello_world diff --git a/null_safety/calculate_lix/pubspec.yaml b/null_safety/calculate_lix/pubspec.yaml index aab3ff8..c8b906f 100644 --- a/null_safety/calculate_lix/pubspec.yaml +++ b/null_safety/calculate_lix/pubspec.yaml @@ -6,10 +6,10 @@ version: 1.3.0 publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: - collection: ^1.18.0 + collection: ^1.19.0 dev_dependencies: - lints: ^4.0.0 + lints: ^5.0.0 diff --git a/package_constraint_solver/pubspec.yaml b/package_constraint_solver/pubspec.yaml index b7f3c7c..0b5a432 100644 --- a/package_constraint_solver/pubspec.yaml +++ b/package_constraint_solver/pubspec.yaml @@ -4,13 +4,13 @@ repository: https://github.com/dart-lang/samples/tree/main/package_constraint_so publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: path: ^1.9.0 dev_dependencies: checks: ^0.3.0 - lints: ^4.0.0 + lints: ^5.0.0 intl: ^0.19.0 - test: ^1.25.0 + test: ^1.25.8 diff --git a/parameters/pubspec.yaml b/parameters/pubspec.yaml index 5d01c18..db1dd7c 100644 --- a/parameters/pubspec.yaml +++ b/parameters/pubspec.yaml @@ -5,8 +5,8 @@ version: 1.0.0 publish_to: none environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dev_dependencies: - lints: ^4.0.0 - test: ^1.25.0 + lints: ^5.0.0 + test: ^1.25.8 diff --git a/server/google_apis/pubspec.yaml b/server/google_apis/pubspec.yaml index 2a8c454..363508e 100644 --- a/server/google_apis/pubspec.yaml +++ b/server/google_apis/pubspec.yaml @@ -2,14 +2,14 @@ name: cloud_run_google_apis publish_to: none # not intended for publication to pub.dev environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: google_cloud: ^0.2.0 - googleapis: ^12.0.0 - googleapis_auth: ^1.4.1 - shelf: ^1.4.0 - shelf_router: ^1.1.2 + googleapis: ^13.2.0 + googleapis_auth: ^1.6.0 + shelf: ^1.4.2 + shelf_router: ^1.1.4 dev_dependencies: - lints: ^4.0.0 + lints: ^5.0.0 diff --git a/server/simple/pubspec.yaml b/server/simple/pubspec.yaml index 130a7d3..3b62bb6 100644 --- a/server/simple/pubspec.yaml +++ b/server/simple/pubspec.yaml @@ -2,15 +2,15 @@ name: container_server_example publish_to: none # not intended for publication to pub.dev environment: - sdk: ^3.4.0 + sdk: ^3.5.0 dependencies: - shelf: ^1.4.0 - shelf_router: ^1.1.2 - shelf_static: ^1.1.0 + shelf: ^1.4.2 + shelf_router: ^1.1.4 + shelf_static: ^1.1.3 dev_dependencies: - http: ^1.2.0 - lints: ^4.0.0 - test: ^1.25.0 + http: ^1.2.2 + lints: ^5.0.0 + test: ^1.25.8 test_process: ^2.1.0 diff --git a/tool/ci.sh b/tool/ci.sh index 0f71908..d23e5f4 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 # Support built in commands on windows out of the box.