houdini-svelte 1.2.50 → 1.2.52

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.
@@ -75643,6 +75643,7 @@ __export2(conventions_exports, {
75643
75643
  router_path: () => router_path,
75644
75644
  serialized_manifest_path: () => serialized_manifest_path,
75645
75645
  server_adapter_path: () => server_adapter_path,
75646
+ temp_dir: () => temp_dir,
75646
75647
  units_dir: () => units_dir,
75647
75648
  vite_render_path: () => vite_render_path
75648
75649
  });
@@ -75704,6 +75705,9 @@ async function read_layoutView(base) {
75704
75705
  }
75705
75706
  return [null, null];
75706
75707
  }
75708
+ function temp_dir(config2, key) {
75709
+ return path_exports.join(config2.rootDir, "temp", key);
75710
+ }
75707
75711
  function router_index_path(config2) {
75708
75712
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
75709
75713
  }
@@ -140619,6 +140623,7 @@ __export3(conventions_exports2, {
140619
140623
  router_path: () => router_path2,
140620
140624
  serialized_manifest_path: () => serialized_manifest_path2,
140621
140625
  server_adapter_path: () => server_adapter_path2,
140626
+ temp_dir: () => temp_dir2,
140622
140627
  units_dir: () => units_dir2,
140623
140628
  vite_render_path: () => vite_render_path2
140624
140629
  });
@@ -140680,6 +140685,9 @@ async function read_layoutView2(base) {
140680
140685
  }
140681
140686
  return [null, null];
140682
140687
  }
140688
+ function temp_dir2(config2, key) {
140689
+ return path_exports2.join(config2.rootDir, "temp", key);
140690
+ }
140683
140691
  function router_index_path2(config2) {
140684
140692
  return path_exports2.join(config2.routesDir, "..", "+index.jsx");
140685
140693
  }
@@ -75638,6 +75638,7 @@ __export2(conventions_exports, {
75638
75638
  router_path: () => router_path,
75639
75639
  serialized_manifest_path: () => serialized_manifest_path,
75640
75640
  server_adapter_path: () => server_adapter_path,
75641
+ temp_dir: () => temp_dir,
75641
75642
  units_dir: () => units_dir,
75642
75643
  vite_render_path: () => vite_render_path
75643
75644
  });
@@ -75699,6 +75700,9 @@ async function read_layoutView(base) {
75699
75700
  }
75700
75701
  return [null, null];
75701
75702
  }
75703
+ function temp_dir(config2, key) {
75704
+ return path_exports.join(config2.rootDir, "temp", key);
75705
+ }
75702
75706
  function router_index_path(config2) {
75703
75707
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
75704
75708
  }
@@ -140613,6 +140617,7 @@ __export3(conventions_exports2, {
140613
140617
  router_path: () => router_path2,
140614
140618
  serialized_manifest_path: () => serialized_manifest_path2,
140615
140619
  server_adapter_path: () => server_adapter_path2,
140620
+ temp_dir: () => temp_dir2,
140616
140621
  units_dir: () => units_dir2,
140617
140622
  vite_render_path: () => vite_render_path2
140618
140623
  });
@@ -140674,6 +140679,9 @@ async function read_layoutView2(base) {
140674
140679
  }
140675
140680
  return [null, null];
140676
140681
  }
140682
+ function temp_dir2(config2, key) {
140683
+ return path_exports2.join(config2.rootDir, "temp", key);
140684
+ }
140677
140685
  function router_index_path2(config2) {
140678
140686
  return path_exports2.join(config2.routesDir, "..", "+index.jsx");
140679
140687
  }
@@ -78998,6 +78998,7 @@ __export2(conventions_exports, {
78998
78998
  router_path: () => router_path,
78999
78999
  serialized_manifest_path: () => serialized_manifest_path,
79000
79000
  server_adapter_path: () => server_adapter_path,
79001
+ temp_dir: () => temp_dir,
79001
79002
  units_dir: () => units_dir,
79002
79003
  vite_render_path: () => vite_render_path
79003
79004
  });
@@ -79059,6 +79060,9 @@ async function read_layoutView(base) {
79059
79060
  }
79060
79061
  return [null, null];
79061
79062
  }
79063
+ function temp_dir(config2, key) {
79064
+ return path_exports.join(config2.rootDir, "temp", key);
79065
+ }
79062
79066
  function router_index_path(config2) {
79063
79067
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
79064
79068
  }
