@graphql-codegen/graphql-modules-preset 4.0.17-alpha-20250501140451-95f70f83c93c335bf90ac9cc90cc334354c869b9 → 4.0.17-alpha-20250502122133-b3c7334795895f446a517732fcf1cb6f1e35f769

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 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
- options.config.emitLegacyCommonJSImports ? '' : '.js');
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
- options.config.emitLegacyCommonJSImports ? '' : '.js');
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-20250501140451-95f70f83c93c335bf90ac9cc90cc334354c869b9",
3
+ "version": "4.0.17-alpha-20250502122133-b3c7334795895f446a517732fcf1cb6f1e35f769",
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"