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

@graphql-tools/json-file-loader

Package Overview
Dependencies
Maintainers
3
Versions
1028
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 5.0.1-alpha-78275ec.0 to 5.0.1-alpha-8b79332.0

6

index.cjs.js

@@ -5,3 +5,3 @@ 'use strict';

const common = require('@graphql-tools/common');
const utils = require('@graphql-tools/utils');

@@ -17,3 +17,3 @@ const FILE_EXTENSIONS = ['.json'];

canLoadSync(pointer, options) {
if (common.isValidPath(pointer) && options.path && options.fs) {
if (utils.isValidPath(pointer) && options.path && options.fs) {
const { resolve, isAbsolute } = options.path;

@@ -39,3 +39,3 @@ if (FILE_EXTENSIONS.find(extension => pointer.endsWith(extension))) {

const jsonContent = readFileSync(normalizedFilepath, 'utf8');
return common.parseGraphQLJSON(pointer, jsonContent, options);
return utils.parseGraphQLJSON(pointer, jsonContent, options);
}

@@ -42,0 +42,0 @@ catch (e) {

@@ -1,2 +0,2 @@

import { Source, SchemaPointerSingle, DocumentLoader, SingleFileOptions } from '@graphql-tools/common';
import { Source, SchemaPointerSingle, DocumentLoader, SingleFileOptions } from '@graphql-tools/utils';
export interface JsonFileLoaderOptions extends SingleFileOptions {

@@ -3,0 +3,0 @@ fs?: typeof import('fs');

@@ -1,2 +0,2 @@

import { isValidPath, parseGraphQLJSON } from '@graphql-tools/common';
import { isValidPath, parseGraphQLJSON } from '@graphql-tools/utils';

@@ -3,0 +3,0 @@ const FILE_EXTENSIONS = ['.json'];

{
"name": "@graphql-tools/json-file-loader",
"version": "5.0.1-alpha-78275ec.0",
"version": "5.0.1-alpha-8b79332.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -9,3 +9,3 @@ "peerDependencies": {

"dependencies": {
"@graphql-tools/common": "5.0.1-alpha-78275ec.0",
"@graphql-tools/utils": "5.0.1-alpha-8b79332.0",
"tslib": "1.11.1"

@@ -12,0 +12,0 @@ },

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