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

core-types-graphql

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-types-graphql - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

dist/lib/annotation.js

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

const { title, description, examples, default: _default, comment } = node;
const exampleArray = core_types_1.ensureArray(examples);
const exampleArray = (0, core_types_1.ensureArray)(examples);
const isMultiline = !!description || exampleArray.length > 0 || !!_default;

@@ -14,0 +14,0 @@ const fullComment = [

@@ -67,3 +67,3 @@ "use strict";

name: node.name,
...core_types_1.extractAnnotations(node),
...(0, core_types_1.extractAnnotations)(node),
type: 'or',

@@ -74,3 +74,3 @@ or: [node],

if (nullTypeName)
return gqlUnionTypeOfTypes(node, [gql_utils_1.gqlNamedTypeNode(nullTypeName)], ctx);
return gqlUnionTypeOfTypes(node, [(0, gql_utils_1.gqlNamedTypeNode)(nullTypeName)], ctx);
return handleUnsupported(ctx, node, [index]);

@@ -106,3 +106,3 @@ }

try {
core_types_1.throwUnsupportedError(message, node, path);
(0, core_types_1.throwUnsupportedError)(message, node, path);
}

@@ -122,3 +122,3 @@ catch (err) {

return {
data: (header ? `${header}\n\n` : '') + graphql_1.print(ast),
data: (header ? `${header}\n\n` : '') + (0, graphql_1.print)(ast),
convertedTypes,

@@ -130,3 +130,3 @@ notConvertedTypes,

function gqlUnionTypeOfTypes(node, types, ctx) {
return gql_utils_1.gqlUnionType({ ...makeCommonTypeProperties(node, ctx), types });
return (0, gql_utils_1.gqlUnionType)({ ...makeCommonTypeProperties(node, ctx), types });
}

@@ -143,3 +143,3 @@ function makeUnionType(node, ctx) {

return {
name: gql_utils_1.gqlNameNode(node.name),
name: (0, gql_utils_1.gqlNameNode)(node.name),
...makeCommonTypePropertiesWithoutName(node, ctx),

@@ -166,4 +166,4 @@ };

...makeCommonTypePropertiesWithoutName(child, ctx),
name: gql_utils_1.gqlNameNode(name),
type: gql_utils_1.gqlMaybeRequiredNode(typeNode, required),
name: (0, gql_utils_1.gqlNameNode)(name),
type: (0, gql_utils_1.gqlMaybeRequiredNode)(typeNode, required),
};

@@ -188,3 +188,3 @@ })

return namedType;
return gql_utils_1.gqlListTypeNode(gql_utils_1.gqlMaybeRequiredNode(namedType, true));
return (0, gql_utils_1.gqlListTypeNode)((0, gql_utils_1.gqlMaybeRequiredNode)(namedType, true));
}

@@ -206,3 +206,3 @@ else

: makeNamedType(node, baseName, nameHint, ctx);
return typeName === undefined ? typeName : gql_utils_1.gqlNamedTypeNode(typeName);
return typeName === undefined ? typeName : (0, gql_utils_1.gqlNamedTypeNode)(typeName);
}

@@ -218,3 +218,3 @@ function makeNamedType(node, baseName, nameHint, ctx) {

function annotationToComment(node, ctx) {
const comment = annotation_1.stringifyAnnotations(node, ctx);
const comment = (0, annotation_1.stringifyAnnotations)(node, ctx);
if (!comment)

@@ -221,0 +221,0 @@ return undefined;

@@ -10,3 +10,3 @@ "use strict";

function getGraphqlAst(source) {
return graphql_1.parse(source);
return (0, graphql_1.parse)(source);
}

@@ -23,5 +23,5 @@ exports.getGraphqlAst = getGraphqlAst;

if (err instanceof graphql_1.GraphQLError)
core_types_1.throwRelatedError(err, {
(0, core_types_1.throwRelatedError)(err, {
source,
loc: utils_1.gqlLocationsToCoreTypesLocation(source, (_a = err.locations) !== null && _a !== void 0 ? _a : [])
loc: (0, utils_1.gqlLocationsToCoreTypesLocation)(source, (_a = err.locations) !== null && _a !== void 0 ? _a : [])
});

@@ -110,3 +110,3 @@ throw err;

return {
...annotation_1.parseDescription(type.description),
...(0, annotation_1.parseDescription)(type.description),
...(type.loc ? { loc: type.loc } : {}),

@@ -122,3 +122,3 @@ };

type: 'array',
elementType: gql_utils_1.isRequired(field.type)
elementType: (0, gql_utils_1.isRequired)(field.type)
? parseFieldType(field.type.type)

@@ -142,6 +142,6 @@ : {

node: {
...parseFieldType(gql_utils_1.gqlStripRequired(field.type)),
...parseFieldType((0, gql_utils_1.gqlStripRequired)(field.type)),
...parseCommonFieldsWithoutName(field),
},
required: gql_utils_1.isRequired(field.type),
required: (0, gql_utils_1.isRequired)(field.type),
}

@@ -148,0 +148,0 @@ ];

@@ -6,8 +6,8 @@ "use strict";

function getBreakingChanges(from, to) {
return graphql_1.findBreakingChanges(graphql_1.buildSchema(from), graphql_1.buildSchema(to));
return (0, graphql_1.findBreakingChanges)((0, graphql_1.buildSchema)(from), (0, graphql_1.buildSchema)(to));
}
exports.getBreakingChanges = getBreakingChanges;
function getDangerousChanges(from, to) {
return graphql_1.findDangerousChanges(graphql_1.buildSchema(from), graphql_1.buildSchema(to));
return (0, graphql_1.findDangerousChanges)((0, graphql_1.buildSchema)(from), (0, graphql_1.buildSchema)(to));
}
exports.getDangerousChanges = getDangerousChanges;
{
"name": "core-types-graphql",
"version": "1.2.0",
"version": "1.3.0",
"description": "core-types ⬌ GraphQL conversion",

@@ -37,13 +37,13 @@ "author": "Gustaf Räntilä",

"dependencies": {
"core-types": "^1.2.0",
"core-types": "^1.8.2",
"graphql": "^15.5.0"
},
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/jest": "^27.0.1",
"cz-conventional-changelog": "^3.3.0",
"jest": "^26.4.2",
"jest": "^27.1.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.1",
"ts-node": "^9.1.1",
"typescript": "^4.1.5"
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.4.3"
},

@@ -50,0 +50,0 @@ "config": {

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