@graphql-tools/load-files
Advanced tools
Comparing version 6.2.4 to 6.2.5
@@ -31,4 +31,5 @@ 'use strict'; | ||
const path = require('path'); | ||
const fsExtra = require('fs-extra'); | ||
const fs = require('fs'); | ||
var readFile = fs.promises.readFile, stat = fs.promises.stat; | ||
var DEFAULT_IGNORED_EXTENSIONS = ['spec', 'test', 'd', 'map']; | ||
@@ -47,3 +48,3 @@ var DEFAULT_EXTENSIONS = ['gql', 'graphql', 'graphqls', 'ts', 'js']; | ||
try { | ||
var pathStat = fsExtra.statSync(path); | ||
var pathStat = fs.statSync(path); | ||
return pathStat.isDirectory(); | ||
@@ -62,3 +63,3 @@ } | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, fsExtra.stat(path)]; | ||
return [4 /*yield*/, stat(path)]; | ||
case 1: | ||
@@ -153,3 +154,3 @@ pathStat = _a.sent(); | ||
if (!checkExtension(path$1, options)) { | ||
return; | ||
return null; | ||
} | ||
@@ -184,3 +185,3 @@ if (isIndex(path$1, execOptions.extensions) && options.ignoreIndex) { | ||
else { | ||
return fsExtra.readFileSync(path$1, { encoding: 'utf-8' }); | ||
return fs.readFileSync(path$1, { encoding: 'utf-8' }); | ||
} | ||
@@ -289,3 +290,3 @@ }) | ||
return [2 /*return*/, extractedExport]; | ||
case 2: return [2 /*return*/, fsExtra.readFile(path$1, { encoding: 'utf-8' })]; | ||
case 2: return [2 /*return*/, readFile(path$1, { encoding: 'utf-8' })]; | ||
} | ||
@@ -292,0 +293,0 @@ }); |
@@ -5,4 +5,5 @@ import { __assign, __values, __awaiter, __generator } from 'tslib'; | ||
import { extname } from 'path'; | ||
import { readFileSync, readFile, stat, statSync } from 'fs-extra'; | ||
import { promises, readFileSync, statSync } from 'fs'; | ||
var readFile = promises.readFile, stat = promises.stat; | ||
var DEFAULT_IGNORED_EXTENSIONS = ['spec', 'test', 'd', 'map']; | ||
@@ -125,3 +126,3 @@ var DEFAULT_EXTENSIONS = ['gql', 'graphql', 'graphqls', 'ts', 'js']; | ||
if (!checkExtension(path, options)) { | ||
return; | ||
return null; | ||
} | ||
@@ -128,0 +129,0 @@ if (isIndex(path, execOptions.extensions) && options.ignoreIndex) { |
{ | ||
"name": "@graphql-tools/load-files/es5", | ||
"version": "6.2.4", | ||
"version": "6.2.5", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,3 +10,2 @@ "sideEffects": false, | ||
"dependencies": { | ||
"fs-extra": "9.0.1", | ||
"globby": "11.0.1", | ||
@@ -13,0 +12,0 @@ "tslib": "~2.0.1", |
@@ -30,4 +30,5 @@ 'use strict'; | ||
const path = require('path'); | ||
const fsExtra = require('fs-extra'); | ||
const fs = require('fs'); | ||
const { readFile, stat } = fs.promises; | ||
const DEFAULT_IGNORED_EXTENSIONS = ['spec', 'test', 'd', 'map']; | ||
@@ -46,3 +47,3 @@ const DEFAULT_EXTENSIONS = ['gql', 'graphql', 'graphqls', 'ts', 'js']; | ||
try { | ||
const pathStat = fsExtra.statSync(path); | ||
const pathStat = fs.statSync(path); | ||
return pathStat.isDirectory(); | ||
@@ -56,3 +57,3 @@ } | ||
try { | ||
const pathStat = await fsExtra.stat(path); | ||
const pathStat = await stat(path); | ||
return pathStat.isDirectory(); | ||
@@ -116,3 +117,3 @@ } | ||
if (!checkExtension(path$1, options)) { | ||
return; | ||
return null; | ||
} | ||
@@ -147,3 +148,3 @@ if (isIndex(path$1, execOptions.extensions) && options.ignoreIndex) { | ||
else { | ||
return fsExtra.readFileSync(path$1, { encoding: 'utf-8' }); | ||
return fs.readFileSync(path$1, { encoding: 'utf-8' }); | ||
} | ||
@@ -201,3 +202,3 @@ }) | ||
else { | ||
return fsExtra.readFile(path$1, { encoding: 'utf-8' }); | ||
return readFile(path$1, { encoding: 'utf-8' }); | ||
} | ||
@@ -204,0 +205,0 @@ })); |
import globby, { sync } from 'globby'; | ||
import unixify from 'unixify'; | ||
import { extname } from 'path'; | ||
import { readFileSync, readFile, statSync, stat } from 'fs-extra'; | ||
import { readFileSync, promises, statSync } from 'fs'; | ||
const { readFile, stat } = promises; | ||
const DEFAULT_IGNORED_EXTENSIONS = ['spec', 'test', 'd', 'map']; | ||
@@ -87,3 +88,3 @@ const DEFAULT_EXTENSIONS = ['gql', 'graphql', 'graphqls', 'ts', 'js']; | ||
if (!checkExtension(path, options)) { | ||
return; | ||
return null; | ||
} | ||
@@ -90,0 +91,0 @@ if (isIndex(path, execOptions.extensions) && options.ignoreIndex) { |
{ | ||
"name": "@graphql-tools/load-files", | ||
"version": "6.2.4", | ||
"version": "6.2.5", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,3 +10,2 @@ "sideEffects": false, | ||
"dependencies": { | ||
"fs-extra": "9.0.1", | ||
"globby": "11.0.1", | ||
@@ -13,0 +12,0 @@ "tslib": "~2.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
116291
4
1000
- Removedfs-extra@9.0.1
- Removedat-least-node@1.0.0(transitive)
- Removedfs-extra@9.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removeduniversalify@1.0.02.0.1(transitive)