@tanstack/create 0.63.4 → 0.63.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/create-app.js +15 -8
  3. package/dist/frameworks/react/add-ons/better-auth/assets/src/integrations/better-auth/{header-user.tsx → header-user.tsx.ejs} +6 -0
  4. package/dist/frameworks/react/project/base/package.json +1 -1
  5. package/dist/frameworks/react/project/base/src/components/Footer.tsx.ejs +1 -0
  6. package/dist/frameworks/react/project/base/src/components/Header.tsx.ejs +1 -0
  7. package/dist/frameworks/react/project/base/src/components/ThemeToggle.tsx.ejs +1 -0
  8. package/dist/frameworks/react/project/base/src/routes/__root.tsx.ejs +93 -0
  9. package/dist/frameworks/react/project/base/src/routes/about.tsx.ejs +1 -0
  10. package/dist/frameworks/react/project/base/src/routes/index.tsx.ejs +17 -0
  11. package/dist/frameworks/react/project/base/src/styles.css.ejs +18 -0
  12. package/dist/frameworks/react/project/base/tsconfig.json.ejs +0 -1
  13. package/dist/frameworks/react/project/packages.json +1 -1
  14. package/dist/frameworks/solid/add-ons/better-auth/assets/src/integrations/better-auth/{header-user.tsx → header-user.tsx.ejs} +4 -0
  15. package/dist/frameworks/solid/examples/tanchat/assets/ai-streaming-server/package.json +1 -1
  16. package/dist/frameworks/solid/project/base/package.json +1 -1
  17. package/dist/frameworks/solid/project/base/src/components/Header.tsx.ejs +1 -0
  18. package/dist/frameworks/solid/project/base/src/routes/__root.tsx.ejs +46 -1
  19. package/dist/frameworks/solid/project/base/src/routes/about.tsx.ejs +1 -0
  20. package/dist/frameworks/solid/project/base/src/routes/index.tsx.ejs +17 -0
  21. package/dist/frameworks/solid/project/base/src/styles.css.ejs +18 -0
  22. package/dist/frameworks/solid/project/base/tsconfig.json.ejs +0 -1
  23. package/dist/frameworks/solid/project/packages.json +1 -1
  24. package/dist/template-file.js +1 -0
  25. package/dist/types/custom-add-ons/add-on.d.ts +2 -2
  26. package/dist/types/custom-add-ons/starter.d.ts +2 -2
  27. package/dist/types/options.d.ts +1 -1
  28. package/dist/types/registry.d.ts +1 -1
  29. package/package.json +2 -2
  30. package/src/create-app.ts +22 -8
  31. package/src/custom-add-ons/add-on.ts +2 -2
  32. package/src/custom-add-ons/starter.ts +2 -2
  33. package/src/frameworks/react/add-ons/better-auth/assets/src/integrations/better-auth/{header-user.tsx → header-user.tsx.ejs} +6 -0
  34. package/src/frameworks/react/project/base/package.json +1 -1
  35. package/src/frameworks/react/project/base/src/components/Footer.tsx.ejs +1 -0
  36. package/src/frameworks/react/project/base/src/components/Header.tsx.ejs +1 -0
  37. package/src/frameworks/react/project/base/src/components/ThemeToggle.tsx.ejs +1 -0
  38. package/src/frameworks/react/project/base/src/routes/__root.tsx.ejs +93 -0
  39. package/src/frameworks/react/project/base/src/routes/about.tsx.ejs +1 -0
  40. package/src/frameworks/react/project/base/src/routes/index.tsx.ejs +17 -0
  41. package/src/frameworks/react/project/base/src/styles.css.ejs +18 -0
  42. package/src/frameworks/react/project/base/tsconfig.json.ejs +0 -1
  43. package/src/frameworks/react/project/packages.json +1 -1
  44. package/src/frameworks/solid/add-ons/better-auth/assets/src/integrations/better-auth/{header-user.tsx → header-user.tsx.ejs} +4 -0
  45. package/src/frameworks/solid/examples/tanchat/assets/ai-streaming-server/package.json +1 -1
  46. package/src/frameworks/solid/project/base/package.json +1 -1
  47. package/src/frameworks/solid/project/base/src/components/Header.tsx.ejs +1 -0
  48. package/src/frameworks/solid/project/base/src/routes/__root.tsx.ejs +46 -1
  49. package/src/frameworks/solid/project/base/src/routes/about.tsx.ejs +1 -0
  50. package/src/frameworks/solid/project/base/src/routes/index.tsx.ejs +17 -0
  51. package/src/frameworks/solid/project/base/src/styles.css.ejs +18 -0
  52. package/src/frameworks/solid/project/base/tsconfig.json.ejs +0 -1
  53. package/src/frameworks/solid/project/packages.json +1 -1
  54. package/src/options.ts +1 -1
  55. package/src/registry.ts +1 -1
  56. package/src/template-file.ts +1 -0
  57. package/tests/create-app.test.ts +77 -0
  58. package/tests/template-context.test.ts +63 -0
  59. package/tsconfig.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @tanstack/create
