@graphcommerce/graphql-codegen-near-operation-file 8.1.0-canary.8 → 9.0.0-canary.54

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 CHANGED
@@ -1,5 +1,102 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.54
4
+
5
+ ## 8.1.0-canary.53
6
+
7
+ ## 8.1.0-canary.52
8
+
9
+ ## 8.1.0-canary.51
10
+
11
+ ## 8.1.0-canary.50
12
+
13
+ ## 8.1.0-canary.49
14
+
15
+ ## 8.1.0-canary.48
16
+
17
+ ## 8.1.0-canary.47
18
+
19
+ ## 8.1.0-canary.46
20
+
21
+ ## 8.1.0-canary.45
22
+
23
+ ## 8.1.0-canary.44
24
+
25
+ ## 8.1.0-canary.43
26
+
27
+ ## 8.1.0-canary.42
28
+
29
+ ## 8.1.0-canary.41
30
+
31
+ ## 8.1.0-canary.40
32
+
33
+ ## 8.1.0-canary.39
34
+
35
+ ## 8.1.0-canary.38
36
+
37
+ ## 8.1.0-canary.37
38
+
39
+ ## 8.1.0-canary.36
40
+
41
+ ## 8.1.0-canary.35
42
+
43
+ ## 8.1.0-canary.34
44
+
45
+ ## 8.1.0-canary.33
46
+
47
+ ## 8.1.0-canary.32
48
+
49
+ ## 8.1.0-canary.31
50
+
51
+ ## 8.1.0-canary.30
52
+
53
+ ## 8.1.0-canary.29
54
+
55
+ ## 8.1.0-canary.28
56
+
57
+ ## 8.1.0-canary.27
58
+
59
+ ## 8.1.0-canary.26
60
+
61
+ ## 8.1.0-canary.25
62
+
63
+ ## 8.1.0-canary.24
64
+
65
+ ### Patch Changes
66
+
67
+ - [#2289](https://github.com/graphcommerce-org/graphcommerce/pull/2289) [`d2a6f58`](https://github.com/graphcommerce-org/graphcommerce/commit/d2a6f58276abadb132473d4da2d7d25e0b996106) - Do not require fragments to be marked @injectable but always accept @inject directives.
68
+ ([@paales](https://github.com/paales))
69
+
70
+ ## 8.1.0-canary.23
71
+
72
+ ## 8.1.0-canary.22
73
+
74
+ ## 8.1.0-canary.21
75
+
76
+ ## 8.1.0-canary.20
77
+
78
+ ## 8.1.0-canary.19
79
+
80
+ ## 8.1.0-canary.18
81
+
82
+ ## 8.1.0-canary.17
83
+
84
+ ## 8.1.0-canary.16
85
+
86
+ ## 8.1.0-canary.15
87
+
88
+ ## 8.1.0-canary.14
89
+
90
+ ## 8.1.0-canary.13
91
+
92
+ ## 8.1.0-canary.12
93
+
94
+ ## 8.1.0-canary.11
95
+
96
+ ## 8.1.0-canary.10
97
+
98
+ ## 8.1.0-canary.9
99
+
3
100
  ## 8.1.0-canary.8
4
101
 
5
102
  ## 8.1.0-canary.7
@@ -97,14 +97,14 @@ function injectInjectable(injectables, injector) {
97
97
  });
98
98
  });
99
99
  if (!found)
100
- throwInjectError(injectVal, `fragment ${target} @injectable { ... } can not be found or isn't injectable`);
100
+ throwInjectError(injectVal, `fragment ${target} { ... } can not be found`);
101
101
  });
102
102
  }
103
103
  function injectableDirective(documentFiles) {
104
104
  const documents = documentFiles
105
105
  .map(({ document }) => document)
106
106
  .filter((doc) => doc);
107
- const injectables = documents.filter((d) => isFragment(d) && hasInjectableDirective(d));
107
+ const injectables = documents.filter((d) => isFragment(d));
108
108
  const injectors = documents.filter((d) => isFragment(d) && hasInjectDirective(d));
109
109
  injectors.forEach((d) => injectInjectable(injectables, d));
110
110
  return documentFiles;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/graphql-codegen-near-operation-file",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.1.0-canary.8",
5
+ "version": "9.0.0-canary.54",
6
6
  "sideEffects": false,
7
7
  "type": "commonjs",
8
8
  "main": "dist/index.js",
@@ -28,9 +28,9 @@
28
28
  "parse-filepath": "^1.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.8",
32
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.8",
33
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.8",
31
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.54",
32
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.54",
33
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.54",
34
34
  "graphql": "^16.7.1"
35
35
  }
36
36
  }
@@ -1,4 +1,6 @@
1
1
  """
2
+ DEPRECATED, CAN BE COMPLETELY OMITTED
3
+
2
4
  Defines wheter a Fragment can be injected
3
5
 
4
6
  ```graphql
@@ -10,7 +12,7 @@ fragment MyInjectableFragment on Model @injectable {
10
12
  directive @injectable on FRAGMENT_DEFINITION
11
13
 
12
14
  """
13
- Defines whether a Fragment injects into an @injectable
15
+ Defines whether a Fragment injects into another Fragment
14
16
 
15
17
  ```graphql
16
18
  fragment MyFragment on Model @inject(into ["MyInjectableFragment"]) {
@@ -104,11 +104,7 @@ function injectInjectable(injectables: DocumentNode[], injector: DocumentNode) {
104
104
  },
105
105
  })
106
106
  })
107
- if (!found)
108
- throwInjectError(
109
- injectVal,
110
- `fragment ${target} @injectable { ... } can not be found or isn't injectable`,
111
- )
107
+ if (!found) throwInjectError(injectVal, `fragment ${target} { ... } can not be found`)
112
108
  })
113
109
  }
114
110
 
@@ -117,7 +113,7 @@ export function injectableDirective(documentFiles: Types.DocumentFile[]) {
117
113
  .map(({ document }) => document)
118
114
  .filter((doc) => doc) as DocumentNode[]
119
115
 
120
- const injectables = documents.filter((d) => isFragment(d) && hasInjectableDirective(d))
116
+ const injectables = documents.filter((d) => isFragment(d))
121
117
 
122
118
  const injectors = documents.filter((d) => isFragment(d) && hasInjectDirective(d))
123
119
 
File without changes