houdini-svelte 0.20.2 → 0.20.4

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.
@@ -185970,7 +185970,7 @@ import_fs.default.readdirSync = function(filepath, options) {
185970
185970
  function contains2(...names) {
185971
185971
  return names.some((name2) => file_names.includes(name2));
185972
185972
  }
185973
- if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
185973
+ if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts")) {
185974
185974
  result.push(virtual_file("+page.js", options));
185975
185975
  }
185976
185976
  if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
@@ -185965,7 +185965,7 @@ filesystem.readdirSync = function(filepath, options) {
185965
185965
  function contains2(...names) {
185966
185966
  return names.some((name2) => file_names.includes(name2));
185967
185967
  }
185968
- if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
185968
+ if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts")) {
185969
185969
  result.push(virtual_file("+page.js", options));
185970
185970
  }
185971
185971
  if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
@@ -147850,6 +147850,9 @@ var FieldCollection = class {
147850
147850
  this.add(selection2);
147851
147851
  }
147852
147852
  }
147853
+ get size() {
147854
+ return Object.keys(this.fields).length + Object.keys(this.inlineFragments).length + Object.keys(this.fragmentSpreads).length;
147855
+ }
147853
147856
  add(selection2) {
147854
147857
  if (selection2.kind === "Field") {
147855
147858
  const key = selection2.alias?.value || selection2.name.value;
@@ -147918,9 +147921,12 @@ var FieldCollection = class {
147918
147921
  }
147919
147922
  }
147920
147923
  toSelectionSet() {
147921
- return Object.values(this.inlineFragments).map((fragment2) => {
147924
+ return Object.values(this.inlineFragments).flatMap((fragment2) => {
147925
+ if (fragment2.selection.size === 0) {
147926
+ return [];
147927
+ }
147922
147928
  fragment2.astNode.selectionSet.selections = fragment2.selection.toSelectionSet();
147923
- return fragment2.astNode;
147929
+ return [fragment2.astNode];
147924
147930
  }).concat(
147925
147931
  Object.values(this.fields).map((field) => {
147926
147932
  if (field.astNode.selectionSet) {
@@ -302511,7 +302517,7 @@ import_fs.default.readdirSync = function(filepath, options) {
302511
302517
  function contains2(...names) {
302512
302518
  return names.some((name2) => file_names.includes(name2));
302513
302519
  }
302514
- if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
302520
+ if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts")) {
302515
302521
  result.push(virtual_file("+page.js", options));
302516
302522
  }
302517
302523
  if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
@@ -147841,6 +147841,9 @@ var FieldCollection = class {
147841
147841
  this.add(selection2);
147842
147842
  }
147843
147843
  }
147844
+ get size() {
147845
+ return Object.keys(this.fields).length + Object.keys(this.inlineFragments).length + Object.keys(this.fragmentSpreads).length;
147846
+ }
147844
147847
  add(selection2) {
147845
147848
  if (selection2.kind === "Field") {
147846
147849
  const key = selection2.alias?.value || selection2.name.value;
@@ -147909,9 +147912,12 @@ var FieldCollection = class {
147909
147912
  }
147910
147913
  }
147911
147914
  toSelectionSet() {
147912
- return Object.values(this.inlineFragments).map((fragment2) => {
147915
+ return Object.values(this.inlineFragments).flatMap((fragment2) => {
147916
+ if (fragment2.selection.size === 0) {
147917
+ return [];
147918
+ }
147913
147919
  fragment2.astNode.selectionSet.selections = fragment2.selection.toSelectionSet();
147914
- return fragment2.astNode;
147920
+ return [fragment2.astNode];
147915
147921
  }).concat(
147916
147922
  Object.values(this.fields).map((field) => {
147917
147923
  if (field.astNode.selectionSet) {
@@ -302500,7 +302506,7 @@ filesystem.readdirSync = function(filepath, options) {
302500
302506
  function contains2(...names) {
302501
302507
  return names.some((name2) => file_names.includes(name2));
302502
302508
  }
302503
- if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
302509
+ if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts")) {
302504
302510
  result.push(virtual_file("+page.js", options));
302505
302511
  }
302506
302512
  if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "0.20.2",
3
+ "version": "0.20.4",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -31,7 +31,7 @@
31
31
  "recast": "^0.23.1",
32
32
  "svelte": "^3.55.0",
33
33
  "vite": "^4.0.1",
34
- "houdini": "^0.20.2"
34
+ "houdini": "^0.20.4"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "graphql": "^14.0.0 || ^15.0.0"