@tanstack/create-start 1.92.11 → 1.92.13

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.
@@ -1,16 +1,22 @@
1
- import { dirname } from "node:path";
1
+ import { dirname, resolve } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
+ import { readFileSync } from "node:fs";
3
4
  import { z } from "zod";
4
5
  import { packageJsonModule } from "../packageJson.mjs";
5
6
  import { createModule, runWithSpinner } from "../../module.mjs";
6
7
  import { ideModule } from "../ide.mjs";
7
- import packageJson from "../../../package.json" assert { type: "json" };
8
8
  import { packageManagerModule } from "../packageManager.mjs";
9
9
  import { initHelpers } from "../../utils/helpers/index.mjs";
10
10
  import { gitModule } from "../git.mjs";
11
11
  import { createDebugger } from "../../utils/debug.mjs";
12
12
  const __filename = fileURLToPath(import.meta.url);
13
13
  const __dirname = dirname(__filename);
14
+ const createStartPackageJson = JSON.parse(
15
+ readFileSync(
16
+ resolve(dirname(fileURLToPath(import.meta.url)), "../../../package.json"),
17
+ "utf8"
18
+ )
19
+ );
14
20
  const debug = createDebugger("core-module");
15
21
  export const coreModule = createModule(
16
22
  z.object({
@@ -47,7 +53,7 @@ export const coreModule = createModule(
47
53
  ...vals.git,
48
54
  gitIgnore: [...vals.git?.gitIgnore ?? [], ...gitignore]
49
55
  };
50
- const packageJson2 = {
56
+ const packageJson = {
51
57
  type: "new",
52
58
  dependencies: await deps([
53
59
  "@tanstack/react-router",
@@ -105,7 +111,7 @@ export const coreModule = createModule(
105
111
  packageManager: packageManager.data,
106
112
  ide: ide.data,
107
113
  git: git.data,
108
- packageJson: packageJson2
114
+ packageJson
109
115
  };
110
116
  })
111
117
  ).prompt(
@@ -125,18 +131,18 @@ export const coreModule = createModule(
125
131
  path: ["git"]
126
132
  });
127
133
  debug.verbose("Parsing package.json prompt schema");
128
- const packageJson2 = await packageJsonModule._promptSchema.safeParseAsync(
134
+ const packageJson = await packageJsonModule._promptSchema.safeParseAsync(
129
135
  vals.packageJson,
130
136
  {
131
137
  path: ["packageJson"]
132
138
  }
133
139
  );
134
- if (!ide.success || !packageManager.success || !git.success || !packageJson2.success) {
140
+ if (!ide.success || !packageManager.success || !git.success || !packageJson.success) {
135
141
  debug.error("Prompt validation failed", null, {
136
142
  ide: ide.success,
137
143
  packageManager: packageManager.success,
138
144
  git: git.success,
139
- packageJson: packageJson2.success
145
+ packageJson: packageJson.success
140
146
  });
141
147
  ide.error?.issues.forEach((i) => ctx.addIssue(i));
142
148
  packageManager.error?.issues.forEach((i) => ctx.addIssue(i));
@@ -145,7 +151,7 @@ export const coreModule = createModule(
145
151
  }
146
152
  debug.verbose("Prompt transformations complete");
147
153
  return {
148
- packageJson: packageJson2.data,
154
+ packageJson: packageJson.data,
149
155
  ide: ide.data,
150
156
  packageManager: packageManager.data,
151
157
  git: git.data
@@ -207,7 +213,7 @@ const deps = async (depsArray) => {
207
213
  debug.verbose("Resolving dependencies", { deps: depsArray });
208
214
  const result = await Promise.all(
209
215
  depsArray.map((d) => {
210
- const version = packageJson["peerDependencies"][d] === "workspace:^" ? "latest" : packageJson["peerDependencies"][d];
216
+ const version = createStartPackageJson["peerDependencies"][d] === "workspace:^" ? "latest" : createStartPackageJson["peerDependencies"][d];
211
217
  return {
212
218
  name: d,
213
219
  version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/create-start",
3
- "version": "1.92.11",
3
+ "version": "1.92.13",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tim O'Connell",
6
6
  "license": "MIT",
@@ -34,6 +34,7 @@
34
34
  "dependencies": {
35
35
  "gradient-string": "^3.0.0",
36
36
  "@commander-js/extra-typings": "^12.1.0",
37
+ "commander": "^12.1.0",
37
38
  "@inquirer/prompts": "^5.5.0",
38
39
  "cross-spawn": "^7.0.5",
39
40
  "fast-glob": "^3.3.2",
@@ -58,9 +59,9 @@
58
59
  "react-dom": "^18.3.1",
59
60
  "vinxi": "0.5.1",
60
61
  "vite": "^6.0.3",
61
- "@tanstack/react-router": "^1.92.11",
62
- "@tanstack/router-devtools": "^1.92.11",
63
- "@tanstack/start": "^1.92.11"
62
+ "@tanstack/react-router": "^1.92.13",
63
+ "@tanstack/router-devtools": "^1.92.13",
64
+ "@tanstack/start": "^1.92.13"
64
65
  },
65
66
  "peerDependenciesMeta": {
66
67
  "@tanstack/react-router": {