Socket
Socket
Sign inDemoInstall

graphql-language-service

Package Overview
Dependencies
Maintainers
14
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-language-service - npm Package Compare versions

Comparing version 5.2.0-canary-f5992ff0.0 to 6.0.0-canary-351ba549.0

3

esm/interface/autocompleteUtils.js

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

import { isCompositeType, } from 'graphql';
import { SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, } from 'graphql/type/introspection';
import { isCompositeType, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, } from 'graphql';
export function getDefinitionState(tokenState) {

@@ -4,0 +3,0 @@ let definitionState;

@@ -591,9 +591,10 @@ import { isInterfaceType, GraphQLInterfaceType, GraphQLObjectType, Kind, DirectiveLocation, isListType, isNonNullType, isScalarType, isObjectType, isUnionType, isEnumType, isInputObjectType, isOutputType, GraphQLBoolean, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, assertAbstractType, doTypesOverlap, getNamedType, getNullableType, isAbstractType, isCompositeType, isInputType, visit, BREAK, parse, } from 'graphql';

const token = runOnlineParser(queryText, (stream, state, style, index) => {
if (index === cursor.line &&
stream.getCurrentPosition() + offset >= cursor.character + 1) {
styleAtCursor = style;
stateAtCursor = Object.assign({}, state);
stringAtCursor = stream.current();
return 'BREAK';
if (index !== cursor.line ||
stream.getCurrentPosition() + offset < cursor.character + 1) {
return;
}
styleAtCursor = style;
stateAtCursor = Object.assign({}, state);
stringAtCursor = stream.current();
return 'BREAK';
});

@@ -600,0 +601,0 @@ return {

@@ -51,3 +51,3 @@ import { Kind, parse, visit, } from 'graphql';

return {
Field: (node) => {
Field(node) {
const tokenizedText = node.alias

@@ -99,6 +99,6 @@ ? [buildToken('plain', node.alias), buildToken('plain', ': ')]

] }, meta(node))),
InputValueDefinition: (node) => {
InputValueDefinition(node) {
return Object.assign({ tokenizedText: [buildToken('plain', node.name)] }, meta(node));
},
FieldDefinition: (node) => {
FieldDefinition(node) {
return Object.assign({ tokenizedText: [buildToken('plain', node.name)] }, meta(node));

@@ -105,0 +105,0 @@ },

export default class CharacterStream {
constructor(sourceText) {
this._start = 0;
this._pos = 0;
this.getStartOfToken = () => this._start;

@@ -94,4 +96,2 @@ this.getCurrentPosition = () => this._pos;

this.current = () => this._sourceText.slice(this._start, this._pos);
this._start = 0;
this._pos = 0;
this._sourceText = sourceText;

@@ -98,0 +98,0 @@ }

import type { Diagnostic as DiagnosticType, CompletionItem as CompletionItemType } from 'vscode-languageserver-types';
export { InsertTextFormat } from 'vscode-languageserver-types';
import type { ASTNode, GraphQLSchema } from 'graphql';
import type { DocumentNode, FragmentDefinitionNode, NamedTypeNode, TypeDefinitionNode, NameNode } from 'graphql/language';
import type { GraphQLArgument, GraphQLEnumValue, GraphQLField, GraphQLInputFieldMap, GraphQLInterfaceType, GraphQLObjectType, GraphQLType } from 'graphql/type/definition';
import type { GraphQLDirective } from 'graphql/type/directives';
import type { ASTNode, GraphQLSchema, DocumentNode, FragmentDefinitionNode, NamedTypeNode, TypeDefinitionNode, NameNode, GraphQLArgument, GraphQLEnumValue, GraphQLField, GraphQLInputFieldMap, GraphQLInterfaceType, GraphQLObjectType, GraphQLType, GraphQLDirective } from 'graphql';
export declare type Maybe<T> = T | null | undefined;

@@ -8,0 +5,0 @@ import type { GraphQLConfig, GraphQLProjectConfig, GraphQLExtensionDeclaration } from 'graphql-config';

@@ -1,5 +0,5 @@

import { ASTNode } from 'graphql/language';
import { IPosition as TPosition } from '../types';
import { ASTNode } from 'graphql';
export declare function getASTNodeAtPosition(query: string, ast: ASTNode, point: TPosition): ASTNode | undefined;
export declare function pointToOffset(text: string, point: TPosition): number;
//# sourceMappingURL=getASTNodeAtPosition.d.ts.map

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

import { Location } from 'graphql/language';
import { Location } from 'graphql';
import { IRange, IPosition } from '../types';

@@ -3,0 +3,0 @@ export declare class Range implements IRange {

{
"name": "graphql-language-service",
"version": "5.2.0-canary-f5992ff0.0",
"version": "6.0.0-canary-351ba549.0",
"description": "The official, runtime independent Language Service for GraphQL",

@@ -28,5 +28,4 @@ "contributors": [

],
"main": "dist/index.js",
"module": "esm/index.js",
"types": "dist/index.d.ts",
"types": "esm/index.d.ts",
"bin": {

@@ -33,0 +32,0 @@ "graphql": "./dist/temp-bin.js"

@@ -15,10 +15,7 @@ /**

isCompositeType,
} from 'graphql';
import {
SchemaMetaFieldDef,
TypeMetaFieldDef,
TypeNameMetaFieldDef,
} from 'graphql/type/introspection';
} from 'graphql';
import { CompletionItemBase, AllTypeInfo } from '../types';
import { ContextTokenUnion, State } from '../parser';

@@ -25,0 +22,0 @@

@@ -973,10 +973,11 @@ /**

if (
index === cursor.line &&
stream.getCurrentPosition() + offset >= cursor.character + 1
index !== cursor.line ||
stream.getCurrentPosition() + offset < cursor.character + 1
) {
styleAtCursor = style;
stateAtCursor = { ...state };
stringAtCursor = stream.current();
return 'BREAK';
return;
}
styleAtCursor = style;
stateAtCursor = { ...state };
stringAtCursor = stream.current();
return 'BREAK';
});

@@ -983,0 +984,0 @@

@@ -121,3 +121,3 @@ /**

return {
Field: (node: FieldNode) => {
Field(node: FieldNode) {
const tokenizedText = node.alias

@@ -195,3 +195,3 @@ ? [buildToken('plain', node.alias), buildToken('plain', ': ')]

}),
InputValueDefinition: (node: InputValueDefinitionNode) => {
InputValueDefinition(node: InputValueDefinitionNode) {
return {

@@ -202,3 +202,3 @@ tokenizedText: [buildToken('plain', node.name)],

},
FieldDefinition: (node: FieldDefinitionNode) => {
FieldDefinition(node: FieldDefinitionNode) {
return {

@@ -209,3 +209,2 @@ tokenizedText: [buildToken('plain', node.name)],

},
InlineFragment: (node: InlineFragmentNode) => node.selectionSet,

@@ -212,0 +211,0 @@ };

@@ -23,9 +23,7 @@ /**

export default class CharacterStream implements CharacterStreamInterface {
private _start: number;
private _pos: number;
private _start = 0;
private _pos = 0;
private _sourceText: string;
constructor(sourceText: string) {
this._start = 0;
this._pos = 0;
this._sourceText = sourceText;

@@ -32,0 +30,0 @@ }

@@ -16,5 +16,5 @@ /**

import type { ASTNode, GraphQLSchema } from 'graphql';
import type {
ASTNode,
GraphQLSchema,
DocumentNode,

@@ -25,5 +25,2 @@ FragmentDefinitionNode,

NameNode,
} from 'graphql/language';
import type {
GraphQLArgument,

@@ -36,4 +33,4 @@ GraphQLEnumValue,

GraphQLType,
} from 'graphql/type/definition';
import type { GraphQLDirective } from 'graphql/type/directives';
GraphQLDirective,
} from 'graphql';

@@ -40,0 +37,0 @@ export type Maybe<T> = T | null | undefined;

@@ -10,3 +10,3 @@ /**

import { Location } from 'graphql/language';
import { Location } from 'graphql';
import { Range, Position, offsetToPosition, locToRange } from '../Range';

@@ -13,0 +13,0 @@

@@ -10,6 +10,4 @@ /**

import { ASTNode } from 'graphql/language';
import { IPosition as TPosition } from '../types';
import { visit } from 'graphql';
import { ASTNode, visit } from 'graphql';

@@ -16,0 +14,0 @@ export function getASTNodeAtPosition(

@@ -10,3 +10,3 @@ /**

import { Location } from 'graphql/language';
import { Location } from 'graphql';
import { IRange, IPosition } from '../types';

@@ -13,0 +13,0 @@

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

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

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