Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
zhennann authored Jul 29, 2024
2 parents b58a2a6 + 74f10b7 commit cf3a6f7
Show file tree
Hide file tree
Showing 456 changed files with 15,586 additions and 14,515 deletions.
12 changes: 0 additions & 12 deletions .codesandbox/ci.json

This file was deleted.

41 changes: 41 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:recommended",
"group:allNonMajor",
"schedule:weekly",
":approveMajorUpdates",
":automergeMinor",
":disablePeerDependencies",
":maintainLockFilesMonthly",
":semanticCommits",
":semanticCommitTypeAll(chore)"
],
"ignorePresets": [":ignoreModulesAndTests"],
"labels": ["dependencies"],
"rangeStrategy": "bump",
"postUpdateOptions": ["pnpmDedupe"],
"ignoreDeps": [
"@types/node",
"@types/react",
"@types/react-dom",
"eslint-plugin-react-compiler",
"node",
"react",
"react-dom",
"react-scripts",
"tsup",
"typescript",
"typescript47",
"typescript48",
"typescript49",
"typescript50",
"typescript51",
"typescript52",
"vue",
"vue-tsc",
"vue2",
"vue2.7"
]
}
29 changes: 29 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [main, alpha, beta, rc, v4]

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/[email protected]
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Apply fixes
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'ci: apply automated fixes'
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta', 'rc', 'v4']
branches: [main, alpha, beta, rc, v4]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -16,14 +16,18 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: write
id-token: write

jobs:
test-and-publish:
name: Test & Publish
if: github.repository == 'TanStack/query'
if: github.repository_owner == 'TanStack'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- name: Start Nx Agents
Expand All @@ -42,11 +46,11 @@ jobs:
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.5.0
with:
directory: packages
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v4.3.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
31 changes: 24 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: pr

on:
pull_request:
paths-ignore:
- 'media/**'
push:
branches: ['svelte-5-adapter']

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -12,31 +12,48 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- name: Start Nx Agents
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v4
uses: nrwl/nx-set-shas@v4.0.6
with:
main-branch-name: 'main'
- name: Run Tests
main-branch-name: main
- name: Run Checks
run: pnpm run test:pr --parallel=3
- name: Stop Nx Agents
if: ${{ always() }}
run: npx nx-cloud stop-all-agents
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.5.0
with:
directory: packages
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
preview:
name: Preview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
run: pnpm run build:all
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

3 changes: 0 additions & 3 deletions .lintstagedrc

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.2.0
22.4.0
42 changes: 42 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
function readPackage(pkg, context) {
// [email protected]
if (pkg.name === 'react-scripts' && pkg.version === '4.0.3') {
delete pkg.dependencies['@typescript-eslint/eslint-plugin']
delete pkg.dependencies['@typescript-eslint/parser']
delete pkg.dependencies['babel-eslint']
delete pkg.dependencies['babel-jest']
delete pkg.dependencies['eslint']
delete pkg.dependencies['eslint-config-react-app']
delete pkg.dependencies['eslint-plugin-flowtype']
delete pkg.dependencies['eslint-plugin-import']
delete pkg.dependencies['eslint-plugin-jest']
delete pkg.dependencies['eslint-plugin-jsx-a11y']
delete pkg.dependencies['eslint-plugin-react']
delete pkg.dependencies['eslint-plugin-react-hooks']
delete pkg.dependencies['eslint-plugin-testing-library']
delete pkg.dependencies['jest']
delete pkg.dependencies['jest-circus']
delete pkg.dependencies['jest-resolve']
delete pkg.dependencies['jest-watch-typeahead']
context.log('Removed unused dependencies from [email protected]')
}

// [email protected]
if (pkg.name === 'react-scripts' && pkg.version === '5.0.1') {
delete pkg.dependencies['babel-jest']
delete pkg.dependencies['eslint']
delete pkg.dependencies['eslint-config-react-app']
delete pkg.dependencies['jest']
delete pkg.dependencies['jest-resolve']
delete pkg.dependencies['jest-watch-typeahead']
context.log('Removed unused dependencies from [email protected]')
}

return pkg
}

module.exports = {
hooks: {
readPackage,
},
}
40 changes: 37 additions & 3 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,40 @@
"to": "framework/solid/reference/createQuery"
}
]
},
{
"label": "svelte",
"children": [
{
"label": "Svelte Reference",
"to": "framework/svelte/reference/index"
},
{
"label": "Functions / createQuery",
"to": "framework/svelte/reference/functions/createquery"
},
{
"label": "Functions / createMutation",
"to": "framework/svelte/reference/functions/createmutation"
}
]
},
{
"label": "angular",
"children": [
{
"label": "Angular Reference",
"to": "framework/angular/reference/index"
},
{
"label": "Functions / injectQuery",
"to": "framework/angular/reference/functions/injectquery"
},
{
"label": "Functions / injectMutation",
"to": "framework/angular/reference/functions/injectmutation"
}
]
}
]
},
Expand Down Expand Up @@ -903,7 +937,7 @@
},
{
"label": "Basic",
"to": "framework/solid/examples/basic-typescript"
"to": "framework/solid/examples/basic"
},
{
"label": "Basic w/ GraphQL-Request",
Expand Down Expand Up @@ -964,8 +998,8 @@
"to": "framework/svelte/examples/ssr"
},
{
"label": "Optimistic Updates in TypeScript",
"to": "framework/svelte/examples/optimistic-updates-typescript"
"label": "Optimistic Updates",
"to": "framework/svelte/examples/optimistic-updates"
},
{
"label": "Playground",
Expand Down
Loading

0 comments on commit cf3a6f7

Please sign in to comment.