Skip to content

Commit

Permalink
ci: sync with other TanStack projects (#772)
Browse files Browse the repository at this point in the history
* ci: sync with other TanStack projects

* Update prettier config
  • Loading branch information
lachlancollins committed Jul 23, 2024
1 parent 8428b7d commit 9f36cd3
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 96 deletions.
5 changes: 3 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
"schedule:weekly",
":approveMajorUpdates",
":disablePeerDependencies",
":semanticCommits",
":semanticCommitTypeAll(chore)"
],
"ignorePresets": [":ignoreModulesAndTests"],
"labels": ["dependencies"],
"rangeStrategy": "bump",
"postUpdateOptions": ["pnpmDedupe"],
"semanticCommits": "enabled",
"packageRules": [
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchCurrentVersion": ">=1.0.0",
"matchUpdateTypes": ["minor", "patch"]
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"ignoreDeps": ["@types/node", "node", "typescript"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Apply fixes
uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'ci: apply automated fixes'
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ permissions:
jobs:
test-and-publish:
name: Test & Publish
if: github.repository == 'TanStack/virtual'
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: Setup Tools
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: pr

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'media/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -23,13 +19,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- 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 Checks
Expand All @@ -39,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- name: Setup Tools
Expand Down
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

4 changes: 2 additions & 2 deletions examples/svelte/dynamic/src/GridVirtualizerDynamic.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
? 'list-item-odd'
: 'list-item-even'
: row.index % 2
? 'list-item-odd'
: 'list-item-even'}
? 'list-item-odd'
: 'list-item-even'}
style="position: absolute; top: 0; left: 0; width: {col.size}px; height: {row.size}px; transform: translateX({col.start}px) translateY({row.start}px);"
>
Cell {row.index}, {col.index}
Expand Down
4 changes: 2 additions & 2 deletions examples/svelte/fixed/src/GridVirtualizerFixed.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
? 'list-item-odd'
: 'list-item-even'
: row.index % 2
? 'list-item-odd'
: 'list-item-even'}
? 'list-item-odd'
: 'list-item-even'}
style="position: absolute; top: 0; left: 0; width: {col.size}px; height: {row.size}px; transform: translateX({col.start}px) translateY({row.start}px);"
>
Cell {row.index}, {col.index}
Expand Down
4 changes: 0 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
]
},
"targetDefaults": {
"test:format": {
"cache": true,
"inputs": ["{workspaceRoot}/**/*"]
},
"test:knip": {
"cache": true,
"inputs": ["{workspaceRoot}/**/*"]
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"clean": "pnpm --filter \"./packages/**\" run clean",
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
"test": "pnpm run test:ci",
"test:pr": "nx affected --targets=test:format,test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:ci": "nx run-many --targets=test:format,test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:pr": "nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:ci": "nx run-many --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build",
"test:format": "pnpm run prettier --check",
"test:sherif": "sherif",
"test:lib": "nx affected --target=test:lib --exclude=examples/**",
Expand All @@ -31,7 +31,6 @@
},
"nx": {
"includedScripts": [
"test:format",
"test:knip",
"test:sherif"
]
Expand All @@ -45,6 +44,7 @@
"knip": "^5.26.0",
"nx": "^19.4.3",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.3",
"publint": "^0.2.8",
"rimraf": "^5.0.9",
"sherif": "^0.10.0",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// @ts-check

/** @type {import('prettier').Config} */
const config = {
semi: false,
singleQuote: true,
trailingComma: 'all',
plugins: ['prettier-plugin-svelte'],
overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }],
}

export default config
54 changes: 0 additions & 54 deletions scripts/config.js

This file was deleted.

46 changes: 42 additions & 4 deletions scripts/publish.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
// @ts-check

import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { publish } from '@tanstack/config/publish'
import { branchConfigs, packages, rootDir } from './config.js'

const __dirname = fileURLToPath(new URL('.', import.meta.url))

await publish({
branchConfigs,
packages,
rootDir,
packages: [
{
name: '@tanstack/lit-virtual',
packageDir: 'packages/lit-virtual',
},
{
name: '@tanstack/react-virtual',
packageDir: 'packages/react-virtual',
},
{
name: '@tanstack/solid-virtual',
packageDir: 'packages/solid-virtual',
},
{
name: '@tanstack/svelte-virtual',
packageDir: 'packages/svelte-virtual',
},
{
name: '@tanstack/virtual-core',
packageDir: 'packages/virtual-core',
},
{
name: '@tanstack/vue-virtual',
packageDir: 'packages/vue-virtual',
},
],
branchConfigs: {
main: {
prerelease: false,
},
alpha: {
prerelease: true,
},
beta: {
prerelease: true,
},
},
rootDir: resolve(__dirname, '..'),
branch: process.env.BRANCH,
tag: process.env.TAG,
ghToken: process.env.GH_TOKEN,
Expand Down
9 changes: 0 additions & 9 deletions scripts/types.d.ts

This file was deleted.

0 comments on commit 9f36cd3

Please sign in to comment.