@@ -81305,7 +81309,7 @@ function isSecondaryBuild() {
81305
81309
  async function buildLocalSchema(config2) {
81306
81310
  const { build } = await import("vite");
81307
81311
  const schema = import_node_path2.default.join(config2.localApiDir, "+schema");
81308
- const outDir = import_node_path2.default.join(config2.rootDir, "temp");
81312
+ const outDir = conventions_exports.temp_dir(config2, "schema");
81309
81313
  process.env.HOUDINI_SECONDARY_BUILD = "true";
81310
81314
  try {
81311
81315
  await fs_exports.remove(import_node_path2.default.join(outDir, "assets", "schema.js"));
@@ -81324,7 +81328,7 @@ async function buildLocalSchema(config2) {
81324
81328
  schema
81325
81329
  },
81326
81330
  output: {
81327
- entryFileNames: "assets/[name].js"
81331
+ entryFileNames: "[name].js"
81328
81332
  }
81329
81333
  },
81330
81334
  ssr: true,
@@ -81342,7 +81346,10 @@ async function loadLocalSchema(config2) {
81342
81346
  if (!isSecondaryBuild()) {
81343
81347
  await buildLocalSchema(config2);
81344
81348
  }
81345
- const { default: schema } = await import(import_node_path2.default.join(config2.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
81349
+ const { default: schema } = await import(import_node_path2.default.join(
81350
+ conventions_exports.temp_dir(config2, "schema"),
81351
+ `schema.js?${Date.now().valueOf()}}`
81352
+ ));
81346
81353
  return schema;
81347
81354
  }
81348
81355
  var currentDir = dirname((0, import_node_url.fileURLToPath)(import_meta.url));
@@ -81377,6 +81384,7 @@ var Config = class {
81377
81384
  schemaPollHeaders;
81378
81385
  pluginMode = false;
81379
81386
  plugins = [];
81387
+ adapter;
81380
81388
  componentFields = {};
81381
81389
  constructor({
81382
81390
  filepath,
@@ -172512,6 +172520,7 @@ __export3(conventions_exports2, {
172512
172520
  router_path: () => router_path2,
172513
172521
  serialized_manifest_path: () => serialized_manifest_path2,
172514
172522
  server_adapter_path: () => server_adapter_path2,
172523
+ temp_dir: () => temp_dir2,
172515
172524
  units_dir: () => units_dir2,
172516
172525
  vite_render_path: () => vite_render_path2
172517
172526
  });
@@ -172573,6 +172582,9 @@ async function read_layoutView2(base) {
172573
172582
  }
172574
172583
  return [null, null];
172575
172584
  }
172585
+ function temp_dir2(config2, key) {
172586
+ return path_exports2.join(config2.rootDir, "temp", key);
172587
+ }
172576
172588
  function router_index_path2(config2) {
172577
172589
  return path_exports2.join(config2.routesDir, "..", "+index.jsx");
172578
172590
  }
@@ -78995,6 +78995,7 @@ __export2(conventions_exports, {
78995
78995
  router_path: () => router_path,
78996
78996
  serialized_manifest_path: () => serialized_manifest_path,
78997
78997
  server_adapter_path: () => server_adapter_path,
78998
+ temp_dir: () => temp_dir,
78998
78999
  units_dir: () => units_dir,
78999
79000
  vite_render_path: () => vite_render_path
79000
79001
  });
@@ -79056,6 +79057,9 @@ async function read_layoutView(base) {
79056
79057
  }
79057
79058
  return [null, null];
79058
79059
  }
79060
+ function temp_dir(config2, key) {
79061
+ return path_exports.join(config2.rootDir, "temp", key);
79062
+ }
79059
79063
  function router_index_path(config2) {
79060
79064
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
79061
79065
  }
@@ -81302,7 +81306,7 @@ function isSecondaryBuild() {
81302
81306
  async function buildLocalSchema(config2) {
81303
81307
  const { build } = await import("vite");
81304
81308
  const schema = path2.join(config2.localApiDir, "+schema");
81305
- const outDir = path2.join(config2.rootDir, "temp");
81309
+ const outDir = conventions_exports.temp_dir(config2, "schema");
81306
81310
  process.env.HOUDINI_SECONDARY_BUILD = "true";
81307
81311
  try {
81308
81312
  await fs_exports.remove(path2.join(outDir, "assets", "schema.js"));
@@ -81321,7 +81325,7 @@ async function buildLocalSchema(config2) {
81321
81325
  schema
81322
81326
  },
81323
81327
  output: {
81324
- entryFileNames: "assets/[name].js"
81328
+ entryFileNames: "[name].js"
81325
81329
  }
81326
81330
  },
81327
81331
  ssr: true,
@@ -81339,7 +81343,10 @@ async function loadLocalSchema(config2) {
81339
81343
  if (!isSecondaryBuild()) {
81340
81344
  await buildLocalSchema(config2);
81341
81345
  }
81342
- const { default: schema } = await import(path2.join(config2.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
81346
+ const { default: schema } = await import(path2.join(
81347
+ conventions_exports.temp_dir(config2, "schema"),
81348
+ `schema.js?${Date.now().valueOf()}}`
81349
+ ));
81343
81350
  return schema;
81344
81351
  }
81345
81352
  var currentDir = dirname(fileURLToPath(import.meta.url));
@@ -81374,6 +81381,7 @@ var Config = class {
81374
81381
  schemaPollHeaders;
81375
81382
  pluginMode = false;
81376
81383
  plugins = [];
81384
+ adapter;
81377
81385
  componentFields = {};
81378
81386
  constructor({
81379
81387
  filepath,
@@ -172508,6 +172516,7 @@ __export3(conventions_exports2, {
172508
172516
  router_path: () => router_path2,
172509
172517
  serialized_manifest_path: () => serialized_manifest_path2,
172510
172518
  server_adapter_path: () => server_adapter_path2,
172519
+ temp_dir: () => temp_dir2,
172511
172520
  units_dir: () => units_dir2,
172512
172521
  vite_render_path: () => vite_render_path2
172513
172522
  });
@@ -172569,6 +172578,9 @@ async function read_layoutView2(base) {
172569
172578
  }
172570
172579
  return [null, null];
172571
172580
  }
172581
+ function temp_dir2(config2, key) {
172582
+ return path_exports2.join(config2.rootDir, "temp", key);
172583
+ }
172572
172584
  function router_index_path2(config2) {
172573
172585
  return path_exports2.join(config2.routesDir, "..", "+index.jsx");
172574
172586
  }
@@ -75646,6 +75646,7 @@ __export2(conventions_exports, {
75646
75646
  router_path: () => router_path,
75647
75647
  serialized_manifest_path: () => serialized_manifest_path,
75648
75648
  server_adapter_path: () => server_adapter_path,
75649
+ temp_dir: () => temp_dir,
75649
75650
  units_dir: () => units_dir,
75650
75651
  vite_render_path: () => vite_render_path
75651
75652
  });
@@ -75707,6 +75708,9 @@ async function read_layoutView(base) {
75707
75708
  }
75708
75709
  return [null, null];
75709
75710
  }
75711
+ function temp_dir(config2, key) {
75712
+ return path_exports.join(config2.rootDir, "temp", key);
75713
+ }
75710
75714
  function router_index_path(config2) {
75711
75715
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
75712
75716
  }
@@ -137676,6 +137680,7 @@ function artifactGenerator(stats) {
137676
137680
  return;
137677
137681
  }
137678
137682
  const usedVariableNames = /* @__PURE__ */ new Set();
137683
+ const unusedVariables = /* @__PURE__ */ new Set();
137679
137684
  let documentWithoutInternalDirectives = graphql17.visit(document2, {
137680
137685
  Directive(node2) {
137681
137686
  if (config2.isInternalDirective(node2.name.value)) {
@@ -137695,6 +137700,7 @@ function artifactGenerator(stats) {
137695
137700
  VariableDefinition(variableDefinitionNode) {
137696
137701
  const name2 = variableDefinitionNode.variable.name.value;
137697
137702
  if (!usedVariableNames.has(name2)) {
137703
+ unusedVariables.add(name2);
137698
137704
  return null;
137699
137705
  }
137700
137706
  }
@@ -137783,6 +137789,7 @@ function artifactGenerator(stats) {
137783
137789
  refetch: doc.refetch,
137784
137790
  raw: rawString,
137785
137791
  rootType,
137792
+ stripVariables: [...unusedVariables],
137786
137793
  selection: selection_default({
137787
137794
  config: config2,
137788
137795
  filepath: doc.filename,
@@ -199060,6 +199067,7 @@ var Config = class {
199060
199067
  schemaPollHeaders;
199061
199068
  pluginMode = false;
199062
199069
  plugins = [];
199070
+ adapter;
199063
199071
  componentFields = {};
199064
199072
  constructor({
199065
199073
  filepath,
@@ -262590,6 +262598,7 @@ __export5(conventions_exports2, {
262590
262598
  router_path: () => router_path2,
262591
262599
  serialized_manifest_path: () => serialized_manifest_path2,
262592
262600
  server_adapter_path: () => server_adapter_path2,
262601
+ temp_dir: () => temp_dir2,
262593
262602
  units_dir: () => units_dir2,
262594
262603
  vite_render_path: () => vite_render_path2
262595
262604
  });
@@ -262651,6 +262660,9 @@ async function read_layoutView2(base) {
262651
262660
  }
262652
262661
  return [null, null];
262653
262662
  }
262663
+ function temp_dir2(config2, key) {
262664
+ return path_exports4.join(config2.rootDir, "temp", key);
262665
+ }
262654
262666
  function router_index_path2(config2) {
262655
262667
  return path_exports4.join(config2.routesDir, "..", "+index.jsx");
262656
262668
  }
@@ -75638,6 +75638,7 @@ __export2(conventions_exports, {
75638
75638
  router_path: () => router_path,
75639
75639
  serialized_manifest_path: () => serialized_manifest_path,
75640
75640
  server_adapter_path: () => server_adapter_path,
75641
+ temp_dir: () => temp_dir,
75641
75642
  units_dir: () => units_dir,
75642
75643
  vite_render_path: () => vite_render_path
75643
75644
  });
@@ -75699,6 +75700,9 @@ async function read_layoutView(base) {
75699
75700
  }
75700
75701
  return [null, null];
75701
75702
  }
75703
+ function temp_dir(config2, key) {
75704
+ return path_exports.join(config2.rootDir, "temp", key);
75705
+ }
75702
75706
  function router_index_path(config2) {
75703
75707
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
75704
75708
  }
@@ -137667,6 +137671,7 @@ function artifactGenerator(stats) {
137667
137671
  return;
137668
137672
  }
137669
137673
  const usedVariableNames = /* @__PURE__ */ new Set();
137674
+ const unusedVariables = /* @__PURE__ */ new Set();
137670
137675
  let documentWithoutInternalDirectives = graphql17.visit(document2, {
137671
137676
  Directive(node2) {
137672
137677
  if (config2.isInternalDirective(node2.name.value)) {
@@ -137686,6 +137691,7 @@ function artifactGenerator(stats) {
137686
137691
  VariableDefinition(variableDefinitionNode) {
137687
137692
  const name2 = variableDefinitionNode.variable.name.value;
137688
137693
  if (!usedVariableNames.has(name2)) {
137694
+ unusedVariables.add(name2);
137689
137695
  return null;
137690
137696
  }
137691
137697
  }
@@ -137774,6 +137780,7 @@ function artifactGenerator(stats) {
137774
137780
  refetch: doc.refetch,
137775
137781
  raw: rawString,
137776
137782
  rootType,
137783
+ stripVariables: [...unusedVariables],
137777
137784
  selection: selection_default({
137778
137785
  config: config2,
137779
137786
  filepath: doc.filename,
@@ -199050,6 +199057,7 @@ var Config = class {
199050
199057
  schemaPollHeaders;
199051
199058
  pluginMode = false;
199052
199059
  plugins = [];
199060
+ adapter;
199053
199061
  componentFields = {};
199054
199062
  constructor({
199055
199063
  filepath,
@@ -262579,6 +262587,7 @@ __export5(conventions_exports2, {
262579
262587
  router_path: () => router_path2,
262580
262588
  serialized_manifest_path: () => serialized_manifest_path2,
262581
262589
  server_adapter_path: () => server_adapter_path2,
262590
+ temp_dir: () => temp_dir2,
262582
262591
  units_dir: () => units_dir2,
262583
262592
  vite_render_path: () => vite_render_path2
262584
262593
  });
@@ -262640,6 +262649,9 @@ async function read_layoutView2(base) {
262640
262649
  }
262641
262650
  return [null, null];
262642
262651
  }
262652
+ function temp_dir2(config2, key) {
262653
+ return path_exports4.join(config2.rootDir, "temp", key);
262654
+ }
262643
262655
  function router_index_path2(config2) {
262644
262656
  return path_exports4.join(config2.routesDir, "..", "+index.jsx");
262645
262657
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.2.50",
3
+ "version": "1.2.52",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@types/minimatch": "^5.1.2",
22
22
  "prettier-plugin-svelte": "^2.9.0",
23
- "vitest": "^0.28.3",
23
+ "vitest": "^1.6.0",
24
24
  "scripts": "^1.0.0"
25
25
  },
26
26
  "dependencies": {
@@ -33,7 +33,7 @@
33
33
  "rollup": "^3.7.4",
34
34
  "svelte": "^3.57.0",
35
35
  "vite": "^4.1.1",
36
- "houdini": "^1.2.50"
36
+ "houdini": "^1.2.52"
37
37
  },
38
38
  "files": [
39
39
  "build"