@graphql-codegen/cli 3.2.2-alpha-20230303164759-332b0b6db → 3.2.2-alpha-20230306154040-95172f49a
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/cjs/config.js +1 -18
- package/esm/config.js +1 -18
- package/package.json +2 -2
package/cjs/config.js
CHANGED
|
@@ -94,21 +94,7 @@ async function loadCodegenConfig({ configFilePath, moduleName, searchPlaces: add
|
|
|
94
94
|
}
|
|
95
95
|
exports.loadCodegenConfig = loadCodegenConfig;
|
|
96
96
|
async function loadContext(configFilePath) {
|
|
97
|
-
|
|
98
|
-
try {
|
|
99
|
-
graphqlConfig = await (0, graphql_config_js_1.findAndLoadGraphQLConfig)(configFilePath);
|
|
100
|
-
}
|
|
101
|
-
catch (err) {
|
|
102
|
-
if (isRequireESMError(err)) {
|
|
103
|
-
// TODO: This needs a fix in graphql-config
|
|
104
|
-
}
|
|
105
|
-
else if (isMissingLoaderError(err)) {
|
|
106
|
-
// TODO: This also needs a fix in graphql-config
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
throw err;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
97
|
+
const graphqlConfig = await (0, graphql_config_js_1.findAndLoadGraphQLConfig)(configFilePath);
|
|
112
98
|
if (graphqlConfig) {
|
|
113
99
|
return new CodegenContext({ graphqlConfig });
|
|
114
100
|
}
|
|
@@ -391,6 +377,3 @@ exports.shouldEmitLegacyCommonJSImports = shouldEmitLegacyCommonJSImports;
|
|
|
391
377
|
function isRequireESMError(err) {
|
|
392
378
|
return typeof err.stack === 'string' && err.stack.startsWith('Error [ERR_REQUIRE_ESM]:');
|
|
393
379
|
}
|
|
394
|
-
function isMissingLoaderError(err) {
|
|
395
|
-
return typeof err.stack === 'string' && err.stack.startsWith('Error: No loader specified for extension');
|
|
396
|
-
}
|
package/esm/config.js
CHANGED
|
@@ -88,21 +88,7 @@ export async function loadCodegenConfig({ configFilePath, moduleName, searchPlac
|
|
|
88
88
|
return pathStats.isDirectory() ? cosmi.search(configFilePath) : cosmi.load(configFilePath);
|
|
89
89
|
}
|
|
90
90
|
export async function loadContext(configFilePath) {
|
|
91
|
-
|
|
92
|
-
try {
|
|
93
|
-
graphqlConfig = await findAndLoadGraphQLConfig(configFilePath);
|
|
94
|
-
}
|
|
95
|
-
catch (err) {
|
|
96
|
-
if (isRequireESMError(err)) {
|
|
97
|
-
// TODO: This needs a fix in graphql-config
|
|
98
|
-
}
|
|
99
|
-
else if (isMissingLoaderError(err)) {
|
|
100
|
-
// TODO: This also needs a fix in graphql-config
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
throw err;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
91
|
+
const graphqlConfig = await findAndLoadGraphQLConfig(configFilePath);
|
|
106
92
|
if (graphqlConfig) {
|
|
107
93
|
return new CodegenContext({ graphqlConfig });
|
|
108
94
|
}
|
|
@@ -377,6 +363,3 @@ export function shouldEmitLegacyCommonJSImports(config) {
|
|
|
377
363
|
function isRequireESMError(err) {
|
|
378
364
|
return typeof err.stack === 'string' && err.stack.startsWith('Error [ERR_REQUIRE_ESM]:');
|
|
379
365
|
}
|
|
380
|
-
function isMissingLoaderError(err) {
|
|
381
|
-
return typeof err.stack === 'string' && err.stack.startsWith('Error: No loader specified for extension');
|
|
382
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/cli",
|
|
3
|
-
"version": "3.2.2-alpha-
|
|
3
|
+
"version": "3.2.2-alpha-20230306154040-95172f49a",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"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",
|
|
6
6
|
"typescript": ">=3.0"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"cosmiconfig-typescript-loader": "^4.3.0",
|
|
29
29
|
"debounce": "^1.2.0",
|
|
30
30
|
"detect-indent": "^6.0.0",
|
|
31
|
-
"graphql-config": "^4.
|
|
31
|
+
"graphql-config": "^4.5.0",
|
|
32
32
|
"inquirer": "^8.0.0",
|
|
33
33
|
"is-glob": "^4.0.1",
|
|
34
34
|
"jiti": "^1.17.1",
|