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

@graphql-tools/import

Package Overview
Dependencies
Maintainers
4
Versions
883
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/import - npm Package Compare versions

Comparing version 7.0.9-alpha-20241224080220-7cec9a36c8869567ca685def6970f80d29f8b7f5 to 7.0.9-alpha-20241224093706-07b929bee0ce42f2dc686e2d10197f0e08a1dce8

3

cjs/index.js

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

const path_1 = require("path");
const process_1 = require("process");
const graphql_1 = require("graphql");

@@ -37,3 +36,3 @@ const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));

*/
function processImport(filePath, cwd = (0, process_1.cwd)(), predefinedImports = {}, visitedFiles = new Map()) {
function processImport(filePath, cwd = globalThis.process?.cwd(), predefinedImports = {}, visitedFiles = new Map()) {
const set = visitFile(filePath, (0, path_1.join)(cwd + '/root.graphql'), visitedFiles, predefinedImports);

@@ -40,0 +39,0 @@ const definitionStrSet = new Set();

import { readFileSync, realpathSync } from 'fs';
import { dirname, isAbsolute, join } from 'path';
import { cwd as cwdFactory } from 'process';
import { Kind, parse, print, Source, } from 'graphql';

@@ -28,3 +27,3 @@ import resolveFrom from 'resolve-from';

*/
export function processImport(filePath, cwd = cwdFactory(), predefinedImports = {}, visitedFiles = new Map()) {
export function processImport(filePath, cwd = globalThis.process?.cwd(), predefinedImports = {}, visitedFiles = new Map()) {
const set = visitFile(filePath, join(cwd + '/root.graphql'), visitedFiles, predefinedImports);

@@ -31,0 +30,0 @@ const definitionStrSet = new Set();

{
"name": "@graphql-tools/import",
"version": "7.0.9-alpha-20241224080220-7cec9a36c8869567ca685def6970f80d29f8b7f5",
"version": "7.0.9-alpha-20241224093706-07b929bee0ce42f2dc686e2d10197f0e08a1dce8",
"description": "A set of utils for faster development of GraphQL tools",

@@ -10,3 +10,3 @@ "sideEffects": false,

"dependencies": {
"@graphql-tools/utils": "10.7.0-alpha-20241224080220-7cec9a36c8869567ca685def6970f80d29f8b7f5",
"@graphql-tools/utils": "^10.6.4",
"resolve-from": "5.0.0",

@@ -13,0 +13,0 @@ "tslib": "^2.4.0"

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