@graphql-tools/code-file-loader 7.3.21 → 7.3.22-alpha-20230413103336-666af706

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
@@ -166,7 +166,7 @@ class CodeFileLoader {
166
166
  if (!options.noRequire) {
167
167
  try {
168
168
  if (options && options.require) {
169
- await Promise.all((0, utils_1.asArray)(options.require).map(m => { var _a; return _a = m, Promise.resolve().then(() => tslib_1.__importStar(require(_a))); }));
169
+ await Promise.all((0, utils_1.asArray)(options.require).map(m => Promise.resolve(`${m}`).then(s => tslib_1.__importStar(require(s)))));
170
170
  }
171
171
  const loaded = await (0, load_from_module_js_1.tryToLoadFromExport)(normalizedFilePath);
172
172
  const sources = (0, utils_1.asArray)(loaded)
@@ -22,7 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var _a;
26
25
  Object.defineProperty(exports, "__esModule", { value: true });
27
26
  exports.tryToLoadFromExportSync = exports.tryToLoadFromExport = void 0;
28
27
  const exports_js_1 = require("./exports.js");
@@ -32,7 +31,7 @@ const exports_js_1 = require("./exports.js");
32
31
  async function tryToLoadFromExport(rawFilePath) {
33
32
  try {
34
33
  const filepath = ensureFilepath(rawFilePath);
35
- const mod = await (_a = filepath, Promise.resolve().then(() => __importStar(require(_a))));
34
+ const mod = await Promise.resolve(`${filepath}`).then(s => __importStar(require(s)));
36
35
  return await (0, exports_js_1.pickExportFromModule)({ module: mod, filepath });
37
36
  }
38
37
  catch (e) {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-tools/code-file-loader",
3
- "version": "7.3.21",
3
+ "version": "7.3.22-alpha-20230413103336-666af706",
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.2.1",
11
- "@graphql-tools/graphql-tag-pluck": "7.5.0",
10
+ "@graphql-tools/utils": "^9.2.1",
11
+ "@graphql-tools/graphql-tag-pluck": "7.5.1-alpha-20230413103336-666af706",
12
12
  "globby": "^11.0.3",
13
13
  "tslib": "^2.4.0",
14
14
  "unixify": "^1.0.0"