create-vite-taro 0.7.0 → 0.7.1-beta.2

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/index.js CHANGED
@@ -5,6 +5,7 @@ import path from 'node:path'
5
5
  import process from 'node:process'
6
6
  import readline from 'node:readline/promises'
7
7
  import { fileURLToPath } from 'node:url'
8
+ import generatorPackage from './package.json' with { type: 'json' }
8
9
 
9
10
  const packageRoot = path.dirname(fileURLToPath(import.meta.url))
10
11
  const defaultProjectName = 'vite-taro-app'
@@ -130,8 +131,16 @@ function copyTemplate(sourceDirectory, targetDirectory, projectName, projectTitl
130
131
 
131
132
  function transformTemplateFile(fileName, source, projectName, projectTitle, wechatAppId) {
132
133
  if (fileName === 'package.json') {
133
- const packageJson = JSON.parse(source)
134
- packageJson.name = projectName
134
+ const template = JSON.parse(source)
135
+ // The fixed Changesets group releases the generator and plugin at the same version.
136
+ const packageJson = {
137
+ ...template,
138
+ name: projectName,
139
+ devDependencies: {
140
+ ...template.devDependencies,
141
+ 'vite-plugin-taro': `^${generatorPackage.version}`
142
+ }
143
+ }
135
144
  return `${JSON.stringify(packageJson, null, 4)}\n`
136
145
  }
137
146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vite-taro",
3
- "version": "0.7.0",
3
+ "version": "0.7.1-beta.2",
4
4
  "description": "Create Vite 8 + React 19 + Taro apps for WeChat, Alipay, and H5 targets.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,8 +24,7 @@
24
24
  "typescript": "^7.0.2",
25
25
  "cross-env": "^10.1.0",
26
26
  "rolldown": "1.2.7",
27
- "vite": "8.2.2",
28
- "vite-plugin-taro": "^0.7.0"
27
+ "vite": "8.2.2"
29
28
  },
30
29
  "overrides": {
31
30
  "@types/react": "$@types/react"