@depup/graphql-codegen__cli 6.2.1-depup.2 → 7.2.0-depup.8

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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -24
  3. package/changes.json +42 -34
  4. package/cjs/cli.js +17 -7
  5. package/cjs/codegen.js +84 -34
  6. package/cjs/config.js +55 -20
  7. package/cjs/documentTransforms.js +5 -1
  8. package/cjs/generate-and-save.js +1 -1
  9. package/cjs/graphql-config.js +5 -5
  10. package/cjs/init/helpers.js +8 -4
  11. package/cjs/init/index.js +1 -1
  12. package/cjs/init/plugins.js +3 -1
  13. package/cjs/init/questions.js +10 -3
  14. package/cjs/init/targets.js +1 -1
  15. package/cjs/isESMModule.js +9 -0
  16. package/cjs/load.js +6 -3
  17. package/cjs/utils/patterns.js +17 -6
  18. package/cjs/utils/watcher.js +12 -7
  19. package/cjs/version.js +4 -0
  20. package/esm/codegen.js +83 -33
  21. package/esm/config.js +55 -20
  22. package/esm/documentTransforms.js +5 -1
  23. package/esm/generate-and-save.js +1 -1
  24. package/esm/graphql-config.js +5 -5
  25. package/esm/init/helpers.js +8 -4
  26. package/esm/init/index.js +1 -1
  27. package/esm/init/plugins.js +3 -1
  28. package/esm/init/questions.js +11 -4
  29. package/esm/init/targets.js +1 -1
  30. package/esm/isESMModule.js +6 -0
  31. package/esm/load.js +6 -3
  32. package/esm/utils/file-system.js +1 -1
  33. package/esm/utils/patterns.js +17 -6
  34. package/esm/utils/watcher.js +12 -7
  35. package/esm/version.js +1 -0
  36. package/package.json +75 -66
  37. package/typings/config.d.cts +3 -2
  38. package/typings/config.d.ts +3 -2
  39. package/typings/init/questions.d.cts +1 -1
  40. package/typings/init/questions.d.ts +1 -1
  41. package/typings/init/targets.d.cts +1 -1
  42. package/typings/init/targets.d.ts +1 -1
  43. package/typings/isESMModule.d.cts +6 -0
  44. package/typings/isESMModule.d.ts +6 -0
  45. package/typings/load.d.cts +3 -2
  46. package/typings/load.d.ts +3 -2
  47. package/typings/version.d.cts +1 -0
  48. package/typings/version.d.ts +1 -0
  49. package/cjs/utils/abort-controller-polyfill.js +0 -99
  50. package/esm/utils/abort-controller-polyfill.js +0 -96
  51. package/typings/utils/abort-controller-polyfill.d.cts +0 -5
  52. package/typings/utils/abort-controller-polyfill.d.ts +0 -5
@@ -6,8 +6,8 @@ import { ensureContext } from './config.js';
6
6
  import { lifecycleHooks } from './hooks.js';
7
7
  import { debugLog } from './utils/debugging.js';
8
8
  import { mkdirp, readFile, unlinkFile, writeFile } from './utils/file-system.js';
9
- import { createWatcher } from './utils/watcher.js';
10
9
  import { getLogger } from './utils/logger.js';
10
+ import { createWatcher } from './utils/watcher.js';
11
11
  const hash = (content) => createHash('sha1').update(content).digest('base64');
