@graphql-tools/load-files 6.6.1-alpha-e7752ba5.0 → 6.6.1-alpha-b9e4a92b.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/index.js CHANGED
@@ -6,7 +6,7 @@ const globby_1 = tslib_1.__importStar(require("globby"));
6
6
  const unixify_1 = tslib_1.__importDefault(require("unixify"));
7
7
  const path_1 = require("path");
8
8
  const fs_1 = require("fs");
9
- const graphql_1 = require("@graphql-tools/graphql");
9
+ const graphql_1 = require("graphql");
10
10
  const module_1 = require("module");
11
11
  const process_1 = require("process");
12
12
  const { readFile, stat } = fs_1.promises;
package/esm/index.js CHANGED
@@ -2,7 +2,7 @@ import globby, { sync as globbySync } from 'globby';
2
2
  import unixify from 'unixify';
3
3
  import { extname, join } from 'path';
4
4
  import { statSync, readFileSync, promises as fsPromises } from 'fs';
5
- import { parse } from '@graphql-tools/graphql';
5
+ import { parse } from 'graphql';
6
6
  import { createRequire } from 'module';
7
7
  import { cwd } from 'process';
8
8
  const { readFile, stat } = fsPromises;
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@graphql-tools/load-files",
3
- "version": "6.6.1-alpha-e7752ba5.0",
3
+ "version": "6.6.1-alpha-b9e4a92b.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
+ "peerDependencies": {
7
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
+ },
6
9
  "dependencies": {
7
- "@graphql-tools/graphql": "0.1.0-alpha-e7752ba5.0",
8
10
  "globby": "11.1.0",
9
11
  "unixify": "1.0.0",
10
12
  "tslib": "^2.4.0"
@@ -26,7 +28,7 @@
26
28
  "exports": {
27
29
  ".": {
28
30
  "require": {
29
- "types": "./typings/index.d.ts",
31
+ "types": "./typings/index.d.cts",
30
32
  "default": "./cjs/index.js"
31
33
  },
32
34
  "import": {
@@ -40,7 +42,7 @@
40
42
  },
41
43
  "./*": {
42
44
  "require": {
43
- "types": "./typings/*.d.ts",
45
+ "types": "./typings/*.d.cts",
44
46
  "default": "./cjs/*.js"
45
47
  },
46
48
  "import": {
@@ -0,0 +1,27 @@
1
+ import { GlobbyOptions } from 'globby';
2
+ /**
3
+ * Additional options for loading files
4
+ */
5
+ export interface LoadFilesOptions {
6
+ ignoredExtensions?: string[];
7
+ extensions?: string[];
8
+ useRequire?: boolean;
9
+ requireMethod?: any;
10
+ globOptions?: GlobbyOptions;
11
+ exportNames?: string[];
12
+ recursive?: boolean;
13
+ ignoreIndex?: boolean;
14
+ extractExports?: (fileExport: any) => any;
15
+ }
16
+ /**
17
+ * Synchronously loads files using the provided glob pattern.
18
+ * @param pattern Glob pattern or patterns to use when loading files
19
+ * @param options Additional options
20
+ */
21
+ export declare function loadFilesSync<T = any>(pattern: string | string[], options?: LoadFilesOptions): T[];
22
+ /**
23
+ * Asynchronously loads files using the provided glob pattern.
24
+ * @param pattern Glob pattern or patterns to use when loading files
25
+ * @param options Additional options
26
+ */
27
+ export declare function loadFiles(pattern: string | string[], options?: LoadFilesOptions): Promise<any[]>;