@graphql-codegen/cli 2.13.4 → 2.13.5-alpha-20221006101637-3fe4d3fc9

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
@@ -16,6 +16,8 @@ const module_1 = require("module");
16
16
  const fs_1 = require("fs");
17
17
  const crypto_1 = require("crypto");
18
18
  const { lstat } = fs_1.promises;
19
+ // #8437: conflict with `graphql-config` also using TypeScriptLoader(), causing a double `ts-node` register.
20
+ const tsLoader = (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)({ transpileOnly: true });
19
21
  function generateSearchPlaces(moduleName) {
20
22
  const extensions = ['json', 'yaml', 'yml', 'js', 'ts', 'config.js'];
21
23
  // gives codegen.json...
@@ -47,7 +49,7 @@ function customLoader(ext) {
47
49
  return cosmiconfig_1.defaultLoaders['.js'](filepath, content);
48
50
  }
49
51
  if (ext === 'ts') {
50
- return (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)()(filepath, content);
52
+ return tsLoader(filepath, content);
51
53
  }
52
54
  }
53
55
  return loader;
package/esm/config.js CHANGED
@@ -12,6 +12,8 @@ import { createRequire } from 'module';
12
12
  import { promises } from 'fs';
13
13
  import { createHash } from 'crypto';
14
14
  const { lstat } = promises;
15
+ // #8437: conflict with `graphql-config` also using TypeScriptLoader(), causing a double `ts-node` register.
16
+ const tsLoader = TypeScriptLoader({ transpileOnly: true });
15
17
  export function generateSearchPlaces(moduleName) {
16
18
  const extensions = ['json', 'yaml', 'yml', 'js', 'ts', 'config.js'];
17
19
  // gives codegen.json...
@@ -42,7 +44,7 @@ function customLoader(ext) {
42
44
  return defaultLoaders['.js'](filepath, content);
43
45
  }
44
46
  if (ext === 'ts') {
45
- return TypeScriptLoader()(filepath, content);
47
+ return tsLoader(filepath, content);
46
48
  }
47
49
  }
48
50
  return loader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "2.13.4",
3
+ "version": "2.13.5-alpha-20221006101637-3fe4d3fc9",
4
4
  "peerDependencies": {
5
5
  "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"
6
6
  },
@@ -28,7 +28,7 @@
28
28
  "cosmiconfig-typescript-loader": "4.1.1",
29
29
  "debounce": "^1.2.0",
30
30
  "detect-indent": "^6.0.0",
31
- "graphql-config": "^4.3.5",
31
+ "graphql-config": "4.3.6-alpha-20221006101253-cd51d3a",
32
32
  "inquirer": "^8.0.0",
33
33
  "is-glob": "^4.0.1",
34
34
  "json-to-pretty-yaml": "^1.2.2",