@graphcommerce/graphql-codegen-near-operation-file 8.1.0-canary.9 → 9.0.0-canary.55
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.55
|
4
|
+
|
5
|
+
## 9.0.0-canary.54
|
6
|
+
|
7
|
+
## 8.1.0-canary.53
|
8
|
+
|
9
|
+
## 8.1.0-canary.52
|
10
|
+
|
11
|
+
## 8.1.0-canary.51
|
12
|
+
|
13
|
+
## 8.1.0-canary.50
|
14
|
+
|
15
|
+
## 8.1.0-canary.49
|
16
|
+
|
17
|
+
## 8.1.0-canary.48
|
18
|
+
|
19
|
+
## 8.1.0-canary.47
|
20
|
+
|
21
|
+
## 8.1.0-canary.46
|
22
|
+
|
23
|
+
## 8.1.0-canary.45
|
24
|
+
|
25
|
+
## 8.1.0-canary.44
|
26
|
+
|
27
|
+
## 8.1.0-canary.43
|
28
|
+
|
29
|
+
## 8.1.0-canary.42
|
30
|
+
|
31
|
+
## 8.1.0-canary.41
|
32
|
+
|
33
|
+
## 8.1.0-canary.40
|
34
|
+
|
35
|
+
## 8.1.0-canary.39
|
36
|
+
|
37
|
+
## 8.1.0-canary.38
|
38
|
+
|
39
|
+
## 8.1.0-canary.37
|
40
|
+
|
41
|
+
## 8.1.0-canary.36
|
42
|
+
|
43
|
+
## 8.1.0-canary.35
|
44
|
+
|
45
|
+
## 8.1.0-canary.34
|
46
|
+
|
47
|
+
## 8.1.0-canary.33
|
48
|
+
|
49
|
+
## 8.1.0-canary.32
|
50
|
+
|
51
|
+
## 8.1.0-canary.31
|
52
|
+
|
53
|
+
## 8.1.0-canary.30
|
54
|
+
|
55
|
+
## 8.1.0-canary.29
|
56
|
+
|
57
|
+
## 8.1.0-canary.28
|
58
|
+
|
59
|
+
## 8.1.0-canary.27
|
60
|
+
|
61
|
+
## 8.1.0-canary.26
|
62
|
+
|
63
|
+
## 8.1.0-canary.25
|
64
|
+
|
65
|
+
## 8.1.0-canary.24
|
66
|
+
|
67
|
+
### Patch Changes
|
68
|
+
|
69
|
+
- [#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.
|
70
|
+
([@paales](https://github.com/paales))
|
71
|
+
|
72
|
+
## 8.1.0-canary.23
|
73
|
+
|
74
|
+
## 8.1.0-canary.22
|
75
|
+
|
76
|
+
## 8.1.0-canary.21
|
77
|
+
|
78
|
+
## 8.1.0-canary.20
|
79
|
+
|
80
|
+
## 8.1.0-canary.19
|
81
|
+
|
82
|
+
## 8.1.0-canary.18
|
83
|
+
|
84
|
+
## 8.1.0-canary.17
|
85
|
+
|
86
|
+
## 8.1.0-canary.16
|
87
|
+
|
88
|
+
## 8.1.0-canary.15
|
89
|
+
|
90
|
+
## 8.1.0-canary.14
|
91
|
+
|
92
|
+
## 8.1.0-canary.13
|
93
|
+
|
94
|
+
## 8.1.0-canary.12
|
95
|
+
|
96
|
+
## 8.1.0-canary.11
|
97
|
+
|
98
|
+
## 8.1.0-canary.10
|
99
|
+
|
3
100
|
## 8.1.0-canary.9
|
4
101
|
|
5
102
|
## 8.1.0-canary.8
|
@@ -97,14 +97,14 @@ function injectInjectable(injectables, injector) {
|
|
97
97
|
});
|
98
98
|
});
|
99
99
|
if (!found)
|
100
|
-
throwInjectError(injectVal, `fragment ${target}
|
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)
|
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": "
|
5
|
+
"version": "9.0.0-canary.55",
|
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": "^
|
32
|
-
"@graphcommerce/prettier-config-pwa": "^
|
33
|
-
"@graphcommerce/typescript-config-pwa": "^
|
31
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.55",
|
32
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.55",
|
33
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.55",
|
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
|
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)
|
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
|