Skip to content

Commit f5cafb7

Browse files
committed
fix: patch query provider scaffolds and legacy create flags
1 parent d3fffed commit f5cafb7

File tree

13 files changed

+157
-23
lines changed

13 files changed

+157
-23
lines changed

cli-aliases/create-start-app/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This will start an interactive CLI that guides you through the setup process, al
3131
You can also use command line flags to specify your preferences directly:
3232

3333
```bash
34-
pnpm dlx create-start-app@latest my-app --tailwind --package-manager pnpm
34+
pnpm dlx create-start-app@latest my-app --package-manager pnpm
3535
```
3636

3737
Available options:
@@ -40,6 +40,7 @@ Available options:
4040
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint`)
4141
- `--no-git`: Do not initialize a git repository
4242
- `--add-ons`: Enable add-on selection or specify add-ons to install
43+
- `--tailwind` / `--no-tailwind`: Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled)
4344

4445
When using flags, the CLI will display which options were provided and only prompt for the remaining choices.
4546

cli-aliases/create-tanstack-app/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To maintain compatability with `create-react-app` you can build a new applicatio
1313
| `pnpm dlx create-tanstack-app@latest my-app` | Create a new app |
1414
| `pnpm dlx create-tanstack-app@latest my-app --template file-router` | Create a new file based app |
1515
| `pnpm dlx create-tanstack-app@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16-
| `pnpm dlx create-tanstack-app@latest my-app --tailwind` | Add Tailwind CSS support |
16+
| `pnpm dlx create-tanstack-app@latest my-app --tailwind` | Deprecated compatibility flag (ignored) |
1717
| `pnpm dlx create-tanstack-app@latest my-app --framework solid` | Create a Solid app |
1818
| `pnpm dlx create-tanstack-app@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
1919

@@ -38,13 +38,13 @@ This will start an interactive CLI that guides you through the setup process, al
3838
You can also use command line flags to specify your preferences directly:
3939

4040
```bash
41-
pnpm dlx create-tanstack-app@latest my-app --template file-router --tailwind --package-manager pnpm
41+
pnpm dlx create-tanstack-app@latest my-app --template file-router --package-manager pnpm
4242
```
4343

4444
Available options:
4545

4646
- `--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47-
- `--tailwind`: Enable Tailwind CSS
47+
- `--tailwind` / `--no-tailwind`: Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled)
4848
- `--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
4949
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint`)
5050
- `--no-git`: Do not initialize a git repository
@@ -88,7 +88,7 @@ pnpm dlx create-tanstack-app@latest my-app --template typescript
8888

8989
### Tailwind CSS
9090

91-
Enable Tailwind CSS either through the interactive CLI or by adding the `--tailwind` flag. This will automatically configure [Tailwind V4](https://tailwindcss.com/).
91+
Tailwind CSS is always configured by default. `--tailwind` / `--no-tailwind` are accepted for compatibility but ignored.
9292

9393
### Package Manager
9494

cli-aliases/create-tanstack/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To maintain compatability with `create-react-app` you can build a new applicatio
1313
| `pnpm dlx create-tanstack@latest my-app` | Create a new app |
1414
| `pnpm dlx create-tanstack@latest my-app --template file-router` | Create a new file based app |
1515
| `pnpm dlx create-tanstack@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16-
| `pnpm dlx create-tanstack@latest my-app --tailwind` | Add Tailwind CSS support |
16+
| `pnpm dlx create-tanstack@latest my-app --tailwind` | Deprecated compatibility flag (ignored) |
1717
| `pnpm dlx create-tanstack@latest my-app --framework solid` | Create a Solid app |
1818
| `pnpm dlx create-tanstack@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
1919

@@ -38,13 +38,13 @@ This will start an interactive CLI that guides you through the setup process, al
3838
You can also use command line flags to specify your preferences directly:
3939

4040
```bash
41-
pnpm dlx create-tanstack@latest my-app --template file-router --tailwind --package-manager pnpm
41+
pnpm dlx create-tanstack@latest my-app --template file-router --package-manager pnpm
4242
```
4343

4444
Available options:
4545

4646
- `--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47-
- `--tailwind`: Enable Tailwind CSS
47+
- `--tailwind` / `--no-tailwind`: Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled)
4848
- `--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
4949
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint`)
5050
- `--no-git`: Do not initialize a git repository
@@ -88,7 +88,7 @@ pnpm dlx create-tanstack@latest my-app --template typescript
8888

8989
### Tailwind CSS
9090

91-
Enable Tailwind CSS either through the interactive CLI or by adding the `--tailwind` flag. This will automatically configure [Tailwind V4](https://tailwindcss.com/).
91+
Tailwind CSS is always configured by default. `--tailwind` / `--no-tailwind` are accepted for compatibility but ignored.
9292

9393
### Package Manager
9494

cli-aliases/create-tsrouter-app/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To maintain compatability with `create-react-app` you can build a new applicatio
1313
| `pnpm dlx create-tsrouter-app@latest my-app` | Create a new app |
1414
| `pnpm dlx create-tsrouter-app@latest my-app --template file-router` | Create a new file based app |
1515
| `pnpm dlx create-tsrouter-app@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16-
| `pnpm dlx create-tsrouter-app@latest my-app --tailwind` | Add Tailwind CSS support |
16+
| `pnpm dlx create-tsrouter-app@latest my-app --tailwind` | Deprecated compatibility flag (ignored) |
1717
| `pnpm dlx create-tsrouter-app@latest my-app --framework solid` | Create a Solid app |
1818
| `pnpm dlx create-tsrouter-app@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
1919

@@ -38,13 +38,13 @@ This will start an interactive CLI that guides you through the setup process, al
3838
You can also use command line flags to specify your preferences directly:
3939

4040
```bash
41-
pnpm dlx create-tsrouter-app@latest my-app --template file-router --tailwind --package-manager pnpm
41+
pnpm dlx create-tsrouter-app@latest my-app --template file-router --package-manager pnpm
4242
```
4343

4444
Available options:
4545

4646
- `--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47-
- `--tailwind`: Enable Tailwind CSS
47+
- `--tailwind` / `--no-tailwind`: Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled)
4848
- `--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
4949
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint`)
5050
- `--no-git`: Do not initialize a git repository
@@ -88,7 +88,7 @@ pnpm dlx create-tsrouter-app@latest my-app --template typescript
8888

