-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' into feature/use-client
- Loading branch information
Showing
290 changed files
with
3,057 additions
and
3,714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
{ | ||
"installCommand": "install:csb", | ||
"sandboxes": ["/examples/react/basic-typescript", "/examples/solid/basic-typescript", "/examples/svelte/basic", "/examples/vue/basic"], | ||
"buildCommand": "build:all", | ||
"sandboxes": [ | ||
"/examples/react/basic-typescript", | ||
"/examples/solid/basic-typescript", | ||
"/examples/svelte/basic", | ||
"/examples/vue/basic" | ||
], | ||
"packages": ["packages/**"], | ||
"node": "16" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// @ts-check | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
const config = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'compat', 'import'], | ||
extends: [ | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:compat/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'prettier', | ||
], | ||
env: { | ||
browser: true, | ||
es2020: true, | ||
}, | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: './tsconfig.json', | ||
sourceType: 'module', | ||
ecmaVersion: 2020, | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
typescript: true, | ||
}, | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/ban-types': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ prefer: 'type-imports' }, | ||
], | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-unnecessary-condition': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-inferrable-types': [ | ||
'error', | ||
{ ignoreParameters: true }, | ||
], | ||
'import/default': 'off', | ||
'import/export': 'off', | ||
'import/newline-after-import': 'error', | ||
'import/no-cycle': 'error', | ||
'import/no-duplicates': 'off', | ||
'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }], | ||
'import/no-unused-modules': ['off', { unusedExports: true }], | ||
'no-redeclare': 'off', | ||
'no-shadow': 'error', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.test.{ts,tsx}'], | ||
rules: { | ||
'@typescript-eslint/no-unnecessary-condition': 'off', | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
name: ci | ||
concurrency: | ||
group: publish-${{ github.github.base_ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
@@ -13,9 +11,15 @@ on: | |
- 'main' | ||
- 'alpha' | ||
- 'beta' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
NX_DAEMON: false | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} | ||
|
||
jobs: | ||
test-and-publish: | ||
if: github.repository == 'TanStack/query' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta') | ||
|
@@ -38,7 +42,7 @@ jobs: | |
- name: Run Tests | ||
uses: nick-fields/[email protected] | ||
with: | ||
command: pnpm run test:ci --base=${{ github.event.before || 'origin/main' }} | ||
command: pnpm run test:ci | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
- name: Publish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,96 @@ | ||
name: pr | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
NX_DAEMON: false | ||
NX_CLOUD_DISTRIBUTED_EXECUTION: true | ||
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: 3 | ||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} | ||
|
||
jobs: | ||
agent: | ||
name: 'Nx Cloud Agents' | ||
main: | ||
name: Nx Cloud - Main Job | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
agent: [1, 2, 3, 4] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- uses: pnpm/[email protected] | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- name: Start Nx Agent ${{ matrix.agent }} | ||
run: npx nx-cloud start-agent | ||
orchestrator: | ||
name: 'Nx Cloud Orchestrator' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
- name: Get appropriate base and head commits for `nx affected` commands | ||
uses: nrwl/nx-set-shas@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- name: Derive appropriate SHAs for base and head for `nx affected` commands | ||
uses: nrwl/nx-set-shas@v2 | ||
main-branch-name: 'alpha' | ||
- run: | | ||
echo "BASE: ${{ env.NX_BASE }}" | ||
echo "HEAD: ${{ env.NX_HEAD }}" | ||
- name: Start CI Orchestrator | ||
run: npx nx-cloud start-ci-run | ||
- name: Run All Checks | ||
- name: Run Tests | ||
uses: nick-fields/[email protected] | ||
env: | ||
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 3 | ||
command: npx nx affected --targets=test:eslint,test:types,test:build,test:lib --base=${{ github.event.pull_request.base.sha }} | ||
command: npx nx affected --targets=test:eslint,test:lib,test:types,test:build | ||
- name: Stop Agents | ||
run: npx nx-cloud stop-all-agents | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
agents: | ||
name: Nx Cloud - Agents | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
agent: [1, 2, 3] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- name: Start Nx Agent ${{ matrix.agent }} | ||
run: npx nx-cloud start-agent | ||
format: | ||
name: 'Format' | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- uses: pnpm/[email protected] | ||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --filter "./packages/**" --filter query --prefer-offline install | ||
- run: pnpm run test:format --base=${{ github.event.pull_request.base.sha }} | ||
- name: Run prettier | ||
run: pnpm run test:format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/packages/svelte-query/.svelte-kit | ||
/packages/react-query/build | ||
**/.next | ||
**/.svelte-kit | ||
**/build | ||
**/coverage | ||
**/dist | ||
/packages/codemods/**/__testfixtures__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.