@graphql-codegen/typescript 5.0.4-alpha-20251113150958-a61a57fa90f09d12823695db865da6ea9b5afe59 → 6.0.0-alpha-20251115114232-bd165e82320ed2cee35fe09cc96b5b0598536293

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
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TsVisitor = exports.MAKE_INCREMENTAL_SIGNATURE = exports.MAKE_EMPTY_SIGNATURE = exports.MAKE_MAYBE_SIGNATURE = exports.MAKE_OPTIONAL_SIGNATURE = exports.EXACT_SIGNATURE = void 0;
3
+ exports.TsVisitor = exports.MAKE_INCREMENTAL_SIGNATURE = exports.MAKE_EMPTY_SIGNATURE = exports.MAKE_MAYBE_SIGNATURE = exports.MAKE_OPTIONAL_SIGNATURE = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
6
6
  const auto_bind_1 = tslib_1.__importDefault(require("auto-bind"));
7
7
  const graphql_1 = require("graphql");
8
8
  const typescript_variables_to_object_js_1 = require("./typescript-variables-to-object.js");
9
- exports.EXACT_SIGNATURE = `type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };`;
10
9
  exports.MAKE_OPTIONAL_SIGNATURE = `type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };`;
11
10
  exports.MAKE_MAYBE_SIGNATURE = `type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };`;
12
11
  exports.MAKE_EMPTY_SIGNATURE = `type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };`;
@@ -84,7 +83,6 @@ class TsVisitor extends visitor_plugin_common_1.BaseTypesVisitor {
84
83
  const definitions = [
85
84
  this.getMaybeValue(),
86
85
  this.getInputMaybeValue(),
87
- this.getExactDefinition(),
88
86
  this.getMakeOptionalDefinition(),
89
87
  this.getMakeMaybeDefinition(),
90
88
  this.getMakeEmptyDefinition(),
@@ -98,11 +96,6 @@ class TsVisitor extends visitor_plugin_common_1.BaseTypesVisitor {
98
96
  }
99
97
  return definitions;
100
98
  }
101
- getExactDefinition() {
102
- if (this.config.onlyEnums)
103
- return '';
104
- return `${this.getExportPrefix()}${exports.EXACT_SIGNATURE}`;
105
- }
106
99
  getMakeOptionalDefinition() {
107
100
  return `${this.getExportPrefix()}${exports.MAKE_OPTIONAL_SIGNATURE}`;
108
101
  }
package/esm/visitor.js CHANGED
@@ -2,7 +2,6 @@ import { BaseTypesVisitor, DeclarationBlock, getConfigValue, indent, isOneOfInpu
2
2
  import autoBind from 'auto-bind';
3
3
  import { GraphQLObjectType, isEnumType, Kind, } from 'graphql';
4
4
  import { TypeScriptOperationVariablesToObject } from './typescript-variables-to-object.js';
5
- export const EXACT_SIGNATURE = `type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };`;
6
5
  export const MAKE_OPTIONAL_SIGNATURE = `type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };`;
7
6
  export const MAKE_MAYBE_SIGNATURE = `type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };`;
8
7
  export const MAKE_EMPTY_SIGNATURE = `type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };`;
@@ -80,7 +79,6 @@ export class TsVisitor extends BaseTypesVisitor {
80
79
  const definitions = [
81
80
  this.getMaybeValue(),
82
81
  this.getInputMaybeValue(),
83
- this.getExactDefinition(),
84
82
  this.getMakeOptionalDefinition(),
85
83
  this.getMakeMaybeDefinition(),
86
84
  this.getMakeEmptyDefinition(),
@@ -94,11 +92,6 @@ export class TsVisitor extends BaseTypesVisitor {
94
92
  }
95
93
  return definitions;
96
94
  }
97
- getExactDefinition() {
98
- if (this.config.onlyEnums)
99
- return '';
100
- return `${this.getExportPrefix()}${EXACT_SIGNATURE}`;
101
- }
102
95
  getMakeOptionalDefinition() {
103
96
  return `${this.getExportPrefix()}${MAKE_OPTIONAL_SIGNATURE}`;
104
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript",
3
- "version": "5.0.4-alpha-20251113150958-a61a57fa90f09d12823695db865da6ea9b5afe59",
3
+ "version": "6.0.0-alpha-20251115114232-bd165e82320ed2cee35fe09cc96b5b0598536293",
4
4
  "description": "GraphQL Code Generator plugin for generating TypeScript types",
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "@graphql-codegen/plugin-helpers": "^6.0.0",
10
10
  "@graphql-codegen/schema-ast": "^5.0.0",
11
- "@graphql-codegen/visitor-plugin-common": "6.1.2-alpha-20251113150958-a61a57fa90f09d12823695db865da6ea9b5afe59",
11
+ "@graphql-codegen/visitor-plugin-common": "6.1.0",
12
12
  "auto-bind": "~4.0.0",
13
13
  "tslib": "~2.6.0"
14
14
  },
@@ -17,7 +17,6 @@ export interface TypeScriptPluginParsedConfig extends ParsedTypesConfig {
17
17
  noExport: boolean;
18
18
  useImplementingTypes: boolean;
19
19
  }
20
- export declare const EXACT_SIGNATURE = "type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };";
21
20
  export declare const MAKE_OPTIONAL_SIGNATURE = "type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };";
22
21
  export declare const MAKE_MAYBE_SIGNATURE = "type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };";
23
22
  export declare const MAKE_EMPTY_SIGNATURE = "type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };";
@@ -26,7 +25,6 @@ export declare class TsVisitor<TRawConfig extends TypeScriptPluginConfig = TypeS
26
25
  constructor(schema: GraphQLSchema, pluginConfig: TRawConfig, additionalConfig?: Partial<TParsedConfig>);
27
26
  protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string;
28
27
  getWrapperDefinitions(): string[];
29
- getExactDefinition(): string;
30
28
  getMakeOptionalDefinition(): string;
31
29
  getMakeMaybeDefinition(): string;
32
30
  getMakeEmptyDefinition(): string;
@@ -17,7 +17,6 @@ export interface TypeScriptPluginParsedConfig extends ParsedTypesConfig {
17
17
  noExport: boolean;
18
18
  useImplementingTypes: boolean;
19
19
  }
20
- export declare const EXACT_SIGNATURE = "type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };";
21
20
  export declare const MAKE_OPTIONAL_SIGNATURE = "type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };";
22
21
  export declare const MAKE_MAYBE_SIGNATURE = "type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };";
23
22
  export declare const MAKE_EMPTY_SIGNATURE = "type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };";
@@ -26,7 +25,6 @@ export declare class TsVisitor<TRawConfig extends TypeScriptPluginConfig = TypeS
26
25
  constructor(schema: GraphQLSchema, pluginConfig: TRawConfig, additionalConfig?: Partial<TParsedConfig>);
27
26
  protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string;
28
27
  getWrapperDefinitions(): string[];
29
- getExactDefinition(): string;
30
28
  getMakeOptionalDefinition(): string;
31
29
  getMakeMaybeDefinition(): string;
32
30
  getMakeEmptyDefinition(): string;