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.5.2 to 6.5.3

18

index.js

@@ -32,2 +32,4 @@ 'use strict';

const graphql = require('graphql');
const module$1 = require('module');
const process = require('process');

@@ -101,2 +103,3 @@ const { readFile, stat } = fs.promises;

absolute: true,
cwd: process.cwd(),
},

@@ -113,3 +116,3 @@ exportNames: DEFAULT_EXPORT_NAMES,

function loadFilesSync(pattern, options = LoadFilesDefaultOptions) {
var _a;
var _a, _b;
const execOptions = { ...LoadFilesDefaultOptions, ...options };

@@ -120,3 +123,3 @@ const relevantPaths = scanForFilesSync(asArray(pattern).map(path => isDirectorySync(path)

const extractExports = execOptions.extractExports || DEFAULT_EXTRACT_EXPORTS_FACTORY((_a = execOptions.exportNames) !== null && _a !== void 0 ? _a : []);
const requireMethod = execOptions.requireMethod || require;
const requireMethod = execOptions.requireMethod || module$1.createRequire(path.join(((_b = options === null || options === void 0 ? void 0 : options.globOptions) === null || _b === void 0 ? void 0 : _b.cwd) || process.cwd(), 'noop.js'));
return relevantPaths

@@ -185,3 +188,12 @@ .map(path$1 => {

const extractExports = execOptions.extractExports || DEFAULT_EXTRACT_EXPORTS_FACTORY((_a = execOptions.exportNames) !== null && _a !== void 0 ? _a : []);
const defaultRequireMethod = (path) => new Promise(function (resolve) { resolve(_interopNamespace(require(path))); }).catch(async () => require(path));
const defaultRequireMethod = (path$1) => new Promise(function (resolve) { resolve(_interopNamespace(require(path$1))); }).catch(importError => {
var _a;
const cwdRequire = module$1.createRequire(path.join(((_a = options === null || options === void 0 ? void 0 : options.globOptions) === null || _a === void 0 ? void 0 : _a.cwd) || process.cwd(), 'noop.js'));
try {
return cwdRequire(path$1);
}
catch (e) {
throw importError;
}
});
const requireMethod = execOptions.requireMethod || defaultRequireMethod;

@@ -188,0 +200,0 @@ return Promise.all(relevantPaths

5

package.json
{
"name": "@graphql-tools/load-files",
"version": "6.5.2",
"version": "6.5.3",
"description": "A set of utils for faster development of GraphQL tools",

@@ -35,4 +35,5 @@ "sideEffects": false,

"import": "./*.mjs"
}
},
"./package.json": "./package.json"
}
}

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