From 27cd18562b64dfe18e6343b6a49f3f606af89d86 Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Sat, 8 Aug 2020 12:42:17 -0400 Subject: [PATCH] feat: graphql-config@3 support in lsp server (#1616) - adopt `documents` instead of `includes`, and other `graphql-config@3` features - pre-cache schema on load and on `getDefinition` - load schema from `project.getSchema()` by default or from individual files with config - pre-cache all files in `documents` on initialization, which can be optionally disabled. --- .../graphql-language-service-cli/src/cli.ts | 3 +- .../package.json | 2 +- .../src/GraphQLCache.ts | 61 +-- .../src/Logger.ts | 4 +- .../src/MessageProcessor.ts | 293 ++++++++++-- .../src/__tests__/.graphqlrc.yml | 18 +- .../src/__tests__/GraphQLCache-test.ts | 38 +- .../src/__tests__/MessageProcessor-test.ts | 46 +- .../src/startServer.ts | 67 +-- yarn.lock | 422 +++++++++--------- 10 files changed, 626 insertions(+), 328 deletions(-) diff --git a/packages/graphql-language-service-cli/src/cli.ts b/packages/graphql-language-service-cli/src/cli.ts index dbb14569111..f522eaa773f 100644 --- a/packages/graphql-language-service-cli/src/cli.ts +++ b/packages/graphql-language-service-cli/src/cli.ts @@ -11,6 +11,7 @@ import yargs from 'yargs'; import client from './client'; import { Logger, startServer } from 'graphql-language-service-server'; +import { tmpdir } from 'os'; const { argv } = yargs .usage( @@ -128,7 +129,7 @@ switch (command) { try { startServer(options); } catch (error) { - const logger = new Logger(); + const logger = new Logger(tmpdir()); logger.error(error); } break; diff --git a/packages/graphql-language-service-server/package.json b/packages/graphql-language-service-server/package.json index b8146ad6158..53ce5e2e5dc 100644 --- a/packages/graphql-language-service-server/package.json +++ b/packages/graphql-language-service-server/package.json @@ -31,7 +31,7 @@ "dependencies": { "@babel/parser": "^7.9.0", "glob": "^7.1.2", - "graphql-config": "^3.0.2", + "graphql-config": "^3.0.3", "graphql-language-service": "^3.0.1", "graphql-language-service-utils": "^2.4.1", "nullthrows": "^1.0.0", diff --git a/packages/graphql-language-service-server/src/GraphQLCache.ts b/packages/graphql-language-service-server/src/GraphQLCache.ts index 5f9bf5f05f3..9c4c5e43955 100644 --- a/packages/graphql-language-service-server/src/GraphQLCache.ts +++ b/packages/graphql-language-service-server/src/GraphQLCache.ts @@ -30,6 +30,7 @@ import { import { parseDocument } from './parseDocument'; import stringToHash from './stringToHash'; import glob from 'glob'; +import { GraphQLExtensionDeclaration } from 'graphql-config/extension'; // Maximum files to read when processing GraphQL files. const MAX_READS = 200; @@ -55,17 +56,23 @@ const { export async function getGraphQLCache( configDir: Uri, parser: typeof parseDocument, - extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>, + extensions: GraphQLExtensionDeclaration[] = [], config?: GraphQLConfig, + fileExtensions: string[] = [], + // loadConfigOptions?: Parameters, ): Promise { - let graphQLConfig = - config ?? ((await loadConfig({ rootDir: configDir })) as GraphQLConfig); - if (extensions && extensions.length > 0) { - for await (const extension of extensions) { - graphQLConfig = await extension(graphQLConfig); - } - } - return new GraphQLCache(configDir, graphQLConfig, parser); + const graphQLConfig = + config ?? + (await loadConfig({ + rootDir: configDir, + extensions, + })); + return new GraphQLCache( + configDir, + graphQLConfig as GraphQLConfig, + parser, + fileExtensions, + ); } export class GraphQLCache implements GraphQLCacheInterface { @@ -77,11 +84,13 @@ export class GraphQLCache implements GraphQLCacheInterface { _fragmentDefinitionsCache: Map>; _typeDefinitionsCache: Map>; _parser: typeof parseDocument; + _fileExtensions: string[]; constructor( configDir: Uri, graphQLConfig: GraphQLConfig, parser: typeof parseDocument, + fileExtensions: string[], ) { this._configDir = configDir; this._graphQLConfig = graphQLConfig; @@ -91,6 +100,7 @@ export class GraphQLCache implements GraphQLCacheInterface { this._typeDefinitionsCache = new Map(); this._typeExtensionMap = new Map(); this._parser = parser; + this._fileExtensions = fileExtensions; } getGraphQLConfig = (): GraphQLConfig => this._graphQLConfig; @@ -181,11 +191,7 @@ export class GraphQLCache implements GraphQLCacheInterface { const filesFromInputDirs = await this._readFilesFromInputDirs( rootDir, - projectConfig.include instanceof Array - ? projectConfig.include - : projectConfig.include - ? [projectConfig.include] - : [], + projectConfig.documents, ); const list = filesFromInputDirs.filter(fileInfo => projectConfig.match(fileInfo.filePath), @@ -296,11 +302,7 @@ export class GraphQLCache implements GraphQLCacheInterface { } const filesFromInputDirs = await this._readFilesFromInputDirs( rootDir, - projectConfig.include instanceof Array - ? projectConfig.include - : projectConfig.include - ? [projectConfig.include] - : [], + projectConfig.documents, ); const list = filesFromInputDirs.filter(fileInfo => projectConfig.match(fileInfo.filePath), @@ -317,21 +319,24 @@ export class GraphQLCache implements GraphQLCacheInterface { _readFilesFromInputDirs = ( rootDir: string, - includes: string[], + documents: GraphQLProjectConfig['documents'], ): Promise> => { let pattern: string; - if (includes.length === 0) { + if (!documents || documents.length === 0) { return Promise.resolve([]); } // See https://github.com/graphql/graphql-language-service/issues/221 // for details on why special handling is required here for the - // includes.length === 1 case. - if (includes.length === 1) { - pattern = includes[0]; + // documents.length === 1 case. + if (typeof documents === 'string') { + pattern = documents; + } else if (documents.length === 1) { + // @ts-ignore + pattern = documents[0]; } else { - pattern = `{${includes.join(',')}}`; + pattern = `{${documents.join(',')}}`; } return new Promise((resolve, reject) => { @@ -368,9 +373,7 @@ export class GraphQLCache implements GraphQLCacheInterface { // so we have to force this here // becase glob's DefinatelyTyped doesn't use fs.Stats here though // the docs indicate that is what's there :shrug: - const cacheEntry: fs.Stats = globResult.statCache[ - filePath - ] as fs.Stats; + const cacheEntry = globResult.statCache[filePath] as fs.Stats; return { filePath, mtime: Math.trunc(cacheEntry.mtime.getTime() / 1000), @@ -804,7 +807,7 @@ export class GraphQLCache implements GraphQLCacheInterface { let queries: CachedContent[] = []; if (content.trim().length !== 0) { try { - queries = this._parser(content, filePath); + queries = this._parser(content, filePath, this._fileExtensions); if (queries.length === 0) { // still resolve with an empty ast resolve({ diff --git a/packages/graphql-language-service-server/src/Logger.ts b/packages/graphql-language-service-server/src/Logger.ts index 4f122ab33ed..f5f1acd41c7 100644 --- a/packages/graphql-language-service-server/src/Logger.ts +++ b/packages/graphql-language-service-server/src/Logger.ts @@ -22,8 +22,8 @@ export class Logger implements VSCodeLogger { _logFilePath: string; _stream: fs.WriteStream | null; - constructor() { - const dir = join(os.tmpdir(), 'graphql-language-service-logs'); + constructor(tmpDir?: string) { + const dir = join(tmpDir || os.tmpdir(), 'graphql-language-service-logs'); try { if (!fs.existsSync(dir)) { fs.mkdirSync(dir); diff --git a/packages/graphql-language-service-server/src/MessageProcessor.ts b/packages/graphql-language-service-server/src/MessageProcessor.ts index a8891bab033..48f7445badd 100644 --- a/packages/graphql-language-service-server/src/MessageProcessor.ts +++ b/packages/graphql-language-service-server/src/MessageProcessor.ts @@ -6,16 +6,16 @@ * LICENSE file in the root directory of this source tree. * */ - -import { readFileSync } from 'fs'; +import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs'; import { URL } from 'url'; - -import type { +import * as path from 'path'; +import { CachedContent, GraphQLCache, Uri, DefinitionQueryResult, GraphQLConfig, + GraphQLProjectConfig, } from 'graphql-language-service'; import { @@ -25,7 +25,7 @@ import { import { Range, Position } from 'graphql-language-service-utils'; -import { +import type { CompletionParams, FileEvent, VersionedTextDocumentIdentifier, @@ -33,7 +33,7 @@ import { DidOpenTextDocumentParams, } from 'vscode-languageserver-protocol'; -import { +import type { Diagnostic, CompletionItem, CompletionList, @@ -50,12 +50,18 @@ import { TextDocumentPositionParams, DocumentSymbolParams, SymbolInformation, + WorkspaceSymbolParams, } from 'vscode-languageserver'; +import type { UnnormalizedTypeDefPointer } from '@graphql-tools/load'; + import { getGraphQLCache } from './GraphQLCache'; import { parseDocument } from './parseDocument'; import { Logger } from './Logger'; +import { printSchema } from 'graphql'; +import { tmpdir } from 'os'; +import { loadConfig, GraphQLExtensionDeclaration } from 'graphql-config'; type CachedDocumentType = { version: number; @@ -70,16 +76,22 @@ export class MessageProcessor { _isInitialized: boolean; _willShutdown: boolean; _logger: Logger; - _extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>; + _extensions?: GraphQLExtensionDeclaration[]; _fileExtensions?: Array; _parser: typeof parseDocument; + _tmpDir: string; + _tmpUriBase: string; + _tmpDirBase: string; + _loadConfigOptions?: Parameters; constructor( logger: Logger, - extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>, + extensions?: GraphQLExtensionDeclaration[], config?: GraphQLConfig, parser?: typeof parseDocument, fileExtensions?: string[], + tmpDir?: string, + loadConfigOptions?: Parameters, ) { this._textDocumentCache = new Map(); this._isInitialized = false; @@ -89,6 +101,15 @@ export class MessageProcessor { this._fileExtensions = fileExtensions; this._graphQLConfig = config; this._parser = parser ?? parseDocument; + this._tmpDir = tmpDir || tmpdir(); + this._tmpDirBase = path.join(this._tmpDir, 'graphql-language-service'); + this._tmpUriBase = path.join('file://', this._tmpDirBase); + if (loadConfigOptions) { + this._loadConfigOptions = loadConfigOptions; + } + if (!existsSync(this._tmpDirBase)) { + mkdirSync(this._tmpDirBase); + } } async handleInitializeRequest( @@ -120,12 +141,13 @@ export class MessageProcessor { '`--configDir` option or `rootPath` argument is required.', ); } - this._graphQLCache = await getGraphQLCache( rootPath, this._parser, this._extensions, this._graphQLConfig, + this._fileExtensions, + // this._loadConfigOptions, ); this._languageService = new GraphQLLanguageService(this._graphQLCache); @@ -141,6 +163,8 @@ export class MessageProcessor { messageType: 'initialize', }), ); + const config = this._graphQLCache.getGraphQLConfig(); + await this._cacheAllProjectFiles(config); return serverCapabilities; } @@ -161,6 +185,7 @@ export class MessageProcessor { const diagnostics: Diagnostic[] = []; let contents: CachedContent[] = []; + // Create/modify the cached entry if text is provided. // Otherwise, try searching the cache to perform diagnostics. if ('text' in textDocument && textDocument.text) { @@ -168,7 +193,7 @@ export class MessageProcessor { // Only run the below function if text is passed in. contents = this._parser(textDocument.text, uri, this._fileExtensions); - this._invalidateCache(textDocument, uri, contents); + await this._invalidateCache(textDocument, uri, contents); } else { const cachedDocument = this._getCachedDocument(textDocument.uri); if (cachedDocument) { @@ -242,15 +267,15 @@ export class MessageProcessor { this._fileExtensions, ); // If it's a .graphql file, proceed normally and invalidate the cache. - this._invalidateCache(textDocument, uri, contents); + await this._invalidateCache(textDocument, uri, contents); const cachedDocument = this._getCachedDocument(uri); if (!cachedDocument) { return null; } - this._updateFragmentDefinition(uri, contents); - this._updateObjectTypeDefinition(uri, contents); + await this._updateFragmentDefinition(uri, contents); + await this._updateObjectTypeDefinition(uri, contents); // Send the diagnostics onChange as well const diagnostics: Diagnostic[] = []; @@ -457,8 +482,8 @@ export class MessageProcessor { const text: string = readFileSync(new URL(uri).pathname).toString(); const contents = this._parser(text, uri, this._fileExtensions); - this._updateFragmentDefinition(uri, contents); - this._updateObjectTypeDefinition(uri, contents); + await this._updateFragmentDefinition(uri, contents); + await this._updateObjectTypeDefinition(uri, contents); const diagnostics = ( await Promise.all( @@ -519,7 +544,12 @@ export class MessageProcessor { } const textDocument = params.textDocument; const position = params.position; - + const project = this._graphQLCache + .getGraphQLConfig() + .getProjectForFile(textDocument.uri); + if (project) { + await this._cacheSchemaFilesForProject(project); + } const cachedDocument = this._getCachedDocument(textDocument.uri); if (!cachedDocument) { throw new Error(`${textDocument.uri} is not available.`); @@ -565,10 +595,6 @@ export class MessageProcessor { }) : []; - const project = this._graphQLCache - .getGraphQLConfig() - .getProjectForFile(textDocument.uri); - this._logger.log( JSON.stringify({ type: 'usage', @@ -623,6 +649,219 @@ export class MessageProcessor { // ); // } + async handleWorkspaceSymbolRequest( + params: WorkspaceSymbolParams, + ): Promise> { + // const config = await this._graphQLCache.getGraphQLConfig(); + // await this._cacheAllProjectFiles(config); + const documents = Array.from(this._textDocumentCache); + let symbols: SymbolInformation[] = []; + await Promise.all( + documents.map(async ([uri]) => { + const cachedDocument = this._getCachedDocument(uri); + if (!cachedDocument) { + throw new Error('A cached document cannot be found.'); + } + const docSymbols = await this._languageService.getDocumentSymbols( + cachedDocument.contents[0].query, + uri, + ); + symbols.push(...docSymbols); + }), + ); + if (params.query !== '') { + symbols = symbols.filter( + symbol => symbol?.name && symbol.name.includes(params.query), + ); + } + + return symbols; + } + + async _cacheSchemaText(uri: string, text: string, version: number) { + try { + const contents = this._parser(text, uri, this._fileExtensions); + if (contents.length > 0) { + await this._updateObjectTypeDefinition(uri, contents); + await this._invalidateCache({ version, uri }, uri, contents); + } + } catch (err) { + this._logger.error(err); + } + } + async _cacheSchemaFile( + uri: UnnormalizedTypeDefPointer, + project: GraphQLProjectConfig, + ) { + uri = uri.toString(); + + const isFileUri = existsSync(uri); + + let version = 1; + if (isFileUri) { + const schemaUri = 'file://' + path.join(project.dirpath, uri); + const schemaDocument = this._getCachedDocument(schemaUri); + + if (schemaDocument) { + version = schemaDocument.version++; + } + const schemaText = readFileSync(uri, { encoding: 'utf-8' }); + this._cacheSchemaText(schemaUri, schemaText, version); + } + } + _getTmpProjectPath( + project: GraphQLProjectConfig, + prependWithProtocol: boolean = true, + ) { + const baseDir = this._graphQLCache.getGraphQLConfig().dirpath; + const baseName = path.basename(baseDir); + const basePath = path.join(this._tmpDirBase, baseName); + if (!existsSync(basePath)) { + mkdirSync(basePath); + mkdirSync(path.join(basePath, 'projects')); + } + const projectTmpPath = path.resolve( + path.join(basePath, 'projects', project.name), + ); + if (!existsSync(projectTmpPath)) { + mkdirSync(projectTmpPath); + } + return prependWithProtocol ? 'file://' + projectTmpPath : projectTmpPath; + } + async _cacheSchemaFilesForProject(project: GraphQLProjectConfig) { + const schema = project?.schema; + const config = project?.extensions?.vscode; + /** + * By default, let's only cache the full graphql config schema. + * This allows us to rely on graphql-config's schema building features + * And our own cache implementations + * This prefers schema instead of SDL first schema development, but will still + * work with lookup of the actual .graphql schema files if the option is enabled, + * however results may vary. + * + * The default temporary schema file seems preferrable until we have graphql source maps + */ + const cacheSchemaFiles = config?.cacheSchemaFiles || false; + const cacheConfigSchema = config?.cacheConfigSchema || true; + + if (cacheConfigSchema) { + await this._cacheConfigSchema(project); + } + if (cacheSchemaFiles && schema) { + if (Array.isArray(schema)) { + Promise.all( + schema.map(async (uri: UnnormalizedTypeDefPointer) => { + await this._cacheSchemaFile(uri, project); + }), + ); + } else { + const uri = schema.toString(); + await this._cacheSchemaFile(uri, project); + } + } + } + /** + * Cache the schema as represented by graphql-config, with extensions + * from GraphQLCache.getSchema() + * @param project {GraphQLProjectConfig} + */ + async _cacheConfigSchema(project: GraphQLProjectConfig) { + try { + const schema = await this._graphQLCache.getSchema(project.name); + if (schema) { + const schemaText = printSchema(schema, { + commentDescriptions: true, + }); + // file:// protocol path + const uri = path.join( + this._getTmpProjectPath(project), + 'schema.graphql', + ); + // no file:// protocol for fs.writeFileSync() + const fsPath = path.join( + this._getTmpProjectPath(project, false), + 'schema.graphql', + ); + + const cachedSchemaDoc = this._getCachedDocument(uri); + + if (!cachedSchemaDoc) { + writeFileSync(fsPath, schemaText, { + encoding: 'utf-8', + }); + await this._cacheSchemaText(uri, schemaText, 1); + } + // do we have a change in the getSchema result? if so, update schema cache + if ( + cachedSchemaDoc && + schemaText !== cachedSchemaDoc.contents[0].query + ) { + writeFileSync(fsPath, schemaText, { + encoding: 'utf-8', + }); + await this._cacheSchemaText( + uri, + schemaText, + cachedSchemaDoc.version++, + ); + } + } + } catch (err) { + this._logger.error(err); + } + } + /** + * Pre-cache all documents for a project. + * + * TODO: Maybe make this optional, where only schema needs to be pre-cached. + * + * @param project {GraphQLProjectConfig} + */ + async _cacheDocumentFilesforProject(project: GraphQLProjectConfig) { + try { + const documents = await project.getDocuments(); + return Promise.all( + documents.map(async document => { + if (!document.location || !document.rawSDL) { + return; + } + // build full system URI path with protocol + const uri = 'file://' + path.join(project.dirpath, document.location); + // i would use the already existing graphql-config AST, but there are a few reasons we can't yet + const contents = this._parser( + document.rawSDL, + uri, + this._fileExtensions, + ); + + await this._updateObjectTypeDefinition(uri, contents); + await this._updateFragmentDefinition(uri, contents); + await this._invalidateCache({ version: 1, uri }, uri, contents); + }), + ); + } catch (err) { + this._logger.error( + `invalid/unknown file in graphql config documents entry:\n '${project.documents}'`, + ); + this._logger.error(err); + } + } + /** + * This should only be run on initialize() really. + * Cacheing all the document files upfront could be expensive. + * @param config {GraphQLConfig} + */ + async _cacheAllProjectFiles(config: GraphQLConfig) { + if (config?.projects) { + return Promise.all( + Object.keys(config.projects).map(async projectName => { + const project = await config.getProject(projectName); + await this._cacheSchemaFilesForProject(project); + await this._cacheDocumentFilesforProject(project); + }), + ); + } + } _isRelayCompatMode(query: string): boolean { return ( query.indexOf('RelayCompat') !== -1 || @@ -666,31 +905,33 @@ export class MessageProcessor { return null; } - _invalidateCache( + async _invalidateCache( textDocument: VersionedTextDocumentIdentifier, uri: Uri, contents: CachedContent[], - ): void { + ): Promise | null> { if (this._textDocumentCache.has(uri)) { const cachedDocument = this._textDocumentCache.get(uri); if ( cachedDocument && - textDocument.version && + textDocument && + textDocument?.version && cachedDocument.version < textDocument.version ) { // Current server capabilities specify the full sync of the contents. // Therefore always overwrite the entire content. - this._textDocumentCache.set(uri, { + return this._textDocumentCache.set(uri, { version: textDocument.version, contents, }); } - } else if (textDocument.version) { - this._textDocumentCache.set(uri, { + } else if (textDocument?.version) { + return this._textDocumentCache.set(uri, { version: textDocument.version, contents, }); } + return null; } } diff --git a/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml b/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml index 65f03980405..e2ea194812e 100644 --- a/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml +++ b/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml @@ -1,8 +1,8 @@ projects: testWithSchema: - schema: - - __schema__/StarWarsSchema.graphql - - "directive @customDirective on FRAGMENT_SPREAD" + schema: + - __schema__/StarWarsSchema.graphql + - 'directive @customDirective on FRAGMENT_SPREAD' testWithEndpoint: schema: https://example.com/graphql testWithEndpointAndSchema: @@ -10,21 +10,21 @@ projects: - __schema__/StarWarsSchema.graphql - https://example.com/graphql testWithoutSchema: - schema: "" + schema: '' testWithCustomDirectives: - schema: + schema: - __schema__/StarWarsSchema.graphql - - "directive @customDirective on FIELD" + - 'directive @customDirective on FIELD' testSingularIncludesGlob: schema: __schema__/StarWarsSchema.graphql - include: __queries__/*.graphql + documents: __queries__/*.graphql testMultipleIncludes: schema: __schema__/StarWarsSchema.graphql - include: + documents: - __queries__/*.graphql - __fragments__/*.graphql testNoIncludes: schema: __schema__/StarWarsSchema.graphql testBadIncludes: schema: __schema__/StarWarsSchema.graphql - include: nope.nopeql + documents: nope.nopeql diff --git a/packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts b/packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts index 8143fca907e..f831064be0d 100644 --- a/packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts +++ b/packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts @@ -12,7 +12,7 @@ jest.mock('cross-fetch', () => ({ })); import { GraphQLSchema } from 'graphql/type'; import { parse } from 'graphql/language'; -import { loadConfig } from 'graphql-config'; +import { loadConfig, GraphQLExtensionDeclaration } from 'graphql-config'; import fetchMock from 'fetch-mock'; import { introspectionFromSchema, @@ -29,14 +29,26 @@ function wihtoutASTNode(definition: any) { return result; } +const fileExtensions = ['js', 'ts', 'graphql']; + describe('GraphQLCache', () => { const configDir = __dirname; let graphQLRC; - let cache = new GraphQLCache(configDir, graphQLRC, parseDocument); + let cache = new GraphQLCache( + configDir, + graphQLRC, + parseDocument, + fileExtensions, + ); beforeEach(async () => { graphQLRC = await loadConfig({ rootDir: configDir }); - cache = new GraphQLCache(configDir, graphQLRC, parseDocument); + cache = new GraphQLCache( + configDir, + graphQLRC, + parseDocument, + fileExtensions, + ); }); afterEach(() => { @@ -45,10 +57,9 @@ describe('GraphQLCache', () => { describe('getGraphQLCache', () => { it('should apply extensions', async () => { - const extension = config => { + const extension: GraphQLExtensionDeclaration = config => { return { - ...config, - extension: 'extension-used', // Just adding a key to the config to demo extension usage + name: 'extension-used', // Just adding a key to the config to demo extension usage }; }; const extensions = [extension]; @@ -58,8 +69,11 @@ describe('GraphQLCache', () => { extensions, ); const config = cacheWithExtensions.getGraphQLConfig(); - expect('extension' in config).toBe(true); - expect((config as any).extension).toBe('extension-used'); + expect('extensions' in config).toBe(true); + expect(config.extensions.has('extension-used')).toBeTruthy(); + expect(config.extensions.get('extension-used')).toEqual({ + name: 'extension-used', + }); }); }); @@ -185,25 +199,25 @@ describe('GraphQLCache', () => { }); describe('getFragmentDefinitions', () => { - it('it caches fragments found through single glob in `includes`', async () => { + it('it caches fragments found through single glob in `documents`', async () => { const config = graphQLRC.getProject('testSingularIncludesGlob'); const fragmentDefinitions = await cache.getFragmentDefinitions(config); expect(fragmentDefinitions.get('testFragment')).not.toBeUndefined(); }); - it('it caches fragments found through multiple globs in `includes`', async () => { + it('it caches fragments found through multiple globs in `documents`', async () => { const config = graphQLRC.getProject('testMultipleIncludes'); const fragmentDefinitions = await cache.getFragmentDefinitions(config); expect(fragmentDefinitions.get('testFragment')).not.toBeUndefined(); }); - it('handles empty includes', async () => { + it('handles empty documents', async () => { const config = graphQLRC.getProject('testNoIncludes'); const fragmentDefinitions = await cache.getFragmentDefinitions(config); expect(fragmentDefinitions.get('testFragment')).toBeUndefined(); }); - it('handles non-existent includes', async () => { + it('handles non-existent documents', async () => { const config = graphQLRC.getProject('testBadIncludes'); const fragmentDefinitions = await cache.getFragmentDefinitions(config); expect(fragmentDefinitions.get('testFragment')).toBeUndefined(); diff --git a/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts b/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts index 06fbb22c53d..60b9bd95da6 100644 --- a/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts +++ b/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts @@ -6,6 +6,7 @@ * LICENSE file in the root directory of this source tree. * */ +import { tmpdir } from 'os'; import { SymbolKind } from 'vscode-languageserver'; import { Position, Range } from 'graphql-language-service-utils'; @@ -14,12 +15,22 @@ import { parseDocument } from '../parseDocument'; jest.mock('../Logger'); -import type { DefinitionQueryResult, Outline } from 'graphql-language-service'; +import { GraphQLCache } from '../GraphQLCache'; + +import { loadConfig } from 'graphql-config'; + +import type { + DefinitionQueryResult, + Outline, + GraphQLConfig, + GraphQLProjectConfig, +} from 'graphql-language-service'; import { Logger } from '../Logger'; +const baseConfig = { dirpath: __dirname }; describe('MessageProcessor', () => { - const logger = new Logger(); + const logger = new Logger(tmpdir()); const messageProcessor = new MessageProcessor(logger); const queryDir = `${__dirname}/__queries__`; @@ -30,24 +41,16 @@ describe('MessageProcessor', () => { } `; - beforeEach(() => { - messageProcessor._graphQLCache = { - // @ts-ignore - getGraphQLConfig() { - return { - dirpath: __dirname, - getProjectForFile() { - return null; - }, - }; - }, - // @ts-ignore - updateFragmentDefinition() {}, - // @ts-ignore - updateObjectTypeDefinition() {}, - // @ts-ignore - handleWatchmanSubscribeEvent() {}, - }; + beforeEach(async () => { + const gqlConfig = await loadConfig({ rootDir: __dirname, extensions: [] }); + // @ts-ignore + // loadConfig.mockRestore(); + messageProcessor._graphQLCache = new GraphQLCache( + __dirname, + gqlConfig, + parseDocument, + ['ts', 'js', 'graphql'], + ); messageProcessor._languageService = { // @ts-ignore getAutocompleteSuggestions: (query, position, uri) => { @@ -117,12 +120,13 @@ describe('MessageProcessor', () => { const { capabilities } = await messageProcessor.handleInitializeRequest( // @ts-ignore { - rootUri: __dirname, + rootPath: __dirname, }, null, __dirname, ); expect(capabilities.definitionProvider).toEqual(true); + expect(capabilities.workspaceSymbolProvider).toEqual(true); expect(capabilities.completionProvider.resolveProvider).toEqual(true); expect(capabilities.textDocumentSync).toEqual(1); }); diff --git a/packages/graphql-language-service-server/src/startServer.ts b/packages/graphql-language-service-server/src/startServer.ts index 325cae2deed..d0ba3d54467 100644 --- a/packages/graphql-language-service-server/src/startServer.ts +++ b/packages/graphql-language-service-server/src/startServer.ts @@ -6,10 +6,13 @@ * LICENSE file in the root directory of this source tree. * */ - import * as net from 'net'; import { MessageProcessor } from './MessageProcessor'; -import { GraphQLConfig } from 'graphql-config'; +import { + GraphQLConfig, + loadConfig, + GraphQLExtensionDeclaration, +} from 'graphql-config'; import { createMessageConnection, @@ -37,7 +40,8 @@ import { DidChangeWatchedFilesNotification, ShutdownRequest, DocumentSymbolRequest, - // WorkspaceSymbolRequest, + PublishDiagnosticsParams, + WorkspaceSymbolRequest, // ReferencesRequest, } from 'vscode-languageserver'; @@ -49,14 +53,17 @@ export type ServerOptions = { port?: number; // socket, streams, or node (ipc) method?: 'socket' | 'stream' | 'node'; - // the directory where graphql-config is found + // (deprecated: use loadConfigOptions.baseDir now) the directory where graphql-config is found configDir?: string; + loadConfigOptions?: Parameters; // array of functions to transform the graphql-config and add extensions dynamically - extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>; + extensions?: GraphQLExtensionDeclaration[]; + // allowed file extensions, used by the parser fileExtensions?: string[]; // pre-existing GraphQLConfig config?: GraphQLConfig; parser?: typeof parseDocument; + tmpDir?: string; }; /** @@ -68,7 +75,8 @@ export type ServerOptions = { export default async function startServer( options: ServerOptions, ): Promise { - const logger = new Logger(); + const logger = new Logger(options.tmpDir); + if (options && options.method) { let reader; let writer; @@ -152,6 +160,8 @@ function initializeHandlers({ options.config, options.parser, options.fileExtensions, + options.tmpDir, + options.loadConfigOptions, ); return connection; } catch (err) { @@ -161,14 +171,28 @@ function initializeHandlers({ } } +function reportDiagnostics( + diagnostics: PublishDiagnosticsParams | null, + connection: MessageConnection, +) { + if (diagnostics) { + connection.sendNotification( + PublishDiagnosticsNotification.type, + diagnostics, + ); + } +} + function addHandlers( connection: MessageConnection, logger: Logger, configDir?: string, - extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>, + extensions?: GraphQLExtensionDeclaration[], config?: GraphQLConfig, parser?: typeof parseDocument, fileExtensions?: string[], + tmpDir?: string, + loadConfigOptions?: Parameters, ): void { const messageProcessor = new MessageProcessor( logger, @@ -176,6 +200,8 @@ function addHandlers( config, parser, fileExtensions, + tmpDir, + loadConfigOptions, ); connection.onNotification( DidOpenTextDocumentNotification.type, @@ -183,12 +209,7 @@ function addHandlers( const diagnostics = await messageProcessor.handleDidOpenOrSaveNotification( params, ); - if (diagnostics) { - connection.sendNotification( - PublishDiagnosticsNotification.type, - diagnostics, - ); - } + reportDiagnostics(diagnostics, connection); }, ); connection.onNotification( @@ -197,12 +218,7 @@ function addHandlers( const diagnostics = await messageProcessor.handleDidOpenOrSaveNotification( params, ); - if (diagnostics) { - connection.sendNotification( - PublishDiagnosticsNotification.type, - diagnostics, - ); - } + reportDiagnostics(diagnostics, connection); }, ); connection.onNotification( @@ -211,12 +227,7 @@ function addHandlers( const diagnostics = await messageProcessor.handleDidChangeNotification( params, ); - if (diagnostics) { - connection.sendNotification( - PublishDiagnosticsNotification.type, - diagnostics, - ); - } + reportDiagnostics(diagnostics, connection); }, ); @@ -252,9 +263,9 @@ function addHandlers( connection.onRequest(DocumentSymbolRequest.type, params => messageProcessor.handleDocumentSymbolRequest(params), ); - // connection.onRequest(WorkspaceSymbolRequest.type, params => - // messageProcessor.handleWorkspaceSymbolRequest(params), - // ); + connection.onRequest(WorkspaceSymbolRequest.type, params => + messageProcessor.handleWorkspaceSymbolRequest(params), + ); // connection.onRequest(ReferencesRequest.type, params => // messageProcessor.handleReferencesRequest(params), // ); diff --git a/yarn.lock b/yarn.lock index 71406e1566e..afba8441ed9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@ardatan/aggregate-error@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@ardatan/aggregate-error/-/aggregate-error-0.0.1.tgz#1403ac5de10d8ca689fc1f65844c27179ae1d44f" + integrity sha512-UQ9BequOTIavs0pTHLMwQwKQF8tTV1oezY/H2O9chA+JNPFZSua55xpU5dPSjAU9/jLJ1VwU+HJuTVN8u7S6Fg== + "@babel/cli@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.4.tgz#505fb053721a98777b2b175323ea4f090b7d3c1c" @@ -1679,70 +1684,108 @@ unique-filename "^1.1.1" which "^1.3.1" -"@graphql-toolkit/common@0.10.7", "@graphql-toolkit/common@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/common/-/common-0.10.7.tgz#e5d4ddeae080c4f7357bc7d6a8d02e75578e9bd1" - integrity sha512-epcJvmIAo+vSEY76F0Dj1Ef6oeewT5pdMe1obHj7LHXN9V22O86aQzwdEEm1iG91qROqSw/apcDnSCMjuVeQVA== +"@graphql-tools/delegate@6.0.13": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-6.0.13.tgz#4dd62c086da5c8fae01bdb82358be2c6b233bba9" + integrity sha512-DoHzhQFQLSS0dw1afLz7h290INNSw3jmIU9CP+CTZ3Ikgfy+51abWjw5VDjgSvFOgnP0YbTR2r1Ett6JwUsryQ== dependencies: - aggregate-error "3.0.1" - camel-case "4.1.1" - graphql-tools "5.0.0" - lodash "4.17.15" + "@ardatan/aggregate-error" "0.0.1" + "@graphql-tools/schema" "6.0.13" + "@graphql-tools/utils" "6.0.13" + tslib "~2.0.0" -"@graphql-toolkit/core@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/core/-/core-0.10.7.tgz#e4d86d9e439fbb05b634054b0865c16d488fad97" - integrity sha512-LXcFLG7XcRJrPz/xD+0cExzLx/ptVynDM20650/FbmHbKOU50d9mSbcsrzAOq/3f4q3HrRDssvn0f6pPm0EHMg== +"@graphql-tools/graphql-file-loader@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-6.0.13.tgz#a99e8f48f9dcff1af80b1122f77e03e1baa5dfac" + integrity sha512-JDfvdHgNiA+psbtm4H0qX5yo2GMsKmD9y5Dl3x7LKBHUo4Ao+6XL740uhvUZ7BiHttXHeBs5xuOb5ILhTGA/JQ== dependencies: - "@graphql-toolkit/common" "0.10.7" - "@graphql-toolkit/schema-merging" "0.10.7" - aggregate-error "3.0.1" - globby "11.0.0" - import-from "^3.0.0" - is-glob "4.0.1" - lodash "4.17.15" - p-limit "2.3.0" + "@graphql-tools/import" "6.0.13" + "@graphql-tools/utils" "6.0.13" + fs-extra "9.0.1" + tslib "~2.0.0" + +"@graphql-tools/import@6.0.13": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.0.13.tgz#64b9aa2784f4195e517a2e6cd2205b142652ae30" + integrity sha512-fNh0zlqwhaVkc75vYefAvLODIfVJvWEWlBRUZRSzLfOOJem1cAxjv2PpYmhH5QEW3QXWlq73+Y58GNNvAzLOlQ== + dependencies: + fs-extra "9.0.1" resolve-from "5.0.0" - tslib "1.11.2" + +"@graphql-tools/json-file-loader@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-6.0.13.tgz#c278647eae1a3e251f0fd0d9908175d9bafca22b" + integrity sha512-HNYDokirz28YcSjFW0IR96jcKtaS6U0Bk4gSi3IH5DQ/xbFyao9ai9CGFA+pwewG3oGdTMpBOuTms3vZCgly1g== + dependencies: + "@graphql-tools/utils" "6.0.13" + fs-extra "9.0.1" + tslib "~2.0.0" + +"@graphql-tools/load@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-6.0.13.tgz#a63a70c1404a430caafd71adf0ad4ee80da6e7a2" + integrity sha512-MeatTqNWrpJVG7KWYBP6fyeORUtMueBBawmxlr7LKJtDQ9v+Zg1XfL18wvOzJjZlNejaYdp0A7gVYGH5dEkpcw== + dependencies: + "@graphql-tools/merge" "6.0.13" + "@graphql-tools/utils" "6.0.13" + globby "11.0.1" + import-from "3.0.0" + is-glob "4.0.1" + p-limit "3.0.2" + tslib "~2.0.0" unixify "1.0.0" valid-url "1.0.9" -"@graphql-toolkit/graphql-file-loader@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/graphql-file-loader/-/graphql-file-loader-0.10.7.tgz#496e49712def12449b339739d3583ed1bda7a24f" - integrity sha512-6tUIuw/YBlm0VyVgXgMrOXsEQ+WpXVgr2NQwHNzmZo82kPGqImveq7A2D3gBWLyVTcinDScRcKJMxM4kCF5T0A== - dependencies: - "@graphql-toolkit/common" "0.10.7" - tslib "1.11.2" - -"@graphql-toolkit/json-file-loader@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/json-file-loader/-/json-file-loader-0.10.7.tgz#6ac38258bc3da8540b38232b71bb5820bf02cff6" - integrity sha512-nVISrODqvn5LiQ4nKL5pz1Let/W1tuj2viEwrNyTS+9mcjaCE2nhV5MOK/7ZY0cR+XeA4N2u65EH1lQd63U3Cw== - dependencies: - "@graphql-toolkit/common" "0.10.7" - tslib "1.11.2" - -"@graphql-toolkit/schema-merging@0.10.7", "@graphql-toolkit/schema-merging@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/schema-merging/-/schema-merging-0.10.7.tgz#7b33becd48629bc656d602405c0b5c17d33ebd85" - integrity sha512-VngxJbVdRfXYhdMLhL90pqN+hD/2XTZwhHPGvpWqmGQhT6roc98yN3xyDyrWFYYsuiY4gTexdmrHQ3d7mzitwA== - dependencies: - "@graphql-toolkit/common" "0.10.7" - deepmerge "4.2.2" - graphql-tools "5.0.0" - tslib "1.11.2" - -"@graphql-toolkit/url-loader@~0.10.6": - version "0.10.7" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/url-loader/-/url-loader-0.10.7.tgz#0de998eeeaebcbf918526a26cb5f30f8250211f0" - integrity sha512-Ec3T4Zuo63LwG+RfK2ryz8ChPfncBf8fiSJ1xr68FtLDVznDNulvlNKFbfREE5koWejwsnJrjLCv6IX5IbhExg== - dependencies: - "@graphql-toolkit/common" "0.10.7" - cross-fetch "3.0.4" - graphql-tools "5.0.0" - tslib "1.11.2" +"@graphql-tools/merge@6.0.13", "@graphql-tools/merge@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-6.0.13.tgz#d7d6c5d4b1fe7a525a99d276d18beb814d4990d8" + integrity sha512-t8M1ytadf8JAKBSappzWqDzpCoufYPRPimadqxFxgeGZ/LrwzsJ7lCw8EIT1eZZYT7DbqYfAUalIQ124GazuEQ== + dependencies: + "@graphql-tools/schema" "6.0.13" + "@graphql-tools/utils" "6.0.13" + tslib "~2.0.0" + +"@graphql-tools/schema@6.0.13": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-6.0.13.tgz#bc08d914cbd055ead08e9deecd9e122194dcb4df" + integrity sha512-Uy2J7L3rr8QeIr+SwWltcAlvAu3q0EKuq41qMhL23dgqpoTAg1BIWlvYSoOdoGaRZP95bvLCEiyf/X5Q1VMEFw== + dependencies: + "@graphql-tools/utils" "6.0.13" + tslib "~2.0.0" + +"@graphql-tools/url-loader@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-6.0.13.tgz#4ccdcb52592003271cec5033fa5503834bce2e8c" + integrity sha512-0OweFMByPNzEa31Sre3hAhH5stCqd3aNzQqmmjeucdQCZZyirKtC7xUbiKlMfivIbiydqaAttz/XiZJdOZqVJA== + dependencies: + "@graphql-tools/delegate" "6.0.13" + "@graphql-tools/utils" "6.0.13" + "@graphql-tools/wrap" "6.0.13" + "@types/websocket" "1.0.1" + cross-fetch "3.0.5" + subscriptions-transport-ws "0.9.17" + tslib "~2.0.0" valid-url "1.0.9" + websocket "1.0.31" + +"@graphql-tools/utils@6.0.13", "@graphql-tools/utils@^6.0.0": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-6.0.13.tgz#5ea073e8aafa766e88a018432d0f0737e92f41ff" + integrity sha512-9jTI1HAM9HoXU2tV5CV8w7XXvJe7r37rythgo2FTe1Mws0+O6pQNjVVg7GDDr6FJ/eyMccyMx2SIf+5t7/XPrQ== + dependencies: + "@ardatan/aggregate-error" "0.0.1" + camel-case "4.1.1" + +"@graphql-tools/wrap@6.0.13": + version "6.0.13" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-6.0.13.tgz#0424023f9e7c78732a5053842fdcec61dd46ead7" + integrity sha512-QJAHUpZN8fEupYNLDXtahlPH4/yC/AOXxOoaBUOpQTEFr7A3eMLGk9FgINWlGIEgWpJYH8G6bo9N0bE64LIsGw== + dependencies: + "@graphql-tools/delegate" "6.0.13" + "@graphql-tools/schema" "6.0.13" + "@graphql-tools/utils" "6.0.13" + aggregate-error "3.0.1" + tslib "~2.0.0" "@hapi/address@2.x.x", "@hapi/address@^2.1.2": version "2.1.4" @@ -4170,6 +4213,13 @@ "@types/webpack-sources" "*" source-map "^0.6.0" +"@types/websocket@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.1.tgz#039272c196c2c0e4868a0d8a1a27bbb86e9e9138" + integrity sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "15.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" @@ -4566,13 +4616,6 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@wry/equality@^0.1.2": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" - integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== - dependencies: - tslib "^1.9.3" - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -4918,45 +4961,6 @@ anymatch@^3.0.3, anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -apollo-link-http-common@^0.2.14: - version "0.2.16" - resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" - integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== - dependencies: - apollo-link "^1.2.14" - ts-invariant "^0.4.0" - tslib "^1.9.3" - -apollo-link@^1.2.12, apollo-link@^1.2.14: - version "1.2.14" - resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" - integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== - dependencies: - apollo-utilities "^1.3.0" - ts-invariant "^0.4.0" - tslib "^1.9.3" - zen-observable-ts "^0.8.21" - -apollo-upload-client@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-13.0.0.tgz#146d1ddd85d711fcac8ca97a72d3ca6787f2b71b" - integrity sha512-lJ9/bk1BH1lD15WhWRha2J3+LrXrPIX5LP5EwiOUHv8PCORp4EUrcujrA3rI5hZeZygrTX8bshcuMdpqpSrvtA== - dependencies: - "@babel/runtime" "^7.9.2" - apollo-link "^1.2.12" - apollo-link-http-common "^0.2.14" - extract-files "^8.0.0" - -apollo-utilities@^1.3.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c" - integrity sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw== - dependencies: - "@wry/equality" "^0.1.2" - fast-json-stable-stringify "^2.0.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - app-root-dir@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/app-root-dir/-/app-root-dir-1.0.2.tgz#38187ec2dea7577fff033ffcb12172692ff6e118" @@ -5258,6 +5262,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob-lite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" @@ -5775,6 +5784,11 @@ babylon@^6.18.0: resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== +backo2@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -6818,7 +6832,7 @@ columnify@^1.5.4: strip-ansi "^3.0.0" wcwidth "^1.0.0" -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -7276,13 +7290,12 @@ cross-env@^7.0.0, cross-env@^7.0.2: dependencies: cross-spawn "^7.0.1" -cross-fetch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.4.tgz#7bef7020207e684a7638ef5f2f698e24d9eb283c" - integrity sha512-MSHgpjQqgbT/94D4CyADeNoYh52zMkCX4pcJvPP5WqPsLFMKjr2TCMg381ox5qI0ii2dPwaLx/00477knXqXVw== +cross-fetch@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.5.tgz#2739d2981892e7ab488a7ad03b92df2816e03f4c" + integrity sha512-FFLcLtraisj5eteosnX1gf01qYDCOc4fDy0+euOt8Kn9YBY2NtXL/pCoYPavw24NIQkQqm5ZOLsGD5Zzj0gyew== dependencies: node-fetch "2.6.0" - whatwg-fetch "3.0.0" cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5: version "6.0.5" @@ -7839,7 +7852,7 @@ deep-object-diff@^1.1.0: resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.0.tgz#d6fabf476c2ed1751fc94d5ca693d2ed8c18bc5a" integrity sha512-b+QLs5vHgS+IoSNcUE4n9HP2NwcHj7aqnJWsjPtuG75Rh5TOaGt0OjAYInh77d5T16V5cRDC+Pw/6ZZZiETBGw== -deepmerge@4.2.2, deepmerge@^4.2.2: +deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== @@ -7928,11 +7941,6 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -deprecated-decorator@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" - integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= - deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -9155,11 +9163,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-files@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-8.1.0.tgz#46a0690d0fe77411a2e3804852adeaa65cd59288" - integrity sha512-PTGtfthZK79WUMk+avLmwx3NGdU8+iVFXC2NMGxKsn0MnihOG2lvumj+AZo8CTwTrwjXDgZ5tztbRlEdRjBonQ== - extract-zip@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" @@ -9665,15 +9668,6 @@ fork-ts-checker-webpack-plugin@4.1.3: tapable "^1.0.0" worker-rpc "^0.1.0" -form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -9737,6 +9731,16 @@ fs-extra@8.1.0, fs-extra@^8.0.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -10177,10 +10181,10 @@ globalthis@^1.0.0: dependencies: define-properties "^1.1.3" -globby@11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154" - integrity sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg== +globby@11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -10253,7 +10257,7 @@ grapheme-breaker@^0.3.2: unicode-trie "^0.3.1" "graphiql@file:packages/graphiql": - version "2.0.0-alpha.0" + version "2.0.0-alpha.1" dependencies: "@emotion/core" "^10.0.28" "@mdx-js/react" "^1.5.2" @@ -10266,24 +10270,25 @@ grapheme-breaker@^0.3.2: i18next-browser-languagedetector "^4.1.1" markdown-it "^10.0.0" monaco-editor "^0.20.0" - monaco-graphql "^0.2.0" + monaco-graphql "^0.3.0" react-i18next "^11.4.0" theme-ui "^0.3.1" -graphql-config@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-3.0.2.tgz#dfec1ff193dc3791457cb09a973887cf1e4aad50" - integrity sha512-efoimZ4F2wF2OwZJzPq2KdPjQs1K+UgJSfsHoHBBA0TwveGyQ/0kS3lUphhJg/JXIrZociuRkfjrk8JC4iPPJQ== - dependencies: - "@graphql-toolkit/common" "~0.10.6" - "@graphql-toolkit/core" "~0.10.6" - "@graphql-toolkit/graphql-file-loader" "~0.10.6" - "@graphql-toolkit/json-file-loader" "~0.10.6" - "@graphql-toolkit/schema-merging" "~0.10.6" - "@graphql-toolkit/url-loader" "~0.10.6" +graphql-config@^3.0.2, graphql-config@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-3.0.3.tgz#58907c65ed7d6e04132321450b60e57863ea9a5f" + integrity sha512-MBY0wEjvcgJtZUyoqpPvOE1e5qPI0hJaa1gKTqjonSFiCsNHX2lykNjpOPcodmAgH1V06ELxhGnm9kcVzqvi/g== + dependencies: + "@graphql-tools/graphql-file-loader" "^6.0.0" + "@graphql-tools/json-file-loader" "^6.0.0" + "@graphql-tools/load" "^6.0.0" + "@graphql-tools/merge" "^6.0.0" + "@graphql-tools/url-loader" "^6.0.0" + "@graphql-tools/utils" "^6.0.0" cosmiconfig "6.0.0" minimatch "3.0.4" - tslib "^1.11.1" + string-env-interpolation "1.0.1" + tslib "^2.0.0" graphql-language-service@^2.4.0-alpha.7: version "2.4.0-alpha.7" @@ -10296,20 +10301,6 @@ graphql-language-service@^2.4.0-alpha.7: graphql-language-service-utils "^2.4.0-alpha.6" yargs "^15.3.1" -graphql-tools@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-5.0.0.tgz#67281c834a0e29f458adba8018f424816fa627e9" - integrity sha512-5zn3vtn//382b7G3Wzz3d5q/sh+f7tVrnxeuhTMTJ7pWJijNqLxH7VEzv8VwXCq19zAzHYEosFHfXiK7qzvk7w== - dependencies: - apollo-link "^1.2.14" - apollo-upload-client "^13.0.0" - deprecated-decorator "^0.1.6" - form-data "^3.0.0" - iterall "^1.3.0" - node-fetch "^2.6.0" - tslib "^1.11.1" - uuid "^7.0.3" - graphql@14.6.0: version "14.6.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.6.0.tgz#57822297111e874ea12f5cd4419616930cd83e49" @@ -10922,7 +10913,7 @@ import-fresh@^3.0.0, import-fresh@^3.1.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@3.0.0, import-from@^3.0.0: +import-from@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== @@ -11804,7 +11795,7 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterall@^1.2.2, iterall@^1.3.0: +iterall@^1.2.1, iterall@^1.2.2: version "1.3.0" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== @@ -12818,6 +12809,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -14045,6 +14045,11 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== +nan@^2.14.0: + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -14743,10 +14748,10 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== -p-limit@2.3.0, p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== +p-limit@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" + integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== dependencies: p-try "^2.0.0" @@ -14757,6 +14762,13 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -18438,6 +18450,11 @@ string-argv@0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== +string-env-interpolation@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz#ad4397ae4ac53fe6c91d1402ad6f6a52862c7152" + integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg== + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -18737,6 +18754,17 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" +subscriptions-transport-ws@0.9.17: + version "0.9.17" + resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.17.tgz#e30e40f0caae0d2781903c01a8cb51b6e2682098" + integrity sha512-hNHi2N80PBz4T0V0QhnnsMGvG3XDFDS9mS6BhZ3R12T6EBywC8d/uJscsga0cVO4DKtXCkCRrWm2sOYrbOdhEA== + dependencies: + backo2 "^1.0.2" + eventemitter3 "^3.1.0" + iterall "^1.2.1" + symbol-observable "^1.0.4" + ws "^5.2.0" + success-symbol@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" @@ -18814,7 +18842,7 @@ svgo@^1.0.0, svgo@^1.2.2, svgo@^1.3.2: unquote "~1.1.1" util.promisify "~1.0.0" -symbol-observable@^1.1.0: +symbol-observable@^1.0.4, symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== @@ -19247,13 +19275,6 @@ ts-dedent@^1.1.0: resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-1.1.1.tgz#68fad040d7dbd53a90f545b450702340e17d18f3" integrity sha512-UGTRZu1evMw4uTPyYF66/KFd22XiU+jMaIuHrkIHQ2GivAXVlLV0v/vHrpOuTRf9BmpNHi/SO7Vd0rLu0y57jg== -ts-invariant@^0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" - integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== - dependencies: - tslib "^1.9.3" - ts-jest@^25.3.1: version "25.3.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.3.1.tgz#58e2ed3506e4e4487c0b9b532846a5cade9656ba" @@ -19292,16 +19313,16 @@ ts-pnp@^1.1.2, ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== -tslib@1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" - integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== - -tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== +tslib@^2.0.0, tslib@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.0.tgz#18d13fc2dce04051e20f074cc8387fd8089ce4f3" + integrity sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -19558,6 +19579,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + unixify@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz#3a641c8c2ffbce4da683a5c70f03a462940c2090" @@ -19722,11 +19748,6 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== - v8-compile-cache@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" @@ -20173,6 +20194,17 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== +websocket@1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" + integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== + dependencies: + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -20180,7 +20212,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@3.0.0, whatwg-fetch@^3.0.0: +whatwg-fetch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== @@ -20588,6 +20620,11 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -20750,16 +20787,3 @@ yauzl@2.10.0, yauzl@^2.10.0: dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" - -zen-observable-ts@^0.8.21: - version "0.8.21" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" - integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== - dependencies: - tslib "^1.9.3" - zen-observable "^0.8.0" - -zen-observable@^0.8.0: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==