create-lve 0.4.16 → 0.4.18

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.
package/config.js CHANGED
@@ -162,6 +162,30 @@ export default defineConfig({
162
162
  },
163
163
  }
164
164
 
165
+ async function resolveLatestVersions(pkgPath) {
166
+ const pkg = await fs.readJson(pkgPath)
167
+ const sections = ['dependencies', 'devDependencies']
168
+
169
+ for (const section of sections) {
170
+ if (!pkg[section]) continue
171
+ for (const [name, version] of Object.entries(pkg[section])) {
172
+ if (version === 'latest') {
173
+ try {
174
+ const resolved = execSync(`npm view ${name} version`, {
175
+ encoding: 'utf-8',
176
+ timeout: 10000,
177
+ }).trim()
178
+ pkg[section][name] = `^${resolved}`
179
+ } catch {
180
+ // resolution failed, keep latest
181
+ }
182
+ }
183
+ }
184
+ }
185
+
186
+ await fs.writeJson(pkgPath, pkg, { spaces: 2 })
187
+ }
188
+
165
189
  async function runTask(command, args, cwd) {
166
190
  return new Promise((resolve, reject) => {
167
191
  const child = spawn(command, args, {
@@ -192,6 +216,8 @@ async function applyProjectTransform(ctx) {
192
216
  if (extraConfig.pnpm) pkg.pnpm = { ...pkg.pnpm, ...extraConfig.pnpm }
193
217
  await fs.writeJson(pkgPath, pkg, { spaces: 2 })
194
218
 
219
+ await resolveLatestVersions(pkgPath)
220
+
195
221
  if (isNext) return
196
222
 
197
223
  const strategy = CSS_STRATEGIES[css]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "bin": {
5
5
  "create-lve": "index.js"
6
6
  },
@@ -10,17 +10,17 @@
10
10
  "prepare": "vp config"
11
11
  },
12
12
  "dependencies": {
13
- "react": "^19.2.4",
14
- "react-dom": "^19.2.4"
13
+ "react": "latest",
14
+ "react-dom": "latest"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/node": "^24.10.1",
18
- "@types/react": "^19.2.7",
19
- "@types/react-dom": "^19.2.3",
20
- "@vitejs/plugin-react": "^5.1.1",
17
+ "@types/node": "latest",
18
+ "@types/react": "latest",
19
+ "@types/react-dom": "latest",
20
+ "@vitejs/plugin-react": "latest",
21
21
  "babel-plugin-react-compiler": "latest",
22
- "typescript": "~5.9.3",
23
- "vite": "npm:@voidzero-dev/vite-plus-core@latest",
22
+ "typescript": "latest",
23
+ "vite": "latest",
24
24
  "vite-plus": "latest"
25
25
  },
26
26
  "packageManager": "pnpm@10.32.1",