@graphql-codegen/typescript-operations 6.0.0-alpha-20260105125118-f6dd8aad76b522a60a52fee9cc56d3e46fc3c9a5 → 6.0.0-alpha-20260106134123-136e4309bee31cd9b40ecaff4f750cd91956f7f1

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/visitor.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypeScriptDocumentsVisitor = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
6
+ const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
6
7
  const auto_bind_1 = tslib_1.__importDefault(require("auto-bind"));
7
8
  const graphql_1 = require("graphql");
8
9
  const ts_operation_variables_to_object_js_1 = require("./ts-operation-variables-to-object.js");
@@ -235,8 +236,11 @@ class TypeScriptDocumentsVisitor extends visitor_plugin_common_1.BaseDocumentsVi
235
236
  identifiers: [],
236
237
  },
237
238
  typesImport: true,
238
- // FIXME: rebase with master for the new extension
239
- emitLegacyCommonJSImports: true,
239
+ emitLegacyCommonJSImports: this.config.emitLegacyCommonJSImports,
240
+ importExtension: (0, plugin_helpers_1.normalizeImportExtension)({
241
+ emitLegacyCommonJSImports: this.config.emitLegacyCommonJSImports,
242
+ importExtension: this.config.importExtension,
243
+ }),
240
244
  }),
241
245
  ];
242
246
  }
package/esm/visitor.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { BaseDocumentsVisitor, convertSchemaEnumToDeclarationBlockString, DeclarationBlock, generateFragmentImportStatement, generateImportStatement, getConfigValue, indent, isOneOfInputObjectType, getEnumsImports, isNativeNamedType, normalizeAvoidOptionals, parseEnumValues, PreResolveTypesProcessor, SelectionSetToObject, getNodeComment, wrapTypeWithModifiers, } from '@graphql-codegen/visitor-plugin-common';
2
+ import { normalizeImportExtension } from '@graphql-codegen/plugin-helpers';
2
3
  import autoBind from 'auto-bind';
3
4
  import { getNamedType, GraphQLEnumType, GraphQLInputObjectType, GraphQLScalarType, isEnumType, Kind, TypeInfo, visit, visitWithTypeInfo, } from 'graphql';
4
5
  import { TypeScriptOperationVariablesToObject, SCALARS } from './ts-operation-variables-to-object.js';
@@ -231,8 +232,11 @@ export class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
231
232
  identifiers: [],
232
233
  },
233
234
  typesImport: true,
234
- // FIXME: rebase with master for the new extension
235
- emitLegacyCommonJSImports: true,
235
+ emitLegacyCommonJSImports: this.config.emitLegacyCommonJSImports,
236
+ importExtension: normalizeImportExtension({
237
+ emitLegacyCommonJSImports: this.config.emitLegacyCommonJSImports,
238
+ importExtension: this.config.importExtension,
239
+ }),
236
240
  }),
237
241
  ];
238
242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-operations",
3
- "version": "6.0.0-alpha-20260105125118-f6dd8aad76b522a60a52fee9cc56d3e46fc3c9a5",
3
+ "version": "6.0.0-alpha-20260106134123-136e4309bee31cd9b40ecaff4f750cd91956f7f1",
4
4
  "description": "GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments",
5
5
  "peerDependenciesMeta": {
6
6
  "graphql-sock": {
@@ -12,10 +12,10 @@
12
12
  "graphql-sock": "^1.0.0"
13
13
  },
14
14
  "dependencies": {
15
- "@graphql-codegen/plugin-helpers": "^6.0.0",
16
- "@graphql-codegen/typescript": "6.0.0-alpha-20260105125118-f6dd8aad76b522a60a52fee9cc56d3e46fc3c9a5",
15
+ "@graphql-codegen/plugin-helpers": "^6.1.0",
17
16
  "@graphql-codegen/schema-ast": "^5.0.0",
18
- "@graphql-codegen/visitor-plugin-common": "7.0.0-alpha-20260105125118-f6dd8aad76b522a60a52fee9cc56d3e46fc3c9a5",
17
+ "@graphql-codegen/typescript": "6.0.0-alpha-20260106134123-136e4309bee31cd9b40ecaff4f750cd91956f7f1",
18
+ "@graphql-codegen/visitor-plugin-common": "7.0.0-alpha-20260106134123-136e4309bee31cd9b40ecaff4f750cd91956f7f1",
19
19
  "auto-bind": "~4.0.0",
20
20
  "tslib": "~2.6.0"
21
21
  },
@@ -2,4 +2,4 @@ import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers';
2
2
  import { TypeScriptDocumentsPluginConfig } from './config.cjs';
3
3
  import { TypeScriptDocumentsVisitor } from './visitor.cjs';
4
4
  export declare const plugin: PluginFunction<TypeScriptDocumentsPluginConfig, Types.ComplexPluginOutput>;
5
- export { TypeScriptDocumentsVisitor };
5
+ export { TypeScriptDocumentsVisitor, type TypeScriptDocumentsPluginConfig };
@@ -2,4 +2,4 @@ import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers';
2
2
  import { TypeScriptDocumentsPluginConfig } from './config.js';
3
3
  import { TypeScriptDocumentsVisitor } from './visitor.js';
4
4
  export declare const plugin: PluginFunction<TypeScriptDocumentsPluginConfig, Types.ComplexPluginOutput>;
5
- export { TypeScriptDocumentsVisitor };
5
+ export { TypeScriptDocumentsVisitor, type TypeScriptDocumentsPluginConfig };