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

@graphql-tools/graphql-file-loader

Package Overview
Dependencies
Maintainers
4
Versions
1088
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/graphql-file-loader - npm Package Compare versions

Comparing version 8.0.12-alpha-20250114135744-c6fae34620a5bfac6d31e5210fcdc9667cf4cac1 to 8.0.12-alpha-20250116122450-7e52267bb240c285f4942b856fa84aa701f76417

10

cjs/index.js

@@ -9,2 +9,3 @@ "use strict";

const globby_1 = tslib_1.__importDefault(require("globby"));
const unixify_1 = tslib_1.__importDefault(require("unixify"));
const import_1 = require("@graphql-tools/import");

@@ -14,2 +15,9 @@ const utils_1 = require("@graphql-tools/utils");

const FILE_EXTENSIONS = ['.gql', '.gqls', '.graphql', '.graphqls'];
function unixifyWithDriverLetter(path) {
if (path.match(/^[A-Z]:\\/)) {
const driveLetter = path[0].toLowerCase();
return `${driveLetter}:${(0, unixify_1.default)(path)}`;
}
return (0, unixify_1.default)(path);
}
function isGraphQLImportFile(rawSDL) {

@@ -77,3 +85,3 @@ const trimmedRawSDL = rawSDL.trim();

const ignores = (0, utils_1.asArray)(options.ignore || []);
const globs = [glob, ...ignores.map(v => buildIgnoreGlob(v))];
const globs = [unixifyWithDriverLetter(glob), ...ignores.map(v => buildIgnoreGlob(unixifyWithDriverLetter(v)))];
return globs;

@@ -80,0 +88,0 @@ }

@@ -5,2 +5,3 @@ import { existsSync, promises as fsPromises, readFileSync } from 'fs';

import globby from 'globby';
import unixify from 'unixify';
import { processImport } from '@graphql-tools/import';

@@ -10,2 +11,9 @@ import { asArray, isValidPath, parseGraphQLSDL, } from '@graphql-tools/utils';

const FILE_EXTENSIONS = ['.gql', '.gqls', '.graphql', '.graphqls'];
function unixifyWithDriverLetter(path) {
if (path.match(/^[A-Z]:\\/)) {
const driveLetter = path[0].toLowerCase();
return `${driveLetter}:${unixify(path)}`;
}
return unixify(path);
}
function isGraphQLImportFile(rawSDL) {

@@ -73,3 +81,3 @@ const trimmedRawSDL = rawSDL.trim();

const ignores = asArray(options.ignore || []);
const globs = [glob, ...ignores.map(v => buildIgnoreGlob(v))];
const globs = [unixifyWithDriverLetter(glob), ...ignores.map(v => buildIgnoreGlob(unixifyWithDriverLetter(v)))];
return globs;

@@ -76,0 +84,0 @@ }

5

package.json
{
"name": "@graphql-tools/graphql-file-loader",
"version": "8.0.12-alpha-20250114135744-c6fae34620a5bfac6d31e5210fcdc9667cf4cac1",
"version": "8.0.12-alpha-20250116122450-7e52267bb240c285f4942b856fa84aa701f76417",
"description": "A set of utils for faster development of GraphQL tools",

@@ -13,3 +13,4 @@ "sideEffects": false,

"globby": "^11.0.3",
"tslib": "^2.4.0"
"tslib": "^2.4.0",
"unixify": "^1.0.0"
},

@@ -16,0 +17,0 @@ "repository": {

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