houdini 2.0.0-next.6 → 2.0.0-next.8
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/build/cmd-cjs/index.js +3 -4
- package/build/cmd-esm/index.js +3 -4
- package/build/lib-cjs/index.js +1 -2
- package/build/lib-esm/index.js +1 -2
- package/build/test-cjs/index.js +1 -2
- package/build/test-esm/index.js +1 -2
- package/build/vite/hmr.d.ts +0 -2
- package/build/vite-cjs/index.js +8 -21
- package/build/vite-esm/index.js +8 -21
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -78120,8 +78120,7 @@ var Config = class {
|
|
|
78120
78120
|
let {
|
|
78121
78121
|
schema,
|
|
78122
78122
|
schemaPath = "./schema.graphql",
|
|
78123
|
-
|
|
78124
|
-
runtimeDir = "$houdini",
|
|
78123
|
+
runtimeDir = ".houdini",
|
|
78125
78124
|
exclude = [],
|
|
78126
78125
|
module: module2 = "esm",
|
|
78127
78126
|
scalars,
|
|
@@ -89212,12 +89211,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
89212
89211
|
}
|
|
89213
89212
|
packageJSON2.devDependencies = {
|
|
89214
89213
|
...packageJSON2.devDependencies,
|
|
89215
|
-
houdini: "^2.0.0-next.
|
|
89214
|
+
houdini: "^2.0.0-next.8"
|
|
89216
89215
|
};
|
|
89217
89216
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
89218
89217
|
packageJSON2.devDependencies = {
|
|
89219
89218
|
...packageJSON2.devDependencies,
|
|
89220
|
-
"houdini-svelte": "^3.0.0-next.
|
|
89219
|
+
"houdini-svelte": "^3.0.0-next.11"
|
|
89221
89220
|
};
|
|
89222
89221
|
} else {
|
|
89223
89222
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -78124,8 +78124,7 @@ var Config = class {
|
|
|
78124
78124
|
let {
|
|
78125
78125
|
schema,
|
|
78126
78126
|
schemaPath = "./schema.graphql",
|
|
78127
|
-
|
|
78128
|
-
runtimeDir = "$houdini",
|
|
78127
|
+
runtimeDir = ".houdini",
|
|
78129
78128
|
exclude = [],
|
|
78130
78129
|
module = "esm",
|
|
78131
78130
|
scalars,
|
|
@@ -89216,12 +89215,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
89216
89215
|
}
|
|
89217
89216
|
packageJSON2.devDependencies = {
|
|
89218
89217
|
...packageJSON2.devDependencies,
|
|
89219
|
-
houdini: "^2.0.0-next.
|
|
89218
|
+
houdini: "^2.0.0-next.8"
|
|
89220
89219
|
};
|
|
89221
89220
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
89222
89221
|
packageJSON2.devDependencies = {
|
|
89223
89222
|
...packageJSON2.devDependencies,
|
|
89224
|
-
"houdini-svelte": "^3.0.0-next.
|
|
89223
|
+
"houdini-svelte": "^3.0.0-next.11"
|
|
89225
89224
|
};
|
|
89226
89225
|
} else {
|
|
89227
89226
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/lib-cjs/index.js
CHANGED
|
@@ -77876,8 +77876,7 @@ var Config = class {
|
|
|
77876
77876
|
let {
|
|
77877
77877
|
schema,
|
|
77878
77878
|
schemaPath = "./schema.graphql",
|
|
77879
|
-
|
|
77880
|
-
runtimeDir = "$houdini",
|
|
77879
|
+
runtimeDir = ".houdini",
|
|
77881
77880
|
exclude = [],
|
|
77882
77881
|
module: module2 = "esm",
|
|
77883
77882
|
scalars,
|
package/build/lib-esm/index.js
CHANGED
|
@@ -77786,8 +77786,7 @@ var Config = class {
|
|
|
77786
77786
|
let {
|
|
77787
77787
|
schema,
|
|
77788
77788
|
schemaPath = "./schema.graphql",
|
|
77789
|
-
|
|
77790
|
-
runtimeDir = "$houdini",
|
|
77789
|
+
runtimeDir = ".houdini",
|
|
77791
77790
|
exclude = [],
|
|
77792
77791
|
module = "esm",
|
|
77793
77792
|
scalars,
|
package/build/test-cjs/index.js
CHANGED
|
@@ -65667,8 +65667,7 @@ var Config = class {
|
|
|
65667
65667
|
let {
|
|
65668
65668
|
schema,
|
|
65669
65669
|
schemaPath = "./schema.graphql",
|
|
65670
|
-
|
|
65671
|
-
runtimeDir = "$houdini",
|
|
65670
|
+
runtimeDir = ".houdini",
|
|
65672
65671
|
exclude = [],
|
|
65673
65672
|
module: module2 = "esm",
|
|
65674
65673
|
scalars,
|
package/build/test-esm/index.js
CHANGED
|
@@ -65663,8 +65663,7 @@ var Config = class {
|
|
|
65663
65663
|
let {
|
|
65664
65664
|
schema,
|
|
65665
65665
|
schemaPath = "./schema.graphql",
|
|
65666
|
-
|
|
65667
|
-
runtimeDir = "$houdini",
|
|
65666
|
+
runtimeDir = ".houdini",
|
|
65668
65667
|
exclude = [],
|
|
65669
65668
|
module = "esm",
|
|
65670
65669
|
scalars,
|
package/build/vite/hmr.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { EnvironmentModuleNode } from 'vite';
|
|
2
1
|
import { type Config } from '../lib';
|
|
3
2
|
export declare function isGraphQLFile(filepath: string): boolean;
|
|
4
3
|
export declare function shouldReactToFileChange(filepath: string, config: Config): Promise<boolean>;
|
|
5
|
-
export declare function fileDependsOnHoudini(modules: EnvironmentModuleNode[], houdiniPath: string): Boolean;
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -75772,8 +75772,7 @@ var Config = class {
|
|
|
75772
75772
|
let {
|
|
75773
75773
|
schema,
|
|
75774
75774
|
schemaPath = "./schema.graphql",
|
|
75775
|
-
|
|
75776
|
-
runtimeDir = "$houdini",
|
|
75775
|
+
runtimeDir = ".houdini",
|
|
75777
75776
|
exclude = [],
|
|
75778
75777
|
module: module2 = "esm",
|
|
75779
75778
|
scalars,
|
|
@@ -85755,17 +85754,6 @@ async function shouldReactToFileChange(filepath, config2) {
|
|
|
85755
85754
|
}
|
|
85756
85755
|
return config2.includeFile(filepath, { root: process.cwd() });
|
|
85757
85756
|
}
|
|
85758
|
-
function fileDependsOnHoudini(modules, houdiniPath) {
|
|
85759
|
-
const fileDependencies = modules.reduce((acc, module2) => {
|
|
85760
|
-
module2.importedModules.forEach((importedModule) => {
|
|
85761
|
-
if (importedModule?.id) acc.push(importedModule.id);
|
|
85762
|
-
});
|
|
85763
|
-
return acc;
|
|
85764
|
-
}, []);
|
|
85765
|
-
return fileDependencies.some((file) => {
|
|
85766
|
-
return file.startsWith(houdiniPath);
|
|
85767
|
-
});
|
|
85768
|
-
}
|
|
85769
85757
|
|
|
85770
85758
|
// src/vite/houdini.ts
|
|
85771
85759
|
var config;
|
|
@@ -85779,12 +85767,13 @@ function Plugin(opts = {}) {
|
|
|
85779
85767
|
// houdini will always act as a "meta framework" and process the user's code before it
|
|
85780
85768
|
// is processed by the user's library-specific plugins.
|
|
85781
85769
|
enforce: "pre",
|
|
85782
|
-
async hotUpdate({ file, server, modules, timestamp }) {
|
|
85770
|
+
async hotUpdate({ file, server, modules, timestamp, read }) {
|
|
85783
85771
|
const config2 = await getConfig(opts);
|
|
85784
85772
|
const shouldReact = await shouldReactToFileChange(file, config2);
|
|
85785
|
-
const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? "
|
|
85773
|
+
const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? ".houdini");
|
|
85774
|
+
const dependsOn = (await read()).includes("$houdini");
|
|
85786
85775
|
const isGqlFile = isGraphQLFile(file);
|
|
85787
|
-
if (!(shouldReact && (
|
|
85776
|
+
if (!(shouldReact && (dependsOn || isGqlFile))) {
|
|
85788
85777
|
return modules;
|
|
85789
85778
|
}
|
|
85790
85779
|
if (config2.localSchema) {
|
|
@@ -85794,20 +85783,18 @@ function Plugin(opts = {}) {
|
|
|
85794
85783
|
config2.pluginMode = true;
|
|
85795
85784
|
let artifactStats = void 0;
|
|
85796
85785
|
if (!lastHotUpdateEvent || timestamp !== lastHotUpdateEvent.timestamp) {
|
|
85797
|
-
console.log("\u{1F3A9} \u{1F504} bundle HMR rebuild...");
|
|
85798
85786
|
try {
|
|
85799
85787
|
artifactStats = await compile(config2);
|
|
85800
85788
|
} catch (e2) {
|
|
85801
85789
|
formatErrors(e2);
|
|
85802
85790
|
}
|
|
85791
|
+
lastHotUpdateEvent = {
|
|
85792
|
+
timestamp
|
|
85793
|
+
};
|
|
85803
85794
|
}
|
|
85804
|
-
lastHotUpdateEvent = {
|
|
85805
|
-
timestamp
|
|
85806
|
-
};
|
|
85807
85795
|
if (!artifactStats) {
|
|
85808
85796
|
return modules;
|
|
85809
85797
|
}
|
|
85810
|
-
console.log("\u{1F3A9} \u2B06\uFE0F bundle changed, triggering HMR update");
|
|
85811
85798
|
const taintedModules = [];
|
|
85812
85799
|
for await (const file2 of fs_exports.walk(runtimeDir)) {
|
|
85813
85800
|
const module2 = environment.moduleGraph.getModuleById(file2);
|
package/build/vite-esm/index.js
CHANGED
|
@@ -75764,8 +75764,7 @@ var Config = class {
|
|
|
75764
75764
|
let {
|
|
75765
75765
|
schema,
|
|
75766
75766
|
schemaPath = "./schema.graphql",
|
|
75767
|
-
|
|
75768
|
-
runtimeDir = "$houdini",
|
|
75767
|
+
runtimeDir = ".houdini",
|
|
75769
75768
|
exclude = [],
|
|
75770
75769
|
module = "esm",
|
|
75771
75770
|
scalars,
|
|
@@ -85747,17 +85746,6 @@ async function shouldReactToFileChange(filepath, config2) {
|
|
|
85747
85746
|
}
|
|
85748
85747
|
return config2.includeFile(filepath, { root: process.cwd() });
|
|
85749
85748
|
}
|
|
85750
|
-
function fileDependsOnHoudini(modules, houdiniPath) {
|
|
85751
|
-
const fileDependencies = modules.reduce((acc, module) => {
|
|
85752
|
-
module.importedModules.forEach((importedModule) => {
|
|
85753
|
-
if (importedModule?.id) acc.push(importedModule.id);
|
|
85754
|
-
});
|
|
85755
|
-
return acc;
|
|
85756
|
-
}, []);
|
|
85757
|
-
return fileDependencies.some((file) => {
|
|
85758
|
-
return file.startsWith(houdiniPath);
|
|
85759
|
-
});
|
|
85760
|
-
}
|
|
85761
85749
|
|
|
85762
85750
|
// src/vite/houdini.ts
|
|
85763
85751
|
var config;
|
|
@@ -85771,12 +85759,13 @@ function Plugin(opts = {}) {
|
|
|
85771
85759
|
// houdini will always act as a "meta framework" and process the user's code before it
|
|
85772
85760
|
// is processed by the user's library-specific plugins.
|
|
85773
85761
|
enforce: "pre",
|
|
85774
|
-
async hotUpdate({ file, server, modules, timestamp }) {
|
|
85762
|
+
async hotUpdate({ file, server, modules, timestamp, read }) {
|
|
85775
85763
|
const config2 = await getConfig(opts);
|
|
85776
85764
|
const shouldReact = await shouldReactToFileChange(file, config2);
|
|
85777
|
-
const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? "
|
|
85765
|
+
const runtimeDir = path_exports.join(config2.projectRoot, config2.runtimeDir ?? ".houdini");
|
|
85766
|
+
const dependsOn = (await read()).includes("$houdini");
|
|
85778
85767
|
const isGqlFile = isGraphQLFile(file);
|
|
85779
|
-
if (!(shouldReact && (
|
|
85768
|
+
if (!(shouldReact && (dependsOn || isGqlFile))) {
|
|
85780
85769
|
return modules;
|
|
85781
85770
|
}
|
|
85782
85771
|
if (config2.localSchema) {
|
|
@@ -85786,20 +85775,18 @@ function Plugin(opts = {}) {
|
|
|
85786
85775
|
config2.pluginMode = true;
|
|
85787
85776
|
let artifactStats = void 0;
|
|
85788
85777
|
if (!lastHotUpdateEvent || timestamp !== lastHotUpdateEvent.timestamp) {
|
|
85789
|
-
console.log("\u{1F3A9} \u{1F504} bundle HMR rebuild...");
|
|
85790
85778
|
try {
|
|
85791
85779
|
artifactStats = await compile(config2);
|
|
85792
85780
|
} catch (e2) {
|
|
85793
85781
|
formatErrors(e2);
|
|
85794
85782
|
}
|
|
85783
|
+
lastHotUpdateEvent = {
|
|
85784
|
+
timestamp
|
|
85785
|
+
};
|
|
85795
85786
|
}
|
|
85796
|
-
lastHotUpdateEvent = {
|
|
85797
|
-
timestamp
|
|
85798
|
-
};
|
|
85799
85787
|
if (!artifactStats) {
|
|
85800
85788
|
return modules;
|
|
85801
85789
|
}
|
|
85802
|
-
console.log("\u{1F3A9} \u2B06\uFE0F bundle changed, triggering HMR update");
|
|
85803
85790
|
const taintedModules = [];
|
|
85804
85791
|
for await (const file2 of fs_exports.walk(runtimeDir)) {
|
|
85805
85792
|
const module = environment.moduleGraph.getModuleById(file2);
|