diff --git a/.npmignore b/.npmignore index 85e671f..a8ca035 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,5 @@ # except these !lib/**/* !src/**/* -!package-lock.json !package.json !README.md \ No newline at end of file diff --git a/package.json b/package.json index abc5eef..607aba3 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,26 @@ "devDependencies": { "@playlyfe/gql": "2.3.2", "@types/fs-extra": "4.0.4", - "@types/graphql": "0.11.5", + "@types/graphql": "^14.5.0", "@types/jest": "21.1.5", - "@types/node": "8.0.50", + "@types/lodash": "^4.14.149", + "@types/node": "^13.9.2", "@types/yargs": "^11.0.0", "del-cli": "^2.0.0", "fs-extra": "4.0.2", - "graphql": "0.11.7", - "graphql-tools": "2.7.2", + "graphql": "^14.6.0", "jest": "22.4.3", - "lodash": "^4.17.13", "ts-jest": "22.4.4", "tslint": "5.8.0", - "typescript": "2.9.2" + "typescript": "^3.8.3" }, "dependencies": { + "graphql-tools": "^4.0.7", + "lodash": "^4.17.15", "yargs": "^11.0.0" }, "peerDependencies": { - "graphql": "*", + "graphql": ">= 0.12", "typescript": "*" }, "jest": { diff --git a/src/__tests__/__snapshots__/schemaExtendDeclarations.test.ts.snap b/src/__tests__/__snapshots__/schemaExtendDeclarations.test.ts.snap new file mode 100644 index 0000000..1b5a550 --- /dev/null +++ b/src/__tests__/__snapshots__/schemaExtendDeclarations.test.ts.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`schema extension declaration should generate if schema is a valid graphql schema 1`] = ` +"/* tslint:disable */ +/* eslint-disable */ +import { GraphQLResolveInfo } from 'graphql'; +/** + * This file is auto-generated by @raraujo/graphql-schema-typescript + * Please note that any changes in this file may be overwritten + */ + + +/******************************* + * * + * TYPE DEFS * + * * + *******************************/ +export interface GQLQuery { + test: string; + foo?: string; +} + +/********************************* + * * + * TYPE RESOLVERS * + * * + *********************************/ +/** + * This interface define the shape of your resolver + * Note that this type is designed to be compatible with graphql-tools resolvers + * However, you can still use other generated interfaces to make your resolver type-safed + */ +export interface GQLResolver { + Query?: GQLQueryTypeResolver; +} +export interface GQLQueryTypeResolver { + test?: QueryToTestResolver; + foo?: QueryToFooResolver; +} + +export interface QueryToTestResolver { + (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; +} + +export interface QueryToFooResolver { + (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; +} +" +`; diff --git a/src/__tests__/schemaExtendDeclarations.test.ts b/src/__tests__/schemaExtendDeclarations.test.ts new file mode 100644 index 0000000..4ae330d --- /dev/null +++ b/src/__tests__/schemaExtendDeclarations.test.ts @@ -0,0 +1,12 @@ +import * as path from 'path'; +import { generateTypeScriptTypes } from '..'; +import { executeApiTest } from './testUtils'; + +describe('schema extension declaration', () => { + + it('should generate if schema is a valid graphql schema', async () => { + const schemaStr = `schema { query: Query } type Query { test: String! } extend type Query { foo: String }`; + const generated = await executeApiTest('schemaString.ts', {}, schemaStr); + expect(generated).toEqual(expect.stringContaining('foo?: string')); + }); +}); \ No newline at end of file diff --git a/src/__tests__/testSchema/index.ts b/src/__tests__/testSchema/index.ts index 167327f..bfc8511 100644 --- a/src/__tests__/testSchema/index.ts +++ b/src/__tests__/testSchema/index.ts @@ -1,12 +1,13 @@ import * as fs from 'fs'; import * as path from 'path'; import { makeExecutableSchema } from 'graphql-tools'; -import { GraphQLSchema, introspectionQuery, graphql } from 'graphql'; +import { GraphQLSchema } from 'graphql'; const gqlFiles = fs.readdirSync(__dirname).filter(f => f.endsWith('.gql') || f.endsWith('.graphql')); const typeDefs = gqlFiles.map(filePath => fs.readFileSync(path.join(__dirname, filePath), 'utf-8')); export const testSchema: GraphQLSchema = makeExecutableSchema({ - typeDefs: typeDefs + typeDefs: typeDefs, + resolverValidationOptions: {requireResolversForResolveType: false} }); \ No newline at end of file diff --git a/src/__tests__/testUtils.ts b/src/__tests__/testUtils.ts index 8db1b92..603da03 100644 --- a/src/__tests__/testUtils.ts +++ b/src/__tests__/testUtils.ts @@ -10,8 +10,8 @@ export const executeCommand = (command: string, options?: childProcess.ExecOptio return new Promise((resolve, reject) => { const process = childProcess.exec(command, options); - process.stdout.on('data', console.log); - process.stderr.on('data', console.error); + process.stdout!.on('data', console.log); + process.stderr!.on('data', console.error); process.on('close', (exitCode: number) => { if (exitCode !== 0) { @@ -28,7 +28,7 @@ export const executeCommand = (command: string, options?: childProcess.ExecOptio }; /** Function that count occurrences of a substring in a string; - * @param {String} string The string + * @param {String} str The string * @param {String} subString The sub string to search for * @param {Boolean} [allowOverlapping] Optional. (Default:false) * @@ -44,7 +44,7 @@ export const occurrences = (str: string, subString: string, allowOverlapping: bo return (str.length + 1); } - var n = 0, + let n = 0, pos = 0, step = allowOverlapping ? 1 : subString.length; @@ -63,7 +63,7 @@ export const occurrences = (str: string, subString: string, allowOverlapping: bo export const OUTPUT_FOLDER = path.join(__dirname, 'generatedTypes'); export const executeApiTest = async ( outputFile: string, - options: GenerateTypescriptOptions, + options: Partial, schema?: GraphQLSchema | string ): Promise => { // prepare output folder @@ -73,11 +73,11 @@ export const executeApiTest = async ( const outputPath = path.join(OUTPUT_FOLDER, outputFile); // run api function - await generateTypeScriptTypes(schema || testSchema, outputPath, options); + generateTypeScriptTypes(schema || testSchema, outputPath, options as GenerateTypescriptOptions); // ensure no error on tsc const generated = fs.readFileSync(outputPath, 'utf-8'); - await executeCommand(`tsc --noEmit --lib es6,esnext.asynciterable --target es5 ${outputPath}`); + await executeCommand(`yarn -s tsc --noEmit --lib es6,esnext.asynciterable --target es5 ${outputPath}`); // snapshot expect(generated).toMatchSnapshot(); diff --git a/src/apollo-link.d.ts b/src/apollo-link.d.ts deleted file mode 100644 index c01d172..0000000 --- a/src/apollo-link.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Workaround for missing apollo-link dependency in graphql-tools - * We don't want to install apollo-link package just to use the ApolloLink type - */ -declare module 'apollo-link' { - type ApolloLink = any; -} \ No newline at end of file diff --git a/src/cli.ts b/src/cli.ts index abb9d2f..1b01648 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -101,7 +101,7 @@ yargs async argv => { const { folderPath, output } = argv; - const options: GenerateTypescriptOptions = {}; + const options: Partial = {}; options[globalOpt] = argv[globalOpt]; options[typePrefix] = argv[typePrefix]; options[namespaceOpt] = argv[namespaceOpt]; @@ -116,7 +116,7 @@ yargs options[noStringEnum] = argv[noStringEnum]; options[optionalResolverInfo] = argv[optionalResolverInfo]; - await generateTypeScriptTypes(folderPath, path.resolve(output), options); + generateTypeScriptTypes(folderPath, path.resolve(output), options as GenerateTypescriptOptions); if (process.env.NODE_ENV !== 'test') { console.log(`Typescript generated at: ${output}`); } diff --git a/src/index.ts b/src/index.ts index b310278..bc7f8b1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,10 @@ import * as fs from 'fs'; import * as path from 'path'; -import { GraphQLSchema, buildSchema } from 'graphql'; +import { GraphQLSchema } from 'graphql'; import { GenerateTypescriptOptions, defaultOptions } from './types'; import { TSResolverGenerator, GenerateResolversResult } from './typescriptResolverGenerator'; import { TypeScriptGenerator } from './typescriptGenerator'; -import { formatTabSpace, introspectSchema, introspectSchemaViaLocalFile } from './utils'; -import { isString } from 'util'; +import { formatTabSpace, introspectSchema, introspectSchemaStr, introspectSchemaViaLocalFile } from './utils'; import { IntrospectionQuery } from 'graphql/utilities/introspectionQuery'; export { GenerateTypescriptOptions } from './types'; @@ -36,21 +35,21 @@ const typeResolversDecoration = [ ' *********************************/' ]; -export const generateTSTypesAsString = async ( +export const generateTSTypesAsString = ( schema: GraphQLSchema | string, outputPath: string, options: GenerateTypescriptOptions -): Promise => { +): string => { const mergedOptions = { ...defaultOptions, ...options }; - let introspectResult: IntrospectionQuery; - if (isString(schema)) { + let introspectResult: IntrospectionQuery | null = null; + if (typeof schema === 'string') { // is is a path to schema folder? try { const schemaPath = path.resolve(schema); const exists = fs.existsSync(schemaPath); if (exists) { - introspectResult = await introspectSchemaViaLocalFile(schemaPath); + introspectResult = introspectSchemaViaLocalFile(schemaPath); } } catch { // fall-through in case the provided string is a graphql definition, @@ -59,22 +58,17 @@ export const generateTSTypesAsString = async ( // it's not a folder, maybe it's a schema definition if (!introspectResult) { - const schemaViaStr = buildSchema(schema); - introspectResult = await introspectSchema(schemaViaStr); + introspectResult = introspectSchemaStr(schema); } } else { - introspectResult = await introspectSchema(schema); + introspectResult = introspectSchema(schema); } const tsGenerator = new TypeScriptGenerator(mergedOptions, introspectResult, outputPath); - const typeDefs = await tsGenerator.generate(); + const typeDefs = tsGenerator.generate(); - let typeResolvers: GenerateResolversResult = { - body: [], - importHeader: [] - }; const tsResolverGenerator = new TSResolverGenerator(mergedOptions, introspectResult); - typeResolvers = await tsResolverGenerator.generate(); + const typeResolvers = tsResolverGenerator.generate(); let header = [...typeResolvers.importHeader, jsDoc]; @@ -108,11 +102,11 @@ export const generateTSTypesAsString = async ( return formatted.join('\n'); }; -export async function generateTypeScriptTypes( +export function generateTypeScriptTypes( schema: GraphQLSchema | string, outputPath: string, options: GenerateTypescriptOptions = defaultOptions ) { - const content = await generateTSTypesAsString(schema, outputPath, options); + const content = generateTSTypesAsString(schema, outputPath, options); fs.writeFileSync(outputPath, content, 'utf-8'); } \ No newline at end of file diff --git a/src/types.ts b/src/types.ts index 3c5eb45..6766b7d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,10 +7,10 @@ export interface GenerateTypescriptOptions { }; /** Tab format, default to 2 */ - tabSpaces?: number; + tabSpaces: number; /** A prefix to every generated types. Default to GQL */ - typePrefix?: string; + typePrefix: string; /** Generate types as global */ global?: boolean; diff --git a/src/typescriptGenerator.ts b/src/typescriptGenerator.ts index c7a6892..f8169cc 100644 --- a/src/typescriptGenerator.ts +++ b/src/typescriptGenerator.ts @@ -15,9 +15,8 @@ import { IntrospectionInputObjectType, IntrospectionInterfaceType, IntrospectionQuery, - IntrospectionField, - IntrospectionInputValue } from 'graphql'; +import { IntrospectionField, IntrospectionInputValue } from 'graphql/utilities/introspectionQuery'; export class TypeScriptGenerator { @@ -27,7 +26,7 @@ export class TypeScriptGenerator { protected outputPath: string ) { } - public async generate(): Promise { + public generate(): string[] { const { introspectResult } = this; const gqlTypes = introspectResult.__schema.types.filter(type => !isBuiltinType(type)); @@ -35,7 +34,7 @@ export class TypeScriptGenerator { (prevTypescriptDefs, gqlType) => { const jsDoc = descriptionToJSDoc({ description: gqlType.description }); - let typeScriptDefs: string[] = [].concat(jsDoc); + let typeScriptDefs = jsDoc.slice(0); switch (gqlType.kind) { case 'SCALAR': { @@ -138,7 +137,7 @@ export class TypeScriptGenerator { if (this.options.enumsAsPascalCase) { return pascalCase(graphQlName); } else { - return graphQlName; + return graphQlName; } } @@ -146,7 +145,7 @@ export class TypeScriptGenerator { objectType: IntrospectionObjectType | IntrospectionInputObjectType | IntrospectionInterfaceType, allGQLTypes: IntrospectionType[] ): string[] { - const fields: (IntrospectionInputValue | IntrospectionField)[] + const fields: ReadonlyArray = objectType.kind === 'INPUT_OBJECT' ? objectType.inputFields : objectType.fields; const extendTypes: string[] = objectType.kind === 'OBJECT' @@ -161,15 +160,14 @@ export class TypeScriptGenerator { [] ); - const objectFields = fields.reduce( - (prevTypescriptDefs, field, index) => { - + const objectFields = fields.reduce( + (prevTypescriptDefs, field) => { if (extendFields.indexOf(field.name) !== -1 && this.options.minimizeInterfaceImplementation) { return prevTypescriptDefs; } const fieldJsDoc = descriptionToJSDoc(field); - const { fieldName, fieldType } = createFieldRef(field, this.options.typePrefix, this.options.strictNulls); + const { fieldName, fieldType } = createFieldRef(field, this.options.typePrefix, !!this.options.strictNulls); const fieldNameAndType = `${fieldName}: ${fieldType};`; let typescriptDefs = [...fieldJsDoc, fieldNameAndType]; @@ -180,7 +178,7 @@ export class TypeScriptGenerator { return prevTypescriptDefs.concat(typescriptDefs); }, - [] + [] as string[] ); const possibleTypeNames: string[] = []; diff --git a/src/typescriptResolverGenerator.ts b/src/typescriptResolverGenerator.ts index 8ea309d..9f209a1 100644 --- a/src/typescriptResolverGenerator.ts +++ b/src/typescriptResolverGenerator.ts @@ -28,9 +28,9 @@ export class TSResolverGenerator { } = {}; protected contextType: string; - protected queryType?: IntrospectionNamedTypeRef; - protected mutationType?: IntrospectionNamedTypeRef; - protected subscriptionType?: IntrospectionNamedTypeRef; + protected queryType?: IntrospectionNamedTypeRef | null; + protected mutationType?: IntrospectionNamedTypeRef | null; + protected subscriptionType?: IntrospectionNamedTypeRef | null; constructor( protected options: GenerateTypescriptOptions, @@ -42,7 +42,7 @@ export class TSResolverGenerator { } } - public async generate(): Promise { + public generate(): GenerateResolversResult { const { introspectionResult } = this; const gqlTypes = introspectionResult.__schema.types.filter(type => !isBuiltinType(type)); this.queryType = introspectionResult.__schema.queryType; diff --git a/src/utils.ts b/src/utils.ts index 6ef3d4c..c23fd82 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,24 +1,21 @@ import * as fs from 'fs'; import { join } from 'path'; import { - graphql, - buildASTSchema, - parse, + graphqlSync, introspectionQuery, GraphQLSchema, IntrospectionQuery, IntrospectionField, IntrospectionInputValue } from 'graphql'; -import { - camelCase -} from 'lodash'; +import { camelCase } from 'lodash'; +import { makeExecutableSchema } from 'graphql-tools'; /** * Send introspection query to a graphql schema */ -export const introspectSchema = async (schema: GraphQLSchema): Promise => { - const { data, errors } = await graphql(schema, introspectionQuery); +export const introspectSchema = (schema: GraphQLSchema): IntrospectionQuery => { + const { data, errors } = graphqlSync(schema, introspectionQuery); if (errors) { throw errors; @@ -27,8 +24,8 @@ export const introspectSchema = async (schema: GraphQLSchema): Promise { - const schema = buildASTSchema(parse(schemaStr)); +export function introspectSchemaStr(schemaStr: string): IntrospectionQuery { + const schema = makeExecutableSchema({typeDefs: schemaStr, resolverValidationOptions: {requireResolversForResolveType: false}}); return introspectSchema(schema); } @@ -43,10 +40,10 @@ function klawSync(path: string, filterRegex: RegExp, fileNames: string[] = []) { return fileNames; } -export const introspectSchemaViaLocalFile = async (path: string): Promise => { +export const introspectSchemaViaLocalFile = (path: string): IntrospectionQuery => { const files = klawSync(path, /\.(graphql|gql|graphqls)$/); const allTypeDefs = files.map(filePath => fs.readFileSync(filePath, 'utf-8')).join('\n'); - return await introspectSchemaStr(allTypeDefs); + return introspectSchemaStr(allTypeDefs); }; export interface SimpleTypeDescription { @@ -67,9 +64,9 @@ export const isBuiltinType = (type: SimpleTypeDescription): boolean => { }; export interface GraphqlDescription { - description?: string; + description?: string | null; isDeprecated?: boolean; - deprecationReason?: string; + deprecationReason?: string | null; } /** diff --git a/tsconfig.json b/tsconfig.json index 021a93c..6c2c55a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,7 @@ "src/cli.ts" ], "compilerOptions": { + "module": "commonjs", "target": "es5", "lib": [ "es6", @@ -14,7 +15,8 @@ "declaration": true, "declarationMap": true, "outDir": "./lib", - "noImplicitAny": false, + "strict": true, + "alwaysStrict": true, "forceConsistentCasingInFileNames": true, "noUnusedLocals": false } diff --git a/yarn.lock b/yarn.lock index abf39b1..ee1f4f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,16 +63,23 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/graphql@0.11.5": - version "0.11.5" - resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.11.5.tgz#e70f051e80b299be5b12f7e60d962f30c9596072" - integrity sha512-s7w/gfCoD3+IwiGsfn/VGu7XSX0bwv/HA9sU9NmdRwKzx4R8s9u7mqmGRGOcxRzzNEpy93Zv9PK+sZbFNdQ5fg== +"@types/graphql@^14.5.0": + version "14.5.0" + resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-14.5.0.tgz#a545fb3bc8013a3547cf2f07f5e13a33642b75d6" + integrity sha512-MOkzsEp1Jk5bXuAsHsUi6BVv0zCO+7/2PTiZMXWDSsMXvNU6w/PLMQT2vHn8hy2i0JqojPz1Sz6rsFjHtsU0lA== + dependencies: + graphql "*" "@types/jest@21.1.5": version "21.1.5" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.5.tgz#3db93d069d12602ca115d3604550e15131d8eb7a" integrity sha512-HwBIPK96DROvcB4EX5mA7L2nzhZ3sh8AcDSFODB4eG43S3q3d0+oo356J51qCxw9Bbn7G1DOmBmrw6vf+WiGTg== +"@types/lodash@^4.14.149": + version "4.14.149" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440" + integrity sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ== + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -83,16 +90,23 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.11.4.tgz#e8bd933c3f78795d580ae41d86590bfc1f4f389d" integrity sha512-ojnbBiKkZFYRfQpmtnnWTMw+rzGp/JiystjluW9jgN3VzRwilXddJ6aGQ9V/7iuDG06SBgn7ozW9k3zcAnYjYQ== -"@types/node@8.0.50": - version "8.0.50" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.50.tgz#dc545448e128c88c4eec7cd64025fcc3b7604541" - integrity sha512-N9OVsMBspboNvYaLAQnLEhb2eQ96lavogMR5LoH5k8nb1PvBZHSBFhzhsq2LNzGTBBOtBviOc1GiSu+wlM/pGw== +"@types/node@^13.9.2": + version "13.9.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.2.tgz#ace1880c03594cc3e80206d96847157d8e7fa349" + integrity sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg== "@types/yargs@^11.0.0": version "11.1.2" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-11.1.2.tgz#fd4b676846fe731a5de5c6d2e5ef6a377262fc30" integrity sha512-zG61PAp2OcoIBjRV44wftJj6AJgzJrOc32LCYOBqk9bdgcdzK5DCJHV9QZJ60+Fu+fOn79g8Ks3Gixm4CfkZ+w== +"@wry/equality@^0.1.2": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.9.tgz#b13e18b7a8053c6858aa6c85b54911fb31e3a909" + integrity sha512-mB6ceGjpMGz1ZTza8HYnrPGos2mC6So4NhS1PtZ8s4Qt0K7fBiIGhpSxUbQmhwcSWE3no+bYxmI2OL6KuXYmoQ== + dependencies: + tslib "^1.9.3" + abab@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" @@ -194,6 +208,16 @@ apollo-codegen@0.10.13: source-map-support "^0.4.2" yargs "^7.0.1" +apollo-link@^1.2.3: + version "1.2.13" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.13.tgz#dff00fbf19dfcd90fddbc14b6a3f9a771acac6c4" + integrity sha512-+iBMcYeevMm1JpYgwDEIDt/y0BB7VWyvlm/7x+TIPNLHCTCMgcEgDuW5kH86iQZWo0I7mNwQiTOz+/3ShPFmBw== + dependencies: + apollo-utilities "^1.3.0" + ts-invariant "^0.4.0" + tslib "^1.9.3" + zen-observable-ts "^0.8.20" + apollo-utilities@^1.0.1: version "1.0.21" resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.21.tgz#cb8b5779fe275850b16046ff8373f4af2de90765" @@ -202,6 +226,16 @@ apollo-utilities@^1.0.1: fast-json-stable-stringify "^2.0.0" fclone "^1.0.11" +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" + append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" @@ -1639,21 +1673,23 @@ graphql-language-service-utils@0.0.10: graphql "^0.9.6" graphql-language-service-types "0.0.16" -graphql-tools@2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.7.2.tgz#03104a155b15f8441b0e5a7113b12b9512341a9e" - integrity sha512-BhL37XtfH1XCDoMi/RR+ApOm/zVpGE0GFRdZhRaQn3wd6W9rBIVoAGa7/k/VimROy45UKDO4DIyhnbGAZW1lqg== +graphql-tools@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.7.tgz#743309b96cb657ff45b607ee0a07193cd987e43c" + integrity sha512-rApl8sT8t/W1uQRcwzxMYyUBiCl/XicluApiDkNze5TX/GR0BSTQMjM2UcRGdTmkbsb1Eqq6afkyyeG/zMxZYQ== dependencies: + apollo-link "^1.2.3" apollo-utilities "^1.0.1" deprecated-decorator "^0.1.6" + iterall "^1.1.3" uuid "^3.1.0" -graphql@0.11.7: - version "0.11.7" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6" - integrity sha512-x7uDjyz8Jx+QPbpCFCMQ8lltnQa4p4vSYHx6ADe8rVYRTdsyhCJbvSty5DAsLVmU6cGakl+r8HQYolKHxk/tiw== +graphql@*, graphql@^14.6.0: + version "14.6.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.6.0.tgz#57822297111e874ea12f5cd4419616930cd83e49" + integrity sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg== dependencies: - iterall "1.1.3" + iterall "^1.2.2" graphql@0.9.6, graphql@^0.9.5, graphql@^0.9.6: version "0.9.6" @@ -2219,16 +2255,16 @@ istanbul-reports@^1.5.1: dependencies: handlebars "^4.0.3" -iterall@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.3.tgz#1cbbff96204056dde6656e2ed2e2226d0e6d72c9" - integrity sha512-Cu/kb+4HiNSejAPhSaN1VukdNTTi/r4/e+yykqjlG/IW+1gZH5b4+Bq3whDX4tvbYugta3r8KTMUiqT3fIGxuQ== - iterall@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7" integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA== +iterall@^1.1.3, 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== + jest-changed-files@^22.2.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.4.3.tgz#8882181e022c38bd46a2e4d18d44d19d90a90fb2" @@ -2732,11 +2768,16 @@ lodash@4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4= -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.4: +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4: version "4.17.13" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93" integrity sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA== +lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -4226,6 +4267,13 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= +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@22.4.4: version "22.4.4" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.4.4.tgz#7b5c0abb2188fe7170840df9f80e78659aaf8a24" @@ -4241,6 +4289,11 @@ ts-jest@22.4.4: pkg-dir "^2.0.0" yargs "^11.0.0" +tslib@^1.10.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@^1.7.1, tslib@^1.8.1: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -4289,10 +4342,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@2.9.2: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" - integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== +typescript@^3.8.3: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== uglify-js@^3.1.4: version "3.7.3" @@ -4611,3 +4664,16 @@ yargs@^7.0.1: which-module "^1.0.0" y18n "^3.2.1" yargs-parser "^5.0.0" + +zen-observable-ts@^0.8.20: + version "0.8.20" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.20.tgz#44091e335d3fcbc97f6497e63e7f57d5b516b163" + integrity sha512-2rkjiPALhOtRaDX6pWyNqK1fnP5KkJJybYebopNSn6wDG1lxBoFs2+nwwXKoA6glHIrtwrfBBy6da0stkKtTAA== + 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==