@graphql-codegen/cli 6.0.0-alpha-20250812131146-d8919a6237f19450de571b59081b880c2e7d3494 → 6.0.0-alpha-20250814123644-9b9c4e7a2ceb01175dafd069cd26047ce20eb406

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 CHANGED
@@ -17,7 +17,7 @@ const module_1 = require("module");
17
17
  const path_1 = require("path");
18
18
  const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
19
19
  const cosmiconfig_1 = require("cosmiconfig");
20
- const jiti_1 = tslib_1.__importDefault(require("jiti"));
20
+ const jiti_1 = require("jiti");
21
21
  const graphql_1 = require("graphql");
22
22
  const string_env_interpolation_1 = require("string-env-interpolation");
23
23
  const yaml_1 = tslib_1.__importDefault(require("yaml"));
@@ -55,8 +55,8 @@ function customLoader(ext) {
55
55
  return cosmiconfig_1.defaultLoaders['.js'](filepath, content);
56
56
  }
57
57
  if (ext === 'ts') {
58
- const jitiLoader = (0, jiti_1.default)('', { interopDefault: true });
59
- return jitiLoader(filepath);
58
+ const jitiLoader = (0, jiti_1.createJiti)('');
59
+ return jitiLoader.import(filepath, { default: true });
60
60
  }
61
61
  };
62
62
  }
@@ -237,10 +237,18 @@ function updateContextWithCliFlags(context, cliFlags) {
237
237
  context.updateConfig(config);
238
238
  }
