@graphql-codegen/cli 2.14.1-alpha-20221125150948-fd3e2f5ff → 2.15.0

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,8 +16,6 @@ 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 });
21
19
  function generateSearchPlaces(moduleName) {
22
20
  const extensions = ['json', 'yaml', 'yml', 'js', 'ts', 'config.js'];
23
21
  // gives codegen.json...
@@ -49,6 +47,8 @@ function customLoader(ext) {
49
47
  return cosmiconfig_1.defaultLoaders['.js'](filepath, content);
50
48
  }
51
49
  if (ext === 'ts') {
50
+ // #8437: conflict with `graphql-config` also using TypeScriptLoader(), causing a double `ts-node` register.
51
+ const tsLoader = (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)({ transpileOnly: true });
52
52
  return tsLoader(filepath, content);
53
53
  }
54
54
  }
package/esm/config.js CHANGED
@@ -12,8 +12,6 @@ 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 });
17
15
  export function generateSearchPlaces(moduleName) {
18
16
  const extensions = ['json', 'yaml', 'yml', 'js', 'ts', 'config.js'];
19
17
  // gives codegen.json...
@@ -44,6 +42,8 @@ function customLoader(ext) {
44
42
  return defaultLoaders['.js'](filepath, content);
45
43
  }
46
44
  if (ext === 'ts') {
45
+ // #8437: conflict with `graphql-config` also using TypeScriptLoader(), causing a double `ts-node` register.
46
+ const tsLoader = TypeScriptLoader({ transpileOnly: true });
47
47
  return tsLoader(filepath, content);
48
48
  }
49
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "2.14.1-alpha-20221125150948-fd3e2f5ff",
3
+ "version": "2.15.0",
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
  },