@graphql-tools/code-file-loader 7.3.13 → 7.3.14

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/index.js CHANGED
@@ -161,7 +161,7 @@ class CodeFileLoader {
161
161
  if (!options.noRequire) {
162
162
  try {
163
163
  if (options && options.require) {
164
- await Promise.all((0, utils_1.asArray)(options.require).map(m => Promise.resolve().then(() => tslib_1.__importStar(require(m)))));
164
+ await Promise.all((0, utils_1.asArray)(options.require).map(m => { var _a; return _a = m, Promise.resolve().then(() => tslib_1.__importStar(require(_a))); }));
165
165
  }
166
166
  const loaded = await (0, load_from_module_js_1.tryToLoadFromExport)(normalizedFilePath);
167
167
  const sources = (0, utils_1.asArray)(loaded)
@@ -22,6 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var _a;
25
26
  Object.defineProperty(exports, "__esModule", { value: true });
26
27
  exports.tryToLoadFromExportSync = exports.tryToLoadFromExport = void 0;
27
28
  const exports_js_1 = require("./exports.js");
@@ -31,7 +32,7 @@ const exports_js_1 = require("./exports.js");
31
32
  async function tryToLoadFromExport(rawFilePath) {
32
33
  try {
33
34
  const filepath = ensureFilepath(rawFilePath);
34
- const mod = await Promise.resolve().then(() => __importStar(require(filepath)));
35
+ const mod = await (_a = filepath, Promise.resolve().then(() => __importStar(require(_a))));
35
36
  return await (0, exports_js_1.pickExportFromModule)({ module: mod, filepath });
36
37
  }
37
38
  catch (e) {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-tools/code-file-loader",
3
- "version": "7.3.13",
3
+ "version": "7.3.14",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/utils": "9.1.1",
11
- "@graphql-tools/graphql-tag-pluck": "7.4.0",
10
+ "@graphql-tools/utils": "9.1.2",
11
+ "@graphql-tools/graphql-tag-pluck": "7.4.1",
12
12
  "globby": "^11.0.3",
13
13
  "tslib": "^2.4.0",
14
14
  "unixify": "^1.0.0"
@@ -1,6 +1,6 @@
1
1
  import { Source, BaseLoaderOptions, Loader } from '@graphql-tools/utils';
2
2
  import { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck';
3
- export declare type CodeFileLoaderConfig = {
3
+ export type CodeFileLoaderConfig = {
4
4
  pluckConfig?: GraphQLTagPluckOptions;
5
5
  noPluck?: boolean;
6
6
  noRequire?: boolean;
@@ -12,7 +12,7 @@ export declare type CodeFileLoaderConfig = {
12
12
  /**
13
13
  * Additional options for loading from a code file
14
14
  */
15
- export declare type CodeFileLoaderOptions = {
15
+ export type CodeFileLoaderOptions = {
16
16
  require?: string | string[];
17
17
  } & CodeFileLoaderConfig & BaseLoaderOptions;
18
18
  /**
@@ -1,6 +1,6 @@
1
1
  import { Source, BaseLoaderOptions, Loader } from '@graphql-tools/utils';
2
2
  import { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck';
3
- export declare type CodeFileLoaderConfig = {
3
+ export type CodeFileLoaderConfig = {
4
4
  pluckConfig?: GraphQLTagPluckOptions;
5
5
  noPluck?: boolean;
6
6
  noRequire?: boolean;
@@ -12,7 +12,7 @@ export declare type CodeFileLoaderConfig = {
12
12
  /**
13
13
  * Additional options for loading from a code file
14
14
  */
15
- export declare type CodeFileLoaderOptions = {
15
+ export type CodeFileLoaderOptions = {
16
16
  require?: string | string[];
17
17
  } & CodeFileLoaderConfig & BaseLoaderOptions;
18
18
  /**