@graphql-codegen/typescript-react-apollo 3.2.9 → 3.2.12
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/config.d.ts +9 -9
- package/index.js +2 -4
- package/index.mjs +2 -4
- package/package.json +3 -3
package/config.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
10
10
|
* @default false
|
|
11
11
|
*
|
|
12
12
|
* @exampleMarkdown
|
|
13
|
-
* ```
|
|
13
|
+
* ```yaml
|
|
14
14
|
* generates:
|
|
15
15
|
* path/to/file.ts:
|
|
16
16
|
* plugins:
|
|
@@ -27,7 +27,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
27
27
|
* @default false
|
|
28
28
|
*
|
|
29
29
|
* @exampleMarkdown
|
|
30
|
-
* ```
|
|
30
|
+
* ```yaml
|
|
31
31
|
* generates:
|
|
32
32
|
* path/to/file.ts:
|
|
33
33
|
* plugins:
|
|
@@ -44,7 +44,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
44
44
|
* @default true
|
|
45
45
|
*
|
|
46
46
|
* @exampleMarkdown
|
|
47
|
-
* ```
|
|
47
|
+
* ```yaml
|
|
48
48
|
* generates:
|
|
49
49
|
* path/to/file.ts:
|
|
50
50
|
* plugins:
|
|
@@ -61,7 +61,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
61
61
|
* @default true
|
|
62
62
|
*
|
|
63
63
|
* @exampleMarkdown
|
|
64
|
-
* ```
|
|
64
|
+
* ```yaml
|
|
65
65
|
* generates:
|
|
66
66
|
* path/to/file.ts:
|
|
67
67
|
* plugins:
|
|
@@ -78,7 +78,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
78
78
|
* @default false
|
|
79
79
|
*
|
|
80
80
|
* @exampleMarkdown
|
|
81
|
-
* ```
|
|
81
|
+
* ```yaml
|
|
82
82
|
* generates:
|
|
83
83
|
* path/to/file.ts:
|
|
84
84
|
* plugins:
|
|
@@ -122,7 +122,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
122
122
|
* @default 3
|
|
123
123
|
*
|
|
124
124
|
* @exampleMarkdown
|
|
125
|
-
* ```
|
|
125
|
+
* ```yaml
|
|
126
126
|
* generates:
|
|
127
127
|
* path/to/file.ts:
|
|
128
128
|
* plugins:
|
|
@@ -139,7 +139,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
139
139
|
* @default true
|
|
140
140
|
*
|
|
141
141
|
* @exampleMarkdown
|
|
142
|
-
* ```
|
|
142
|
+
* ```yaml
|
|
143
143
|
* generates:
|
|
144
144
|
* path/to/file.ts:
|
|
145
145
|
* plugins:
|
|
@@ -156,7 +156,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
156
156
|
* @default true
|
|
157
157
|
*
|
|
158
158
|
* @exampleMarkdown
|
|
159
|
-
* ```
|
|
159
|
+
* ```yaml
|
|
160
160
|
* generates:
|
|
161
161
|
* path/to/file.ts:
|
|
162
162
|
* plugins:
|
|
@@ -174,7 +174,7 @@ export interface ReactApolloRawPluginConfig extends RawClientSideBasePluginConfi
|
|
|
174
174
|
* @default true
|
|
175
175
|
*
|
|
176
176
|
* @exampleMarkdown
|
|
177
|
-
* ```
|
|
177
|
+
* ```yaml
|
|
178
178
|
* generates:
|
|
179
179
|
* path/to/file.ts:
|
|
180
180
|
* plugins:
|
package/index.js
CHANGED
|
@@ -362,10 +362,8 @@ const validate = async (schema, documents, config, outputFile) => {
|
|
|
362
362
|
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".tsx" when withComponent: true is set!`);
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
else {
|
|
366
|
-
|
|
367
|
-
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".ts" or ".tsx"!`);
|
|
368
|
-
}
|
|
365
|
+
else if (path.extname(outputFile) !== '.ts' && path.extname(outputFile) !== '.tsx') {
|
|
366
|
+
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".ts" or ".tsx"!`);
|
|
369
367
|
}
|
|
370
368
|
};
|
|
371
369
|
|
package/index.mjs
CHANGED
|
@@ -356,10 +356,8 @@ const validate = async (schema, documents, config, outputFile) => {
|
|
|
356
356
|
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".tsx" when withComponent: true is set!`);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
else {
|
|
360
|
-
|
|
361
|
-
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".ts" or ".tsx"!`);
|
|
362
|
-
}
|
|
359
|
+
else if (extname(outputFile) !== '.ts' && extname(outputFile) !== '.tsx') {
|
|
360
|
+
throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".ts" or ".tsx"!`);
|
|
363
361
|
}
|
|
364
362
|
};
|
|
365
363
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-apollo",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.12",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating a ready-to-use React Components/HOC/Hooks based on GraphQL operations",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-codegen/plugin-helpers": "^2.4.0",
|
|
11
|
-
"@graphql-codegen/visitor-plugin-common": "2.7.
|
|
11
|
+
"@graphql-codegen/visitor-plugin-common": "2.7.5",
|
|
12
12
|
"auto-bind": "~4.0.0",
|
|
13
13
|
"change-case-all": "1.0.14",
|
|
14
|
-
"tslib": "~2.
|
|
14
|
+
"tslib": "~2.4.0"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|