create-houdini 2.0.0-next.13 → 2.0.0-next.14

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 CHANGED
@@ -16,17 +16,24 @@ 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
19
+ // derive the dist-tag from our own version, then resolve each package to its actual published version
20
+ // independently — packages can be at different versions across a release cycle
20
21
  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
22
+ const { execSync } = await import('node:child_process')
23
+
24
+ function resolveVersion(pkg) {
25
+ try {
26
+ const resolved = execSync(`npm view ${pkg}@${distTag} version`, { encoding: 'utf-8' }).trim()
27
+ return resolved || version
28
+ } catch {
29
+ return version
30
+ }
28
31
  }
29
32
 
33
+ const houdiniVersion = resolveVersion('houdini')
34
+ const houdiniReactVersion = resolveVersion('houdini-react')
35
+ const houdiniAdapterVersion = resolveVersion('houdini-adapter-auto')
36
+
30
37
  // prepare options
31
38
  const templatesDir = sourcePath(`./templates`)
32
39
  const options = fs.readdirSync(templatesDir).map((templateDir) => {
@@ -217,6 +224,8 @@ copy(
217
224
  API_URL: apiUrl,
218
225
  PROJECT_NAME: projectName,
219
226
  HOUDINI_VERSION: houdiniVersion,
227
+ HOUDINI_REACT_VERSION: houdiniReactVersion,
228
+ HOUDINI_ADAPTER_VERSION: houdiniAdapterVersion,
220
229
  ["'CLIENT_CONFIG'"]: clientConfig,
221
230
  ["'CONFIG_FILE'"]: configFile,
222
231
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-houdini",
3
- "version": "2.0.0-next.13",
3
+ "version": "2.0.0-next.14",
4
4
  "description": "A CLI for creating new Houdini projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "houdini": "^HOUDINI_VERSION",
13
- "houdini-react": "^HOUDINI_VERSION",
14
- "houdini-adapter-auto": "^HOUDINI_VERSION",
13
+ "houdini-react": "^HOUDINI_REACT_VERSION",
14
+ "houdini-adapter-auto": "^HOUDINI_ADAPTER_VERSION",
15
15
  "react": "^19.0.0",
16
16
  "react-dom": "^19.0.0",
17
17
  "graphql-yoga": "^5.21.1",
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "houdini": "^HOUDINI_VERSION",
13
- "houdini-react": "^HOUDINI_VERSION",
14
- "houdini-adapter-auto": "^HOUDINI_VERSION",
13
+ "houdini-react": "^HOUDINI_REACT_VERSION",
14
+ "houdini-adapter-auto": "^HOUDINI_ADAPTER_VERSION",
15
15
  "react": "^19.0.0",
16
16
  "react-dom": "^19.0.0",
17
17
  "graphql-yoga": "^5.21.1",