houdini-svelte 1.2.0-next.1 → 1.2.0

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.
@@ -92670,7 +92670,7 @@ function deepMerge2(filepath, ...targets) {
92670
92670
  }
92671
92671
  async function parseJS(str, config4) {
92672
92672
  const defaultConfig = {
92673
- plugins: ["typescript", "importAssertions"],
92673
+ plugins: ["typescript", "importAssertions", "jsx"],
92674
92674
  sourceType: "module"
92675
92675
  };
92676
92676
  return (0, import_parser.parse)(str || "", config4 ? deepMerge2("", defaultConfig, config4) : defaultConfig).program;
@@ -92661,7 +92661,7 @@ function deepMerge2(filepath, ...targets) {
92661
92661
  }
92662
92662
  async function parseJS(str, config4) {
92663
92663
  const defaultConfig = {
92664
- plugins: ["typescript", "importAssertions"],
92664
+ plugins: ["typescript", "importAssertions", "jsx"],
92665
92665
  sourceType: "module"
92666
92666
  };
92667
92667
  return (0, import_parser.parse)(str || "", config4 ? deepMerge2("", defaultConfig, config4) : defaultConfig).program;
@@ -96751,7 +96751,7 @@ function deepMerge2(filepath, ...targets) {
96751
96751
  }
96752
96752
  async function parseJS(str, config4) {
96753
96753
  const defaultConfig = {
96754
- plugins: ["typescript", "importAssertions"],
96754
+ plugins: ["typescript", "importAssertions", "jsx"],
96755
96755
  sourceType: "module"
96756
96756
  };
96757
96757
  return (0, import_parser.parse)(str || "", config4 ? deepMerge2("", defaultConfig, config4) : defaultConfig).program;
@@ -96744,7 +96744,7 @@ function deepMerge2(filepath, ...targets) {
96744
96744
  }
96745
96745
  async function parseJS(str, config4) {
96746
96746
  const defaultConfig = {
96747
- plugins: ["typescript", "importAssertions"],
96747
+ plugins: ["typescript", "importAssertions", "jsx"],
96748
96748
  sourceType: "module"
96749
96749
  };
96750
96750
  return (0, import_parser.parse)(str || "", config4 ? deepMerge2("", defaultConfig, config4) : defaultConfig).program;
@@ -92673,7 +92673,7 @@ function deepMerge2(filepath, ...targets) {
92673
92673
  }
92674
92674
  async function parseJS(str, config5) {
92675
92675
  const defaultConfig = {
92676
- plugins: ["typescript", "importAssertions"],
92676
+ plugins: ["typescript", "importAssertions", "jsx"],
92677
92677
  sourceType: "module"
92678
92678
  };
92679
92679
  return (0, import_parser.parse)(str || "", config5 ? deepMerge2("", defaultConfig, config5) : defaultConfig).program;
@@ -149361,7 +149361,7 @@ function deepMerge22(filepath, ...targets) {
149361
149361
  }
149362
149362
  async function parseJS2(str, config22) {
149363
149363
  const defaultConfig = {
149364
- plugins: ["typescript", "importAssertions"],
149364
+ plugins: ["typescript", "importAssertions", "jsx"],
149365
149365
  sourceType: "module"
149366
149366
  };
149367
149367
  return (0, import_parser2.parse)(str || "", config22 ? deepMerge22("", defaultConfig, config22) : defaultConfig).program;
@@ -154833,6 +154833,28 @@ function validateLoadingDirective(config22) {
154833
154833
  }
154834
154834
  }
154835
154835
  },
154836
+ FragmentSpread(node2, _, __, ___, ancestors) {
154837
+ const loadingDirective = node2.directives?.find(
154838
+ (d) => d.name.value === config22.loadingDirective
154839
+ );
154840
+ if (!loadingDirective) {
154841
+ return;
154842
+ }
154843
+ const parent2 = parentField(ancestors);
154844
+ if (!parent2 || ["OperationDefinition", "FragmentDefinition"].includes(parent2.kind)) {
154845
+ return;
154846
+ }
154847
+ const parentLoading = parent2.directives?.find(
154848
+ (d) => d.name.value === config22.loadingDirective
154849
+ );
154850
+ if (!parentLoading && !global2) {
154851
+ ctx.reportError(
154852
+ new graphql24.GraphQLError(
154853
+ `@${config22.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154854
+ )
154855
+ );
154856
+ }
154857
+ },
154836
154858
  Field(node2, _, __, ___, ancestors) {
154837
154859
  const loadingDirective = node2.directives?.find(
154838
154860
  (d) => d.name.value === config22.loadingDirective
@@ -154850,7 +154872,7 @@ function validateLoadingDirective(config22) {
154850
154872
  if (!parentLoading && !global2) {
154851
154873
  ctx.reportError(
154852
154874
  new graphql24.GraphQLError(
154853
- `@${config22.loadingDirective} can only be applied on a field at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154875
+ `@${config22.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154854
154876
  )
154855
154877
  );
154856
154878
  }
@@ -92661,7 +92661,7 @@ function deepMerge2(filepath, ...targets) {
92661
92661
  }
92662
92662
  async function parseJS(str, config5) {
92663
92663
  const defaultConfig = {
92664
- plugins: ["typescript", "importAssertions"],
92664
+ plugins: ["typescript", "importAssertions", "jsx"],
92665
92665
  sourceType: "module"
92666
92666
  };
92667
92667
  return (0, import_parser.parse)(str || "", config5 ? deepMerge2("", defaultConfig, config5) : defaultConfig).program;
@@ -149348,7 +149348,7 @@ function deepMerge22(filepath, ...targets) {
149348
149348
  }
149349
149349
  async function parseJS2(str, config22) {
149350
149350
  const defaultConfig = {
149351
- plugins: ["typescript", "importAssertions"],
149351
+ plugins: ["typescript", "importAssertions", "jsx"],
149352
149352
  sourceType: "module"
149353
149353
  };
149354
149354
  return (0, import_parser2.parse)(str || "", config22 ? deepMerge22("", defaultConfig, config22) : defaultConfig).program;
@@ -154820,6 +154820,28 @@ function validateLoadingDirective(config22) {
154820
154820
  }
154821
154821
  }
154822
154822
  },
154823
+ FragmentSpread(node2, _, __, ___, ancestors) {
154824
+ const loadingDirective = node2.directives?.find(
154825
+ (d) => d.name.value === config22.loadingDirective
154826
+ );
154827
+ if (!loadingDirective) {
154828
+ return;
154829
+ }
154830
+ const parent2 = parentField(ancestors);
154831
+ if (!parent2 || ["OperationDefinition", "FragmentDefinition"].includes(parent2.kind)) {
154832
+ return;
154833
+ }
154834
+ const parentLoading = parent2.directives?.find(
154835
+ (d) => d.name.value === config22.loadingDirective
154836
+ );
154837
+ if (!parentLoading && !global2) {
154838
+ ctx.reportError(
154839
+ new graphql24.GraphQLError(
154840
+ `@${config22.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154841
+ )
154842
+ );
154843
+ }
154844
+ },
154823
154845
  Field(node2, _, __, ___, ancestors) {
154824
154846
  const loadingDirective = node2.directives?.find(
154825
154847
  (d) => d.name.value === config22.loadingDirective
@@ -154837,7 +154859,7 @@ function validateLoadingDirective(config22) {
154837
154859
  if (!parentLoading && !global2) {
154838
154860
  ctx.reportError(
154839
154861
  new graphql24.GraphQLError(
154840
- `@${config22.loadingDirective} can only be applied on a field at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154862
+ `@${config22.loadingDirective} can only be applied on a field or fragment spread at the root of a document or on one whose parent also has @${config22.loadingDirective}`
154841
154863
  )
154842
154864
  );
154843
154865
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.2.0-next.1",
3
+ "version": "1.2.0",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -32,7 +32,7 @@
32
32
  "rollup": "^3.7.4",
33
33
  "svelte": "^3.57.0",
34
34
  "vite": "^4.1.1",
35
- "houdini": "^1.2.0-next.1"
35
+ "houdini": "^1.2.0"
36
36
  },
37
37
  "files": [
38
38
  "build"