Skip to content

Commit 1b86a60

Browse files
Fix github workflows, prettier
1 parent ec5bef4 commit 1b86a60

File tree

43 files changed

+145
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+145
-108
lines changed

.github/workflows/ci.yml

+30-19
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
11
name: ci
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: override release tag
8+
required: false
9+
push:
10+
branches: ['main', 'alpha', 'beta']
11+
212
concurrency:
3-
group: publish-${{ github.github.base_ref }}
13+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
414
cancel-in-progress: true
15+
516
env:
6-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
717
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
8-
on:
9-
push:
10-
branches:
11-
- 'main'
12-
- 'beta'
18+
1319
jobs:
1420
test-and-publish:
15-
name: 'Test & Publish'
21+
name: Test & Publish
22+
if: github.repository == 'TanStack/virtual'
1623
runs-on: ubuntu-latest
1724
steps:
18-
- name: Checkout Repo
19-
uses: actions/checkout@v3
25+
- name: Checkout
26+
uses: actions/checkout@v4
2027
with:
2128
fetch-depth: '0'
22-
- name: Setup Pnpm
23-
uses: pnpm/action-setup@v2.2.4
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v2
2431
with:
25-
version: 7
32+
version: 8
2633
- name: Setup Node
27-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v4
2835
with:
29-
node-version: 16.19.0
30-
cache: 'pnpm'
36+
node-version-file: .nvmrc
37+
cache: pnpm
3138
- name: Install dependencies
32-
run: pnpm --filter "./packages/**" --prefer-offline install --no-frozen-lockfile
33-
- name: Publish
39+
run: pnpm install --frozen-lockfile --prefer-offline
40+
- name: Run Tests
41+
run: pnpm run test:ci
42+
- name: Publish
3443
run: |
3544
git config --global user.name 'Tanner Linsley'
3645
git config --global user.email '[email protected]'
3746
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
38-
pnpm cipublish
47+
pnpm run cipublish
3948
env:
4049
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4150
GH_TOKEN: ${{ secrets.GH_TOKEN }}
51+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4252
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
TAG: ${{ inputs.tag }}

.github/workflows/pr.yml

+30-15
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
name: pr
2-
on: [pull_request]
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- 'media/**'
8+
- '**/*.md'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
12+
cancel-in-progress: true
13+
314
env:
4-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
515
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
16+
617
jobs:
718
test:
8-
name: 'Test'
19+
name: Test
920
runs-on: ubuntu-latest
1021
steps:
11-
- name: Checkout Repo
12-
uses: actions/checkout@v3
22+
- name: Checkout
23+
uses: actions/checkout@v4
1324
with:
14-
fetch-depth: '0'
15-
- name: Setup Pnpm
16-
uses: pnpm/action-setup@v2.2.4
25+
fetch-depth: 0
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v2
1728
with:
18-
version: 7
29+
version: 8
1930
- name: Setup Node
20-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
2132
with:
22-
node-version: 16.19.0
23-
cache: 'pnpm'
33+
node-version-file: .nvmrc
34+
cache: pnpm
2435
- name: Install dependencies
25-
run: pnpm --filter "./packages/**" --prefer-offline install --no-frozen-lockfile
26-
- name: Build & Test
27-
run: npx nx run-many --targets=test,build --projects=@tanstack/* --exclude=@tanstack/react-start
36+
run: pnpm install --frozen-lockfile --prefer-offline
37+
- name: Get base and head commits for `nx affected`
38+
uses: nrwl/nx-set-shas@v3
39+
with:
40+
main-branch-name: 'main'
41+
- name: Run Checks
42+
run: pnpm run test:pr

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ coverage
2424
.env.test.local
2525
.env.production.local
2626
.next
27-
.nx/cache
28-
.pnpm-store
2927

3028
npm-debug.log*
3129
yarn-debug.log*
@@ -39,6 +37,9 @@ stats.html
3937

4038
*.log
4139
.DS_Store
42-
node_modules
4340
.cache
44-
dist
41+
.nx/cache
42+
.pnpm-store
43+
44+
vite.config.js.timestamp-*
45+
vite.config.ts.timestamp-*

.nx/workflows/dynamic-changesets.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
distribute-on:
2+
small-changeset: 8 linux-medium-js
3+
medium-changeset: 10 linux-medium-js
4+
large-changeset: 12 linux-medium-js

.prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/.next
2+
**/.nx/cache
3+
**/.svelte-kit
4+
**/build
5+
**/coverage
6+
**/dist
7+
**/docs
8+
**/codemods/**/__testfixtures__
9+
pnpm-lock.yaml

examples/react/dynamic/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/dynamic/vite.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [react()]
6+
plugins: [react()],
77
})

examples/react/fixed/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/fixed/src/main.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ function GridVirtualizerFixed() {
189189
? 'ListItemOdd'
190190
: 'ListItemEven'
191191
: virtualRow.index % 2
192-
? 'ListItemOdd'
193-
: 'ListItemEven'
192+
? 'ListItemOdd'
193+
: 'ListItemEven'
194194
}
195195
style={{
196196
position: 'absolute',

examples/react/infinite-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/padding/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/padding/src/main.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ function GridVirtualizerDynamic({ rows, columns }) {
211211
? 'ListItemOdd'
212212
: 'ListItemEven'
213213
: virtualRow.index % 2
214-
? 'ListItemOdd'
215-
: 'ListItemEven'
214+
? 'ListItemOdd'
215+
: 'ListItemEven'
216216
}
217217
style={{
218218
position: 'absolute',

examples/react/scroll-padding/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/smooth-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/sticky/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/table/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/table/vite.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [react()]
6+
plugins: [react()],
77
})

examples/react/variable/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/react/variable/src/main.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ function GridVirtualizerVariable({ rows, columns }) {
204204
? 'ListItemOdd'
205205
: 'ListItemEven'
206206
: virtualRow.index % 2
207-
? 'ListItemOdd'
208-
: 'ListItemEven'
207+
? 'ListItemOdd'
208+
: 'ListItemEven'
209209
}
210210
style={{
211211
position: 'absolute',

examples/react/window/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/dynamic/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/fixed/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/infinite-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/smooth-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/sticky/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/svelte/table/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/dynamic/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/fixed/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/fixed/src/components/GridVirtualizerFixed.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
? 'ListItemOdd'
2222
: 'ListItemEven'
2323
: virtualRow.index % 2
24-
? 'ListItemOdd'
25-
: 'ListItemEven'
24+
? 'ListItemOdd'
25+
: 'ListItemEven'
2626
"
2727
:style="{
2828
position: 'absolute',

examples/vue/infinite-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/padding/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/padding/src/components/GridVirtualizerPadding.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
? 'ListItemOdd'
3333
: 'ListItemEven'
3434
: virtualRow.index % 2
35-
? 'ListItemOdd'
36-
: 'ListItemEven'
35+
? 'ListItemOdd'
36+
: 'ListItemEven'
3737
"
3838
:style="{
3939
position: 'absolute',

examples/vue/scroll-padding/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/smooth-scroll/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/sticky/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/table/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

examples/vue/table/src/style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ body {
2828

2929
.text-left {
3030
text-align: left;
31-
}
31+
}

examples/vue/variable/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)