239
239
  class CodegenContext {
240
+ _config;
241
+ _graphqlConfig;
242
+ config;
243
+ _project;
244
+ _checkMode = false;
245
+ _pluginContext = {};
246
+ cwd;
247
+ filepath;
248
+ profiler;
249
+ profilerOutput;
250
+ checkModeStaleFiles = [];
240
251
  constructor({ config, graphqlConfig, filepath, }) {
241
- this._checkMode = false;
242
- this._pluginContext = {};
243
- this.checkModeStaleFiles = [];
244
252
  this._config = config;
245
253
  this._graphqlConfig = graphqlConfig;
246
254
  this.filepath = this._graphqlConfig ? this._graphqlConfig.filepath : filepath;
@@ -18,6 +18,10 @@ const debugging_js_1 = require("./debugging.js");
18
18
  * https://github.com/southpolesteve/node-abort-controller/blob/master/index.js
19
19
  */
20
20
  class AbortSignalPolyfill {
21
+ eventEmitter;
22
+ onabort;
23
+ aborted;
24
+ reason;
21
25
  constructor() {
22
26
  this.eventEmitter = new events_1.EventEmitter();
23
27
  this.onabort = null;
@@ -62,6 +66,7 @@ class AbortSignalPolyfill {
62
66
  }
63
67
  const AbortSignal = global.AbortSignal ?? AbortSignalPolyfill;
64
68
  class AbortControllerPolyfill {
69
+ signal;
65
70
  constructor() {
66
71
  (0, debugging_js_1.debugLog)('Using polyfilled AbortController');
67
72
  // @ts-expect-error No Event type in Node 14
package/esm/config.js CHANGED
@@ -4,7 +4,7 @@ import { createRequire } from 'module';
4
4
  import { resolve } from 'path';
5
5
  import { createNoopProfiler, createProfiler, getCachedDocumentNodeFromSchema, } from '@graphql-codegen/plugin-helpers';
6
6
  import { cosmiconfig, defaultLoaders } from 'cosmiconfig';
7
- import jiti from 'jiti';
7
+ import { createJiti } from 'jiti';
8
8
  import { print } from 'graphql';
9
9
  import { env } from 'string-env-interpolation';
10
10
  import yaml from 'yaml';
@@ -42,8 +42,8 @@ function customLoader(ext) {
42
42
  return defaultLoaders['.js'](filepath, content);
43
43
  }
44
44
  if (ext === 'ts') {
45
- const jitiLoader = jiti('', { interopDefault: true });
46
- return jitiLoader(filepath);
45
+ const jitiLoader = createJiti('');
46
+ return jitiLoader.import(filepath, { default: true });
47
47
  }
48
48
  };
49
49
  }
@@ -224,10 +224,18 @@ export function updateContextWithCliFlags(context, cliFlags) {
224
224
  context.updateConfig(config);
225
225
  }
226
226
  export class CodegenContext {
227
+ _config;
228
+ _graphqlConfig;
229
+ config;
230
+ _project;
231
+ _checkMode = false;
232
+ _pluginContext = {};
233
+ cwd;
234
+ filepath;
235
+ profiler;
236
+ profilerOutput;
237
+ checkModeStaleFiles = [];
227
238
  constructor({ config, graphqlConfig, filepath, }) {
228
- this._checkMode = false;
229
- this._pluginContext = {};
230
- this.checkModeStaleFiles = [];
231
239
  this._config = config;
232
240
  this._graphqlConfig = graphqlConfig;
233
241
  this.filepath = this._graphqlConfig ? this._graphqlConfig.filepath : filepath;
@@ -15,6 +15,10 @@ import { debugLog } from './debugging.js';
15
15
  * https://github.com/southpolesteve/node-abort-controller/blob/master/index.js
16
16
  */
17
17
  class AbortSignalPolyfill {
18
+ eventEmitter;
19
+ onabort;
20
+ aborted;
21
+ reason;
18
22
  constructor() {
19
23
  this.eventEmitter = new EventEmitter();
20
24
  this.onabort = null;
@@ -59,6 +63,7 @@ class AbortSignalPolyfill {
59
63
  }
60
64
  const AbortSignal = global.AbortSignal ?? AbortSignalPolyfill;
61
65
  class AbortControllerPolyfill {
66
+ signal;
62
67
  constructor() {
63
68
  debugLog('Using polyfilled AbortController');
64
69
  // @ts-expect-error No Event type in Node 14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "6.0.0-alpha-20250812131146-d8919a6237f19450de571b59081b880c2e7d3494",
3
+ "version": "6.0.0-alpha-20250814123644-9b9c4e7a2ceb01175dafd069cd26047ce20eb406",
4
4
  "peerDependenciesMeta": {
5
5
  "@parcel/watcher": {
6
6
  "optional": true
@@ -14,9 +14,9 @@
14
14
  "@babel/generator": "^7.18.13",
15
15
  "@babel/template": "^7.18.10",
16
16
  "@babel/types": "^7.18.13",
17
- "@graphql-codegen/client-preset": "5.0.0-alpha-20250812131146-d8919a6237f19450de571b59081b880c2e7d3494",
18
- "@graphql-codegen/core": "5.0.0-alpha-20250812131146-d8919a6237f19450de571b59081b880c2e7d3494",
19
- "@graphql-codegen/plugin-helpers": "6.0.0-alpha-20250812131146-d8919a6237f19450de571b59081b880c2e7d3494",
17
+ "@graphql-codegen/client-preset": "5.0.0-alpha-20250814123644-9b9c4e7a2ceb01175dafd069cd26047ce20eb406",
18
+ "@graphql-codegen/core": "5.0.0-alpha-20250814123644-9b9c4e7a2ceb01175dafd069cd26047ce20eb406",
19
+ "@graphql-codegen/plugin-helpers": "6.0.0-alpha-20250814123644-9b9c4e7a2ceb01175dafd069cd26047ce20eb406",
20
20
  "@graphql-tools/apollo-engine-loader": "^8.0.0",
21
21
  "@graphql-tools/code-file-loader": "^8.0.0",
22
22
  "@graphql-tools/git-loader": "^8.0.0",
@@ -28,13 +28,13 @@
28
28
  "@graphql-tools/utils": "^10.0.0",
29
29
  "@whatwg-node/fetch": "^0.10.0",
30
30
  "chalk": "^4.1.0",
31
- "cosmiconfig": "^8.1.3",
32
- "debounce": "^1.2.0",
31
+ "cosmiconfig": "^9.0.0",
32
+ "debounce": "^2.0.0",
33
33
  "detect-indent": "^6.0.0",
34
34
  "graphql-config": "^5.1.1",
35
35
  "inquirer": "^8.0.0",
36
36
  "is-glob": "^4.0.1",
37
- "jiti": "^1.17.1",
37
+ "jiti": "^2.3.0",
38
38
  "json-to-pretty-yaml": "^1.2.2",
39
39
  "listr2": "^4.0.5",
40
40
  "log-symbols": "^4.0.0",