Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ jobs:
with:
fetch-depth: '0'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down
16 changes: 6 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@

# dependencies
node_modules
package-lock.json
yarn.lock

# builds
types
build
*/build
dist
lib
es
artifacts
.rpt2_cache
coverage
*.tgz
dist

# misc
.DS_Store
Expand All @@ -34,13 +29,14 @@ stats-hydration.json
stats.json
stats.html
.vscode/settings.json
.idea

*.log
.DS_Store
.cache
.idea
.nx/cache
.nx/workspace-data
.pnpm-store
.tsup
.svelte-kit

vite.config.js.timestamp-*
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
link-workspace-packages=true
prefer-workspace-packages=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.19.0
v18.20.3
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

// @ts-expect-error
import { tanstackConfig } from '@tanstack/config/eslint'

export default [
...tanstackConfig,
{
name: 'tanstack/temp',
rules: {
'ts/ban-types': 'off',
'ts/naming-convention': 'off',
'ts/no-unnecessary-condition': 'off',
'no-self-assign': 'off',
},
},
]
4 changes: 2 additions & 2 deletions examples/lit/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tanstack-lit-virtual-example-dynamic",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand All @@ -13,9 +14,8 @@
"lit": "^3.1.3"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@types/node": "^18.19.3",
"typescript": "5.2.2",
"vite": "^5.1.3"
"vite": "^5.3.2"
}
}
4 changes: 2 additions & 2 deletions examples/lit/fixed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tanstack-lit-virtual-example-fixed",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand All @@ -13,9 +14,8 @@
"lit": "^3.1.3"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@types/node": "^18.19.3",
"typescript": "5.2.2",
"vite": "^5.1.3"
"vite": "^5.3.2"
}
}
14 changes: 7 additions & 7 deletions examples/react/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tanstack-react-virtual-example-dynamic",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand All @@ -9,16 +10,15 @@
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/react-virtual": "^3.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@types/node": "^18.19.3",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "5.2.2",
"vite": "^5.1.3"
"vite": "^5.3.2"
}
}
14 changes: 7 additions & 7 deletions examples/react/fixed/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "tanstack-react-virtual-example-fixed",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-virtual": "^3.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@types/node": "^18.19.3",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "5.2.2",
"vite": "^5.1.3"
"vite": "^5.3.2"
}
}
14 changes: 6 additions & 8 deletions examples/react/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tanstack-react-virtual-example-infinite-scroll",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand All @@ -10,14 +10,12 @@
},
"dependencies": {
"@tanstack/react-virtual": "^3.7.0",
"axios": "^0.26.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.1"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@tanstack/react-query": "^5.48.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.1.3"
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.2"
}
}
19 changes: 10 additions & 9 deletions examples/react/infinite-scroll/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom'
import axios from 'axios'
import { QueryClient, QueryClientProvider, useInfiniteQuery } from 'react-query'
import {
QueryClient,
QueryClientProvider,
useInfiniteQuery,
} from '@tanstack/react-query'

import './index.css'

Expand Down Expand Up @@ -31,13 +34,11 @@ function App() {
isFetchingNextPage,
fetchNextPage,
hasNextPage,
} = useInfiniteQuery(
'projects',
(ctx) => fetchServerPage(10, ctx.pageParam),
{
getNextPageParam: (_lastGroup, groups) => groups.length,
},
)
} = useInfiniteQuery({
queryKey: 'projects',
queryFn: (ctx) => fetchServerPage(10, ctx.pageParam),
getNextPageParam: (_lastGroup, groups) => groups.length,
})

const allRows = data ? data.pages.flatMap((d) => d.rows) : []

Expand Down
3 changes: 0 additions & 3 deletions examples/react/infinite-scroll/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import rollupReplace from '@rollup/plugin-replace'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
11 changes: 5 additions & 6 deletions examples/react/padding/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
"name": "tanstack-react-virtual-example-padding",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview --port 3001",
"start": "vite"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@tanstack/react-virtual": "^3.7.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.1.3"
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.2"
}
}
3 changes: 0 additions & 3 deletions examples/react/padding/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import rollupReplace from '@rollup/plugin-replace'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
13 changes: 6 additions & 7 deletions examples/react/scroll-padding/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"name": "tanstack-react-virtual-example-scroll-padding",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview --port 3001",
"start": "vite"
},
"dependencies": {
"@react-hookz/web": "^14.2.2",
"@react-hookz/web": "^24.0.4",
"@tanstack/react-virtual": "^3.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.1.3"
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.2"
}
}
2 changes: 1 addition & 1 deletion examples/react/scroll-padding/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'

import './index.css'

import { useMeasure } from '@react-hookz/web/esm'
import { useMeasure } from '@react-hookz/web'
import { useVirtualizer } from '@tanstack/react-virtual'

function App() {
Expand Down
3 changes: 0 additions & 3 deletions examples/react/scroll-padding/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import rollupReplace from '@rollup/plugin-replace'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
11 changes: 5 additions & 6 deletions examples/react/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
"name": "tanstack-react-virtual-example-smooth-scroll",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview --port 3001",
"start": "vite"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@tanstack/react-virtual": "^3.7.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.1.3"
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.2"
}
}
3 changes: 0 additions & 3 deletions examples/react/smooth-scroll/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import rollupReplace from '@rollup/plugin-replace'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
Loading