From 0b10cfc2055dbebd48da5aa0da9aaae428b4058a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 19:25:06 +0200 Subject: [PATCH 01/18] add melos.yaml --- melos.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 melos.yaml diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 00000000..0adc2ce5 --- /dev/null +++ b/melos.yaml @@ -0,0 +1,8 @@ +name: gql_monorepo +packages: + - cats + - codegen/* + - examples/* + - gql + - gql_pedantic + - links/* From a7c869bb3c74d30417dd1b1a70c258da305b3853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 19:47:46 +0200 Subject: [PATCH 02/18] Update melos.yaml with proper globs Co-authored-by: Mike Diarmid --- melos.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/melos.yaml b/melos.yaml index 0adc2ce5..3b24026b 100644 --- a/melos.yaml +++ b/melos.yaml @@ -1,8 +1,8 @@ name: gql_monorepo packages: - - cats - - codegen/* - - examples/* - - gql - - gql_pedantic - - links/* + - cats/* + - codegen/** + - examples/** + - gql/* + - gql_pedantic/* + - links/** From 080743e29699314ea1628b795dc8ae44cba5c7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 20:23:07 +0200 Subject: [PATCH 03/18] melos in CI #1 --- .github/workflows/dart.yml | 97 ++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index ac115b2e..70073070 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,35 +29,36 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v2 - - name: Activate multipack + - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos + pub global activate uni - name: Check pubspec run: | - multipack --only $PACKAGE pubspec clean - multipack --only $PACKAGE exec git diff --exit-code pubspec.yaml - - name: Override local dependencies + melos clean + melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml + - name: Bootstrap run: | - multipack pubspec hard_override + melos bootstrap - name: Get dependencies run: | - multipack --only $PACKAGE pub get + melos --scope $PACKAGE pub get - name: Check formatting run: | echo "" echo "A list of incorrectly formatted files may follow:" echo "" - multipack --only $PACKAGE fmt -n . --set-exit-if-changed + melos --scope $PACKAGE exec -- uni --tooling legacy format -n . --set-exit-if-changed echo "" - name: Analyze package run: | - multipack --only $PACKAGE analyze --version - multipack --only $PACKAGE analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --version + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . - name: Run tests run: | - multipack --only $PACKAGE exec [ ! -d ./test ] && exit 0 - multipack --only $PACKAGE pub run test + melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 + melos --scope $PACKAGE exec -- uni test examples: strategy: matrix: @@ -74,37 +75,38 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v2 - - name: Activate multipack + - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos + pub global activate uni - name: Check pubspec run: | - multipack --only $PACKAGE pubspec clean - multipack --only $PACKAGE exec git diff --exit-code pubspec.yaml - - name: Override local dependencies + melos --scope $PACKAGE pubspec clean + melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml + - name: Bootstrap run: | - multipack pubspec hard_override + melos bootstrap - name: Get dependencies run: | - multipack --only $PACKAGE pub get + melos --scope $PACKAGE pub get - name: Run builders run: | - multipack --only $PACKAGE pub run build_runner build --delete-conflicting-outputs + melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | - multipack --only $PACKAGE exec git diff --exit-code **/*.gql.dart + melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart - name: Check formatting run: | echo "" echo "A list of incorrectly formatted files may follow:" echo "" - multipack --only $PACKAGE fmt -n . --set-exit-if-changed + melos --scope $PACKAGE uni --tooling legacy format -n . --set-exit-if-changed echo "" - name: Analyze package run: | - multipack --only $PACKAGE analyze --version - multipack --only $PACKAGE analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --version + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . builder_tests: strategy: matrix: @@ -119,41 +121,42 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v2 - - name: Activate multipack + - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos + pub global activate uni - name: Check pubspec run: | - multipack --only $PACKAGE pubspec clean - multipack --only $PACKAGE exec git diff --exit-code pubspec.yaml - - name: Override local dependencies + melos --scope $PACKAGE pubspec clean + melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml + - name: Bootstrap run: | - multipack pubspec hard_override + melos bootstrap - name: Get dependencies run: | - multipack --only $PACKAGE pub get + melos --scope $PACKAGE pub get - name: Run builders run: | - multipack --only $PACKAGE pub run build_runner build --delete-conflicting-outputs + melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | - multipack --only $PACKAGE exec git diff --exit-code **/*.gql.dart + melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart - name: Check formatting run: | echo "" echo "A list of incorrectly formatted files may follow:" echo "" - multipack --only $PACKAGE fmt -n . --set-exit-if-changed + melos --scope $PACKAGE uni --tooling legacy format -n . --set-exit-if-changed echo "" - name: Analyze package run: | - multipack --only $PACKAGE analyze --version - multipack --only $PACKAGE analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --version + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . - name: Run tests run: | - multipack --only $PACKAGE exec [ ! -d ./test ] && exit 0 - multipack --only $PACKAGE pub run test + melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 + melos --scope $PACKAGE exec -- uni test publish_dry_run: runs-on: ubuntu-latest @@ -166,20 +169,21 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v2 - - name: Activate multipack + - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos + pub global activate uni - name: Bump to alpha version run: | - multipack --only $PACKAGES pubspec bump-alpha + melos --scope $PACKAGES pubspec bump-alpha - name: Sync package versions run: | - multipack --only $PACKAGES pubspec sync-versions + melos --scope $PACKAGES pubspec sync-versions - name: Publish packages run: | echo "{\"accessToken\":\"$PUB_ACCESS_TOKEN\",\"refreshToken\":\"$PUB_REFRESH_TOKEN\",\"idToken\":null,\"tokenEndpoint\":\"https://accounts.google.com/o/oauth2/token\",\"scopes\":[\"openid\",\"https://www.googleapis.com/auth/userinfo.email\"],\"expiration\":1588334512218}" > $HOME/.pub-cache/credentials.json - multipack --only $PACKAGES pub publish --dry-run + melos --scope $PACKAGES pub publish --dry-run check_svg: runs-on: ubuntu-latest container: @@ -191,13 +195,14 @@ jobs: run: | apt update apt install -y graphviz - - name: Activate multipack + - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos + pub global activate uni - name: Generate SVG run: | - multipack info | dot -Tsvg -o docs/gql.svg + melos info | dot -Tsvg -o docs/gql.svg cat docs/gql.svg - name: Check changes run: | From 2e33b0b4133fe99b09c23f8b15ccb39ed28aaf51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 20:34:47 +0200 Subject: [PATCH 04/18] scope bootstrap --- .github/workflows/dart.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 70073070..b50cf0cd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,7 +40,7 @@ jobs: melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml - name: Bootstrap run: | - melos bootstrap + melos --scope $PACKAGE bootstrap - name: Get dependencies run: | melos --scope $PACKAGE pub get @@ -86,7 +86,7 @@ jobs: melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml - name: Bootstrap run: | - melos bootstrap + melos --scope $PACKAGE bootstrap - name: Get dependencies run: | melos --scope $PACKAGE pub get @@ -132,7 +132,7 @@ jobs: melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml - name: Bootstrap run: | - melos bootstrap + melos --scope $PACKAGE bootstrap - name: Get dependencies run: | melos --scope $PACKAGE pub get From 11843adb47ce0ba85ee5295f6ffcc6d9f6b7e821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 20:38:02 +0200 Subject: [PATCH 05/18] fix pub get --- .github/workflows/dart.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b50cf0cd..f9a14cfd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -43,7 +43,7 @@ jobs: melos --scope $PACKAGE bootstrap - name: Get dependencies run: | - melos --scope $PACKAGE pub get + melos --scope $PACKAGE exec -- uni pub get - name: Check formatting run: | echo "" @@ -89,7 +89,7 @@ jobs: melos --scope $PACKAGE bootstrap - name: Get dependencies run: | - melos --scope $PACKAGE pub get + melos --scope $PACKAGE exec -- uni pub get - name: Run builders run: | melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs @@ -135,7 +135,7 @@ jobs: melos --scope $PACKAGE bootstrap - name: Get dependencies run: | - melos --scope $PACKAGE pub get + melos --scope $PACKAGE exec -- uni pub get - name: Run builders run: | melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs From 69f1b1dad2eec73638fd82ec937ea0c9ad432e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 20:46:56 +0200 Subject: [PATCH 06/18] remove --no-hint --- .github/workflows/dart.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index f9a14cfd..5602b240 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -54,7 +54,7 @@ jobs: - name: Analyze package run: | melos --scope $PACKAGE exec -- uni analyze --version - melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 @@ -106,7 +106,7 @@ jobs: - name: Analyze package run: | melos --scope $PACKAGE exec -- uni analyze --version - melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . builder_tests: strategy: matrix: @@ -152,7 +152,7 @@ jobs: - name: Analyze package run: | melos --scope $PACKAGE exec -- uni analyze --version - melos --scope $PACKAGE exec -- uni analyze --fatal-warnings --no-hints . + melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 From 7777237ca3418d88880f4618eda0bac3ce013c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:05:37 +0200 Subject: [PATCH 07/18] fix check for test dir --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 5602b240..43d5fb4c 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -57,7 +57,7 @@ jobs: melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | - melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 + melos --scope $PACKAGE exec -- [ ! -d ./test ] || exit 0 melos --scope $PACKAGE exec -- uni test examples: strategy: @@ -155,7 +155,7 @@ jobs: melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | - melos --scope $PACKAGE exec -- [ ! -d ./test ] && exit 0 + melos --scope $PACKAGE exec -- [ ! -d ./test ] || exit 0 melos --scope $PACKAGE exec -- uni test publish_dry_run: From 9d1876f379259eec1d49e3eb90c9d180797fa498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:18:39 +0200 Subject: [PATCH 08/18] fix check for test dir --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 43d5fb4c..77ee8835 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -57,7 +57,7 @@ jobs: melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | - melos --scope $PACKAGE exec -- [ ! -d ./test ] || exit 0 + melos --scope $PACKAGE exec -- [ -d ./test ] || exit 0 melos --scope $PACKAGE exec -- uni test examples: strategy: @@ -155,7 +155,7 @@ jobs: melos --scope $PACKAGE exec -- uni analyze --fatal-warnings . - name: Run tests run: | - melos --scope $PACKAGE exec -- [ ! -d ./test ] || exit 0 + melos --scope $PACKAGE exec -- [ -d ./test ] || exit 0 melos --scope $PACKAGE exec -- uni test publish_dry_run: From 5527fe58fd9580951fbf239badf09c37ae066911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:33:54 +0200 Subject: [PATCH 09/18] fix melos clean --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 77ee8835..a7b60492 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -82,7 +82,7 @@ jobs: pub global activate uni - name: Check pubspec run: | - melos --scope $PACKAGE pubspec clean + melos clean melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml - name: Bootstrap run: | @@ -128,7 +128,7 @@ jobs: pub global activate uni - name: Check pubspec run: | - melos --scope $PACKAGE pubspec clean + melos clean melos --scope $PACKAGE exec -- git diff --exit-code pubspec.yaml - name: Bootstrap run: | From cdaa3b9eb0b4e90e0c41c50a14ae9a48c0429680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:34:06 +0200 Subject: [PATCH 10/18] fix imports and dependencies --- links/gql_http_link/lib/src/_utils.dart | 2 -- links/gql_http_link/pubspec.yaml | 1 - 2 files changed, 3 deletions(-) diff --git a/links/gql_http_link/lib/src/_utils.dart b/links/gql_http_link/lib/src/_utils.dart index 97ece858..84abb4cd 100644 --- a/links/gql_http_link/lib/src/_utils.dart +++ b/links/gql_http_link/lib/src/_utils.dart @@ -1,6 +1,4 @@ import "dart:convert"; -import "dart:typed_data"; -import "package:meta/meta.dart"; import "package:http/http.dart"; import "package:gql/ast.dart"; diff --git a/links/gql_http_link/pubspec.yaml b/links/gql_http_link/pubspec.yaml index 839c12cd..67ed54f2 100644 --- a/links/gql_http_link/pubspec.yaml +++ b/links/gql_http_link/pubspec.yaml @@ -15,4 +15,3 @@ dev_dependencies: test: ^1.0.0 mockito: ^4.1.1 gql_pedantic: ^1.0.2 - http_parser: ^3.1.4 From 032ba5d19fc3e6cce85bd1d75e3f73e9034caf6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:37:21 +0200 Subject: [PATCH 11/18] fix build --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a7b60492..c8488093 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -92,7 +92,7 @@ jobs: melos --scope $PACKAGE exec -- uni pub get - name: Run builders run: | - melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs + melos --scope $PACKAGE exec --uni pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart @@ -138,7 +138,7 @@ jobs: melos --scope $PACKAGE exec -- uni pub get - name: Run builders run: | - melos --scope $PACKAGE pub run build_runner build --delete-conflicting-outputs + melos --scope $PACKAGE exec -- uni pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart From b21893a4a336b00b565ddf1542628d8dd4553d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:41:00 +0200 Subject: [PATCH 12/18] fix fixes --- .github/workflows/dart.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c8488093..6544355e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -92,7 +92,7 @@ jobs: melos --scope $PACKAGE exec -- uni pub get - name: Run builders run: | - melos --scope $PACKAGE exec --uni pub run build_runner build --delete-conflicting-outputs + melos --scope $PACKAGE exec -- uni pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart @@ -101,7 +101,7 @@ jobs: echo "" echo "A list of incorrectly formatted files may follow:" echo "" - melos --scope $PACKAGE uni --tooling legacy format -n . --set-exit-if-changed + melos --scope $PACKAGE exec -- uni --tooling legacy format -n . --set-exit-if-changed echo "" - name: Analyze package run: | @@ -147,7 +147,7 @@ jobs: echo "" echo "A list of incorrectly formatted files may follow:" echo "" - melos --scope $PACKAGE uni --tooling legacy format -n . --set-exit-if-changed + melos --scope $PACKAGE exec -- uni --tooling legacy format -n . --set-exit-if-changed echo "" - name: Analyze package run: | From c81b4cf6c2f347f6fef9e67f1e6071a1fb3b954b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:48:22 +0200 Subject: [PATCH 13/18] bump using multipack --- .github/workflows/dart.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 6544355e..bcf1e700 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -172,18 +172,17 @@ jobs: - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate melos - pub global activate uni + pub global activate multipack - name: Bump to alpha version run: | - melos --scope $PACKAGES pubspec bump-alpha + multipack --only $PACKAGES pubspec bump-alpha - name: Sync package versions run: | - melos --scope $PACKAGES pubspec sync-versions + multipack --only $PACKAGES pubspec sync-versions - name: Publish packages run: | echo "{\"accessToken\":\"$PUB_ACCESS_TOKEN\",\"refreshToken\":\"$PUB_REFRESH_TOKEN\",\"idToken\":null,\"tokenEndpoint\":\"https://accounts.google.com/o/oauth2/token\",\"scopes\":[\"openid\",\"https://www.googleapis.com/auth/userinfo.email\"],\"expiration\":1588334512218}" > $HOME/.pub-cache/credentials.json - melos --scope $PACKAGES pub publish --dry-run + multipack --only $PACKAGES pub publish --dry-run check_svg: runs-on: ubuntu-latest container: @@ -198,11 +197,10 @@ jobs: - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate melos - pub global activate uni + pub global activate multipack - name: Generate SVG run: | - melos info | dot -Tsvg -o docs/gql.svg + multipack info | dot -Tsvg -o docs/gql.svg cat docs/gql.svg - name: Check changes run: | From ab7e8d14328c0fec2872d051d80280b3fd48e68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 21:53:55 +0200 Subject: [PATCH 14/18] fix diff check --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index bcf1e700..6f66e488 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -95,7 +95,7 @@ jobs: melos --scope $PACKAGE exec -- uni pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | - melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart + melos --scope $PACKAGE exec -- git diff --exit-code **/*.gql.dart - name: Check formatting run: | echo "" @@ -141,7 +141,7 @@ jobs: melos --scope $PACKAGE exec -- uni pub run build_runner build --delete-conflicting-outputs - name: Check build diff run: | - melos --scope $PACKAGE exec git diff --exit-code **/*.gql.dart + melos --scope $PACKAGE exec -- git diff --exit-code **/*.gql.dart - name: Check formatting run: | echo "" From 91a47174fa61377a7be6d43f59185b56ca23f84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 23:09:16 +0200 Subject: [PATCH 15/18] add readme note --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f905c99b..1e35be50 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Star on GitHub][github-star-badge]][github-star-link] [![Watch on GitHub][github-forks-badge]][github-forks-link] [![Discord][discord-badge]][discord-link] +[![Melos][melos-badge]][melos-link] [license-badge]: https://img.shields.io/github/license/gql-dart/gql.svg?style=for-the-badge [license-link]: https://github.com/gql-dart/gql/blob/master/LICENSE @@ -21,6 +22,8 @@ [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff [discord-link]: https://discord.gg/NryjpVa +[melos-badge]: https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=for-the-badge +[melos-link]: https://github.com/invertase/melos This is an effort to advance the Dart GraphQL ecosystem. From dcdf41489eac2aff1a3bdb7b03acf6d876413b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 23:43:55 +0200 Subject: [PATCH 16/18] draw svg using melos --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 6f66e488..aac33bae 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -197,10 +197,10 @@ jobs: - name: Activate tools run: | echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH - pub global activate multipack + pub global activate melos - name: Generate SVG run: | - multipack info | dot -Tsvg -o docs/gql.svg + melos list --gviz | dot -Tsvg -o docs/gql.svg cat docs/gql.svg - name: Check changes run: | From e87b729f84d3acf90e2cfdac2abbddd90f2cf579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Fri, 12 Feb 2021 23:46:50 +0200 Subject: [PATCH 17/18] update svg --- docs/gql.svg | 873 ++++++++++++++++++++++++++------------------------- 1 file changed, 437 insertions(+), 436 deletions(-) diff --git a/docs/gql.svg b/docs/gql.svg index 0adbb924..f98936de 100644 --- a/docs/gql.svg +++ b/docs/gql.svg @@ -6,585 +6,586 @@ - + packages - + -cluster - +cluster . + +. -cluster links - -links +cluster codegen + +codegen -cluster codegen - -codegen +cluster links + +links cluster examples - -examples + +examples - + -gql_pedantic - -gql_pedantic +cats + +cats - + -cats - -cats +end_to_end_test + +end_to_end_test - - -gql - -gql + + +gql_build + +gql_build - + -gql->gql_pedantic - - +end_to_end_test->gql_build + + - + + +gql_code_builder + +gql_code_builder + + -gql->cats - - +end_to_end_test->gql_code_builder + + - + gql_exec - -gql_exec - - - -gql_exec->gql_pedantic - - + +gql_exec - + -gql_exec->gql - - +end_to_end_test->gql_exec + + - - -gql_link - -gql_link + + +gql + +gql - - -gql_link->gql_pedantic - - + + +gql->cats + + - + + +gql_pedantic + +gql_pedantic + + -gql_link->gql - - +gql->gql_pedantic + + - + -gql_link->gql_exec - - - - - -gql_websocket_link - -gql_websocket_link +gql_build->gql + + - - -gql_websocket_link->gql_pedantic - - + + +gql_build->gql_code_builder + + - + -gql_websocket_link->gql - - +gql_build->gql_pedantic + + - + -gql_websocket_link->gql_exec - - +gql_code_builder->gql + + - + -gql_websocket_link->gql_link - - +gql_code_builder->gql_exec + + - - -gql_transform_link - -gql_transform_link + + +gql_code_builder->gql_pedantic + + - - -gql_transform_link->gql_pedantic - - + + +gql_dedupe_link + +gql_dedupe_link - + -gql_transform_link->gql - - +gql_dedupe_link->gql + + - + -gql_transform_link->gql_exec - - +gql_dedupe_link->gql_exec + + - + + +gql_link + +gql_link + + -gql_transform_link->gql_link - - +gql_dedupe_link->gql_link + + - - -gql_http_link - -gql_http_link + + +gql_dedupe_link->gql_pedantic + + - - -gql_http_link->gql_pedantic - - + + +gql_dio_link + +gql_dio_link - + + +gql_dio_link->gql + + + + -gql_http_link->gql - - +gql_dio_link->gql_exec + + - + -gql_http_link->gql_exec - - +gql_dio_link->gql_link + + - - -gql_http_link->gql_link - - + + +gql_dio_link->gql_pedantic + + - + gql_error_link - -gql_error_link - - - -gql_error_link->gql_pedantic - - + +gql_error_link gql_error_link->gql - - + + gql_error_link->gql_exec - - + + gql_error_link->gql_link - - + + - - -gql_code_builder - -gql_code_builder + + +gql_error_link->gql_pedantic + + - - -gql_code_builder->gql_pedantic - - + + +gql_example_build + +gql_example_build - + -gql_code_builder->gql - - +gql_example_build->gql_build + + - + -gql_code_builder->gql_exec - - +gql_example_build->gql_pedantic + + - - -gql_build - -gql_build + + +gql_example_cli + +gql_example_cli - - -gql_build->gql_pedantic - - + + +gql_example_cli->gql + + - + + +gql_example_cli->gql_build + + + + -gql_build->gql - - +gql_example_cli->gql_exec + + - + + +gql_http_link + +gql_http_link + + -gql_build->gql_code_builder - - +gql_example_cli->gql_http_link + + - - -gql_example_http_auth_link - -gql_example_http_auth_link + + +gql_example_cli->gql_link + + - - -gql_example_http_auth_link->gql_pedantic - - + + +gql_example_cli->gql_pedantic + + - - -gql_example_http_auth_link->gql - - + + +gql_example_cli_github + +gql_example_cli_github - + -gql_example_http_auth_link->gql_exec - - +gql_example_cli_github->gql + + - - -gql_example_http_auth_link->gql_link - - + + +gql_example_cli_github->gql_build + + - + + +gql_example_cli_github->gql_exec + + + + -gql_example_http_auth_link->gql_transform_link - - +gql_example_cli_github->gql_http_link + + - + -gql_example_http_auth_link->gql_http_link - - +gql_example_cli_github->gql_link + + - - -gql_example_http_auth_link->gql_error_link - - + + +gql_example_cli_github->gql_pedantic + + - - -gql_example_http_auth_link->gql_build - - + + +gql_transform_link + +gql_transform_link - - -gql_example_flutter - -gql_example_flutter + + +gql_example_cli_github->gql_transform_link + + - - -gql_example_flutter->gql_pedantic - - + + +gql_example_dio_link + +gql_example_dio_link - - -gql_example_flutter->gql - - + + +gql_example_dio_link->gql + + - + + +gql_example_dio_link->gql_dio_link + + + + -gql_example_flutter->gql_exec - - +gql_example_dio_link->gql_exec + + - - -gql_example_flutter->gql_link - - + + +gql_example_dio_link->gql_link + + - - -gql_example_flutter->gql_http_link - - + + +gql_example_flutter + +gql_example_flutter - + -gql_example_flutter->gql_build - - - - - -gql_dio_link - -gql_dio_link +gql_example_flutter->gql + + - + -gql_dio_link->gql_pedantic - - +gql_example_flutter->gql_build + + - - -gql_dio_link->gql - - + + +gql_example_flutter->gql_exec + + - + -gql_dio_link->gql_exec - - - - - -gql_dio_link->gql_link - - +gql_example_flutter->gql_http_link + + - - -gql_example_dio_link - -gql_example_dio_link + + +gql_example_flutter->gql_link + + - + -gql_example_dio_link->gql - - +gql_example_flutter->gql_pedantic + + - - -gql_example_dio_link->gql_exec - - + + +gql_example_http_auth_link + +gql_example_http_auth_link - + -gql_example_dio_link->gql_link - - +gql_example_http_auth_link->gql + + - - -gql_example_dio_link->gql_dio_link - - + + +gql_example_http_auth_link->gql_build + + - - -gql_example_cli_github - -gql_example_cli_github + + +gql_example_http_auth_link->gql_error_link + + - - -gql_example_cli_github->gql_pedantic - - + + +gql_example_http_auth_link->gql_exec + + - + -gql_example_cli_github->gql - - - - - -gql_example_cli_github->gql_exec - - +gql_example_http_auth_link->gql_http_link + + - + -gql_example_cli_github->gql_link - - +gql_example_http_auth_link->gql_link + + - + -gql_example_cli_github->gql_transform_link - - - - - -gql_example_cli_github->gql_http_link - - +gql_example_http_auth_link->gql_pedantic + + - - -gql_example_cli_github->gql_build - - + + +gql_example_http_auth_link->gql_transform_link + + - - -gql_example_cli - -gql_example_cli + + +gql_exec->gql + + - - -gql_example_cli->gql_pedantic - - + + +gql_exec->gql_pedantic + + - + -gql_example_cli->gql - - - - - -gql_example_cli->gql_exec - - +gql_http_link->gql + + - + -gql_example_cli->gql_link - - +gql_http_link->gql_exec + + - + + +gql_http_link->gql_link + + + + -gql_example_cli->gql_http_link - - +gql_http_link->gql_pedantic + + - - -gql_example_cli->gql_build - - + + +gql_link->gql + + - - -gql_example_build - -gql_example_build + + +gql_link->gql_exec + + - + -gql_example_build->gql_pedantic - - - - - -gql_example_build->gql_build - - - - - -gql_dedupe_link - -gql_dedupe_link +gql_link->gql_pedantic + + - - -gql_dedupe_link->gql_pedantic - - + + +gql_transform_link->gql + + - - -gql_dedupe_link->gql - - + + +gql_transform_link->gql_exec + + - + -gql_dedupe_link->gql_exec - - +gql_transform_link->gql_link + + - - -gql_dedupe_link->gql_link - - + + +gql_transform_link->gql_pedantic + + - + -end_to_end_test - -end_to_end_test +gql_websocket_link + +gql_websocket_link - - -end_to_end_test->gql_exec - - + + +gql_websocket_link->gql + + - - -end_to_end_test->gql_code_builder - - + + +gql_websocket_link->gql_exec + + - + -end_to_end_test->gql_build - - +gql_websocket_link->gql_link + + + + + +gql_websocket_link->gql_pedantic + + From 73d910dd68b3ae81165bc30c6db1abb62e1b0f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Tue, 16 Feb 2021 00:27:13 +0200 Subject: [PATCH 18/18] update readme --- README.md | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1e35be50..0122cd01 100644 --- a/README.md +++ b/README.md @@ -157,31 +157,18 @@ and to build a community around this vendor-neutral implementation. Community contributions are welcome. -### `multipack` -This repo uses [`multipack`](https://github.com/gql-dart/multipack). To activate it run the following command. +### `melos` +This repo uses [`melos`](https://docs.page/invertase/melos) for monorepo management. To activate it run the following command. ```bash -pub global activate multipack +dart pub global activate melos ``` -`multipack` provides a simple way of running commands in multiple packages at once. It builds a directed graph of packages -to run commands in topological order. - -Link all local packages by running -```bash -multipack pubspec override -``` - -Get all packages by running -```bash -multipack pub get -``` - -Clean up the pubspec file before publishing +Start your work by [bootstrapping the monorepo](https://docs.page/invertase/melos/getting-started#bootstrapping). ```bash -multipack pubspec clean +melos bootstrap ``` -See more usage examples in [.github/workflows/dart.yml](.github/workflows/dart.yml). +See more usage examples of `melos` in [.github/workflows/dart.yml](.github/workflows/dart.yml). ## Features and bugs