8989
### Tailwind CSS
9090

91-
Enable Tailwind CSS either through the interactive CLI or by adding the `--tailwind` flag. This will automatically configure [Tailwind V4](https://tailwindcss.com/).
91+
Tailwind CSS is always configured by default. `--tailwind` / `--no-tailwind` are accepted for compatibility but ignored.
9292

9393
### Package Manager
9494

cli-aliases/ts-create-start/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This will start an interactive CLI that guides you through the setup process, al
3131
You can also use command line flags to specify your preferences directly:
3232

3333
```bash
34-
pnpm create @tanstack/start@latest my-app --tailwind --package-manager pnpm
34+
pnpm create @tanstack/start@latest my-app --package-manager pnpm
3535
```
3636

3737
Available options:
@@ -40,6 +40,7 @@ Available options:
4040
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint`)
4141
- `--no-git`: Do not initialize a git repository
4242
- `--add-ons`: Enable add-on selection or specify add-ons to install
43+
- `--tailwind` / `--no-tailwind`: Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled)
4344

4445
When using flags, the CLI will display which options were provided and only prompt for the remaining choices.
4546

docs/cli-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tanstack create [project-name] [options]
2020
| `--router-only` | Create Router-only SPA without TanStack Start (no SSR) |
2121
| `--toolchain <id>` | Toolchain add-on (use `--list-add-ons` to see options) |
2222
| `--deployment <id>` | Deployment add-on (use `--list-add-ons` to see options) |
23-
| `--tailwind` / `--no-tailwind` | Include/skip Tailwind CSS |
23+
| `--tailwind` / `--no-tailwind` | Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled) |
2424
| `--no-git` | Skip git init |
2525
| `--no-install` | Skip dependency install |
2626
| `-y, --yes` | Use defaults, skip prompts |

packages/cli/src/cli.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ export function cli({
408408
'--template <type>',
409409
'Deprecated: compatibility flag from create-tsrouter-app',
410410
)
411+
.option(
412+
'--tailwind',
413+
'Deprecated: compatibility flag; Tailwind is always enabled',
414+
)
415+
.option(
416+
'--no-tailwind',
417+
'Deprecated: compatibility flag; Tailwind opt-out is ignored',
418+
)
411419

412420
if (deployments.size > 0) {
413421
cmd.option<string>(

packages/cli/src/command-line.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ export function validateLegacyCreateFlags(cliOptions: CliOptions): {
3737
)
3838
}
3939

40+
if (cliOptions.tailwind === true) {
41+
warnings.push(
42+
'The --tailwind flag is deprecated and ignored. Tailwind is always enabled in TanStack Start scaffolds.',
43+
)
44+
}
45+
46+
if (cliOptions.tailwind === false) {
47+
warnings.push(
48+
'The --no-tailwind flag is deprecated and ignored. Tailwind opt-out is intentionally unsupported to keep add-on permutations maintainable; remove Tailwind after scaffolding if needed.',
49+
)
50+
}
51+
4052
if (!cliOptions.template) {
4153
return { warnings }
4254
}

packages/cli/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ export interface CliOptions {
2222
force?: boolean
2323
routerOnly?: boolean
2424
template?: string
25+
tailwind?: boolean
2526
}

packages/cli/tests/command-line.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,19 @@ describe('validateLegacyCreateFlags', () => {
319319
expect(result.warnings[0]).toContain('--router-only')
320320
})
321321

322+
it('warns when --tailwind is used', () => {
323+
const result = validateLegacyCreateFlags({ tailwind: true })
324+
expect(result.error).toBeUndefined()
325+
expect(result.warnings[0]).toContain('--tailwind')
326+
})
327+
328+
it('warns heavily when --no-tailwind is used', () => {
329+
const result = validateLegacyCreateFlags({ tailwind: false })
330+
expect(result.error).toBeUndefined()
331+
expect(result.warnings[0]).toContain('--no-tailwind')
332+
expect(result.warnings[0]).toContain('intentionally unsupported')
333+
})
334+
322335
it('errors for JavaScript templates', () => {
323336
const result = validateLegacyCreateFlags({ template: 'javascript' })
324337
expect(result.error).toContain('JavaScript/JSX templates are not supported')

0 commit comments

Comments
 (0)