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

@graphql-tools/webpack-loader

Package Overview
Dependencies
Maintainers
3
Versions
511
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 6.2.4 to 6.3.0-alpha-46c2b3fb.0

33

es5/index.cjs.js

@@ -8,2 +8,3 @@ 'use strict';

const webpackLoaderRuntime = require('@graphql-tools/webpack-loader-runtime/es5');
const optimize = require('@graphql-tools/optimize/es5');

@@ -77,24 +78,2 @@ /**

}
function removeDescriptions(doc) {
function transformNode(node) {
if (node.description) {
node.description = undefined;
}
return node;
}
if (isSDL(doc)) {
return graphql.visit(doc, {
ScalarTypeDefinition: transformNode,
ObjectTypeDefinition: transformNode,
InterfaceTypeDefinition: transformNode,
UnionTypeDefinition: transformNode,
EnumTypeDefinition: transformNode,
EnumValueDefinition: transformNode,
InputObjectTypeDefinition: transformNode,
InputValueDefinition: transformNode,
FieldDefinition: transformNode,
});
}
return doc;
}
function expandImports(source, options) {

@@ -120,6 +99,12 @@ var lines = source.split(/\r\n|\r|\n/);

var doc = parseDocument(source);
// Removes descriptions from Nodes
var optimizers = [];
if (options.noDescription) {
doc = removeDescriptions(doc);
optimizers.push(optimize.removeDescriptions);
}
if (options.noEmptyNodes) {
optimizers.push(optimize.removeEmptyNodes);
}
if (optimizers.length > 0 && isSDL(doc)) {
doc = optimize.optimizeDocumentNode(doc, optimizers);
}
var headerCode = "\n var doc = " + JSON.stringify(doc) + ";\n ";

@@ -126,0 +111,0 @@ var outputCode = '';

import os from 'os';
import { parse, Kind, print, isExecutableDefinitionNode, visit } from 'graphql';
import { parse, Kind, print, isExecutableDefinitionNode } from 'graphql';
import { uniqueCode } from '@graphql-tools/webpack-loader-runtime/es5';
import { optimizeDocumentNode, removeDescriptions, removeEmptyNodes } from '@graphql-tools/optimize/es5';

@@ -72,24 +73,2 @@ /**

}
function removeDescriptions(doc) {
function transformNode(node) {
if (node.description) {
node.description = undefined;
}
return node;
}
if (isSDL(doc)) {
return visit(doc, {
ScalarTypeDefinition: transformNode,
ObjectTypeDefinition: transformNode,
InterfaceTypeDefinition: transformNode,
UnionTypeDefinition: transformNode,
EnumTypeDefinition: transformNode,
EnumValueDefinition: transformNode,
InputObjectTypeDefinition: transformNode,
InputValueDefinition: transformNode,
FieldDefinition: transformNode,
});
}
return doc;
}
function expandImports(source, options) {

@@ -115,6 +94,12 @@ var lines = source.split(/\r\n|\r|\n/);

var doc = parseDocument(source);
// Removes descriptions from Nodes
var optimizers = [];
if (options.noDescription) {
doc = removeDescriptions(doc);
optimizers.push(removeDescriptions);
}
if (options.noEmptyNodes) {
optimizers.push(removeEmptyNodes);
}
if (optimizers.length > 0 && isSDL(doc)) {
doc = optimizeDocumentNode(doc, optimizers);
}
var headerCode = "\n var doc = " + JSON.stringify(doc) + ";\n ";

@@ -121,0 +106,0 @@ var outputCode = '';

{
"name": "@graphql-tools/webpack-loader/es5",
"version": "6.2.4",
"version": "6.3.0-alpha-46c2b3fb.0",
"description": "A set of utils for faster development of GraphQL tools",

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

"dependencies": {
"@graphql-tools/optimize": "1.0.0-alpha-46c2b3fb.0",
"@graphql-tools/webpack-loader-runtime": "^6.2.4",

@@ -12,0 +13,0 @@ "tslib": "~2.0.1"

@@ -8,2 +8,3 @@ 'use strict';

const webpackLoaderRuntime = require('@graphql-tools/webpack-loader-runtime');
const optimize = require('@graphql-tools/optimize');

@@ -77,24 +78,2 @@ /**

}
function removeDescriptions(doc) {
function transformNode(node) {
if (node.description) {
node.description = undefined;
}
return node;
}
if (isSDL(doc)) {
return graphql.visit(doc, {
ScalarTypeDefinition: transformNode,
ObjectTypeDefinition: transformNode,
InterfaceTypeDefinition: transformNode,
UnionTypeDefinition: transformNode,
EnumTypeDefinition: transformNode,
EnumValueDefinition: transformNode,
InputObjectTypeDefinition: transformNode,
InputValueDefinition: transformNode,
FieldDefinition: transformNode,
});
}
return doc;
}
function expandImports(source, options) {

@@ -125,6 +104,12 @@ const lines = source.split(/\r\n|\r|\n/);

let doc = parseDocument(source);
// Removes descriptions from Nodes
const optimizers = [];
if (options.noDescription) {
doc = removeDescriptions(doc);
optimizers.push(optimize.removeDescriptions);
}
if (options.noEmptyNodes) {
optimizers.push(optimize.removeEmptyNodes);
}
if (optimizers.length > 0 && isSDL(doc)) {
doc = optimize.optimizeDocumentNode(doc, optimizers);
}
const headerCode = `

@@ -131,0 +116,0 @@ var doc = ${JSON.stringify(doc)};

import os from 'os';
import { parse, Kind, print, isExecutableDefinitionNode, visit } from 'graphql';
import { parse, Kind, print, isExecutableDefinitionNode } from 'graphql';
import { uniqueCode } from '@graphql-tools/webpack-loader-runtime';
import { optimizeDocumentNode, removeDescriptions, removeEmptyNodes } from '@graphql-tools/optimize';

@@ -72,24 +73,2 @@ /**

}
function removeDescriptions(doc) {
function transformNode(node) {
if (node.description) {
node.description = undefined;
}
return node;
}
if (isSDL(doc)) {
return visit(doc, {
ScalarTypeDefinition: transformNode,
ObjectTypeDefinition: transformNode,
InterfaceTypeDefinition: transformNode,
UnionTypeDefinition: transformNode,
EnumTypeDefinition: transformNode,
EnumValueDefinition: transformNode,
InputObjectTypeDefinition: transformNode,
InputValueDefinition: transformNode,
FieldDefinition: transformNode,
});
}
return doc;
}
function expandImports(source, options) {

@@ -120,6 +99,12 @@ const lines = source.split(/\r\n|\r|\n/);

let doc = parseDocument(source);
// Removes descriptions from Nodes
const optimizers = [];
if (options.noDescription) {
doc = removeDescriptions(doc);
optimizers.push(removeDescriptions);
}
if (options.noEmptyNodes) {
optimizers.push(removeEmptyNodes);
}
if (optimizers.length > 0 && isSDL(doc)) {
doc = optimizeDocumentNode(doc, optimizers);
}
const headerCode = `

@@ -126,0 +111,0 @@ var doc = ${JSON.stringify(doc)};

{
"name": "@graphql-tools/webpack-loader",
"version": "6.2.4",
"version": "6.3.0-alpha-46c2b3fb.0",
"description": "A set of utils for faster development of GraphQL tools",

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

"dependencies": {
"@graphql-tools/optimize": "1.0.0-alpha-46c2b3fb.0",
"@graphql-tools/webpack-loader-runtime": "^6.2.4",

@@ -12,0 +13,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