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 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: version,
185
+ HOUDINI_VERSION: houdiniVersion,
175
186
  ["'CLIENT_CONFIG'"]: clientConfig,
176
187
  ["'CONFIG_FILE'"]: configFile,
177
188
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-houdini",
3
- "version": "2.0.0-go.3",
3
+ "version": "2.0.0-next.11",
4
4
  "description": "A CLI for creating new Houdini projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,8 +1,8 @@
1
1
  projects:
2
2
  default:
3
3
  schema:
4
- - ./$houdini/graphql/schema.graphql
4
+ - .houdini/graphql/schema.graphql
5
5
  documents:
6
6
  - '**/*.gql'
7
7
  - '**/*.jsx'
8
- - ./$houdini/graphql/documents.gql
8
+ - .houdini/graphql/documents.gql
@@ -16,7 +16,7 @@ dist
16
16
  dist-ssr
17
17
  *.local
18
18
 
19
- ./$houdini
19
+ .houdini
20
20
  ./dist
21
21
 
22
22
  # Editor directories and files
@@ -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": "15.8.0",
18
+ "graphql": "^16.0.0",
19
19
  "@whatwg-node/server": "^0.9.14"
20
20
  },
21
21
  "devDependencies": {
22
- "@vitejs/plugin-react": "^3.1.0",
22
+ "@vitejs/plugin-react": "^4.0.0",
23
23
  "vite": "^4.1.0"
24
24
  },
25
25
  "resolutions": {
26
- "graphql": "15.8.0",
26
+ "graphql": "^16.0.0",
27
27
  "react": "^19.0.0",
28
28
  "react-dom": "^19.0.0"
29
29
  }
@@ -5,5 +5,5 @@ import { defineConfig } from 'vite'
5
5
 
6
6
  // https://vitejs.dev/config/
7
7
  export default defineConfig({
8
- plugins: [houdini({ adapter }), react({ fastRefresh: false })],
8
+ plugins: [houdini({ adapter }), react()],
9
9
  })
@@ -1,8 +1,8 @@
1
1
  projects:
2
2
  default:
3
3
  schema:
4
- - ./$houdini/graphql/schema.graphql
4
+ - .houdini/graphql/schema.graphql
5
5
  documents:
6
6
  - '**/*.gql'
7
7
  - '**/*.tsx'
8
- - ./$houdini/graphql/documents.gql
8
+ - .houdini/graphql/documents.gql
@@ -16,7 +16,7 @@ node_modules
16
16
  dist
17
17
  dist-ssr
18
18
  *.local
19
- $houdini
19
+ .houdini
20
20
 
21
21
  # Editor directories and files
22
22
  .vscode/*
@@ -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": "15.8.0",
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": "^3.1.0",
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": "15.8.0",
29
+ "graphql": "^16.0.0",
30
30
  "react": "^19.0.0",
31
31
  "react-dom": "^19.0.0"
32
32
  }
@@ -5,5 +5,5 @@ import { defineConfig } from 'vite'
5
5
 
6
6
  // https://vitejs.dev/config/
7
7
  export default defineConfig({
8
- plugins: [houdini({ adapter }), react({ fastRefresh: false })],
8
+ plugins: [houdini({ adapter }), react()],
9
9
  })