2
2
 
3
+ ## 0.63.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated changeset from semantic commits on main.
8
+
9
+ - chore: update to TS6.0, fix deprecated tsconfig options (#421) (847b396)
10
+
11
+ ## 0.63.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Fix demo/example files leaking into projects when users opt out of demo pages. ([#434](https://github.com/TanStack/cli/pull/434))
16
+
17
+ - Strip add-on demo support files in `src/lib/`, `src/hooks/`, `src/data/`, `src/components/`, `src/store/`, and any `demo.*` / `demo-*` / `example.*` / `example-*` files.
18
+ - Strip example image assets under `public/`.
19
+ - Generate a minimal base starter (no Header, Footer, ThemeToggle, about page, or styled index page) when declining demo/example pages.
20
+ - Render Better Auth header-user component as `null` when its demo route is excluded, instead of linking to a non-existent route.
21
+
22
+ Closes #422, #409.
23
+
3
24
  ## 0.63.4
4
25
 
5
26
  ### Patch Changes
@@ -9,14 +9,19 @@ import { createTemplateFile } from './template-file.js';
9
9
  import { installShadcnComponents } from './integrations/shadcn.js';
10
10
  import { setupGit } from './integrations/git.js';
11
11
  import { runSpecialSteps } from './special-steps/index.js';
12
- function isDemoRoutePath(path) {
12
+ function isDemoFilePath(path) {
13
13
  if (!path)
14
14
  return false;
15
15
  const normalized = path.replace(/\\/g, '/');
16
- return (normalized.includes('/routes/demo/') ||
17
- normalized.includes('/routes/demo.') ||
18
- normalized.includes('/routes/example/') ||
19
- normalized.includes('/routes/example.'));
16
+ if (normalized.includes('/routes/demo/') ||
17
+ normalized.includes('/routes/example/')) {
18
+ return true;
19
+ }
20
+ const filename = normalized.split('/').pop() || '';
21
+ return (filename.startsWith('demo.') ||
22
+ filename.startsWith('demo-') ||
23
+ filename.startsWith('example.') ||
24
+ filename.startsWith('example-'));
20
25
  }
21
26
  function stripExamplesFromOptions(options) {
22
27
  if (options.includeExamples !== false) {
@@ -25,18 +30,20 @@ function stripExamplesFromOptions(options) {
25
30
  const chosenAddOns = options.chosenAddOns
26
31
  .filter((addOn) => addOn.type !== 'example')
27
32
  .map((addOn) => {
28
- const filteredRoutes = (addOn.routes || []).filter((route) => !isDemoRoutePath(route.path) &&
33
+ const filteredRoutes = (addOn.routes || []).filter((route) => !isDemoFilePath(route.path) &&
29
34
  !(route.url && route.url.startsWith('/demo')));
35
+ const filteredIntegrations = (addOn.integrations || []).filter((integration) => !isDemoFilePath(integration.path));
30
36
  return {
31
37
  ...addOn,
32
38
  routes: filteredRoutes,
39
+ integrations: filteredIntegrations,
33
40
  getFiles: async () => {
34
41
  const files = await addOn.getFiles();
35
- return files.filter((file) => !isDemoRoutePath(file));
42
+ return files.filter((file) => !isDemoFilePath(file));
36
43
  },
37
44
  getDeletedFiles: async () => {
38
45
  const deletedFiles = await addOn.getDeletedFiles();
39
- return deletedFiles.filter((file) => !isDemoRoutePath(file));
46
+ return deletedFiles.filter((file) => !isDemoFilePath(file));
40
47
  },
41
48
  };
42
49
  });
@@ -1,5 +1,7 @@
1
1
  import { authClient } from "#/lib/auth-client";
2
+ <%_ if (routes.some(r => r.url === '/demo/better-auth')) { _%>
2
3
  import { Link } from "@tanstack/react-router";
4
+ <%_ } _%>
3
5
 
4
6
  export default function BetterAuthHeader() {
5
7
  const { data: session, isPending } = authClient.useSession();
@@ -34,6 +36,7 @@ export default function BetterAuthHeader() {
34
36
  );
35
37
  }
36
38
 
39
+ <%_ if (routes.some(r => r.url === '/demo/better-auth')) { _%>
37
40
  return (
38
41
  <Link
39
42
  to="/demo/better-auth"
@@ -42,4 +45,7 @@ export default function BetterAuthHeader() {
42
45
  Sign in
43
46
  </Link>
44
47
  );
48
+ <%_ } else { _%>
49
+ return null;
50
+ <%_ } _%>
45
51
  }
@@ -30,7 +30,7 @@
30
30
  "@types/react-dom": "^19.2.0",
31
31
  "@vitejs/plugin-react": "^6.0.1",
32
32
  "jsdom": "^28.1.0",
33
- "typescript": "^5.9.2",
33
+ "typescript": "^6.0.2",
34
34
  "vite": "^8.0.0",
35
35
  "vitest": "^3.0.5"
36
36
  },
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  export default function Footer() {
2
3
  const year = new Date().getFullYear()
3
4
 
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  import { Link } from '@tanstack/react-router'
2
3
  <% for (const integration of integrations.filter((i) => i.type === 'header-user')) { %>import <%= integration.jsName %> from '<%= relativePath(integration.path) %>'
3
4
  <% } %>import ThemeToggle from './ThemeToggle'
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  import { useEffect, useState } from 'react'
2
3
 
3
4
  type ThemeMode = 'light' | 'dark' | 'auto'
@@ -27,6 +27,99 @@ function RootComponent() {
27
27
  </>
28
28
  )
29
29
  }
30
+ <% } else if (!includeExamples) { %>
31
+ <% let hasContext = addOnEnabled["apollo-client"] || addOnEnabled["tanstack-query"]; %>
32
+ import {
33
+ HeadContent, Scripts, <% if (hasContext) { %>createRootRouteWithContext<% } else { %>createRootRoute<% } %> } from '@tanstack/react-router'
34
+ import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools';
35
+ import { TanStackDevtools } from '@tanstack/react-devtools'
36
+ <% for(const integration of integrations.filter(i => i.type === 'layout' || i.type === 'provider' || i.type === 'devtools')) { %>
37
+ import <%= integration.jsName %> from '<%= relativePath(integration.path, true) %>'
38
+ <% } %><% if (addOnEnabled.paraglide) { %>
39
+ import { getLocale } from '#/paraglide/runtime'
40
+ <% } %>
41
+ import appCss from '../styles.css?url'
42
+ <% if (addOnEnabled["apollo-client"]) { %>
43
+ import type { ApolloClientIntegration } from "@apollo/client-integration-tanstack-start";
44
+ <% } %>
45
+ <% if (addOnEnabled["tanstack-query"]) { %>
46
+ import type { QueryClient } from '@tanstack/react-query'
47
+ <% if (addOnEnabled.tRPC) { %>
48
+ import type { TRPCRouter } from '#/integrations/trpc/router'
49
+ import type { TRPCOptionsProxy } from '@trpc/tanstack-react-query'
50
+ <% } %>
51
+ <% } %>
52
+ <% if (hasContext) { %>
53
+ interface MyRouterContext <% if (addOnEnabled["apollo-client"]) {%> extends ApolloClientIntegration.RouterContext <%} %>{
54
+ <% if (addOnEnabled["tanstack-query"]) { %>
55
+ queryClient: QueryClient
56
+ <% if (addOnEnabled.tRPC) { %>
57
+ trpc: TRPCOptionsProxy<TRPCRouter>
58
+ <% } %>
59
+ <% } %>
60
+ }<% } %>
61
+
62
+ export const Route = <% if (hasContext) { %>createRootRouteWithContext<MyRouterContext>()<% } else { %>createRootRoute<% } %>({
63
+ <% if (addOnEnabled.paraglide) { %>
64
+ beforeLoad: async () => {
65
+ // Other redirect strategies are possible; see
66
+ // https://github.com/TanStack/router/tree/main/examples/react/i18n-paraglide#offline-redirect
67
+ if (typeof document !== 'undefined') {
68
+ document.documentElement.setAttribute('lang', getLocale())
69
+ }
70
+ },
71
+ <% } %>
72
+ head: () => ({
73
+ meta: [
74
+ {
75
+ charSet: 'utf-8',
76
+ },
77
+ {
78
+ name: 'viewport',
79
+ content: 'width=device-width, initial-scale=1',
80
+ },
81
+ {
82
+ title: 'TanStack Start Starter',
83
+ },
84
+ ],
85
+ links: [
86
+ {
87
+ rel: 'stylesheet',
88
+ href: appCss,
89
+ },
90
+ ],
91
+ }),
92
+ shellComponent: RootDocument
93
+ })
94
+
95
+ function RootDocument({ children }: { children: React.ReactNode }) {
96
+ return (
97
+ <% if (addOnEnabled.paraglide) { %><html lang={getLocale()}><% } else { %><html lang="en"><% } %>
98
+ <head>
99
+ <HeadContent />
100
+ </head>
101
+ <body>
102
+ <% for(const integration of integrations.filter(i => i.type === 'provider')) { %><<%= integration.jsName %>>
103
+ <% } %>{children}
104
+ <TanStackDevtools
105
+ config={{
106
+ position: 'bottom-right',
107
+ }}
108
+ plugins={[
109
+ {
110
+ name: 'Tanstack Router',
111
+ render: <TanStackRouterDevtoolsPanel />,
112
+ },
113
+ <% for(const integration of integrations.filter(i => i.type === 'devtools')) { %><%= integration.jsName %>,<% } %>
114
+ ]}
115
+ />
116
+ <% for(const integration of integrations.filter(i => i.type === 'layout')) { %><<%= integration.jsName %> />
117
+ <% } %><% for(const integration of integrations.filter(i => i.type === 'provider').reverse()) { %></<%= integration.jsName %>>
118
+ <% } %><Scripts />
119
+ </body>
120
+ </html>
121
+ )
122
+ }
30
123
  <% } else { %>
31
124
  <% let hasContext = addOnEnabled["apollo-client"] || addOnEnabled["tanstack-query"]; %>
32
125
  import {
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  import { createFileRoute } from '@tanstack/react-router'
2
3
 
3
4
  export const Route = createFileRoute('/about')({
@@ -1,3 +1,19 @@
1
+ <% if (!includeExamples) { %>
2
+ import { createFileRoute } from "@tanstack/react-router";
3
+
4
+ export const Route = createFileRoute("/")({ component: Home });
5
+
6
+ function Home() {
7
+ return (
8
+ <div className="p-8">
9
+ <h1 className="text-4xl font-bold">Welcome to TanStack Start</h1>
10
+ <p className="mt-4 text-lg">
11
+ Edit <code>src/routes/index.tsx</code> to get started.
12
+ </p>
13
+ </div>
14
+ );
15
+ }
16
+ <% } else { %>
1
17
  import { createFileRoute } from "@tanstack/react-router";
2
18
 
3
19
  export const Route = createFileRoute("/")({ component: App });
@@ -70,3 +86,4 @@ function App() {
70
86
  </main>
71
87
  );
72
88
  }
89
+ <% } %>
@@ -1,3 +1,20 @@
1
+ <% if (!includeExamples) { %>
2
+ @import "tailwindcss";
3
+
4
+ * {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ html,
9
+ body,
10
+ #app {
11
+ min-height: 100%;
12
+ }
13
+
14
+ body {
15
+ margin: 0;
16
+ }
17
+ <% } else { %>
1
18
  @import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");
2
19
  @import "tailwindcss";
3
20
  @plugin "@tailwindcss/typography";
@@ -257,3 +274,4 @@ a {
257
274
  transform: translateY(0);
258
275
  }
259
276
  }
277
+ <% } %>
@@ -5,7 +5,6 @@
5
5
  "target": "ES2022",
6
6
  "jsx": "react-jsx",
7
7
  "module": "ESNext",
8
- "baseUrl": ".",
9
8
  "paths": {
10
9
  "#/*": ["./src/*"],
11
10
  "@/*": ["./src/*"]
@@ -4,7 +4,7 @@
4
4
  "@types/react": "^19.2.0",
5
5
  "@types/node": "^22.10.2",
6
6
  "@types/react-dom": "^19.2.0",
7
- "typescript": "^5.7.2"
7
+ "typescript": "^6.0.2"
8
8
  }
9
9
  },
10
10
  "tailwindcss": {
@@ -1,5 +1,7 @@
1
1
  import { Show } from "solid-js";
2
+ <%_ if (routes.some(r => r.url === '/demo/better-auth')) { _%>
2
3
  import { Link } from "@tanstack/solid-router";
4
+ <%_ } _%>
3
5
  import { authClient } from "../../lib/auth-client";
4
6
 
5
7
  export default function BetterAuthHeader() {
@@ -14,6 +16,7 @@ export default function BetterAuthHeader() {
14
16
  >
15
17
  <Show
16
18
  when={session().data?.user}
19
+ <%_ if (routes.some(r => r.url === '/demo/better-auth')) { _%>
17
20
  fallback={
18
21
  <Link
19
22
  to="/demo/better-auth"
@@ -22,6 +25,7 @@ export default function BetterAuthHeader() {
22
25
  Sign in
23
26
  </Link>
24
27
  }
28
+ <%_ } _%>
25
29
  >
26
30
  {(user) => (
27
31
  <div class="flex items-center gap-2">
@@ -21,6 +21,6 @@
21
21
  "@types/express": "^5.0.3",
22
22
  "@types/node": "^24.6.0",
23
23
  "tsx": "^4.21.0",
24
- "typescript": "^5.9.2"
24
+ "typescript": "^6.0.2"
25
25
  }
26
26
  }
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@tanstack/devtools-vite": "latest",
22
22
  "vite-plugin-solid": "^2.11.10",
23
- "typescript": "^5.9.2",
23
+ "typescript": "^6.0.2",
24
24
  "vite": "^7.3.1"
25
25
  },
26
26
  "pnpm": {
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  import { Link } from '@tanstack/solid-router'
2
3
  <% for(const integration of integrations.filter(i => i.type === 'header-user')) { %>
3
4
  import <%= integration.jsName %> from '<%= relativePath(integration.path) %>'
@@ -16,6 +16,51 @@ function RootComponent() {
16
16
  </>
17
17
  )
18
18
  }
19
+ <% } else if (!includeExamples) { %>
20
+ import { HeadContent, Outlet, Scripts, createRootRouteWithContext } from '@tanstack/solid-router'
21
+ import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
22
+
23
+ <% if (addOnEnabled['solid-ui']) { %>
24
+ import "@fontsource/inter/400.css"
25
+ <% } %>
26
+
27
+ import { HydrationScript } from 'solid-js/web'
28
+ import { Suspense } from 'solid-js'
29
+
30
+ <% for(const addOn of addOns) {
31
+ for(const init of addOn.main?.initialize || []) { %>
32
+ <%- init %>
33
+ <% } } %>
34
+
35
+ import styleCss from "../styles.css?url";
36
+
37
+ export const Route = createRootRouteWithContext()({
38
+ head: () => ({
39
+ links: [{ rel: "stylesheet", href: styleCss }],
40
+ }),
41
+ shellComponent: RootComponent,
42
+ })
43
+
44
+ function RootComponent() {
45
+ return (
46
+ <html>
47
+ <head>
48
+ <HydrationScript />
49
+ <HeadContent />
50
+ </head>
51
+ <body>
52
+ <Suspense>
53
+ <Outlet />
54
+ <TanStackRouterDevtools />
55
+ <% for(const integration of integrations.filter(i => i.type === 'layout')) { %>
56
+ <<%= integration.jsName %> />
57
+ <% } %>
58
+ </Suspense>
59
+ <Scripts />
60
+ </body>
61
+ </html>
62
+ );
63
+ }
19
64
  <% } else { %>
20
65
  import { HeadContent, Outlet, Scripts, createRootRouteWithContext } from '@tanstack/solid-router'
21
66
  import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
@@ -47,9 +92,9 @@ function RootComponent() {
47
92
  <html>
48
93
  <head>
49
94
  <HydrationScript />
95
+ <HeadContent />
50
96
  </head>
51
97
  <body>
52
- <HeadContent />
53
98
  <Suspense>
54
99
  <Header />
55
100
  <Outlet />
@@ -1,3 +1,4 @@
1
+ <% if (!includeExamples) { ignoreFile(); return; } %>
1
2
  import { createFileRoute } from '@tanstack/solid-router'
2
3
 
3
4
  export const Route = createFileRoute('/about')({
@@ -1,3 +1,19 @@
1
+ <% if (!includeExamples) { %>
2
+ import { createFileRoute } from '@tanstack/solid-router'
3
+
4
+ export const Route = createFileRoute('/')({ component: Home })
5
+
6
+ function Home() {
7
+ return (
8
+ <div class="p-8">
9
+ <h1 class="text-4xl font-bold">Welcome to TanStack Start</h1>
10
+ <p class="mt-4 text-lg">
11
+ Edit <code>src/routes/index.tsx</code> to get started.
12
+ </p>
13
+ </div>
14
+ )
15
+ }
16
+ <% } else { %>
1
17
  import { createFileRoute } from '@tanstack/solid-router'
2
18
 
3
19
  export const Route = createFileRoute('/')({ component: App })
@@ -66,3 +82,4 @@ function App() {
66
82
  </main>
67
83
  )
68
84
  }
85
+ <% } %>
@@ -1,3 +1,20 @@
1
+ <% if (!includeExamples) { %>
2
+ @import 'tailwindcss';
3
+
4
+ * {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ html,
9
+ body,
10
+ #app {
11
+ min-height: 100%;
12
+ }
13
+
14
+ body {
15
+ margin: 0;
16
+ }
17
+ <% } else { %>
1
18
  @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');
2
19
  @import 'tailwindcss';
3
20
 
@@ -193,3 +210,4 @@ code {
193
210
  transform: translateY(0);
194
211
  }
195
212
  }
213
+ <% } %>
@@ -22,7 +22,6 @@
22
22
  "noUnusedParameters": true,
23
23
  "noFallthroughCasesInSwitch": true,
24
24
  "noUncheckedSideEffectImports": true<% if (addOnEnabled['solid-ui']) { %>,
25
- "baseUrl": ".",
26
25
  "paths": {
27
26
  "~/*": ["./src/*"]
28
27
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "typescript": {
3
3
  "devDependencies": {
4
- "typescript": "^5.7.2"
4
+ "typescript": "^6.0.2"
5
5
  }
6
6
  },
7
7
  "tailwindcss": {
@@ -83,6 +83,7 @@ export function createTemplateFile(environment, options) {
83
83
  fileRouter: options.mode === 'file-router',
84
84
  codeRouter: options.mode === 'code-router',
85
85
  routerOnly: options.routerOnly === true,
86
+ includeExamples: options.includeExamples !== false,
86
87
  addOnEnabled,
87
88
  addOnOption: options.addOnOptions,
88
89
  addOns: options.chosenAddOns,
@@ -1,5 +1,5 @@
1
- import type { PersistedOptions } from '../config-file';
2
- import type { AddOn, AddOnInfo, Environment } from '../types';
1
+ import type { PersistedOptions } from '../config-file.js';
2
+ import type { AddOn, AddOnInfo, Environment } from '../types.js';
3
3
  export declare const ADD_ON_IGNORE_FILES: Array<string>;
4
4
  export declare function camelCase(str: string): string;
5
5
  export declare function templatize(routeCode: string, routeFile: string): {
@@ -1,5 +1,5 @@
1
- import type { PersistedOptions } from '../config-file';
2
- import type { Environment, Starter, StarterInfo } from '../types';
1
+ import type { PersistedOptions } from '../config-file.js';
2
+ import type { Environment, Starter, StarterInfo } from '../types.js';
3
3
  export declare function readOrGenerateStarterInfo(options: PersistedOptions): Promise<StarterInfo>;
4
4
  export declare function updateStarterInfo(environment: Environment): Promise<void>;
5
5
  export declare function compileStarter(environment: Environment): Promise<void>;
@@ -1,2 +1,2 @@
1
- import type { Options, SerializedOptions } from './types';
1
+ import type { Options, SerializedOptions } from './types.js';
2
2
  export declare const createSerializedOptions: (options: Options) => SerializedOptions;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { AddOn, Starter } from './types';
2
+ import type { AddOn, Starter } from './types.js';
3
3
  declare const registrySchema: z.ZodObject<{
4
4
  templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
5
  name: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/create",
3
- "version": "0.63.4",
3
+ "version": "0.63.6",
4
4
  "description": "TanStack Application Builder Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "@types/parse-gitignore": "^1.0.2",
39
39
  "@vitest/coverage-v8": "3.1.1",
40
40
  "eslint": "^9.20.0",
41
- "typescript": "^5.6.3",
41
+ "typescript": "^6.0.2",
42
42
  "vitest": "^3.0.8",
43
43
  "vitest-fetch-mock": "^0.4.5"
44
44
  },
package/src/create-app.ts CHANGED
@@ -17,14 +17,23 @@ import { runSpecialSteps } from './special-steps/index.js'
17
17
 
18
18
  import type { Environment, FileBundleHandler, Options } from './types.js'
19
19
 
20
- function isDemoRoutePath(path?: string) {
20
+ function isDemoFilePath(path?: string) {
21
21
  if (!path) return false
22
22
  const normalized = path.replace(/\\/g, '/')
23
- return (
23
+
24
+ if (
24
25
  normalized.includes('/routes/demo/') ||
25
- normalized.includes('/routes/demo.') ||
26
- normalized.includes('/routes/example/') ||
27
- normalized.includes('/routes/example.')
26
+ normalized.includes('/routes/example/')
27
+ ) {
28
+ return true
29
+ }
30
+
31
+ const filename = normalized.split('/').pop() || ''
32
+ return (
33
+ filename.startsWith('demo.') ||
34
+ filename.startsWith('demo-') ||
35
+ filename.startsWith('example.') ||
36
+ filename.startsWith('example-')
28
37
  )
29
38
  }
30
39
 
@@ -38,20 +47,25 @@ function stripExamplesFromOptions(options: Options): Options {
38
47
  .map((addOn) => {
39
48
  const filteredRoutes = (addOn.routes || []).filter(
40
49
  (route) =>
41
- !isDemoRoutePath(route.path) &&
50
+ !isDemoFilePath(route.path) &&
42
51
  !(route.url && route.url.startsWith('/demo')),
43
52
  )
53
+
54
+ const filteredIntegrations = (addOn.integrations || []).filter(
55
+ (integration) => !isDemoFilePath(integration.path)
56
+ )
44
57
 
45
58
  return {
46
59
  ...addOn,
47
60
  routes: filteredRoutes,
61
+ integrations: filteredIntegrations,
48
62
  getFiles: async () => {
49
63
  const files = await addOn.getFiles()
50
- return files.filter((file) => !isDemoRoutePath(file))
64
+ return files.filter((file) => !isDemoFilePath(file))
51
65
  },
52
66
  getDeletedFiles: async () => {
53
67
  const deletedFiles = await addOn.getDeletedFiles()
54
- return deletedFiles.filter((file) => !isDemoRoutePath(file))
68
+ return deletedFiles.filter((file) => !isDemoFilePath(file))
55
69
  },
56
70
  }
57
71
  })
@@ -12,14 +12,14 @@ import {
12
12
  runCreateApp,
13
13
  } from './shared.js'
14
14
 
15
- import type { PersistedOptions } from '../config-file'
15
+ import type { PersistedOptions } from '../config-file.js'
16
16
  import type {
17
17
  AddOn,
18
18
  AddOnCompiled,
19
19
  AddOnInfo,
20
20
  Environment,
21
21
  Options,
22
- } from '../types'
22
+ } from '../types.js'
23
23
 
24
24
  const ADD_ON_DIR = '.add-on'
25
25
 
@@ -12,14 +12,14 @@ import {
12
12
  runCreateApp,
13
13
  } from './shared.js'
14
14
 
15
- import type { PersistedOptions } from '../config-file'
15
+ import type { PersistedOptions } from '../config-file.js'
16
16
  import type {
17
17
  Environment,
18
18
  Options,
19
19
  Starter,
20
20
  StarterCompiled,
21
21
  StarterInfo,
22
- } from '../types'
22
+ } from '../types.js'
23
23
 
24
24
  const INFO_FILE = 'template-info.json'
25
25
  const LEGACY_INFO_FILE = 'starter-info.json'