@mo36924/graphql-plugin 5.4.10 → 5.4.20

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs CHANGED
@@ -1,11 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var graphql$1 = require('@mo36924/graphql');
4
- var graphql$2 = require('graphql');
5
- var graphqlLanguageService = require('graphql-language-service');
6
- var packages_graphqlPlugin_dist_volar = require('./volar.cjs');
7
- require('@volar/typescript/lib/quickstart/createLanguageServicePlugin');
8
- require('typescript');
3
+ const graphql$1 = require('@mo36924/graphql');
4
+ const index_js = require('graphql/index.js');
5
+ const graphqlLanguageService = require('graphql-language-service');
6
+ const packages_graphqlPlugin_dist_volar = require('./volar.cjs');
9
7
 
10
8
  const graphql = ({ typescript: ts })=>{
11
9
  const isQueryTag = (node)=>ts.isTaggedTemplateExpression(node) && ts.isIdentifier(node.tag) && node.tag.escapedText === "gql";
@@ -198,7 +196,7 @@ const graphql = ({ typescript: ts })=>{
198
196
  });
199
197
  }
200
198
  } catch (error) {
201
- if (error instanceof graphql$2.GraphQLError) {
199
+ if (error instanceof index_js.GraphQLError) {
202
200
  diagnostics.push({
203
201
  category: ts.DiagnosticCategory.Error,
204
202
  code: 9999,
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import { getSchema } from '@mo36924/graphql';
2
- import { GraphQLError } from 'graphql';
2
+ import { GraphQLError } from 'graphql/index.mjs';
3
3
  import { getDiagnostics, DIAGNOSTIC_SEVERITY, Position, getAutocompleteSuggestions, CompletionItemKind, getTokenAtPosition, getHoverInformation } from 'graphql-language-service';
4
4
  import { volar } from './volar.js';
5
- import '@volar/typescript/lib/quickstart/createLanguageServicePlugin';
6
- import 'typescript';
7
5
 
8
6
  const graphql = ({ typescript: ts })=>{
9
7
  const isQueryTag = (node)=>ts.isTaggedTemplateExpression(node) && ts.isIdentifier(node.tag) && node.tag.escapedText === "gql";
package/dist/volar.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var graphql = require('@mo36924/graphql');
4
- var createLanguageServicePlugin = require('@volar/typescript/lib/quickstart/createLanguageServicePlugin');
5
- var ts = require('typescript');
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const graphql = require('@mo36924/graphql');
6
+ const createLanguageServicePlugin_js = require('@volar/typescript/lib/quickstart/createLanguageServicePlugin.js');
7
+ const ts = require('typescript');
6
8
 
7
9
  /// <reference types="@volar/typescript" />
8
10
  const tag = "gql";
@@ -117,7 +119,7 @@ const getLanguagePlugin = (cwd)=>{
117
119
  sourceFile = virtualCode.source.sourceFile.update(text, change);
118
120
  }
119
121
  }
120
- sourceFile ?? (sourceFile = ts.createSourceFile(scriptId, text, 99));
122
+ sourceFile ??= ts.createSourceFile(scriptId, text, 99);
121
123
  const result = transform(sourceFile);
122
124
  return {
123
125
  ...virtualCode,
@@ -142,7 +144,7 @@ const getLanguagePlugin = (cwd)=>{
142
144
  };
143
145
  return languagePlugin;
144
146
  };
145
- const volar = createLanguageServicePlugin.createLanguageServicePlugin((_ts, info)=>({
147
+ const volar = createLanguageServicePlugin_js.createLanguageServicePlugin((_ts, info)=>({
146
148
  languagePlugins: [
147
149
  getLanguagePlugin(info.project.getCurrentDirectory())
148
150
  ]
package/dist/volar.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getSchema, getGqlTypeArguments } from '@mo36924/graphql';
2
- import { createLanguageServicePlugin } from '@volar/typescript/lib/quickstart/createLanguageServicePlugin';
2
+ import { createLanguageServicePlugin } from '@volar/typescript/lib/quickstart/createLanguageServicePlugin.js';
3
3
  import ts from 'typescript';
4
4
 
5
5
  /// <reference types="@volar/typescript" />
@@ -115,7 +115,7 @@ const getLanguagePlugin = (cwd)=>{
115
115
  sourceFile = virtualCode.source.sourceFile.update(text, change);
116
116
  }
117
117
  }
118
- sourceFile ?? (sourceFile = ts.createSourceFile(scriptId, text, 99));
118
+ sourceFile ??= ts.createSourceFile(scriptId, text, 99);
119
119
  const result = transform(sourceFile);
120
120
  return {
121
121
  ...virtualCode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mo36924/graphql-plugin",
3
3
  "type": "module",
4
- "version": "5.4.10",
4
+ "version": "5.4.20",
5
5
  "description": "graphql-plugin",
6
6
  "author": "mo36924",
7
7
  "license": "MIT",
@@ -47,12 +47,12 @@
47
47
  "dist"
48
48
  ],
49
49
  "dependencies": {
50
- "@mo36924/graphql": "^5.4.10",
50
+ "@mo36924/graphql": "^5.4.20",
51
51
  "@volar/typescript": "^2.4.10",
52
52
  "graphql": "^16.9.0",
53
53
  "graphql-language-service": "^5.3.0",
54
54
  "typescript": "^5.6.3",
55
55
  "vscode-languageserver-types": "^3.17.5"
56
56
  },
57
- "gitHead": "ef007f9dc1d2487feb46a64e15e3dcddfb02a74b"
57
+ "gitHead": "3e00e3d8836733f58894bcb6b52d625bff2b5ab6"
58
58
  }