create-houdini 2.0.0-go.3 → 2.0.0-next.11
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/bin.js +12 -1
- package/package.json +1 -1
- package/templates/react/.graphqlrc.yaml +2 -2
- package/templates/react/.meta.gitignore +1 -1
- package/templates/react/package.json +3 -3
- package/templates/react/vite.config.ts +1 -1
- package/templates/react-typescript/.graphqlrc.yaml +2 -2
- package/templates/react-typescript/.meta.gitignore +1 -1
- package/templates/react-typescript/package.json +3 -3
- package/templates/react-typescript/vite.config.ts +1 -1
package/bin.js
CHANGED
|
@@ -16,6 +16,17 @@ let projectName = projectDir
|
|
|
16
16
|
const { version } = JSON.parse(fs.readFileSync(new URL('package.json', import.meta.url), 'utf-8'))
|
|
17
17
|
console.log(`${grey(`create-houdini version ${version}`)}\n`)
|
|
18
18
|
|
|
19
|
+
// derive the dist-tag from our own version, then resolve it to a real version from the registry
|
|
20
|
+
const distTag = version.includes('-') ? version.split('-')[1].split('.')[0] : 'latest'
|
|
21
|
+
let houdiniVersion = version
|
|
22
|
+
try {
|
|
23
|
+
const { execSync } = await import('node:child_process')
|
|
24
|
+
const resolved = execSync(`npm view houdini@${distTag} version`, { encoding: 'utf-8' }).trim()
|
|
25
|
+
if (resolved) houdiniVersion = resolved
|
|
26
|
+
} catch {
|
|
27
|
+
// offline or registry unavailable — fall back to create-houdini's own version
|
|
28
|
+
}
|
|
29
|
+
|
|
19
30
|
// prepare options
|
|
20
31
|
const templatesDir = sourcePath(`./templates`)
|
|
21
32
|
const options = fs.readdirSync(templatesDir).map((templateDir) => {
|
|
@@ -171,7 +182,7 @@ copy(
|
|
|
171
182
|
{
|
|
172
183
|
API_URL: apiUrl,
|
|
173
184
|
PROJECT_NAME: projectName,
|
|
174
|
-
HOUDINI_VERSION:
|
|
185
|
+
HOUDINI_VERSION: houdiniVersion,
|
|
175
186
|
["'CLIENT_CONFIG'"]: clientConfig,
|
|
176
187
|
["'CONFIG_FILE'"]: configFile,
|
|
177
188
|
},
|
package/package.json
CHANGED
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"react": "^19.0.0",
|
|
16
16
|
"react-dom": "^19.0.0",
|
|
17
17
|
"graphql-yoga": "4.0.4",
|
|
18
|
-
"graphql": "
|
|
18
|
+
"graphql": "^16.0.0",
|
|
19
19
|
"@whatwg-node/server": "^0.9.14"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@vitejs/plugin-react": "^
|
|
22
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
23
23
|
"vite": "^4.1.0"
|
|
24
24
|
},
|
|
25
25
|
"resolutions": {
|
|
26
|
-
"graphql": "
|
|
26
|
+
"graphql": "^16.0.0",
|
|
27
27
|
"react": "^19.0.0",
|
|
28
28
|
"react-dom": "^19.0.0"
|
|
29
29
|
}
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"react": "^19.0.0",
|
|
16
16
|
"react-dom": "^19.0.0",
|
|
17
17
|
"graphql-yoga": "4.0.4",
|
|
18
|
-
"graphql": "
|
|
18
|
+
"graphql": "^16.0.0",
|
|
19
19
|
"@whatwg-node/server": "^0.9.14"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^19.0.7",
|
|
23
23
|
"@types/react-dom": "^19.0.3",
|
|
24
|
-
"@vitejs/plugin-react": "^
|
|
24
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
25
25
|
"typescript": "^5.9.3",
|
|
26
26
|
"vite": "^4.1.0"
|
|
27
27
|
},
|
|
28
28
|
"resolutions": {
|
|
29
|
-
"graphql": "
|
|
29
|
+
"graphql": "^16.0.0",
|
|
30
30
|
"react": "^19.0.0",
|
|
31
31
|
"react-dom": "^19.0.0"
|
|
32
32
|
}
|