Skip to content

Commit 832206f

Browse files
chore: move to tsdown, remove AIO package (#321)
* WIP: use tsdown * Update vite-config * Update build script and module exports in package.json * Add fixedExtension option to tsdown config * Enable isolated declarations in vite * Move isolatedDeclarations to compilerOptions * Remove test:build script from package.json * Add UserConfig type to tanstackViteConfig * Remove allowJs option from tsconfig * Add dependsOn property to test tasks Added 'dependsOn' property to test:eslint and test:types. * ci: apply automated fixes * Delete AIO config * Update docs * Fix typecheck for other packages * add changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent e074f95 commit 832206f

34 files changed

+563
-321
lines changed

.changeset/ninety-glasses-cut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/vite-config': patch
3+
---
4+
5+
chore: build with tsdown

docs/eslint.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ title: ESLint
77

88
This package unifies the shared ESLint config used across all TanStack projects. It is designed to be framework-agnostic, and does not include any framework-specific plugins.
99

10+
## Installation
11+
12+
To install the package, run the following command:
13+
14+
```bash
15+
pnpm add -D @tanstack/eslint-config
16+
```
17+
1018
## Setup
1119

1220
### package.json
@@ -17,8 +25,6 @@ This package unifies the shared ESLint config used across all TanStack projects.
1725

1826
```js
1927
import { tanstackConfig } from '@tanstack/eslint-config'
20-
// OR
21-
import { tanstackConfig } from '@tanstack/config/eslint'
2228

2329
export default [
2430
...tanstackConfig,

docs/overview.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ id: overview
33
title: Overview
44
---
55

6-
TanStack Config allows you to publish, update, and maintain your packages without having to provide complex configuration.
6+
TanStack Config is a collection of tools we currently use between our projects to simplify configuration.
77

88
## Required Pre-Requisites
99

10-
The following tools are required to use this package:
10+
The following tools are required to use these packages:
1111

1212
- [Node.js v18.17+](https://nodejs.org/en/download/current/)
1313
- [Git CLI](https://git-scm.com/downloads)
@@ -16,27 +16,6 @@ The following tools are required to use this package:
1616

1717
> pnpm is the only supported package manager for TanStack Config.
1818
19-
## Installation
20-
21-
To install the package, run the following command:
22-
23-
```bash
24-
# AIO
25-
pnpm add -D @tanstack/config
26-
27-
# ESLint
28-
pnpm add -D @tanstack/eslint-config
29-
30-
# Publish
31-
pnpm add -D @tanstack/publish-config
32-
33-
# Typedoc
34-
pnpm add -D @tanstack/typedoc-config
35-
36-
# Vite
37-
pnpm add -D @tanstack/vite-config
38-
```
39-
4019
## Utilities
4120

4221
- [ESLint](../eslint.md)

docs/package-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following structure ensures packages work optimally with our monorepo/Nx wor
1919

2020
### `./vite.config.ts`
2121

22-
- Includes config for Vitest, and for Vite if [@tanstack/config/vite](../vite.md) is used
22+
- Includes config for Vitest, and for Vite if [@tanstack/vite-config](../vite.md) is used
2323

2424
### `./src`
2525

docs/publish.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@ id: publish
33
title: Publish
44
---
55

6+
## Installation
7+
8+
To install the package, run the following command:
9+
10+
```bash
11+
pnpm add -D @tanstack/publish-config
12+
```
13+
14+
615
## Usage
716

817
To use the TanStack Config programmatically, you can import the `publish` function:
918

1019
```ts
11-
import { publish } from '@tanstack/config/publish'
12-
// OR
1320
import { publish } from '@tanstack/publish-config'
1421

1522
publish({

docs/vite.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ The Vite build setup is the culmination of several attempts to dual publish ESM
99

1010
ES Modules (ESM) is the standard for writing JavaScript modules. However, due to the historical dependency on CommonJS (CJS), many ecosystem tools and projects were initially incompatible with ESM. It is becoming exceedingly rare for this to be the case, and I would urge you to consider whether it is necessary to distribute CJS code at all. Sindre Sorhus has a good summary on this issue [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
1111

12+
## Installation
13+
14+
To install the package, run the following command:
15+
16+
```bash
17+
pnpm add -D @tanstack/vite-config
18+
```
19+
1220
## Setup
1321

1422
The build config is quite opinionated, as it is designed to work with our internal libraries. If you follow the below instructions, it _may_ work for your library too!
@@ -52,9 +60,6 @@ The build config is quite opinionated, as it is designed to work with our intern
5260

5361
```ts
5462
import { defineConfig, mergeConfig } from 'vite'
55-
56-
import { tanstackViteConfig } from '@tanstack/config/vite'
57-
// OR
5863
import { tanstackViteConfig } from '@tanstack/vite-config'
5964

6065
const config = defineConfig({
@@ -77,7 +82,7 @@ While this config _will_ work with most frameworks with a Vite adapter, it doesn
7782
| Framework | Recommendation |
7883
| --------- | -------------------------------------------------------------------------------------------------- |
7984
| Angular | [ng-packagr](https://www.npmjs.com/package/ng-packagr) (official tool) |
80-
| React | [@tanstack/config](https://www.npmjs.com/package/@tanstack/config) (only if you need dual ESM/CJS) |
85+
| React | [@tanstack/vite-config](https://www.npmjs.com/package/@tanstack/vite-config) (only if you need dual ESM/CJS) |
8186
| Solid | [tsc](https://www.npmjs.com/package/typescript) (preserves JSX, necessary for SSR) |
8287
| Svelte | [@sveltejs/package](https://www.npmjs.com/package/@sveltejs/package) (official tool) |
83-
| Vue | [@tanstack/config](https://www.npmjs.com/package/@tanstack/config) (only if you need dual ESM/CJS) |
88+
| Vue | [@tanstack/vite-config](https://www.npmjs.com/package/@tanstack/vite-config) (only if you need dual ESM/CJS) |

integrations/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"react-dom": "catalog:"
3333
},
3434
"devDependencies": {
35-
"@tanstack/config": "workspace:*",
35+
"@tanstack/vite-config": "workspace:*",
3636
"@types/react": "catalog:",
3737
"@types/react-dom": "catalog:",
3838
"@vitejs/plugin-react": "catalog:",

integrations/react/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig, mergeConfig } from 'vitest/config'
22
import react from '@vitejs/plugin-react'
3-
import { tanstackViteConfig } from '@tanstack/config/vite'
3+
import { tanstackViteConfig } from '@tanstack/vite-config'
44

55
const config = defineConfig({
66
plugins: [react()],

integrations/vanilla/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"test:build": "vitest && publint --strict"
2828
},
2929
"devDependencies": {
30-
"@tanstack/config": "workspace:*",
30+
"@tanstack/vite-config": "workspace:*",
3131
"vite": "catalog:",
3232
"vitest": "catalog:"
3333
}

integrations/vanilla/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig, mergeConfig } from 'vitest/config'
2-
import { tanstackViteConfig } from '@tanstack/config/vite'
2+
import { tanstackViteConfig } from '@tanstack/vite-config'
33

44
const config = defineConfig({
55
test: {

0 commit comments

Comments
 (0)