From 0d4dda3d792eb7bbae4003439d812e570803dcd8 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:20:23 +1000 Subject: [PATCH 1/6] ci: Add autofix.yml --- .github/workflows/autofix.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/autofix.yml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000000..c377ec579c --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,27 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + autofix: + name: autofix + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Tools + uses: tanstack/config/.github/setup@main + - name: Fix formatting + run: pnpm prettier:write + - name: Apply fixes + uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a From ae4b5d35165c22750b72e82da1f7999b2c86c16c Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:23:53 +1000 Subject: [PATCH 2/6] Intentionally break formatting :( --- nx.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nx.json b/nx.json index afb9c2239a..57744909c7 100644 --- a/nx.json +++ b/nx.json @@ -3,10 +3,9 @@ "defaultBase": "main", "nxCloudAccessToken": "ZDdkNDA4MGEtYjNmYi00MWI4LWE1N2QtYTdlNmYxMGJlZWM2fHJlYWQ=", "useInferencePlugins": false, - "parallel": 5, + "parallel":5, "namedInputs": { - "sharedGlobals": [ - "{workspaceRoot}/.nvmrc", + "sharedGlobals": [ "{workspaceRoot}/.nvmrc", "{workspaceRoot}/package.json", "{workspaceRoot}/scripts/getTsupConfig.js", "{workspaceRoot}/tsconfig.json" From b9aa49ee9235db3c1d6270f3ede7717c6942a1f7 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:24:59 +0000 Subject: [PATCH 3/6] [autofix.ci] apply automated fixes --- nx.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nx.json b/nx.json index 57744909c7..afb9c2239a 100644 --- a/nx.json +++ b/nx.json @@ -3,9 +3,10 @@ "defaultBase": "main", "nxCloudAccessToken": "ZDdkNDA4MGEtYjNmYi00MWI4LWE1N2QtYTdlNmYxMGJlZWM2fHJlYWQ=", "useInferencePlugins": false, - "parallel":5, + "parallel": 5, "namedInputs": { - "sharedGlobals": [ "{workspaceRoot}/.nvmrc", + "sharedGlobals": [ + "{workspaceRoot}/.nvmrc", "{workspaceRoot}/package.json", "{workspaceRoot}/scripts/getTsupConfig.js", "{workspaceRoot}/tsconfig.json" From 40f95106b7ec8c0e0a4337e5acc42cd8d0bf1108 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:28:37 +1000 Subject: [PATCH 4/6] Update commit message --- .github/workflows/autofix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index c377ec579c..d020ba02ec 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -17,11 +17,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Fix formatting run: pnpm prettier:write - name: Apply fixes uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a + with: + commit-message: 'ci: apply automated fixes' From 51e8b21a6023b6a6ca21c904de62e09e9a1970ff Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:30:34 +1000 Subject: [PATCH 5/6] Oops, very long line --- packages/query-core/src/infiniteQueryBehavior.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/query-core/src/infiniteQueryBehavior.ts b/packages/query-core/src/infiniteQueryBehavior.ts index 90bf8af2a4..7e8ee44a9a 100644 --- a/packages/query-core/src/infiniteQueryBehavior.ts +++ b/packages/query-core/src/infiniteQueryBehavior.ts @@ -8,9 +8,7 @@ import type { QueryKey, } from './types' -export function infiniteQueryBehavior( - pages?: number, -): QueryBehavior> { +export function infiniteQueryBehavior(pages?: number): QueryBehavior> { return { onFetch: (context, query) => { const fetchFn = async () => { From 765c7947e92e3d89687322d434cf24dfe6788812 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:31:48 +0000 Subject: [PATCH 6/6] ci: apply automated fixes --- packages/query-core/src/infiniteQueryBehavior.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/query-core/src/infiniteQueryBehavior.ts b/packages/query-core/src/infiniteQueryBehavior.ts index 7e8ee44a9a..90bf8af2a4 100644 --- a/packages/query-core/src/infiniteQueryBehavior.ts +++ b/packages/query-core/src/infiniteQueryBehavior.ts @@ -8,7 +8,9 @@ import type { QueryKey, } from './types' -export function infiniteQueryBehavior(pages?: number): QueryBehavior> { +export function infiniteQueryBehavior( + pages?: number, +): QueryBehavior> { return { onFetch: (context, query) => { const fetchFn = async () => {