12
12
  export async function generate(input, saveToFile = true) {
13
13
  const context = ensureContext(input);
@@ -1,8 +1,8 @@
1
+ import { loadConfig } from 'graphql-config';
1
2
  import { ApolloEngineLoader } from '@graphql-tools/apollo-engine-loader';
2
3
  import { CodeFileLoader } from '@graphql-tools/code-file-loader';
3
4
  import { GitLoader } from '@graphql-tools/git-loader';
4
5
  import { GithubLoader } from '@graphql-tools/github-loader';
5
- import { loadConfig } from 'graphql-config';
6
6
  export const CodegenExtension = (api) => {
7
7
  // Schema
8
8
  api.loaders.schema.register(new CodeFileLoader({
@@ -43,10 +43,6 @@ function isGraphQLConfig(config) {
43
43
  if (!config) {
44
44
  return false;
45
45
  }
46
- try {
47
- return config.getDefault().hasExtension('codegen');
48
- }
49
- catch { }
50
46
  try {
51
47
  for (const projectName in config.projects) {
52
48
  if (Object.prototype.hasOwnProperty.call(config.projects, projectName)) {
@@ -58,5 +54,9 @@ function isGraphQLConfig(config) {
58
54
  }
59
55
  }
60
56
  catch { }
57
+ try {
58
+ return config.getDefault().hasExtension('codegen');
59
+ }
60
+ catch { }
61
61
  return false;
62
62
  }
@@ -1,20 +1,24 @@
1
1
  import { readFileSync, writeFileSync } from 'fs';
2
2
  import { relative, resolve } from 'path';
3
+ import chalk from 'chalk';
4
+ import detectIndent from 'detect-indent';
3
5
  import generate from '@babel/generator';
4
6
  import template from '@babel/template';
5
7
  import * as t from '@babel/types';
6
- import chalk from 'chalk';
7
- import detectIndent from 'detect-indent';
8
8
  import { getLatestVersion } from '../utils/get-latest-version.js';
9
9
  import { Tags } from './types.js';
10
10
  function jsObjectToBabelObjectExpression(obj) {
11
11
  const objExp = t.objectExpression([]);
12
12
  for (const [key, val] of Object.entries(obj)) {
13
13
  if (Array.isArray(val)) {
14
- objExp.properties.push(t.objectProperty(/^[a-zA-Z0-9]+$/.test(key) ? t.identifier(key) : t.stringLiteral(key), t.arrayExpression(val.map(v => (typeof v === 'object' ? jsObjectToBabelObjectExpression(v) : t.valueToNode(v))))));
14
+ objExp.properties.push(t.objectProperty(/^[a-zA-Z0-9]+$/.test(key) ? t.identifier(key) : t.stringLiteral(key), t.arrayExpression(val.map(v => typeof v === 'object'
15
+ ? jsObjectToBabelObjectExpression(v)
16
+ : t.valueToNode(v)))));
15
17
  }
16
18
  else {
17
- objExp.properties.push(t.objectProperty(/^[a-zA-Z0-9]+$/.test(key) ? t.identifier(key) : t.stringLiteral(key), typeof val === 'object' ? jsObjectToBabelObjectExpression(val) : t.valueToNode(val)));
19
+ objExp.properties.push(t.objectProperty(/^[a-zA-Z0-9]+$/.test(key) ? t.identifier(key) : t.stringLiteral(key), typeof val === 'object'
20
+ ? jsObjectToBabelObjectExpression(val)
21
+ : t.valueToNode(val)));
18
22
  }
19
23
  }
20
24
  return objExp;
package/esm/init/index.js CHANGED
@@ -11,7 +11,7 @@ export async function init() {
11
11
  Welcome to ${bold('GraphQL Code Generator')}!
12
12
  Answer few questions and we will setup everything for you.
13
13
  `);
14
- const possibleTargets = await guessTargets();
14
+ const possibleTargets = guessTargets();
15
15
  const answers = await getAnswers(possibleTargets);
16
16
  // define config
17
17
  const config = {
@@ -7,7 +7,9 @@ export const plugins = [
7
7
  value: 'typescript',
8
8
  pathInRepo: 'typescript/typescript',
9
9
  available: hasTag(Tags.typescript),
10
- shouldBeSelected: tags => oneOf(tags, Tags.angular, Tags.stencil) || allOf(tags, Tags.typescript, Tags.react) || noneOf(tags, Tags.flow),
10
+ shouldBeSelected: tags => oneOf(tags, Tags.angular, Tags.stencil) ||
11
+ allOf(tags, Tags.typescript, Tags.react) ||
12
+ noneOf(tags, Tags.flow),
11
13
  defaultExtension: '.ts',
12
14
  },
13
15
  {
@@ -1,4 +1,4 @@
1
- import { checkbox, input, select, confirm } from '@inquirer/prompts';
1
+ import { checkbox, confirm, input, select } from '@inquirer/prompts';
2
2
  import { grey } from './helpers.js';
3
3
  import { plugins } from './plugins.js';
4
4
  import { Tags } from './types.js';
@@ -16,7 +16,9 @@ export async function getAnswers(possibleTargets) {
16
16
  validate: str => str.length > 0,
17
17
  });
18
18
  let documents;
19
- if (targets.includes(Tags.client) || targets.includes(Tags.angular) || targets.includes(Tags.stencil))
19
+ if (targets.includes(Tags.client) ||
20
+ targets.includes(Tags.angular) ||
21
+ targets.includes(Tags.stencil))
20
22
  documents = await input({
21
23
  message: 'Where are your operations and fragments?:',
22
24
  default: getDocumentsDefaultValue(targets),
@@ -41,7 +43,9 @@ export async function getAnswers(possibleTargets) {
41
43
  });
42
44
  const config = await input({
43
45
  message: 'How to name the config file?',
44
- default: (() => targets.includes(Tags.client) || targets.includes(Tags.typescript) || targets.includes(Tags.angular)
46
+ default: (() => targets.includes(Tags.client) ||
47
+ targets.includes(Tags.typescript) ||
48
+ targets.includes(Tags.angular)
45
49
  ? 'codegen.ts'
46
50
  : 'codegen.yml')(),
47
51
  validate: str => {
@@ -131,7 +135,10 @@ export function getApplicationTypeChoices(possibleTargets) {
131
135
  name: 'Application built with other framework or vanilla JS',
132
136
  key: 'client',
133
137
  value: [Tags.typescript, Tags.flow],
134
- checked: possibleTargets.Browser && !possibleTargets.Angular && !possibleTargets.React && !possibleTargets.Stencil,
138
+ checked: possibleTargets.Browser &&
139
+ !possibleTargets.Angular &&
140
+ !possibleTargets.React &&
141
+ !possibleTargets.Stencil,
135
142
  },
136
143
  ];
137
144
  }
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
3
  import { Tags } from './types.js';
4
- export async function guessTargets() {
4
+ export function guessTargets() {
5
5
  const pkg = JSON.parse(readFileSync(resolve(process.cwd(), 'package.json'), 'utf8'));
6
6
  const dependencies = Object.keys({
7
7
  ...pkg.dependencies,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Poor mans ESM detection.
3
+ * Looking at this and you have a better method?
4
+ * Send a PR.
5
+ */
6
+ export const isESMModule = (typeof __dirname === 'string') === false;
package/esm/load.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { extname, join } from 'path';
2
+ import { GraphQLError } from 'graphql';
2
3
  import { ApolloEngineLoader } from '@graphql-tools/apollo-engine-loader';
3
4
  import { CodeFileLoader } from '@graphql-tools/code-file-loader';
4
5
  import { GitLoader } from '@graphql-tools/git-loader';
@@ -7,7 +8,6 @@ import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
7
8
  import { JsonFileLoader } from '@graphql-tools/json-file-loader';
8
9
  import { loadDocuments as loadDocumentsToolkit, loadSchema as loadSchemaToolkit, NoTypeDefinitionsFound, } from '@graphql-tools/load';
9
10
  import { UrlLoader } from '@graphql-tools/url-loader';
10
- import { GraphQLError } from 'graphql';
11
11
  export const defaultSchemaLoadOptions = {
12
12
  assumeValidSDL: true,
13
13
  sort: true,
@@ -68,7 +68,7 @@ export async function loadDocuments(documentPointers, config) {
68
68
  // we omit paths that don't resolve to a specific file
69
69
  continue;
70
70
  }
71
- ignore.push(join(process.cwd(), generatePath));
71
+ ignore.push(join(config.cwd || process.cwd(), generatePath));
72
72
  }
73
73
  try {
74
74
  const loadedFromToolkit = await loadDocumentsToolkit(documentPointers, {
@@ -86,7 +86,10 @@ export async function loadDocuments(documentPointers, config) {
86
86
  throw error;
87
87
  }
88
88
  // For other errors, we need to add an error message with documentPointers, so it's better for DevX
89
- throw new Error([`Failed to load documents from ${Object.keys(documentPointers).join(',')}:`, printError(error)].join('\n'));
89
+ throw new Error([
90
+ `Failed to load documents from ${Object.keys(documentPointers).join(',')}:`,
91
+ printError(error),
92
+ ].join('\n'));
90
93
  }
91
94
  }
92
95
  const printError = (error) => {
@@ -1,4 +1,4 @@
1
- import { promises, unlink as fsUnlink } from 'fs';
1
+ import { unlink as fsUnlink, promises } from 'fs';
2
2
  const { access: fsAccess, writeFile: fsWriteFile, readFile: fsReadFile, mkdir } = promises;
3
3
  export function access(...args) {
4
4
  return fsAccess(...args);
@@ -1,8 +1,8 @@
1
1
  import { isAbsolute, relative } from 'path';
2
- import { isValidPath } from '@graphql-tools/utils';
3
- import { normalizeInstanceOrArray } from '@graphql-codegen/plugin-helpers';
4
2
  import isGlob from 'is-glob';
5
3
  import mm from 'micromatch';
4
+ import { normalizeInstanceOrArray } from '@graphql-codegen/plugin-helpers';
5
+ import { isValidPath } from '@graphql-tools/utils';
6
6
  import { isURL } from './helpers.js';
7
7
  /**
8
8
  * Flatten a list of pattern sets to be a list of only the affirmative patterns
@@ -39,7 +39,10 @@ export const makeShouldRebuild = ({ globalPatternSet, localPatternSets, }) => {
39
39
  const localMatchers = localPatternSets.map(localPatternSet => {
40
40
  return (path) => {
41
41
  // Is path negated by any negating watch pattern?
42
- if (matchesAnyNegatedPattern(path, [...globalPatternSet.watch.negated, ...localPatternSet.watch.negated])) {
42
+ if (matchesAnyNegatedPattern(path, [
43
+ ...globalPatternSet.watch.negated,
44
+ ...localPatternSet.watch.negated,
45
+ ])) {
43
46
  // Short circut: negations in watch patterns take priority
44
47
  return false;
45
48
  }
@@ -56,7 +59,10 @@ export const makeShouldRebuild = ({ globalPatternSet, localPatternSets, }) => {
56
59
  ...globalPatternSet.documents.affirmative,
57
60
  ...localPatternSet.documents.affirmative,
58
61
  ]) &&
59
- !matchesAnyNegatedPattern(path, [...globalPatternSet.documents.negated, ...localPatternSet.documents.negated])) {
62
+ !matchesAnyNegatedPattern(path, [
63
+ ...globalPatternSet.documents.negated,
64
+ ...localPatternSet.documents.negated,
65
+ ])) {
60
66
  return true;
61
67
  }
62
68
  // Does path match schemas patterns (without being negated)?
@@ -64,7 +70,10 @@ export const makeShouldRebuild = ({ globalPatternSet, localPatternSets, }) => {
64
70
  ...globalPatternSet.schemas.affirmative,
65
71
  ...localPatternSet.schemas.affirmative,
66
72
  ]) &&
67
- !matchesAnyNegatedPattern(path, [...globalPatternSet.schemas.negated, ...localPatternSet.schemas.negated])) {
73
+ !matchesAnyNegatedPattern(path, [
74
+ ...globalPatternSet.schemas.negated,
75
+ ...localPatternSet.schemas.negated,
76
+ ])) {
68
77
  return true;
69
78
  }
70
79
  // Otherwise, there is no match
@@ -94,7 +103,9 @@ export const makeGlobalPatternSet = (initialContext) => {
94
103
  const config = initialContext.getConfig();
95
104
  return {
96
105
  watch: sortPatterns([
97
- ...(typeof config.watch === 'boolean' ? [] : normalizeInstanceOrArray(config.watch ?? [])),
106
+ ...(typeof config.watch === 'boolean'
107
+ ? []
108
+ : normalizeInstanceOrArray(config.watch ?? [])),
98
109
  relative(process.cwd(), initialContext.filepath),
99
110
  ]),
100
111
  schemas: sortPatterns(makePatternsFromSchemas(normalizeInstanceOrArray(config.schema))),
@@ -1,16 +1,15 @@
1
- import { join, isAbsolute, relative, resolve, sep } from 'path';
2
- import { normalizeOutputParam } from '@graphql-codegen/plugin-helpers';
1
+ import { isAbsolute, join, relative, resolve, sep } from 'path';
3
2
  import debounce from 'debounce';
4
- import mm from 'micromatch';
5
3
  import logSymbols from 'log-symbols';
4
+ import mm from 'micromatch';
5
+ import { normalizeOutputParam } from '@graphql-codegen/plugin-helpers';
6
6
  import { executeCodegen } from '../codegen.js';
7
7
  import { loadContext } from '../config.js';
8
8
  import { lifecycleHooks } from '../hooks.js';
9
- import { access } from './file-system.js';
10
9
  import { debugLog } from './debugging.js';
10
+ import { access } from './file-system.js';
11
11
  import { getLogger } from './logger.js';
12
12
  import { allAffirmativePatternsFromPatternSets, makeGlobalPatternSet, makeLocalPatternSet, makeShouldRebuild, } from './patterns.js';
13
- import { AbortController } from './abort-controller-polyfill.js';
14
13
  function log(msg) {
15
14
  // double spaces to inline the message with Listr
16
15
  getLogger().info(` ${msg}`);
@@ -25,8 +24,14 @@ export const createWatcher = (initialContext, onNext) => {
25
24
  const localPatternSets = Object.keys(config.generates)
26
25
  .map(filename => normalizeOutputParam(config.generates[filename]))
27
26
  .map(conf => makeLocalPatternSet(conf));
28
- const allAffirmativePatterns = allAffirmativePatternsFromPatternSets([globalPatternSet, ...localPatternSets]);
29
- const shouldRebuild = makeShouldRebuild({ globalPatternSet, localPatternSets });
27
+ const allAffirmativePatterns = allAffirmativePatternsFromPatternSets([
28
+ globalPatternSet,
29
+ ...localPatternSets,
30
+ ]);
31
+ const shouldRebuild = makeShouldRebuild({
32
+ globalPatternSet,
33
+ localPatternSets,
34
+ });
30
35
  let watcherSubscription;
31
36
  const runWatcher = async (abortSignal) => {
32
37
  const watchDirectory = await findHighestCommonDirectory(allAffirmativePatterns);
package/esm/version.js ADDED
@@ -0,0 +1 @@
1
+ export const version = '7.2.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/graphql-codegen__cli",
3
- "version": "6.2.1-depup.2",
3
+ "version": "7.2.0-depup.8",
4
4
  "peerDependenciesMeta": {
5
5
  "@parcel/watcher": {
6
6
  "optional": true
@@ -8,48 +8,48 @@
8
8
  },
9
9
  "peerDependencies": {
10
10
  "@parcel/watcher": "^2.1.0",
11
- "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"
11
+ "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 || ^17.0.0"
12
12
  },
13
13
  "dependencies": {
14
- "@babel/generator": "^7.29.1",
15
- "@babel/template": "^7.28.6",
16
- "@babel/types": "^7.29.0",
17
- "@graphql-codegen/client-preset": "^5.2.4",
18
- "@graphql-codegen/core": "^5.0.1",
19
- "@graphql-codegen/plugin-helpers": "^6.2.0",
20
- "@graphql-tools/apollo-engine-loader": "^8.0.28",
21
- "@graphql-tools/code-file-loader": "^8.1.30",
22
- "@graphql-tools/git-loader": "^8.0.34",
23
- "@graphql-tools/github-loader": "^9.1.0",
24
- "@graphql-tools/graphql-file-loader": "^8.1.12",
25
- "@graphql-tools/json-file-loader": "^8.0.26",
26
- "@graphql-tools/load": "^8.1.8",
27
- "@graphql-tools/url-loader": "^9.1.0",
28
- "@graphql-tools/merge": "^9.1.7",
29
- "@graphql-tools/utils": "^11.0.0",
30
- "@inquirer/prompts": "^8.3.2",
14
+ "@babel/generator": "^8.0.0",
15
+ "@babel/template": "^8.0.0",
16
+ "@babel/types": "^8.0.4",
17
+ "@graphql-tools/apollo-engine-loader": "^8.0.34",
18
+ "@graphql-tools/code-file-loader": "^8.1.36",
19
+ "@graphql-tools/git-loader": "^8.0.40",
20
+ "@graphql-tools/github-loader": "^9.1.6",
21
+ "@graphql-tools/graphql-file-loader": "^8.1.18",
22
+ "@graphql-tools/json-file-loader": "^8.0.32",
23
+ "@graphql-tools/load": "^8.1.15",
24
+ "@graphql-tools/merge": "^9.2.2",
25
+ "@graphql-tools/url-loader": "^9.1.6",
26
+ "@graphql-tools/utils": "^11.2.2",
27
+ "@inquirer/prompts": "^8.5.2",
31
28
  "@whatwg-node/fetch": "^0.10.13",
32
29
  "chalk": "^5.6.2",
33
- "cosmiconfig": "^9.0.1",
30
+ "cosmiconfig": "^9.0.2",
34
31
  "debounce": "^3.0.0",
35
32
  "detect-indent": "^7.0.2",
36
33
  "graphql-config": "^5.1.6",
37
34
  "is-glob": "^4.0.3",
38
- "jiti": "^2.6.1",
35
+ "jiti": "^2.7.0",
39
36
  "json-to-pretty-yaml": "^1.2.2",
40
- "listr2": "^10.2.1",
37
+ "listr2": "^10.2.2",
41
38
  "log-symbols": "^7.0.1",
42
39
  "micromatch": "^4.0.8",
43
- "shell-quote": "^1.8.3",
40
+ "shell-quote": "^1.10.0",
44
41
  "string-env-interpolation": "^1.0.1",
45
- "ts-log": "^3.0.0",
42
+ "ts-log": "^3.0.2",
46
43
  "tslib": "^2.8.1",
47
- "yaml": "^2.8.3",
48
- "yargs": "^18.0.0"
44
+ "yaml": "^2.9.0",
45
+ "yargs": "^18.0.0",
46
+ "@graphql-codegen/client-preset": "^6.1.0",
47
+ "@graphql-codegen/core": "^6.2.0",
48
+ "@graphql-codegen/plugin-helpers": "^7.1.0"
49
49
  },
50
50
  "repository": {
51
51
  "type": "git",
52
- "url": "https://github.com/dotansimha/graphql-code-generator.git",
52
+ "url": "git+https://github.com/dotansimha/graphql-code-generator.git",
53
53
  "directory": "packages/graphql-codegen-cli"
54
54
  },
55
55
  "homepage": "https://github.com/dotansimha/graphql-code-generator#readme",
@@ -105,72 +105,85 @@
105
105
  "./package.json": "./package.json"
106
106
  },
107
107
  "bin": {
108
- "gql-gen": "cjs/bin.js",
109
- "graphql-codegen": "cjs/bin.js",
110
- "graphql-code-generator": "cjs/bin.js",
111
- "graphql-codegen-esm": "esm/bin.js"
108
+ "gql-gen": "esm/bin.js",
109
+ "graphql-codegen": "esm/bin.js",
110
+ "graphql-code-generator": "esm/bin.js",
111
+ "graphql-codegen-esm": "esm/bin.js",
112
+ "graphql-codegen-cjs": "cjs/bin.js"
112
113
  },
113
114
  "description": "@graphql-codegen/cli with all dependencies updated to latest",
114
115
  "depup": {
115
116
  "changes": {
116
117
  "@babel/generator": {
117
118
  "from": "^7.18.13",
118
- "to": "^7.29.1"
119
+ "to": "^8.0.0"
119
120
  },
120
121
  "@babel/template": {
121
122
  "from": "^7.18.10",
122
- "to": "^7.28.6"
123
+ "to": "^8.0.0"
123
124
  },
124
125
  "@babel/types": {
125
126
  "from": "^7.18.13",
126
- "to": "^7.29.0"
127
+ "to": "^8.0.4"
128
+ },
129
+ "@graphql-tools/apollo-engine-loader": {
130
+ "from": "^8.0.28",
131
+ "to": "^8.0.34"
127
132
  },
128
133
  "@graphql-tools/code-file-loader": {
129
134
  "from": "^8.1.28",
130
- "to": "^8.1.30"
135
+ "to": "^8.1.36"
131
136
  },
132
137
  "@graphql-tools/git-loader": {
133
138
  "from": "^8.0.32",
134
- "to": "^8.0.34"
139
+ "to": "^8.0.40"
135
140
  },
136
141
  "@graphql-tools/github-loader": {
137
142
  "from": "^9.0.6",
138
- "to": "^9.1.0"
143
+ "to": "^9.1.6"
139
144
  },
140
145
  "@graphql-tools/graphql-file-loader": {
141
146
  "from": "^8.1.11",
142
- "to": "^8.1.12"
147
+ "to": "^8.1.18"
143
148
  },
144
- "@graphql-tools/url-loader": {
145
- "from": "^9.0.6",
146
- "to": "^9.1.0"
149
+ "@graphql-tools/json-file-loader": {
150
+ "from": "^8.0.26",
151
+ "to": "^8.0.32"
152
+ },
153
+ "@graphql-tools/load": {
154
+ "from": "^8.1.8",
155
+ "to": "^8.1.15"
147
156
  },
148
157
  "@graphql-tools/merge": {
149
158
  "from": "^9.0.6",
150
- "to": "^9.1.7"
159
+ "to": "^9.2.2"
160
+ },
161
+ "@graphql-tools/url-loader": {
162
+ "from": "^9.0.6",
163
+ "to": "^9.1.6"
164
+ },
165
+ "@graphql-tools/utils": {
166
+ "from": "^11.2.0",
167
+ "to": "^11.2.2"
151
168
  },
152
169
  "@inquirer/prompts": {
153
- "from": "^7.8.2",
154
- "to": "^8.3.2"
170
+ "from": "^8.3.2",
171
+ "to": "^8.5.2"
155
172
  },
156
173
  "@whatwg-node/fetch": {
157
174
  "from": "^0.10.0",
158
175
  "to": "^0.10.13"
159
176
  },
160
177
  "chalk": {
161
- "from": "^4.1.0",
178
+ "from": "^5.6.0",
162
179
  "to": "^5.6.2"
163
180
  },
164
181
  "cosmiconfig": {
165
182
  "from": "^9.0.0",
166
- "to": "^9.0.1"
167
- },
168
- "debounce": {
169
- "from": "^2.0.0",
170
- "to": "^3.0.0"
183
+ "to": "^9.0.2"
171
184
  },
172
185
  "detect-indent": {
173
- "from": "^6.0.0",
186
+ "from": "^7.0.0",
174
187
  "to": "^7.0.2"
175
188
  },
176
189
  "is-glob": {
@@ -179,14 +192,14 @@
179
192
  },
180
193
  "jiti": {
181
194
  "from": "^2.3.0",
182
- "to": "^2.6.1"
195
+ "to": "^2.7.0"
183
196
  },
184
197
  "listr2": {
185
- "from": "^9.0.0",
186
- "to": "^10.2.1"
198
+ "from": "^10.2.1",
199
+ "to": "^10.2.2"
187
200
  },
188
201
  "log-symbols": {
189
- "from": "^4.0.0",
202
+ "from": "^7.0.0",
190
203
  "to": "^7.0.1"
191
204
  },
192
205
  "micromatch": {
@@ -195,11 +208,11 @@
195
208
  },
196
209
  "shell-quote": {
197
210
  "from": "^1.7.3",
198
- "to": "^1.8.3"
211
+ "to": "^1.10.0"
199
212
  },
200
213
  "ts-log": {
201
- "from": "^2.2.3",
202
- "to": "^3.0.0"
214
+ "from": "^3.0.0",
215
+ "to": "^3.0.2"
203
216
  },
204
217
  "tslib": {
205
218
  "from": "^2.4.0",
@@ -207,17 +220,13 @@
207
220
  },
208
221
  "yaml": {
209
222
  "from": "^2.3.1",
210
- "to": "^2.8.3"
211
- },
212
- "yargs": {
213
- "from": "^17.0.0",
214
- "to": "^18.0.0"
223
+ "to": "^2.9.0"
215
224
  }
216
225
  },
217
- "depsUpdated": 25,
226
+ "depsUpdated": 27,
218
227
  "originalPackage": "@graphql-codegen/cli",
219
- "originalVersion": "6.2.1",
220
- "processedAt": "2026-04-03T12:22:33.892Z",
228
+ "originalVersion": "7.2.0",
229
+ "processedAt": "2026-07-21T16:05:01.236Z",
221
230
  "smokeTest": "passed"
222
231
  }
223
232
  }
@@ -1,6 +1,7 @@
1
- import { Profiler, Types } from '@graphql-codegen/plugin-helpers';
2
1
  import { GraphQLSchema } from 'graphql';
3
2
  import { GraphQLConfig } from 'graphql-config';
3
+ import { Profiler, Types } from '@graphql-codegen/plugin-helpers';
4
+ import type { UnnormalizedTypeDefPointer } from '@graphql-tools/load';
4
5
  export type CodegenConfig = Types.Config;
5
6
  export type YamlCliFlags = {
6
7
  config: string;
@@ -147,6 +148,6 @@ export declare class CodegenContext {
147
148
  [key: string]: any;
148
149
  };
149
150
  loadSchema(pointer: Types.Schema | Types.Schema[]): Promise<GraphQLSchema>;
150
- loadDocuments(pointer: Types.OperationDocument[]): Promise<Types.DocumentFile[]>;
151
+ loadDocuments(pointer: UnnormalizedTypeDefPointer, type: 'standard' | 'external'): Promise<Types.DocumentFile[]>;
151
152
  }
152
153
  export declare function ensureContext(input: CodegenContext | Types.Config): CodegenContext;
@@ -1,6 +1,7 @@
1
- import { Profiler, Types } from '@graphql-codegen/plugin-helpers';
2
1
  import { GraphQLSchema } from 'graphql';
3
2
  import { GraphQLConfig } from 'graphql-config';
3
+ import { Profiler, Types } from '@graphql-codegen/plugin-helpers';
4
+ import type { UnnormalizedTypeDefPointer } from '@graphql-tools/load';
4
5
  export type CodegenConfig = Types.Config;
5
6
  export type YamlCliFlags = {
6
7
  config: string;
@@ -147,6 +148,6 @@ export declare class CodegenContext {
147
148
  [key: string]: any;
148
149
  };
149
150
  loadSchema(pointer: Types.Schema | Types.Schema[]): Promise<GraphQLSchema>;
150
- loadDocuments(pointer: Types.OperationDocument[]): Promise<Types.DocumentFile[]>;
151
+ loadDocuments(pointer: UnnormalizedTypeDefPointer, type: 'standard' | 'external'): Promise<Types.DocumentFile[]>;
151
152
  }
152
153
  export declare function ensureContext(input: CodegenContext | Types.Config): CodegenContext;
@@ -1,4 +1,4 @@
1
- import { type Answers, type PluginOption, Tags } from './types.cjs';
1
+ import { Tags, type Answers, type PluginOption } from './types.cjs';
2
2
  export declare function getAnswers(possibleTargets: Record<Tags, boolean>): Promise<Answers>;
3
3
  export declare function getApplicationTypeChoices(possibleTargets: Record<Tags, boolean>): {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { type Answers, type PluginOption, Tags } from './types.js';
1
+ import { Tags, type Answers, type PluginOption } from './types.js';
2
2
  export declare function getAnswers(possibleTargets: Record<Tags, boolean>): Promise<Answers>;
3
3
  export declare function getApplicationTypeChoices(possibleTargets: Record<Tags, boolean>): {
4
4
  name: string;
@@ -1,2 +1,2 @@
1
1
  import { Tags } from './types.cjs';
2
- export declare function guessTargets(): Promise<Record<Tags, boolean>>;
2
+ export declare function guessTargets(): Record<Tags, boolean>;
@@ -1,2 +1,2 @@
1
1
  import { Tags } from './types.js';
2
- export declare function guessTargets(): Promise<Record<Tags, boolean>>;
2
+ export declare function guessTargets(): Record<Tags, boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Poor mans ESM detection.
3
+ * Looking at this and you have a better method?
4
+ * Send a PR.
5
+ */
6
+ export declare const isESMModule: boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Poor mans ESM detection.
3
+ * Looking at this and you have a better method?
4
+ * Send a PR.
5
+ */
6
+ export declare const isESMModule: boolean;
@@ -1,6 +1,7 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import type { Source } from 'graphql-config';
1
3
  import { Types } from '@graphql-codegen/plugin-helpers';
2
4
  import { UnnormalizedTypeDefPointer } from '@graphql-tools/load';
3
- import { GraphQLSchema } from 'graphql';
4
5
  export declare const defaultSchemaLoadOptions: {
5
6
  assumeValidSDL: boolean;
6
7
  sort: boolean;
@@ -12,4 +13,4 @@ export declare const defaultDocumentsLoadOptions: {
12
13
  skipGraphQLImport: boolean;
13
14
  };
14
15
  export declare function loadSchema(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], config: Types.Config): Promise<GraphQLSchema>;
15
- export declare function loadDocuments(documentPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], config: Types.Config): Promise<Types.DocumentFile[]>;
16
+ export declare function loadDocuments(documentPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], config: Types.Config): Promise<Source[]>;