@graphql-codegen/graphql-modules-preset 4.0.17-alpha-20250502113630-cfd1a06886922f69625b29a3b87f3c960dd29453 → 4.0.17-alpha-20250502122928-1b6639fc1471fcac0491e5f2d6efc09682c32ca7
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/index.js +2 -1
- package/esm/index.js +2 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -61,9 +61,10 @@ exports.preset = {
|
|
|
61
61
|
schemaAst: options.schemaAst,
|
|
62
62
|
documentTransforms: options.documentTransforms,
|
|
63
63
|
};
|
|
64
|
+
const shouldEmitLegacyCommonJSImports = options.config.emitLegacyCommonJSImports === undefined ? true : !!options.config.emitLegacyCommonJSImports;
|
|
64
65
|
const baseTypesFilename = baseTypesPath.replace(/\.(js|ts|d.ts)$/,
|
|
65
66
|
// we need extension if ESM modules are used
|
|
66
|
-
|
|
67
|
+
shouldEmitLegacyCommonJSImports ? '' : '.js');
|
|
67
68
|
const baseTypesDir = (0, utils_js_1.stripFilename)(baseOutput.filename);
|
|
68
69
|
// One file per each module
|
|
69
70
|
const outputs = modules.map(moduleName => {
|
package/esm/index.js
CHANGED
|
@@ -58,9 +58,10 @@ export const preset = {
|
|
|
58
58
|
schemaAst: options.schemaAst,
|
|
59
59
|
documentTransforms: options.documentTransforms,
|
|
60
60
|
};
|
|
61
|
+
const shouldEmitLegacyCommonJSImports = options.config.emitLegacyCommonJSImports === undefined ? true : !!options.config.emitLegacyCommonJSImports;
|
|
61
62
|
const baseTypesFilename = baseTypesPath.replace(/\.(js|ts|d.ts)$/,
|
|
62
63
|
// we need extension if ESM modules are used
|
|
63
|
-
|
|
64
|
+
shouldEmitLegacyCommonJSImports ? '' : '.js');
|
|
64
65
|
const baseTypesDir = stripFilename(baseOutput.filename);
|
|
65
66
|
// One file per each module
|
|
66
67
|
const outputs = modules.map(moduleName => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/graphql-modules-preset",
|
|
3
|
-
"version": "4.0.17-alpha-
|
|
3
|
+
"version": "4.0.17-alpha-20250502122928-1b6639fc1471fcac0491e5f2d6efc09682c32ca7",
|
|
4
4
|
"description": "GraphQL Code Generator preset for modularized schema",
|
|
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"
|