From cfd52ff0a5222d561d6a6e788b02df15348b1cdb Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 27 Dec 2024 14:41:04 -0600 Subject: [PATCH] chore: bump latest deps (#487) --- .github/workflows/lint.yml | 103 +++++------------- .github/workflows/unit.yml | 70 ++++++------ analysis_options.yaml | 1 - dartfn/lib/src/generators/cloudevent.g.dart | 3 +- dartfn/lib/src/generators/helloworld.g.dart | 3 +- dartfn/lib/src/generators/json.g.dart | 3 +- dartfn/pubspec.yaml | 4 +- dartfn/templates/cloudevent/pubspec.yaml | 2 +- dartfn/templates/helloworld/pubspec.yaml | 2 +- dartfn/templates/json/pubspec.yaml | 2 +- dartfn/tool/builder/builder.dart | 2 +- examples/fullstack/backend/pubspec.yaml | 2 +- examples/fullstack/frontend-cli/pubspec.yaml | 2 +- examples/fullstack/frontend/mono_pkg.yaml | 10 +- examples/fullstack/frontend/pubspec.yaml | 2 +- examples/hello/pubspec.yaml | 2 +- examples/json/pubspec.yaml | 2 +- examples/protobuf_firestore/pubspec.yaml | 2 +- examples/raw_cloudevent/pubspec.yaml | 2 +- functions_framework/pubspec.yaml | 2 +- functions_framework_builder/CHANGELOG.md | 1 + functions_framework_builder/lib/builder.dart | 14 ++- functions_framework_builder/pubspec.yaml | 8 +- .../test/builder_test.dart | 4 +- google_cloud/pubspec.yaml | 2 +- integration_test/bin/server.dart | 4 +- integration_test/pubspec.yaml | 2 +- mono_repo.yaml | 3 +- pubspec.yaml | 2 +- tool/ci.sh | 4 - 30 files changed, 110 insertions(+), 155 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8e9f973c..61fdecd4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,49 +16,26 @@ permissions: read-all jobs: job_001: - name: mono_repo self validate + name: "analyze_format; Dart 3.6.0; PKGS: dartfn, dartfn/templates/cloudevent, dartfn/templates/helloworld, dartfn/templates/json, examples/fullstack/backend, examples/fullstack/frontend-cli, examples/hello, examples/json, examples/protobuf_firestore, examples/raw_cloudevent, functions_framework, functions_framework_builder, google_cloud; `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/fullstack/frontend-cli-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework-functions_framework_builder-google_cloud;commands:analyze_1" restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/fullstack/frontend-cli-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework-functions_framework_builder-google_cloud + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: stable + sdk: "3.6.0" - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: mono_repo self validate - 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: "analyze_format; Dart 3.5.0; PKGS: dartfn, dartfn/templates/cloudevent, dartfn/templates/helloworld, dartfn/templates/json, examples/fullstack/backend, examples/fullstack/frontend-cli, examples/hello, examples/json, examples/protobuf_firestore, examples/raw_cloudevent, functions_framework, functions_framework_builder, google_cloud; `dart analyze`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/fullstack/frontend-cli-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework-functions_framework_builder-google_cloud;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/fullstack/frontend-cli-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework-functions_framework_builder-google_cloud - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 - with: - sdk: "3.5.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: dartfn_pub_upgrade name: dartfn; dart pub upgrade run: dart pub upgrade @@ -176,12 +153,12 @@ jobs: run: dart analyze if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'" working-directory: google_cloud - job_003: + job_002: name: "analyze_format; Dart dev; PKGS: dartfn, dartfn/templates/cloudevent, dartfn/templates/helloworld, dartfn/templates/json, examples/fullstack/backend, examples/fullstack/frontend-cli, examples/hello, examples/json, examples/protobuf_firestore, examples/raw_cloudevent, functions_framework, functions_framework_builder, google_cloud, integration_test; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/fullstack/frontend-cli-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework-functions_framework_builder-google_cloud-integration_test;commands:format-analyze_0" @@ -191,12 +168,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: dartfn_pub_upgrade name: dartfn; dart pub upgrade run: dart pub upgrade @@ -379,12 +356,12 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'" working-directory: integration_test - job_004: + job_003: name: "analyze_format; Dart dev; PKG: integration_test; `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:integration_test;commands:analyze_1" @@ -394,12 +371,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: integration_test_pub_upgrade name: integration_test; dart pub upgrade run: dart pub upgrade @@ -409,27 +386,27 @@ jobs: run: dart analyze if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'" working-directory: integration_test - job_005: - name: "analyze_format; Flutter master; PKG: examples/fullstack/frontend; `dart format --output=none --set-exit-if-changed .`, `flutter analyze --fatal-infos`" + job_004: + name: "analyze_format; Flutter stable; PKG: examples/fullstack/frontend; `dart format --output=none --set-exit-if-changed .`, `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:master;packages:examples/fullstack/frontend;commands:format-analyze_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:examples/fullstack/frontend;commands:format-analyze_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:master;packages:examples/fullstack/frontend - os:ubuntu-latest;pub-cache-hosted;sdk:master + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:examples/fullstack/frontend + os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - channel: master + channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: examples_fullstack_frontend_pub_upgrade name: examples/fullstack/frontend; flutter pub upgrade run: flutter pub upgrade @@ -443,33 +420,3 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.examples_fullstack_frontend_pub_upgrade.conclusion == 'success'" working-directory: examples/fullstack/frontend - job_006: - name: "analyze_format; Flutter stable; PKG: examples/fullstack/frontend; `flutter analyze`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:examples/fullstack/frontend;commands:analyze_3" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:examples/fullstack/frontend - os:ubuntu-latest;pub-cache-hosted;sdk:stable - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Flutter SDK - uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3 - with: - channel: stable - - id: checkout - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - id: examples_fullstack_frontend_pub_upgrade - name: examples/fullstack/frontend; flutter pub upgrade - run: flutter pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: examples/fullstack/frontend - - name: examples/fullstack/frontend; flutter analyze - run: flutter analyze - if: "always() && steps.examples_fullstack_frontend_pub_upgrade.conclusion == 'success'" - working-directory: examples/fullstack/frontend diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 04f4f286..11ee5e54 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -16,26 +16,26 @@ permissions: read-all jobs: job_001: - name: "unit_test; linux; Dart 3.5.0; PKGS: dartfn, functions_framework_builder, google_cloud, integration_test; `dart test`" + name: "unit_test; linux; Dart 3.6.0; PKGS: dartfn, functions_framework_builder, google_cloud, integration_test; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0" - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: dartfn_pub_upgrade name: dartfn; dart pub upgrade run: dart pub upgrade @@ -73,26 +73,26 @@ jobs: if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'" working-directory: integration_test job_002: - name: "unit_test; linux; Dart 3.5.0; PKG: google_cloud; `./tool/docker_test_script.sh`" + name: "unit_test; linux; Dart 3.6.0; PKG: google_cloud; `./tool/docker_test_script.sh`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:google_cloud;commands:command" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:google_cloud;commands:command" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:google_cloud - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0;packages:google_cloud + os:ubuntu-latest;pub-cache-hosted;sdk:3.6.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0" - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: google_cloud_pub_upgrade name: google_cloud; dart pub upgrade run: dart pub upgrade @@ -107,7 +107,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework_builder-google_cloud-integration_test;commands:test_0" @@ -117,12 +117,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: dartfn_pub_upgrade name: dartfn; dart pub upgrade run: dart pub upgrade @@ -236,7 +236,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-functions_framework-integration_test;commands:test_1" @@ -246,12 +246,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: dartfn_pub_upgrade name: dartfn; dart pub upgrade run: dart pub upgrade @@ -280,26 +280,26 @@ jobs: if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'" working-directory: integration_test job_005: - name: "unit_test; macos; Dart 3.5.0; PKG: google_cloud; `dart test`" + name: "unit_test; macos; Dart 3.6.0; PKG: google_cloud; `dart test`" runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:macos-latest;pub-cache-hosted;sdk:3.5.0;packages:google_cloud;commands:test_0" + key: "os:macos-latest;pub-cache-hosted;sdk:3.6.0;packages:google_cloud;commands:test_0" restore-keys: | - os:macos-latest;pub-cache-hosted;sdk:3.5.0;packages:google_cloud - os:macos-latest;pub-cache-hosted;sdk:3.5.0 + os:macos-latest;pub-cache-hosted;sdk:3.6.0;packages:google_cloud + os:macos-latest;pub-cache-hosted;sdk:3.6.0 os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.5.0" + sdk: "3.6.0" - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: google_cloud_pub_upgrade name: google_cloud; dart pub upgrade run: dart pub upgrade @@ -314,7 +314,7 @@ jobs: runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:macos-latest;pub-cache-hosted;sdk:dev;packages:google_cloud;commands:test_0" @@ -324,12 +324,12 @@ jobs: os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: google_cloud_pub_upgrade name: google_cloud; dart pub upgrade run: dart pub upgrade @@ -344,12 +344,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: google_cloud_pub_upgrade name: google_cloud; dart pub upgrade run: dart pub upgrade diff --git a/analysis_options.yaml b/analysis_options.yaml index d1e72ff8..d01fa62b 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -23,7 +23,6 @@ linter: - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_runtimeType_toString - - package_api_docs - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals diff --git a/dartfn/lib/src/generators/cloudevent.g.dart b/dartfn/lib/src/generators/cloudevent.g.dart index 6de58a29..f42b1a53 100644 --- a/dartfn/lib/src/generators/cloudevent.g.dart +++ b/dartfn/lib/src/generators/cloudevent.g.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'cloudevent.dart'; @@ -162,7 +163,7 @@ aXR5JzogTG9nU2V2ZXJpdHkuaW5mbywKICAgICAgfSwKICAgICksCiAgKTsKfQo=''', bmFtZTogX19wcm9qZWN0TmFtZV9fCmRlc2NyaXB0aW9uOiBBIHNhbXBsZSBGdW5jdGlvbnMgRnJh bWV3b3JrIHByb2plY3QgZm9yIGhhbmRsaW5nIGEgY2xvdWRldmVudC4KIyB2ZXJzaW9uOiAwLjEu MAojIGhvbWVwYWdlOiBodHRwczovL3d3dy5leGFtcGxlLmNvbQpwdWJsaXNoX3RvOiBub25lCgpl -bnZpcm9ubWVudDoKICBzZGs6IF4zLjUuMAoKZGVwZW5kZW5jaWVzOgogIGZ1bmN0aW9uc19mcmFt +bnZpcm9ubWVudDoKICBzZGs6IF4zLjYuMAoKZGVwZW5kZW5jaWVzOgogIGZ1bmN0aW9uc19mcmFt ZXdvcms6IF4wLjQuMAogIHNoZWxmOiBeMS4wLjAKCmRldl9kZXBlbmRlbmNpZXM6CiAgYnVpbGRf cnVubmVyOiBeMi4wLjAKICBmdW5jdGlvbnNfZnJhbWV3b3JrX2J1aWxkZXI6IF4wLjQuMQogIGh0 dHA6IF4xLjAuMAogIGRhcnRfZmx1dHRlcl90ZWFtX2xpbnRzOiBeMy4wLjAKICB0ZXN0OiBeMS4x diff --git a/dartfn/lib/src/generators/helloworld.g.dart b/dartfn/lib/src/generators/helloworld.g.dart index 1330daa8..4e60efbe 100644 --- a/dartfn/lib/src/generators/helloworld.g.dart +++ b/dartfn/lib/src/generators/helloworld.g.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'helloworld.dart'; @@ -150,7 +151,7 @@ bywgV29ybGQhJyk7Cg==''', bmFtZTogX19wcm9qZWN0TmFtZV9fCmRlc2NyaXB0aW9uOiBBIHNhbXBsZSAiSGVsbG8sIFdvcmxk ISIgRnVuY3Rpb25zIEZyYW1ld29yayBwcm9qZWN0LgojIHZlcnNpb246IDAuMS4wCiMgaG9tZXBh Z2U6IGh0dHBzOi8vd3d3LmV4YW1wbGUuY29tCnB1Ymxpc2hfdG86IG5vbmUKCmVudmlyb25tZW50 -OgogIHNkazogXjMuNS4wCgpkZXBlbmRlbmNpZXM6CiAgZnVuY3Rpb25zX2ZyYW1ld29yazogXjAu +OgogIHNkazogXjMuNi4wCgpkZXBlbmRlbmNpZXM6CiAgZnVuY3Rpb25zX2ZyYW1ld29yazogXjAu NC4wCiAgc2hlbGY6IF4xLjAuMAoKZGV2X2RlcGVuZGVuY2llczoKICBidWlsZF9ydW5uZXI6IF4y LjAuMAogIGZ1bmN0aW9uc19mcmFtZXdvcmtfYnVpbGRlcjogXjAuNC4xCiAgaHR0cDogXjEuMC4w CiAgZGFydF9mbHV0dGVyX3RlYW1fbGludHM6IF4zLjAuMAogIHRlc3Q6IF4xLjE2LjYKICB0ZXN0 diff --git a/dartfn/lib/src/generators/json.g.dart b/dartfn/lib/src/generators/json.g.dart index 9767a21f..b811367c 100644 --- a/dartfn/lib/src/generators/json.g.dart +++ b/dartfn/lib/src/generators/json.g.dart @@ -1,3 +1,4 @@ +// dart format width=80 // GENERATED CODE - DO NOT MODIFY BY HAND part of 'json.dart'; @@ -242,7 +243,7 @@ CiAgICAgICduYW1lJzogaW5zdGFuY2UubmFtZSwKICAgIH07Cg==''', bmFtZTogX19wcm9qZWN0TmFtZV9fCmRlc2NyaXB0aW9uOiBBIHNhbXBsZSBGdW5jdGlvbnMgRnJh bWV3b3JrIHByb2plY3QgZm9yIGhhbmRsaW5nIEpTT04uCiMgdmVyc2lvbjogMC4xLjAKIyBob21l cGFnZTogaHR0cHM6Ly93d3cuZXhhbXBsZS5jb20KcHVibGlzaF90bzogbm9uZQoKZW52aXJvbm1l -bnQ6CiAgc2RrOiBeMy41LjAKCmRlcGVuZGVuY2llczoKICBmdW5jdGlvbnNfZnJhbWV3b3JrOiBe +bnQ6CiAgc2RrOiBeMy42LjAKCmRlcGVuZGVuY2llczoKICBmdW5jdGlvbnNfZnJhbWV3b3JrOiBe MC40LjAKICBqc29uX2Fubm90YXRpb246IF40LjkuMAogIHNoZWxmOiBeMS4wLjAKCmRldl9kZXBl bmRlbmNpZXM6CiAgYnVpbGRfcnVubmVyOiBeMi4yLjEKICBmdW5jdGlvbnNfZnJhbWV3b3JrX2J1 aWxkZXI6IF4wLjQuNwogIGh0dHA6IF4xLjAuMAogIGpzb25fc2VyaWFsaXphYmxlOiBeNi42LjAK diff --git a/dartfn/pubspec.yaml b/dartfn/pubspec.yaml index 515d5d82..d5ee0938 100644 --- a/dartfn/pubspec.yaml +++ b/dartfn/pubspec.yaml @@ -7,7 +7,7 @@ homepage: https://github.com/GoogleCloudPlatform/functions-framework-dart resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 executables: dartfn: @@ -28,6 +28,6 @@ dev_dependencies: dart_flutter_team_lints: ^3.0.0 glob: ^2.0.0 grinder: ^0.9.0 - source_gen: ^1.0.0 + source_gen: '>=1.0.0 <3.0.0' test: ^1.16.6 yaml: ^3.1.0 diff --git a/dartfn/templates/cloudevent/pubspec.yaml b/dartfn/templates/cloudevent/pubspec.yaml index 78e558c7..dd66aa0f 100644 --- a/dartfn/templates/cloudevent/pubspec.yaml +++ b/dartfn/templates/cloudevent/pubspec.yaml @@ -5,7 +5,7 @@ description: A sample Functions Framework project for handling a cloudevent. publish_to: none environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/dartfn/templates/helloworld/pubspec.yaml b/dartfn/templates/helloworld/pubspec.yaml index 4fcd66fe..97b61139 100644 --- a/dartfn/templates/helloworld/pubspec.yaml +++ b/dartfn/templates/helloworld/pubspec.yaml @@ -5,7 +5,7 @@ description: A sample "Hello, World!" Functions Framework project. publish_to: none environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/dartfn/templates/json/pubspec.yaml b/dartfn/templates/json/pubspec.yaml index cf805d10..207d3473 100644 --- a/dartfn/templates/json/pubspec.yaml +++ b/dartfn/templates/json/pubspec.yaml @@ -5,7 +5,7 @@ description: A sample Functions Framework project for handling JSON. publish_to: none environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/dartfn/tool/builder/builder.dart b/dartfn/tool/builder/builder.dart index df0096b8..642edf78 100644 --- a/dartfn/tool/builder/builder.dart +++ b/dartfn/tool/builder/builder.dart @@ -17,7 +17,7 @@ import 'package:source_gen/source_gen.dart'; import 'src/code_generator.dart'; -Builder builder([_]) => PartBuilder( +Builder builder([BuilderOptions? _]) => PartBuilder( [ DataGenerator(), ], diff --git a/examples/fullstack/backend/pubspec.yaml b/examples/fullstack/backend/pubspec.yaml index f6216f03..4a0eb53b 100644 --- a/examples/fullstack/backend/pubspec.yaml +++ b/examples/fullstack/backend/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/examples/fullstack/frontend-cli/pubspec.yaml b/examples/fullstack/frontend-cli/pubspec.yaml index edef9e7d..e6d84b13 100644 --- a/examples/fullstack/frontend-cli/pubspec.yaml +++ b/examples/fullstack/frontend-cli/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 executables: greet: diff --git a/examples/fullstack/frontend/mono_pkg.yaml b/examples/fullstack/frontend/mono_pkg.yaml index e7ee7b66..0b54dc8c 100644 --- a/examples/fullstack/frontend/mono_pkg.yaml +++ b/examples/fullstack/frontend/mono_pkg.yaml @@ -5,7 +5,9 @@ stages: - group: - format - analyze: --fatal-infos - sdk: master - - group: - - analyze - sdk: stable + sdk: stable # main - debug this! +# Need to figure why main/master doesn't work! +# - group: +# - analyze +# sdk: stable +# diff --git a/examples/fullstack/frontend/pubspec.yaml b/examples/fullstack/frontend/pubspec.yaml index 06a52877..d4a2b5c7 100644 --- a/examples/fullstack/frontend/pubspec.yaml +++ b/examples/fullstack/frontend/pubspec.yaml @@ -2,7 +2,7 @@ name: fullstack_demo_frontend publish_to: 'none' environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: cupertino_icons: ^1.0.2 diff --git a/examples/hello/pubspec.yaml b/examples/hello/pubspec.yaml index 24d92d2e..43f7d21f 100644 --- a/examples/hello/pubspec.yaml +++ b/examples/hello/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/examples/json/pubspec.yaml b/examples/json/pubspec.yaml index e9151d12..6eb0cb10 100644 --- a/examples/json/pubspec.yaml +++ b/examples/json/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/examples/protobuf_firestore/pubspec.yaml b/examples/protobuf_firestore/pubspec.yaml index 0a7671a5..891ea987 100644 --- a/examples/protobuf_firestore/pubspec.yaml +++ b/examples/protobuf_firestore/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.3 diff --git a/examples/raw_cloudevent/pubspec.yaml b/examples/raw_cloudevent/pubspec.yaml index 73d33e1a..a1772395 100644 --- a/examples/raw_cloudevent/pubspec.yaml +++ b/examples/raw_cloudevent/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.0 diff --git a/functions_framework/pubspec.yaml b/functions_framework/pubspec.yaml index 9fb6a97a..39d47cc6 100644 --- a/functions_framework/pubspec.yaml +++ b/functions_framework/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/GoogleCloudPlatform/functions-framework-dart resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: args: ^2.0.0 diff --git a/functions_framework_builder/CHANGELOG.md b/functions_framework_builder/CHANGELOG.md index 37d2e3bd..a17eb1ba 100644 --- a/functions_framework_builder/CHANGELOG.md +++ b/functions_framework_builder/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.4.11-wip +- Support the latest versions of `analyzer`, `dart_style` and `source_gen`. - Require Dart 3.5 ## 0.4.10 diff --git a/functions_framework_builder/lib/builder.dart b/functions_framework_builder/lib/builder.dart index 880da2df..a2a3f239 100644 --- a/functions_framework_builder/lib/builder.dart +++ b/functions_framework_builder/lib/builder.dart @@ -48,9 +48,7 @@ class _FunctionsFrameworkBuilder implements Builder { Future build(BuildStep buildStep) async { final entries = {}; - final input = buildStep.inputId; - - final libraryElement = await buildStep.resolver.libraryFor(input); + final libraryElement = await buildStep.inputLibrary; final validator = await FunctionTypeValidator.create(buildStep.resolver); for (var annotatedElement in _fromLibrary(libraryElement)) { @@ -89,7 +87,7 @@ class _FunctionsFrameworkBuilder implements Builder { final importDirectives = [ "'package:functions_framework/serve.dart'", - "'${input.uri}' as $functionsLibraryPrefix", + "'${buildStep.inputId.uri}' as $functionsLibraryPrefix", ]..sort(); var output = ''' @@ -100,7 +98,7 @@ class _FunctionsFrameworkBuilder implements Builder { // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -108,6 +106,8 @@ class _FunctionsFrameworkBuilder implements Builder { // See the License for the specific language governing permissions and // limitations under the License. +// @dart=3.6 + ${importDirectives.map((e) => 'import $e;').join('\n')} Future main(List args) async { @@ -122,7 +122,9 @@ ${cases.join('\n')} '''; try { - output = DartFormatter().format(output); + output = DartFormatter( + languageVersion: libraryElement.languageVersion.effective, + ).format(output); } on FormatterException catch (e, stack) { log.warning('Could not format output.', e, stack); } diff --git a/functions_framework_builder/pubspec.yaml b/functions_framework_builder/pubspec.yaml index 2f5576fd..e1b844bd 100644 --- a/functions_framework_builder/pubspec.yaml +++ b/functions_framework_builder/pubspec.yaml @@ -5,14 +5,14 @@ repository: https://github.com/GoogleCloudPlatform/functions-framework-dart resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: - analyzer: '>=5.12.0 <7.0.0' + analyzer: '>=6.9.0 <8.0.0' build: ^2.3.1 build_config: ^1.0.0 collection: ^1.17.0 - dart_style: ^2.2.4 + dart_style: '>=2.3.7 <4.0.0' # There is a tight version constraint because the builder has a strict # dependency on all features exposed. functions_framework: '>=0.4.0 <0.4.5' @@ -20,7 +20,7 @@ dependencies: meta: ^1.7.0 path: ^1.8.0 shelf: ^1.0.0 - source_gen: ^1.2.3 + source_gen: '>=1.4.0 <3.0.0' source_helper: ^1.3.3 dev_dependencies: diff --git a/functions_framework_builder/test/builder_test.dart b/functions_framework_builder/test/builder_test.dart index cccc4c5d..09c574fe 100644 --- a/functions_framework_builder/test/builder_test.dart +++ b/functions_framework_builder/test/builder_test.dart @@ -669,7 +669,7 @@ String get _outputHeader => ''' // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -677,6 +677,8 @@ String get _outputHeader => ''' // See the License for the specific language governing permissions and // limitations under the License. +// @dart=3.6 + import 'package:functions_framework/serve.dart'; import 'package:$_pkgName/functions.dart' as function_library; diff --git a/google_cloud/pubspec.yaml b/google_cloud/pubspec.yaml index 06a3b381..1f0f9a21 100644 --- a/google_cloud/pubspec.yaml +++ b/google_cloud/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/GoogleCloudPlatform/functions-framework-dart/tree resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: collection: ^1.17.0 diff --git a/integration_test/bin/server.dart b/integration_test/bin/server.dart index 6b155d0e..65b0baff 100644 --- a/integration_test/bin/server.dart +++ b/integration_test/bin/server.dart @@ -5,7 +5,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// @dart=3.6 + import 'package:functions_framework/serve.dart'; import 'package:hello_world_function_test/functions.dart' as function_library; diff --git a/integration_test/pubspec.yaml b/integration_test/pubspec.yaml index c74bb66d..e07b4211 100644 --- a/integration_test/pubspec.yaml +++ b/integration_test/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none resolution: workspace environment: - sdk: ^3.5.0 + sdk: ^3.6.0 dependencies: functions_framework: ^0.4.3+1 diff --git a/mono_repo.yaml b/mono_repo.yaml index 090a1aa0..00abcbcb 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -1,6 +1,7 @@ # https://github.com/google/mono_repo.dart -self_validate: analyze_format +# TODO: need to fix the logic here! +#self_validate: analyze_format merge_stages: - analyze_format diff --git a/pubspec.yaml b/pubspec.yaml index 91877223..8e3d8f2f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: ffd_workspace # Can be anything environment: - sdk: ^3.5.0 + sdk: ^3.6.0 publish_to: none diff --git a/tool/ci.sh b/tool/ci.sh index ea3e54ef..f622b21f 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -75,10 +75,6 @@ for PKG in ${PKGS}; do echo 'flutter analyze --fatal-infos' flutter analyze --fatal-infos || EXIT_CODE=$? ;; - analyze_3) - echo 'flutter analyze' - flutter analyze || EXIT_CODE=$? - ;; command) echo './tool/docker_test_script.sh' ./tool/docker_test_script.sh || EXIT_CODE=$?