houdini 0.16.0 → 0.16.1
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/CHANGELOG.md +6 -0
- package/build/cmd/init.js +11 -9
- package/build/cmd.js +13 -11
- package/build/runtime-cjs/meta.json +1 -1
- package/build/runtime-esm/meta.json +1 -1
- package/build/vite-cjs/index.js +1 -1
- package/build/vite-esm/index.js +1 -1
- package/package.json +1 -1
- package/src/cmd/init.ts +15 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# houdini
|
|
2
2
|
|
|
3
|
+
## 0.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#527](https://github.com/HoudiniGraphql/houdini/pull/527) [`9b87678`](https://github.com/HoudiniGraphql/houdini/commit/9b876789140978c0726ed9a708677c7c75f3e19b) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Update init command to work with latest file template
|
|
8
|
+
|
|
3
9
|
## 0.16.0
|
|
4
10
|
|
|
5
11
|
### ⚠️ Breaking Changes
|
package/build/cmd/init.js
CHANGED
|
@@ -158,7 +158,7 @@ async function init(_path, args, withRunningCheck = true) {
|
|
|
158
158
|
else if (framework === 'svelte') {
|
|
159
159
|
await updateSvelteMainJs(targetPath);
|
|
160
160
|
}
|
|
161
|
-
await updateViteConfig(targetPath, framework);
|
|
161
|
+
await updateViteConfig(targetPath, framework, typescript);
|
|
162
162
|
await tjsConfig(targetPath, framework);
|
|
163
163
|
// we're done!
|
|
164
164
|
console.log();
|
|
@@ -275,8 +275,8 @@ async function tjsConfig(targetPath, framework) {
|
|
|
275
275
|
catch { }
|
|
276
276
|
return false;
|
|
277
277
|
}
|
|
278
|
-
async function updateViteConfig(targetPath, framework) {
|
|
279
|
-
const viteConfigPath = path_1.default.join(targetPath, 'vite.config.js');
|
|
278
|
+
async function updateViteConfig(targetPath, framework, typescript) {
|
|
279
|
+
const viteConfigPath = path_1.default.join(targetPath, 'vite.config' + typescript ? '.ts' : '.js');
|
|
280
280
|
const oldViteConfig1 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
281
281
|
|
|
282
282
|
/** @type {import('vite').UserConfig} */
|
|
@@ -286,13 +286,15 @@ const config = {
|
|
|
286
286
|
|
|
287
287
|
export default config;
|
|
288
288
|
`;
|
|
289
|
-
const oldViteConfig2 = `import {
|
|
290
|
-
import {
|
|
289
|
+
const oldViteConfig2 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
290
|
+
import type { UserConfig } from 'vite';
|
|
291
|
+
|
|
292
|
+
const config: UserConfig = {
|
|
293
|
+
plugins: [sveltekit()]
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
export default config;
|
|
291
297
|
|
|
292
|
-
// https://vitejs.dev/config/
|
|
293
|
-
export default defineConfig({
|
|
294
|
-
plugins: [svelte()]
|
|
295
|
-
})
|
|
296
298
|
`;
|
|
297
299
|
const viteConfigKit = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
298
300
|
import houdini from 'houdini/vite';
|
package/build/cmd.js
CHANGED
|
@@ -159283,7 +159283,7 @@ async function runPipeline(config, docs) {
|
|
|
159283
159283
|
// if we detected a version change, we're nuking everything so don't bother with a summary
|
|
159284
159284
|
if (newTimestamp) {
|
|
159285
159285
|
console.log('💣 Detected new version of Houdini. Regenerating all documents...');
|
|
159286
|
-
console.log('🎉 Welcome to 0.16.
|
|
159286
|
+
console.log('🎉 Welcome to 0.16.1!');
|
|
159287
159287
|
// if the user is coming from a version pre-15, point them to the migration guide
|
|
159288
159288
|
const major = parseInt(previousVersion.split('.')[1]);
|
|
159289
159289
|
if (major < 16) {
|
|
@@ -165913,7 +165913,7 @@ async function init(_path, args, withRunningCheck = true) {
|
|
|
165913
165913
|
else if (framework === 'svelte') {
|
|
165914
165914
|
await updateSvelteMainJs(targetPath);
|
|
165915
165915
|
}
|
|
165916
|
-
await updateViteConfig(targetPath, framework);
|
|
165916
|
+
await updateViteConfig(targetPath, framework, typescript);
|
|
165917
165917
|
await tjsConfig(targetPath, framework);
|
|
165918
165918
|
// we're done!
|
|
165919
165919
|
console.log();
|
|
@@ -166029,8 +166029,8 @@ async function tjsConfig(targetPath, framework) {
|
|
|
166029
166029
|
catch { }
|
|
166030
166030
|
return false;
|
|
166031
166031
|
}
|
|
166032
|
-
async function updateViteConfig(targetPath, framework) {
|
|
166033
|
-
const viteConfigPath = path$h.join(targetPath, 'vite.config.js');
|
|
166032
|
+
async function updateViteConfig(targetPath, framework, typescript) {
|
|
166033
|
+
const viteConfigPath = path$h.join(targetPath, 'vite.config' + typescript ? '.ts' : '.js');
|
|
166034
166034
|
const oldViteConfig1 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
166035
166035
|
|
|
166036
166036
|
/** @type {import('vite').UserConfig} */
|
|
@@ -166040,13 +166040,15 @@ const config = {
|
|
|
166040
166040
|
|
|
166041
166041
|
export default config;
|
|
166042
166042
|
`;
|
|
166043
|
-
const oldViteConfig2 = `import {
|
|
166044
|
-
import {
|
|
166043
|
+
const oldViteConfig2 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
166044
|
+
import type { UserConfig } from 'vite';
|
|
166045
|
+
|
|
166046
|
+
const config: UserConfig = {
|
|
166047
|
+
plugins: [sveltekit()]
|
|
166048
|
+
};
|
|
166049
|
+
|
|
166050
|
+
export default config;
|
|
166045
166051
|
|
|
166046
|
-
// https://vitejs.dev/config/
|
|
166047
|
-
export default defineConfig({
|
|
166048
|
-
plugins: [svelte()]
|
|
166049
|
-
})
|
|
166050
166052
|
`;
|
|
166051
166053
|
const viteConfigKit = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
166052
166054
|
import houdini from 'houdini/vite';
|
|
@@ -166172,7 +166174,7 @@ async function updatePackageJSON(targetPath) {
|
|
|
166172
166174
|
// houdini & graphql should be a dev dependencies
|
|
166173
166175
|
packageJSON.devDependencies = {
|
|
166174
166176
|
...packageJSON.devDependencies,
|
|
166175
|
-
houdini: '^0.16.
|
|
166177
|
+
houdini: '^0.16.1',
|
|
166176
166178
|
graphql: '^15.5.0',
|
|
166177
166179
|
};
|
|
166178
166180
|
await writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.16.
|
|
1
|
+
{"version":"0.16.1","timestamp":1662746411290}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.16.
|
|
1
|
+
{"version":"0.16.1","timestamp":1662746409370}
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -161413,7 +161413,7 @@ async function runPipeline(config, docs) {
|
|
|
161413
161413
|
// if we detected a version change, we're nuking everything so don't bother with a summary
|
|
161414
161414
|
if (newTimestamp) {
|
|
161415
161415
|
console.log('💣 Detected new version of Houdini. Regenerating all documents...');
|
|
161416
|
-
console.log('🎉 Welcome to 0.16.
|
|
161416
|
+
console.log('🎉 Welcome to 0.16.1!');
|
|
161417
161417
|
// if the user is coming from a version pre-15, point them to the migration guide
|
|
161418
161418
|
const major = parseInt(previousVersion.split('.')[1]);
|
|
161419
161419
|
if (major < 16) {
|
package/build/vite-esm/index.js
CHANGED
|
@@ -161374,7 +161374,7 @@ async function runPipeline(config, docs) {
|
|
|
161374
161374
|
// if we detected a version change, we're nuking everything so don't bother with a summary
|
|
161375
161375
|
if (newTimestamp) {
|
|
161376
161376
|
console.log('💣 Detected new version of Houdini. Regenerating all documents...');
|
|
161377
|
-
console.log('🎉 Welcome to 0.16.
|
|
161377
|
+
console.log('🎉 Welcome to 0.16.1!');
|
|
161378
161378
|
// if the user is coming from a version pre-15, point them to the migration guide
|
|
161379
161379
|
const major = parseInt(previousVersion.split('.')[1]);
|
|
161380
161380
|
if (major < 16) {
|
package/package.json
CHANGED
package/src/cmd/init.ts
CHANGED
|
@@ -154,7 +154,7 @@ export default async function init(
|
|
|
154
154
|
} else if (framework === 'svelte') {
|
|
155
155
|
await updateSvelteMainJs(targetPath)
|
|
156
156
|
}
|
|
157
|
-
await updateViteConfig(targetPath, framework)
|
|
157
|
+
await updateViteConfig(targetPath, framework, typescript)
|
|
158
158
|
await tjsConfig(targetPath, framework)
|
|
159
159
|
|
|
160
160
|
// we're done!
|
|
@@ -300,8 +300,12 @@ async function tjsConfig(targetPath: string, framework: 'kit' | 'svelte') {
|
|
|
300
300
|
return false
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
async function updateViteConfig(
|
|
304
|
-
|
|
303
|
+
async function updateViteConfig(
|
|
304
|
+
targetPath: string,
|
|
305
|
+
framework: 'kit' | 'svelte',
|
|
306
|
+
typescript: boolean
|
|
307
|
+
) {
|
|
308
|
+
const viteConfigPath = path.join(targetPath, 'vite.config' + typescript ? '.ts' : '.js')
|
|
305
309
|
|
|
306
310
|
const oldViteConfig1 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
307
311
|
|
|
@@ -313,13 +317,15 @@ const config = {
|
|
|
313
317
|
export default config;
|
|
314
318
|
`
|
|
315
319
|
|
|
316
|
-
const oldViteConfig2 = `import {
|
|
317
|
-
import {
|
|
320
|
+
const oldViteConfig2 = `import { sveltekit } from '@sveltejs/kit/vite';
|
|
321
|
+
import type { UserConfig } from 'vite';
|
|
322
|
+
|
|
323
|
+
const config: UserConfig = {
|
|
324
|
+
plugins: [sveltekit()]
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export default config;
|
|
318
328
|
|
|
319
|
-
// https://vitejs.dev/config/
|
|
320
|
-
export default defineConfig({
|
|
321
|
-
plugins: [svelte()]
|
|
322
|
-
})
|
|
323
329
|
`
|
|
324
330
|
|
|
325
331
|
const viteConfigKit = `import { sveltekit } from '@sveltejs/kit/vite';
|