Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@graphql-tools/load-files

Package Overview
Dependencies
Maintainers
3
Versions
637
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/load-files - npm Package Compare versions

Comparing version 6.2.4 to 6.2.5

13

es5/index.cjs.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc