From 6c2db84aa6b376681df971db86b6e8b013dc21fa Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 20 Oct 2020 14:23:39 -0500 Subject: [PATCH 01/65] rename .js to .ts using this `find src -name "*.js" -exec sh -c 'git mv "$0" "${0%.js}.ts"' {} \;` shell command renamed all files in `src` --- src/__testUtils__/__tests__/{dedent-test.js => dedent-test.ts} | 0 .../__tests__/{genFuzzStrings-test.js => genFuzzStrings-test.ts} | 0 .../__tests__/{inspectStr-test.js => inspectStr-test.ts} | 0 .../{resolveOnNextTick-test.js => resolveOnNextTick-test.ts} | 0 src/__testUtils__/{dedent.js => dedent.ts} | 0 src/__testUtils__/{genFuzzStrings.js => genFuzzStrings.ts} | 0 src/__testUtils__/{inspectStr.js => inspectStr.ts} | 0 src/__testUtils__/{kitchenSinkQuery.js => kitchenSinkQuery.ts} | 0 src/__testUtils__/{kitchenSinkSDL.js => kitchenSinkSDL.ts} | 0 src/__testUtils__/{resolveOnNextTick.js => resolveOnNextTick.ts} | 0 src/__tests__/{starWarsData.js => starWarsData.ts} | 0 ...tarWarsIntrospection-test.js => starWarsIntrospection-test.ts} | 0 src/__tests__/{starWarsQuery-test.js => starWarsQuery-test.ts} | 0 src/__tests__/{starWarsSchema.js => starWarsSchema.ts} | 0 .../{starWarsValidation-test.js => starWarsValidation-test.ts} | 0 src/__tests__/{version-test.js => version-test.ts} | 0 src/error/{GraphQLError.js => GraphQLError.ts} | 0 .../__tests__/{GraphQLError-test.js => GraphQLError-test.ts} | 0 src/error/__tests__/{formatError-test.js => formatError-test.ts} | 0 .../__tests__/{locatedError-test.js => locatedError-test.ts} | 0 src/error/{formatError.js => formatError.ts} | 0 src/error/{index.js => index.ts} | 0 src/error/{locatedError.js => locatedError.ts} | 0 src/error/{syntaxError.js => syntaxError.ts} | 0 src/execution/__tests__/{abstract-test.js => abstract-test.ts} | 0 .../__tests__/{directives-test.js => directives-test.ts} | 0 src/execution/__tests__/{executor-test.js => executor-test.ts} | 0 src/execution/__tests__/{lists-test.js => lists-test.ts} | 0 src/execution/__tests__/{mutations-test.js => mutations-test.ts} | 0 src/execution/__tests__/{nonnull-test.js => nonnull-test.ts} | 0 src/execution/__tests__/{resolve-test.js => resolve-test.ts} | 0 src/execution/__tests__/{schema-test.js => schema-test.ts} | 0 src/execution/__tests__/{sync-test.js => sync-test.ts} | 0 .../{union-interface-test.js => union-interface-test.ts} | 0 src/execution/__tests__/{variables-test.js => variables-test.ts} | 0 src/execution/{execute.js => execute.ts} | 0 src/execution/{index.js => index.ts} | 0 src/execution/{values.js => values.ts} | 0 src/{graphql.js => graphql.ts} | 0 src/{index.js => index.ts} | 0 src/jsutils/{ObjMap.js => ObjMap.ts} | 0 src/jsutils/{Path.js => Path.ts} | 0 src/jsutils/{PromiseOrValue.js => PromiseOrValue.ts} | 0 src/jsutils/__tests__/{didYouMean-test.js => didYouMean-test.ts} | 0 .../__tests__/{identityFunc-test.js => identityFunc-test.ts} | 0 src/jsutils/__tests__/{inspect-test.js => inspect-test.ts} | 0 src/jsutils/__tests__/{instanceOf-test.js => instanceOf-test.ts} | 0 src/jsutils/__tests__/{invariant-test.js => invariant-test.ts} | 0 .../{isAsyncIterable-test.js => isAsyncIterable-test.ts} | 0 .../{isIteratableObject-test.js => isIteratableObject-test.ts} | 0 .../__tests__/{isObjectLike-test.js => isObjectLike-test.ts} | 0 .../__tests__/{naturalCompare-test.js => naturalCompare-test.ts} | 0 .../__tests__/{suggestionList-test.js => suggestionList-test.ts} | 0 src/jsutils/__tests__/{toObjMap-test.js => toObjMap-test.ts} | 0 src/jsutils/{devAssert.js => devAssert.ts} | 0 src/jsutils/{didYouMean.js => didYouMean.ts} | 0 src/jsutils/{identityFunc.js => identityFunc.ts} | 0 src/jsutils/{inspect.js => inspect.ts} | 0 src/jsutils/{instanceOf.js => instanceOf.ts} | 0 src/jsutils/{invariant.js => invariant.ts} | 0 src/jsutils/{isAsyncIterable.js => isAsyncIterable.ts} | 0 src/jsutils/{isIteratableObject.js => isIteratableObject.ts} | 0 src/jsutils/{isObjectLike.js => isObjectLike.ts} | 0 src/jsutils/{isPromise.js => isPromise.ts} | 0 src/jsutils/{keyMap.js => keyMap.ts} | 0 src/jsutils/{keyValMap.js => keyValMap.ts} | 0 src/jsutils/{mapValue.js => mapValue.ts} | 0 src/jsutils/{memoize3.js => memoize3.ts} | 0 src/jsutils/{naturalCompare.js => naturalCompare.ts} | 0 src/jsutils/{printPathArray.js => printPathArray.ts} | 0 src/jsutils/{promiseForObject.js => promiseForObject.ts} | 0 src/jsutils/{promiseReduce.js => promiseReduce.ts} | 0 src/jsutils/{suggestionList.js => suggestionList.ts} | 0 src/jsutils/{toObjMap.js => toObjMap.ts} | 0 .../__tests__/{blockString-fuzz.js => blockString-fuzz.ts} | 0 .../__tests__/{blockString-test.js => blockString-test.ts} | 0 src/language/__tests__/{lexer-test.js => lexer-test.ts} | 0 src/language/__tests__/{parser-test.js => parser-test.ts} | 0 src/language/__tests__/{predicates-test.js => predicates-test.ts} | 0 .../__tests__/{printLocation-test.js => printLocation-test.ts} | 0 src/language/__tests__/{printer-test.js => printer-test.ts} | 0 .../__tests__/{schema-parser-test.js => schema-parser-test.ts} | 0 .../__tests__/{schema-printer-test.js => schema-printer-test.ts} | 0 src/language/__tests__/{source-test.js => source-test.ts} | 0 src/language/__tests__/{toJSONDeep.js => toJSONDeep.ts} | 0 src/language/__tests__/{visitor-test.js => visitor-test.ts} | 0 src/language/{ast.js => ast.ts} | 0 src/language/{blockString.js => blockString.ts} | 0 src/language/{directiveLocation.js => directiveLocation.ts} | 0 src/language/{index.js => index.ts} | 0 src/language/{kinds.js => kinds.ts} | 0 src/language/{lexer.js => lexer.ts} | 0 src/language/{location.js => location.ts} | 0 src/language/{parser.js => parser.ts} | 0 src/language/{predicates.js => predicates.ts} | 0 src/language/{printLocation.js => printLocation.ts} | 0 src/language/{printer.js => printer.ts} | 0 src/language/{source.js => source.ts} | 0 src/language/{tokenKind.js => tokenKind.ts} | 0 src/language/{visitor.js => visitor.ts} | 0 .../{mapAsyncIterator-test.js => mapAsyncIterator-test.ts} | 0 .../__tests__/{simplePubSub-test.js => simplePubSub-test.ts} | 0 src/subscription/__tests__/{simplePubSub.js => simplePubSub.ts} | 0 .../__tests__/{subscribe-test.js => subscribe-test.ts} | 0 src/subscription/{index.js => index.ts} | 0 src/subscription/{mapAsyncIterator.js => mapAsyncIterator.ts} | 0 src/subscription/{subscribe.js => subscribe.ts} | 0 src/type/__tests__/{definition-test.js => definition-test.ts} | 0 src/type/__tests__/{directive-test.js => directive-test.ts} | 0 src/type/__tests__/{enumType-test.js => enumType-test.ts} | 0 src/type/__tests__/{extensions-test.js => extensions-test.ts} | 0 .../__tests__/{introspection-test.js => introspection-test.ts} | 0 src/type/__tests__/{predicate-test.js => predicate-test.ts} | 0 src/type/__tests__/{scalars-test.js => scalars-test.ts} | 0 src/type/__tests__/{schema-test.js => schema-test.ts} | 0 src/type/__tests__/{validation-test.js => validation-test.ts} | 0 src/type/{definition.js => definition.ts} | 0 src/type/{directives.js => directives.ts} | 0 src/type/{index.js => index.ts} | 0 src/type/{introspection.js => introspection.ts} | 0 src/type/{scalars.js => scalars.ts} | 0 src/type/{schema.js => schema.ts} | 0 src/type/{validate.js => validate.ts} | 0 src/utilities/{TypeInfo.js => TypeInfo.ts} | 0 src/utilities/__tests__/{TypeInfo-test.js => TypeInfo-test.ts} | 0 .../{assertValidName-test.js => assertValidName-test.ts} | 0 .../__tests__/{astFromValue-test.js => astFromValue-test.ts} | 0 .../__tests__/{buildASTSchema-test.js => buildASTSchema-test.ts} | 0 .../{buildClientSchema-test.js => buildClientSchema-test.ts} | 0 .../{coerceInputValue-test.js => coerceInputValue-test.ts} | 0 src/utilities/__tests__/{concatAST-test.js => concatAST-test.ts} | 0 .../__tests__/{extendSchema-test.js => extendSchema-test.ts} | 0 .../{findBreakingChanges-test.js => findBreakingChanges-test.ts} | 0 ...etIntrospectionQuery-test.js => getIntrospectionQuery-test.ts} | 0 .../{getOperationAST-test.js => getOperationAST-test.ts} | 0 ...{getOperationRootType-test.js => getOperationRootType-test.ts} | 0 ...spectionFromSchema-test.js => introspectionFromSchema-test.ts} | 0 ...ographicSortSchema-test.js => lexicographicSortSchema-test.ts} | 0 .../__tests__/{printSchema-test.js => printSchema-test.ts} | 0 .../{separateOperations-test.js => separateOperations-test.ts} | 0 ...ipIgnoredCharacters-fuzz.js => stripIgnoredCharacters-fuzz.ts} | 0 ...ipIgnoredCharacters-test.js => stripIgnoredCharacters-test.ts} | 0 .../{typeComparators-test.js => typeComparators-test.ts} | 0 .../__tests__/{valueFromAST-test.js => valueFromAST-test.ts} | 0 .../{valueFromASTUntyped-test.js => valueFromASTUntyped-test.ts} | 0 src/utilities/{assertValidName.js => assertValidName.ts} | 0 src/utilities/{astFromValue.js => astFromValue.ts} | 0 src/utilities/{buildASTSchema.js => buildASTSchema.ts} | 0 src/utilities/{buildClientSchema.js => buildClientSchema.ts} | 0 src/utilities/{coerceInputValue.js => coerceInputValue.ts} | 0 src/utilities/{concatAST.js => concatAST.ts} | 0 src/utilities/{extendSchema.js => extendSchema.ts} | 0 src/utilities/{findBreakingChanges.js => findBreakingChanges.ts} | 0 .../{getIntrospectionQuery.js => getIntrospectionQuery.ts} | 0 src/utilities/{getOperationAST.js => getOperationAST.ts} | 0 .../{getOperationRootType.js => getOperationRootType.ts} | 0 src/utilities/{index.js => index.ts} | 0 .../{introspectionFromSchema.js => introspectionFromSchema.ts} | 0 .../{lexicographicSortSchema.js => lexicographicSortSchema.ts} | 0 src/utilities/{printSchema.js => printSchema.ts} | 0 src/utilities/{separateOperations.js => separateOperations.ts} | 0 .../{stripIgnoredCharacters.js => stripIgnoredCharacters.ts} | 0 src/utilities/{typeComparators.js => typeComparators.ts} | 0 src/utilities/{typeFromAST.js => typeFromAST.ts} | 0 src/utilities/{valueFromAST.js => valueFromAST.ts} | 0 src/utilities/{valueFromASTUntyped.js => valueFromASTUntyped.ts} | 0 src/validation/{ValidationContext.js => ValidationContext.ts} | 0 ...eDefinitionsRule-test.js => ExecutableDefinitionsRule-test.ts} | 0 ...sOnCorrectTypeRule-test.js => FieldsOnCorrectTypeRule-test.ts} | 0 ...iteTypesRule-test.js => FragmentsOnCompositeTypesRule-test.ts} | 0 ...wnArgumentNamesRule-test.js => KnownArgumentNamesRule-test.ts} | 0 .../{KnownDirectivesRule-test.js => KnownDirectivesRule-test.ts} | 0 ...wnFragmentNamesRule-test.js => KnownFragmentNamesRule-test.ts} | 0 .../{KnownTypeNamesRule-test.js => KnownTypeNamesRule-test.ts} | 0 ...usOperationRule-test.js => LoneAnonymousOperationRule-test.ts} | 0 ...emaDefinitionRule-test.js => LoneSchemaDefinitionRule-test.ts} | 0 ...eprecatedCustomRule-test.js => NoDeprecatedCustomRule-test.ts} | 0 ...{NoFragmentCyclesRule-test.js => NoFragmentCyclesRule-test.ts} | 0 ...CustomRule-test.js => NoSchemaIntrospectionCustomRule-test.ts} | 0 ...inedVariablesRule-test.js => NoUndefinedVariablesRule-test.ts} | 0 ...oUnusedFragmentsRule-test.js => NoUnusedFragmentsRule-test.ts} | 0 ...oUnusedVariablesRule-test.js => NoUnusedVariablesRule-test.ts} | 0 ...ergedRule-test.js => OverlappingFieldsCanBeMergedRule-test.ts} | 0 ...entSpreadsRule-test.js => PossibleFragmentSpreadsRule-test.ts} | 0 ...eExtensionsRule-test.js => PossibleTypeExtensionsRule-test.ts} | 0 ...rgumentsRule-test.js => ProvidedRequiredArgumentsRule-test.ts} | 0 .../{ScalarLeafsRule-test.js => ScalarLeafsRule-test.ts} | 0 ...criptionsRule-test.js => SingleFieldSubscriptionsRule-test.ts} | 0 ...eArgumentNamesRule-test.js => UniqueArgumentNamesRule-test.ts} | 0 ...irectiveNamesRule-test.js => UniqueDirectiveNamesRule-test.ts} | 0 ...cationRule-test.js => UniqueDirectivesPerLocationRule-test.ts} | 0 ...numValueNamesRule-test.js => UniqueEnumValueNamesRule-test.ts} | 0 ...onNamesRule-test.js => UniqueFieldDefinitionNamesRule-test.ts} | 0 ...eFragmentNamesRule-test.js => UniqueFragmentNamesRule-test.ts} | 0 ...utFieldNamesRule-test.js => UniqueInputFieldNamesRule-test.ts} | 0 ...perationNamesRule-test.js => UniqueOperationNamesRule-test.ts} | 0 ...perationTypesRule-test.js => UniqueOperationTypesRule-test.ts} | 0 .../{UniqueTypeNamesRule-test.js => UniqueTypeNamesRule-test.ts} | 0 ...eVariableNamesRule-test.js => UniqueVariableNamesRule-test.ts} | 0 ...sOfCorrectTypeRule-test.js => ValuesOfCorrectTypeRule-test.ts} | 0 ...eInputTypesRule-test.js => VariablesAreInputTypesRule-test.ts} | 0 ...ositionRule-test.js => VariablesInAllowedPositionRule-test.ts} | 0 src/validation/__tests__/{harness.js => harness.ts} | 0 .../__tests__/{validation-test.js => validation-test.ts} | 0 src/validation/{index.js => index.ts} | 0 ...{ExecutableDefinitionsRule.js => ExecutableDefinitionsRule.ts} | 0 .../{FieldsOnCorrectTypeRule.js => FieldsOnCorrectTypeRule.ts} | 0 ...tsOnCompositeTypesRule.js => FragmentsOnCompositeTypesRule.ts} | 0 .../{KnownArgumentNamesRule.js => KnownArgumentNamesRule.ts} | 0 .../rules/{KnownDirectivesRule.js => KnownDirectivesRule.ts} | 0 .../{KnownFragmentNamesRule.js => KnownFragmentNamesRule.ts} | 0 .../rules/{KnownTypeNamesRule.js => KnownTypeNamesRule.ts} | 0 ...oneAnonymousOperationRule.js => LoneAnonymousOperationRule.ts} | 0 .../{LoneSchemaDefinitionRule.js => LoneSchemaDefinitionRule.ts} | 0 .../rules/{NoFragmentCyclesRule.js => NoFragmentCyclesRule.ts} | 0 .../{NoUndefinedVariablesRule.js => NoUndefinedVariablesRule.ts} | 0 .../rules/{NoUnusedFragmentsRule.js => NoUnusedFragmentsRule.ts} | 0 .../rules/{NoUnusedVariablesRule.js => NoUnusedVariablesRule.ts} | 0 ...eldsCanBeMergedRule.js => OverlappingFieldsCanBeMergedRule.ts} | 0 ...sibleFragmentSpreadsRule.js => PossibleFragmentSpreadsRule.ts} | 0 ...ossibleTypeExtensionsRule.js => PossibleTypeExtensionsRule.ts} | 0 ...dRequiredArgumentsRule.js => ProvidedRequiredArgumentsRule.ts} | 0 src/validation/rules/{ScalarLeafsRule.js => ScalarLeafsRule.ts} | 0 ...eFieldSubscriptionsRule.js => SingleFieldSubscriptionsRule.ts} | 0 .../{UniqueArgumentNamesRule.js => UniqueArgumentNamesRule.ts} | 0 .../{UniqueDirectiveNamesRule.js => UniqueDirectiveNamesRule.ts} | 0 ...tivesPerLocationRule.js => UniqueDirectivesPerLocationRule.ts} | 0 .../{UniqueEnumValueNamesRule.js => UniqueEnumValueNamesRule.ts} | 0 ...ldDefinitionNamesRule.js => UniqueFieldDefinitionNamesRule.ts} | 0 .../{UniqueFragmentNamesRule.js => UniqueFragmentNamesRule.ts} | 0 ...{UniqueInputFieldNamesRule.js => UniqueInputFieldNamesRule.ts} | 0 .../{UniqueOperationNamesRule.js => UniqueOperationNamesRule.ts} | 0 .../{UniqueOperationTypesRule.js => UniqueOperationTypesRule.ts} | 0 .../rules/{UniqueTypeNamesRule.js => UniqueTypeNamesRule.ts} | 0 .../{UniqueVariableNamesRule.js => UniqueVariableNamesRule.ts} | 0 .../{ValuesOfCorrectTypeRule.js => ValuesOfCorrectTypeRule.ts} | 0 ...ariablesAreInputTypesRule.js => VariablesAreInputTypesRule.ts} | 0 ...InAllowedPositionRule.js => VariablesInAllowedPositionRule.ts} | 0 .../{NoDeprecatedCustomRule.js => NoDeprecatedCustomRule.ts} | 0 ...rospectionCustomRule.js => NoSchemaIntrospectionCustomRule.ts} | 0 src/validation/{specifiedRules.js => specifiedRules.ts} | 0 src/validation/{validate.js => validate.ts} | 0 src/{version.js => version.ts} | 0 243 files changed, 0 insertions(+), 0 deletions(-) rename src/__testUtils__/__tests__/{dedent-test.js => dedent-test.ts} (100%) rename src/__testUtils__/__tests__/{genFuzzStrings-test.js => genFuzzStrings-test.ts} (100%) rename src/__testUtils__/__tests__/{inspectStr-test.js => inspectStr-test.ts} (100%) rename src/__testUtils__/__tests__/{resolveOnNextTick-test.js => resolveOnNextTick-test.ts} (100%) rename src/__testUtils__/{dedent.js => dedent.ts} (100%) rename src/__testUtils__/{genFuzzStrings.js => genFuzzStrings.ts} (100%) rename src/__testUtils__/{inspectStr.js => inspectStr.ts} (100%) rename src/__testUtils__/{kitchenSinkQuery.js => kitchenSinkQuery.ts} (100%) rename src/__testUtils__/{kitchenSinkSDL.js => kitchenSinkSDL.ts} (100%) rename src/__testUtils__/{resolveOnNextTick.js => resolveOnNextTick.ts} (100%) rename src/__tests__/{starWarsData.js => starWarsData.ts} (100%) rename src/__tests__/{starWarsIntrospection-test.js => starWarsIntrospection-test.ts} (100%) rename src/__tests__/{starWarsQuery-test.js => starWarsQuery-test.ts} (100%) rename src/__tests__/{starWarsSchema.js => starWarsSchema.ts} (100%) rename src/__tests__/{starWarsValidation-test.js => starWarsValidation-test.ts} (100%) rename src/__tests__/{version-test.js => version-test.ts} (100%) rename src/error/{GraphQLError.js => GraphQLError.ts} (100%) rename src/error/__tests__/{GraphQLError-test.js => GraphQLError-test.ts} (100%) rename src/error/__tests__/{formatError-test.js => formatError-test.ts} (100%) rename src/error/__tests__/{locatedError-test.js => locatedError-test.ts} (100%) rename src/error/{formatError.js => formatError.ts} (100%) rename src/error/{index.js => index.ts} (100%) rename src/error/{locatedError.js => locatedError.ts} (100%) rename src/error/{syntaxError.js => syntaxError.ts} (100%) rename src/execution/__tests__/{abstract-test.js => abstract-test.ts} (100%) rename src/execution/__tests__/{directives-test.js => directives-test.ts} (100%) rename src/execution/__tests__/{executor-test.js => executor-test.ts} (100%) rename src/execution/__tests__/{lists-test.js => lists-test.ts} (100%) rename src/execution/__tests__/{mutations-test.js => mutations-test.ts} (100%) rename src/execution/__tests__/{nonnull-test.js => nonnull-test.ts} (100%) rename src/execution/__tests__/{resolve-test.js => resolve-test.ts} (100%) rename src/execution/__tests__/{schema-test.js => schema-test.ts} (100%) rename src/execution/__tests__/{sync-test.js => sync-test.ts} (100%) rename src/execution/__tests__/{union-interface-test.js => union-interface-test.ts} (100%) rename src/execution/__tests__/{variables-test.js => variables-test.ts} (100%) rename src/execution/{execute.js => execute.ts} (100%) rename src/execution/{index.js => index.ts} (100%) rename src/execution/{values.js => values.ts} (100%) rename src/{graphql.js => graphql.ts} (100%) rename src/{index.js => index.ts} (100%) rename src/jsutils/{ObjMap.js => ObjMap.ts} (100%) rename src/jsutils/{Path.js => Path.ts} (100%) rename src/jsutils/{PromiseOrValue.js => PromiseOrValue.ts} (100%) rename src/jsutils/__tests__/{didYouMean-test.js => didYouMean-test.ts} (100%) rename src/jsutils/__tests__/{identityFunc-test.js => identityFunc-test.ts} (100%) rename src/jsutils/__tests__/{inspect-test.js => inspect-test.ts} (100%) rename src/jsutils/__tests__/{instanceOf-test.js => instanceOf-test.ts} (100%) rename src/jsutils/__tests__/{invariant-test.js => invariant-test.ts} (100%) rename src/jsutils/__tests__/{isAsyncIterable-test.js => isAsyncIterable-test.ts} (100%) rename src/jsutils/__tests__/{isIteratableObject-test.js => isIteratableObject-test.ts} (100%) rename src/jsutils/__tests__/{isObjectLike-test.js => isObjectLike-test.ts} (100%) rename src/jsutils/__tests__/{naturalCompare-test.js => naturalCompare-test.ts} (100%) rename src/jsutils/__tests__/{suggestionList-test.js => suggestionList-test.ts} (100%) rename src/jsutils/__tests__/{toObjMap-test.js => toObjMap-test.ts} (100%) rename src/jsutils/{devAssert.js => devAssert.ts} (100%) rename src/jsutils/{didYouMean.js => didYouMean.ts} (100%) rename src/jsutils/{identityFunc.js => identityFunc.ts} (100%) rename src/jsutils/{inspect.js => inspect.ts} (100%) rename src/jsutils/{instanceOf.js => instanceOf.ts} (100%) rename src/jsutils/{invariant.js => invariant.ts} (100%) rename src/jsutils/{isAsyncIterable.js => isAsyncIterable.ts} (100%) rename src/jsutils/{isIteratableObject.js => isIteratableObject.ts} (100%) rename src/jsutils/{isObjectLike.js => isObjectLike.ts} (100%) rename src/jsutils/{isPromise.js => isPromise.ts} (100%) rename src/jsutils/{keyMap.js => keyMap.ts} (100%) rename src/jsutils/{keyValMap.js => keyValMap.ts} (100%) rename src/jsutils/{mapValue.js => mapValue.ts} (100%) rename src/jsutils/{memoize3.js => memoize3.ts} (100%) rename src/jsutils/{naturalCompare.js => naturalCompare.ts} (100%) rename src/jsutils/{printPathArray.js => printPathArray.ts} (100%) rename src/jsutils/{promiseForObject.js => promiseForObject.ts} (100%) rename src/jsutils/{promiseReduce.js => promiseReduce.ts} (100%) rename src/jsutils/{suggestionList.js => suggestionList.ts} (100%) rename src/jsutils/{toObjMap.js => toObjMap.ts} (100%) rename src/language/__tests__/{blockString-fuzz.js => blockString-fuzz.ts} (100%) rename src/language/__tests__/{blockString-test.js => blockString-test.ts} (100%) rename src/language/__tests__/{lexer-test.js => lexer-test.ts} (100%) rename src/language/__tests__/{parser-test.js => parser-test.ts} (100%) rename src/language/__tests__/{predicates-test.js => predicates-test.ts} (100%) rename src/language/__tests__/{printLocation-test.js => printLocation-test.ts} (100%) rename src/language/__tests__/{printer-test.js => printer-test.ts} (100%) rename src/language/__tests__/{schema-parser-test.js => schema-parser-test.ts} (100%) rename src/language/__tests__/{schema-printer-test.js => schema-printer-test.ts} (100%) rename src/language/__tests__/{source-test.js => source-test.ts} (100%) rename src/language/__tests__/{toJSONDeep.js => toJSONDeep.ts} (100%) rename src/language/__tests__/{visitor-test.js => visitor-test.ts} (100%) rename src/language/{ast.js => ast.ts} (100%) rename src/language/{blockString.js => blockString.ts} (100%) rename src/language/{directiveLocation.js => directiveLocation.ts} (100%) rename src/language/{index.js => index.ts} (100%) rename src/language/{kinds.js => kinds.ts} (100%) rename src/language/{lexer.js => lexer.ts} (100%) rename src/language/{location.js => location.ts} (100%) rename src/language/{parser.js => parser.ts} (100%) rename src/language/{predicates.js => predicates.ts} (100%) rename src/language/{printLocation.js => printLocation.ts} (100%) rename src/language/{printer.js => printer.ts} (100%) rename src/language/{source.js => source.ts} (100%) rename src/language/{tokenKind.js => tokenKind.ts} (100%) rename src/language/{visitor.js => visitor.ts} (100%) rename src/subscription/__tests__/{mapAsyncIterator-test.js => mapAsyncIterator-test.ts} (100%) rename src/subscription/__tests__/{simplePubSub-test.js => simplePubSub-test.ts} (100%) rename src/subscription/__tests__/{simplePubSub.js => simplePubSub.ts} (100%) rename src/subscription/__tests__/{subscribe-test.js => subscribe-test.ts} (100%) rename src/subscription/{index.js => index.ts} (100%) rename src/subscription/{mapAsyncIterator.js => mapAsyncIterator.ts} (100%) rename src/subscription/{subscribe.js => subscribe.ts} (100%) rename src/type/__tests__/{definition-test.js => definition-test.ts} (100%) rename src/type/__tests__/{directive-test.js => directive-test.ts} (100%) rename src/type/__tests__/{enumType-test.js => enumType-test.ts} (100%) rename src/type/__tests__/{extensions-test.js => extensions-test.ts} (100%) rename src/type/__tests__/{introspection-test.js => introspection-test.ts} (100%) rename src/type/__tests__/{predicate-test.js => predicate-test.ts} (100%) rename src/type/__tests__/{scalars-test.js => scalars-test.ts} (100%) rename src/type/__tests__/{schema-test.js => schema-test.ts} (100%) rename src/type/__tests__/{validation-test.js => validation-test.ts} (100%) rename src/type/{definition.js => definition.ts} (100%) rename src/type/{directives.js => directives.ts} (100%) rename src/type/{index.js => index.ts} (100%) rename src/type/{introspection.js => introspection.ts} (100%) rename src/type/{scalars.js => scalars.ts} (100%) rename src/type/{schema.js => schema.ts} (100%) rename src/type/{validate.js => validate.ts} (100%) rename src/utilities/{TypeInfo.js => TypeInfo.ts} (100%) rename src/utilities/__tests__/{TypeInfo-test.js => TypeInfo-test.ts} (100%) rename src/utilities/__tests__/{assertValidName-test.js => assertValidName-test.ts} (100%) rename src/utilities/__tests__/{astFromValue-test.js => astFromValue-test.ts} (100%) rename src/utilities/__tests__/{buildASTSchema-test.js => buildASTSchema-test.ts} (100%) rename src/utilities/__tests__/{buildClientSchema-test.js => buildClientSchema-test.ts} (100%) rename src/utilities/__tests__/{coerceInputValue-test.js => coerceInputValue-test.ts} (100%) rename src/utilities/__tests__/{concatAST-test.js => concatAST-test.ts} (100%) rename src/utilities/__tests__/{extendSchema-test.js => extendSchema-test.ts} (100%) rename src/utilities/__tests__/{findBreakingChanges-test.js => findBreakingChanges-test.ts} (100%) rename src/utilities/__tests__/{getIntrospectionQuery-test.js => getIntrospectionQuery-test.ts} (100%) rename src/utilities/__tests__/{getOperationAST-test.js => getOperationAST-test.ts} (100%) rename src/utilities/__tests__/{getOperationRootType-test.js => getOperationRootType-test.ts} (100%) rename src/utilities/__tests__/{introspectionFromSchema-test.js => introspectionFromSchema-test.ts} (100%) rename src/utilities/__tests__/{lexicographicSortSchema-test.js => lexicographicSortSchema-test.ts} (100%) rename src/utilities/__tests__/{printSchema-test.js => printSchema-test.ts} (100%) rename src/utilities/__tests__/{separateOperations-test.js => separateOperations-test.ts} (100%) rename src/utilities/__tests__/{stripIgnoredCharacters-fuzz.js => stripIgnoredCharacters-fuzz.ts} (100%) rename src/utilities/__tests__/{stripIgnoredCharacters-test.js => stripIgnoredCharacters-test.ts} (100%) rename src/utilities/__tests__/{typeComparators-test.js => typeComparators-test.ts} (100%) rename src/utilities/__tests__/{valueFromAST-test.js => valueFromAST-test.ts} (100%) rename src/utilities/__tests__/{valueFromASTUntyped-test.js => valueFromASTUntyped-test.ts} (100%) rename src/utilities/{assertValidName.js => assertValidName.ts} (100%) rename src/utilities/{astFromValue.js => astFromValue.ts} (100%) rename src/utilities/{buildASTSchema.js => buildASTSchema.ts} (100%) rename src/utilities/{buildClientSchema.js => buildClientSchema.ts} (100%) rename src/utilities/{coerceInputValue.js => coerceInputValue.ts} (100%) rename src/utilities/{concatAST.js => concatAST.ts} (100%) rename src/utilities/{extendSchema.js => extendSchema.ts} (100%) rename src/utilities/{findBreakingChanges.js => findBreakingChanges.ts} (100%) rename src/utilities/{getIntrospectionQuery.js => getIntrospectionQuery.ts} (100%) rename src/utilities/{getOperationAST.js => getOperationAST.ts} (100%) rename src/utilities/{getOperationRootType.js => getOperationRootType.ts} (100%) rename src/utilities/{index.js => index.ts} (100%) rename src/utilities/{introspectionFromSchema.js => introspectionFromSchema.ts} (100%) rename src/utilities/{lexicographicSortSchema.js => lexicographicSortSchema.ts} (100%) rename src/utilities/{printSchema.js => printSchema.ts} (100%) rename src/utilities/{separateOperations.js => separateOperations.ts} (100%) rename src/utilities/{stripIgnoredCharacters.js => stripIgnoredCharacters.ts} (100%) rename src/utilities/{typeComparators.js => typeComparators.ts} (100%) rename src/utilities/{typeFromAST.js => typeFromAST.ts} (100%) rename src/utilities/{valueFromAST.js => valueFromAST.ts} (100%) rename src/utilities/{valueFromASTUntyped.js => valueFromASTUntyped.ts} (100%) rename src/validation/{ValidationContext.js => ValidationContext.ts} (100%) rename src/validation/__tests__/{ExecutableDefinitionsRule-test.js => ExecutableDefinitionsRule-test.ts} (100%) rename src/validation/__tests__/{FieldsOnCorrectTypeRule-test.js => FieldsOnCorrectTypeRule-test.ts} (100%) rename src/validation/__tests__/{FragmentsOnCompositeTypesRule-test.js => FragmentsOnCompositeTypesRule-test.ts} (100%) rename src/validation/__tests__/{KnownArgumentNamesRule-test.js => KnownArgumentNamesRule-test.ts} (100%) rename src/validation/__tests__/{KnownDirectivesRule-test.js => KnownDirectivesRule-test.ts} (100%) rename src/validation/__tests__/{KnownFragmentNamesRule-test.js => KnownFragmentNamesRule-test.ts} (100%) rename src/validation/__tests__/{KnownTypeNamesRule-test.js => KnownTypeNamesRule-test.ts} (100%) rename src/validation/__tests__/{LoneAnonymousOperationRule-test.js => LoneAnonymousOperationRule-test.ts} (100%) rename src/validation/__tests__/{LoneSchemaDefinitionRule-test.js => LoneSchemaDefinitionRule-test.ts} (100%) rename src/validation/__tests__/{NoDeprecatedCustomRule-test.js => NoDeprecatedCustomRule-test.ts} (100%) rename src/validation/__tests__/{NoFragmentCyclesRule-test.js => NoFragmentCyclesRule-test.ts} (100%) rename src/validation/__tests__/{NoSchemaIntrospectionCustomRule-test.js => NoSchemaIntrospectionCustomRule-test.ts} (100%) rename src/validation/__tests__/{NoUndefinedVariablesRule-test.js => NoUndefinedVariablesRule-test.ts} (100%) rename src/validation/__tests__/{NoUnusedFragmentsRule-test.js => NoUnusedFragmentsRule-test.ts} (100%) rename src/validation/__tests__/{NoUnusedVariablesRule-test.js => NoUnusedVariablesRule-test.ts} (100%) rename src/validation/__tests__/{OverlappingFieldsCanBeMergedRule-test.js => OverlappingFieldsCanBeMergedRule-test.ts} (100%) rename src/validation/__tests__/{PossibleFragmentSpreadsRule-test.js => PossibleFragmentSpreadsRule-test.ts} (100%) rename src/validation/__tests__/{PossibleTypeExtensionsRule-test.js => PossibleTypeExtensionsRule-test.ts} (100%) rename src/validation/__tests__/{ProvidedRequiredArgumentsRule-test.js => ProvidedRequiredArgumentsRule-test.ts} (100%) rename src/validation/__tests__/{ScalarLeafsRule-test.js => ScalarLeafsRule-test.ts} (100%) rename src/validation/__tests__/{SingleFieldSubscriptionsRule-test.js => SingleFieldSubscriptionsRule-test.ts} (100%) rename src/validation/__tests__/{UniqueArgumentNamesRule-test.js => UniqueArgumentNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueDirectiveNamesRule-test.js => UniqueDirectiveNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueDirectivesPerLocationRule-test.js => UniqueDirectivesPerLocationRule-test.ts} (100%) rename src/validation/__tests__/{UniqueEnumValueNamesRule-test.js => UniqueEnumValueNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueFieldDefinitionNamesRule-test.js => UniqueFieldDefinitionNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueFragmentNamesRule-test.js => UniqueFragmentNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueInputFieldNamesRule-test.js => UniqueInputFieldNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueOperationNamesRule-test.js => UniqueOperationNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueOperationTypesRule-test.js => UniqueOperationTypesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueTypeNamesRule-test.js => UniqueTypeNamesRule-test.ts} (100%) rename src/validation/__tests__/{UniqueVariableNamesRule-test.js => UniqueVariableNamesRule-test.ts} (100%) rename src/validation/__tests__/{ValuesOfCorrectTypeRule-test.js => ValuesOfCorrectTypeRule-test.ts} (100%) rename src/validation/__tests__/{VariablesAreInputTypesRule-test.js => VariablesAreInputTypesRule-test.ts} (100%) rename src/validation/__tests__/{VariablesInAllowedPositionRule-test.js => VariablesInAllowedPositionRule-test.ts} (100%) rename src/validation/__tests__/{harness.js => harness.ts} (100%) rename src/validation/__tests__/{validation-test.js => validation-test.ts} (100%) rename src/validation/{index.js => index.ts} (100%) rename src/validation/rules/{ExecutableDefinitionsRule.js => ExecutableDefinitionsRule.ts} (100%) rename src/validation/rules/{FieldsOnCorrectTypeRule.js => FieldsOnCorrectTypeRule.ts} (100%) rename src/validation/rules/{FragmentsOnCompositeTypesRule.js => FragmentsOnCompositeTypesRule.ts} (100%) rename src/validation/rules/{KnownArgumentNamesRule.js => KnownArgumentNamesRule.ts} (100%) rename src/validation/rules/{KnownDirectivesRule.js => KnownDirectivesRule.ts} (100%) rename src/validation/rules/{KnownFragmentNamesRule.js => KnownFragmentNamesRule.ts} (100%) rename src/validation/rules/{KnownTypeNamesRule.js => KnownTypeNamesRule.ts} (100%) rename src/validation/rules/{LoneAnonymousOperationRule.js => LoneAnonymousOperationRule.ts} (100%) rename src/validation/rules/{LoneSchemaDefinitionRule.js => LoneSchemaDefinitionRule.ts} (100%) rename src/validation/rules/{NoFragmentCyclesRule.js => NoFragmentCyclesRule.ts} (100%) rename src/validation/rules/{NoUndefinedVariablesRule.js => NoUndefinedVariablesRule.ts} (100%) rename src/validation/rules/{NoUnusedFragmentsRule.js => NoUnusedFragmentsRule.ts} (100%) rename src/validation/rules/{NoUnusedVariablesRule.js => NoUnusedVariablesRule.ts} (100%) rename src/validation/rules/{OverlappingFieldsCanBeMergedRule.js => OverlappingFieldsCanBeMergedRule.ts} (100%) rename src/validation/rules/{PossibleFragmentSpreadsRule.js => PossibleFragmentSpreadsRule.ts} (100%) rename src/validation/rules/{PossibleTypeExtensionsRule.js => PossibleTypeExtensionsRule.ts} (100%) rename src/validation/rules/{ProvidedRequiredArgumentsRule.js => ProvidedRequiredArgumentsRule.ts} (100%) rename src/validation/rules/{ScalarLeafsRule.js => ScalarLeafsRule.ts} (100%) rename src/validation/rules/{SingleFieldSubscriptionsRule.js => SingleFieldSubscriptionsRule.ts} (100%) rename src/validation/rules/{UniqueArgumentNamesRule.js => UniqueArgumentNamesRule.ts} (100%) rename src/validation/rules/{UniqueDirectiveNamesRule.js => UniqueDirectiveNamesRule.ts} (100%) rename src/validation/rules/{UniqueDirectivesPerLocationRule.js => UniqueDirectivesPerLocationRule.ts} (100%) rename src/validation/rules/{UniqueEnumValueNamesRule.js => UniqueEnumValueNamesRule.ts} (100%) rename src/validation/rules/{UniqueFieldDefinitionNamesRule.js => UniqueFieldDefinitionNamesRule.ts} (100%) rename src/validation/rules/{UniqueFragmentNamesRule.js => UniqueFragmentNamesRule.ts} (100%) rename src/validation/rules/{UniqueInputFieldNamesRule.js => UniqueInputFieldNamesRule.ts} (100%) rename src/validation/rules/{UniqueOperationNamesRule.js => UniqueOperationNamesRule.ts} (100%) rename src/validation/rules/{UniqueOperationTypesRule.js => UniqueOperationTypesRule.ts} (100%) rename src/validation/rules/{UniqueTypeNamesRule.js => UniqueTypeNamesRule.ts} (100%) rename src/validation/rules/{UniqueVariableNamesRule.js => UniqueVariableNamesRule.ts} (100%) rename src/validation/rules/{ValuesOfCorrectTypeRule.js => ValuesOfCorrectTypeRule.ts} (100%) rename src/validation/rules/{VariablesAreInputTypesRule.js => VariablesAreInputTypesRule.ts} (100%) rename src/validation/rules/{VariablesInAllowedPositionRule.js => VariablesInAllowedPositionRule.ts} (100%) rename src/validation/rules/custom/{NoDeprecatedCustomRule.js => NoDeprecatedCustomRule.ts} (100%) rename src/validation/rules/custom/{NoSchemaIntrospectionCustomRule.js => NoSchemaIntrospectionCustomRule.ts} (100%) rename src/validation/{specifiedRules.js => specifiedRules.ts} (100%) rename src/validation/{validate.js => validate.ts} (100%) rename src/{version.js => version.ts} (100%) diff --git a/src/__testUtils__/__tests__/dedent-test.js b/src/__testUtils__/__tests__/dedent-test.ts similarity index 100% rename from src/__testUtils__/__tests__/dedent-test.js rename to src/__testUtils__/__tests__/dedent-test.ts diff --git a/src/__testUtils__/__tests__/genFuzzStrings-test.js b/src/__testUtils__/__tests__/genFuzzStrings-test.ts similarity index 100% rename from src/__testUtils__/__tests__/genFuzzStrings-test.js rename to src/__testUtils__/__tests__/genFuzzStrings-test.ts diff --git a/src/__testUtils__/__tests__/inspectStr-test.js b/src/__testUtils__/__tests__/inspectStr-test.ts similarity index 100% rename from src/__testUtils__/__tests__/inspectStr-test.js rename to src/__testUtils__/__tests__/inspectStr-test.ts diff --git a/src/__testUtils__/__tests__/resolveOnNextTick-test.js b/src/__testUtils__/__tests__/resolveOnNextTick-test.ts similarity index 100% rename from src/__testUtils__/__tests__/resolveOnNextTick-test.js rename to src/__testUtils__/__tests__/resolveOnNextTick-test.ts diff --git a/src/__testUtils__/dedent.js b/src/__testUtils__/dedent.ts similarity index 100% rename from src/__testUtils__/dedent.js rename to src/__testUtils__/dedent.ts diff --git a/src/__testUtils__/genFuzzStrings.js b/src/__testUtils__/genFuzzStrings.ts similarity index 100% rename from src/__testUtils__/genFuzzStrings.js rename to src/__testUtils__/genFuzzStrings.ts diff --git a/src/__testUtils__/inspectStr.js b/src/__testUtils__/inspectStr.ts similarity index 100% rename from src/__testUtils__/inspectStr.js rename to src/__testUtils__/inspectStr.ts diff --git a/src/__testUtils__/kitchenSinkQuery.js b/src/__testUtils__/kitchenSinkQuery.ts similarity index 100% rename from src/__testUtils__/kitchenSinkQuery.js rename to src/__testUtils__/kitchenSinkQuery.ts diff --git a/src/__testUtils__/kitchenSinkSDL.js b/src/__testUtils__/kitchenSinkSDL.ts similarity index 100% rename from src/__testUtils__/kitchenSinkSDL.js rename to src/__testUtils__/kitchenSinkSDL.ts diff --git a/src/__testUtils__/resolveOnNextTick.js b/src/__testUtils__/resolveOnNextTick.ts similarity index 100% rename from src/__testUtils__/resolveOnNextTick.js rename to src/__testUtils__/resolveOnNextTick.ts diff --git a/src/__tests__/starWarsData.js b/src/__tests__/starWarsData.ts similarity index 100% rename from src/__tests__/starWarsData.js rename to src/__tests__/starWarsData.ts diff --git a/src/__tests__/starWarsIntrospection-test.js b/src/__tests__/starWarsIntrospection-test.ts similarity index 100% rename from src/__tests__/starWarsIntrospection-test.js rename to src/__tests__/starWarsIntrospection-test.ts diff --git a/src/__tests__/starWarsQuery-test.js b/src/__tests__/starWarsQuery-test.ts similarity index 100% rename from src/__tests__/starWarsQuery-test.js rename to src/__tests__/starWarsQuery-test.ts diff --git a/src/__tests__/starWarsSchema.js b/src/__tests__/starWarsSchema.ts similarity index 100% rename from src/__tests__/starWarsSchema.js rename to src/__tests__/starWarsSchema.ts diff --git a/src/__tests__/starWarsValidation-test.js b/src/__tests__/starWarsValidation-test.ts similarity index 100% rename from src/__tests__/starWarsValidation-test.js rename to src/__tests__/starWarsValidation-test.ts diff --git a/src/__tests__/version-test.js b/src/__tests__/version-test.ts similarity index 100% rename from src/__tests__/version-test.js rename to src/__tests__/version-test.ts diff --git a/src/error/GraphQLError.js b/src/error/GraphQLError.ts similarity index 100% rename from src/error/GraphQLError.js rename to src/error/GraphQLError.ts diff --git a/src/error/__tests__/GraphQLError-test.js b/src/error/__tests__/GraphQLError-test.ts similarity index 100% rename from src/error/__tests__/GraphQLError-test.js rename to src/error/__tests__/GraphQLError-test.ts diff --git a/src/error/__tests__/formatError-test.js b/src/error/__tests__/formatError-test.ts similarity index 100% rename from src/error/__tests__/formatError-test.js rename to src/error/__tests__/formatError-test.ts diff --git a/src/error/__tests__/locatedError-test.js b/src/error/__tests__/locatedError-test.ts similarity index 100% rename from src/error/__tests__/locatedError-test.js rename to src/error/__tests__/locatedError-test.ts diff --git a/src/error/formatError.js b/src/error/formatError.ts similarity index 100% rename from src/error/formatError.js rename to src/error/formatError.ts diff --git a/src/error/index.js b/src/error/index.ts similarity index 100% rename from src/error/index.js rename to src/error/index.ts diff --git a/src/error/locatedError.js b/src/error/locatedError.ts similarity index 100% rename from src/error/locatedError.js rename to src/error/locatedError.ts diff --git a/src/error/syntaxError.js b/src/error/syntaxError.ts similarity index 100% rename from src/error/syntaxError.js rename to src/error/syntaxError.ts diff --git a/src/execution/__tests__/abstract-test.js b/src/execution/__tests__/abstract-test.ts similarity index 100% rename from src/execution/__tests__/abstract-test.js rename to src/execution/__tests__/abstract-test.ts diff --git a/src/execution/__tests__/directives-test.js b/src/execution/__tests__/directives-test.ts similarity index 100% rename from src/execution/__tests__/directives-test.js rename to src/execution/__tests__/directives-test.ts diff --git a/src/execution/__tests__/executor-test.js b/src/execution/__tests__/executor-test.ts similarity index 100% rename from src/execution/__tests__/executor-test.js rename to src/execution/__tests__/executor-test.ts diff --git a/src/execution/__tests__/lists-test.js b/src/execution/__tests__/lists-test.ts similarity index 100% rename from src/execution/__tests__/lists-test.js rename to src/execution/__tests__/lists-test.ts diff --git a/src/execution/__tests__/mutations-test.js b/src/execution/__tests__/mutations-test.ts similarity index 100% rename from src/execution/__tests__/mutations-test.js rename to src/execution/__tests__/mutations-test.ts diff --git a/src/execution/__tests__/nonnull-test.js b/src/execution/__tests__/nonnull-test.ts similarity index 100% rename from src/execution/__tests__/nonnull-test.js rename to src/execution/__tests__/nonnull-test.ts diff --git a/src/execution/__tests__/resolve-test.js b/src/execution/__tests__/resolve-test.ts similarity index 100% rename from src/execution/__tests__/resolve-test.js rename to src/execution/__tests__/resolve-test.ts diff --git a/src/execution/__tests__/schema-test.js b/src/execution/__tests__/schema-test.ts similarity index 100% rename from src/execution/__tests__/schema-test.js rename to src/execution/__tests__/schema-test.ts diff --git a/src/execution/__tests__/sync-test.js b/src/execution/__tests__/sync-test.ts similarity index 100% rename from src/execution/__tests__/sync-test.js rename to src/execution/__tests__/sync-test.ts diff --git a/src/execution/__tests__/union-interface-test.js b/src/execution/__tests__/union-interface-test.ts similarity index 100% rename from src/execution/__tests__/union-interface-test.js rename to src/execution/__tests__/union-interface-test.ts diff --git a/src/execution/__tests__/variables-test.js b/src/execution/__tests__/variables-test.ts similarity index 100% rename from src/execution/__tests__/variables-test.js rename to src/execution/__tests__/variables-test.ts diff --git a/src/execution/execute.js b/src/execution/execute.ts similarity index 100% rename from src/execution/execute.js rename to src/execution/execute.ts diff --git a/src/execution/index.js b/src/execution/index.ts similarity index 100% rename from src/execution/index.js rename to src/execution/index.ts diff --git a/src/execution/values.js b/src/execution/values.ts similarity index 100% rename from src/execution/values.js rename to src/execution/values.ts diff --git a/src/graphql.js b/src/graphql.ts similarity index 100% rename from src/graphql.js rename to src/graphql.ts diff --git a/src/index.js b/src/index.ts similarity index 100% rename from src/index.js rename to src/index.ts diff --git a/src/jsutils/ObjMap.js b/src/jsutils/ObjMap.ts similarity index 100% rename from src/jsutils/ObjMap.js rename to src/jsutils/ObjMap.ts diff --git a/src/jsutils/Path.js b/src/jsutils/Path.ts similarity index 100% rename from src/jsutils/Path.js rename to src/jsutils/Path.ts diff --git a/src/jsutils/PromiseOrValue.js b/src/jsutils/PromiseOrValue.ts similarity index 100% rename from src/jsutils/PromiseOrValue.js rename to src/jsutils/PromiseOrValue.ts diff --git a/src/jsutils/__tests__/didYouMean-test.js b/src/jsutils/__tests__/didYouMean-test.ts similarity index 100% rename from src/jsutils/__tests__/didYouMean-test.js rename to src/jsutils/__tests__/didYouMean-test.ts diff --git a/src/jsutils/__tests__/identityFunc-test.js b/src/jsutils/__tests__/identityFunc-test.ts similarity index 100% rename from src/jsutils/__tests__/identityFunc-test.js rename to src/jsutils/__tests__/identityFunc-test.ts diff --git a/src/jsutils/__tests__/inspect-test.js b/src/jsutils/__tests__/inspect-test.ts similarity index 100% rename from src/jsutils/__tests__/inspect-test.js rename to src/jsutils/__tests__/inspect-test.ts diff --git a/src/jsutils/__tests__/instanceOf-test.js b/src/jsutils/__tests__/instanceOf-test.ts similarity index 100% rename from src/jsutils/__tests__/instanceOf-test.js rename to src/jsutils/__tests__/instanceOf-test.ts diff --git a/src/jsutils/__tests__/invariant-test.js b/src/jsutils/__tests__/invariant-test.ts similarity index 100% rename from src/jsutils/__tests__/invariant-test.js rename to src/jsutils/__tests__/invariant-test.ts diff --git a/src/jsutils/__tests__/isAsyncIterable-test.js b/src/jsutils/__tests__/isAsyncIterable-test.ts similarity index 100% rename from src/jsutils/__tests__/isAsyncIterable-test.js rename to src/jsutils/__tests__/isAsyncIterable-test.ts diff --git a/src/jsutils/__tests__/isIteratableObject-test.js b/src/jsutils/__tests__/isIteratableObject-test.ts similarity index 100% rename from src/jsutils/__tests__/isIteratableObject-test.js rename to src/jsutils/__tests__/isIteratableObject-test.ts diff --git a/src/jsutils/__tests__/isObjectLike-test.js b/src/jsutils/__tests__/isObjectLike-test.ts similarity index 100% rename from src/jsutils/__tests__/isObjectLike-test.js rename to src/jsutils/__tests__/isObjectLike-test.ts diff --git a/src/jsutils/__tests__/naturalCompare-test.js b/src/jsutils/__tests__/naturalCompare-test.ts similarity index 100% rename from src/jsutils/__tests__/naturalCompare-test.js rename to src/jsutils/__tests__/naturalCompare-test.ts diff --git a/src/jsutils/__tests__/suggestionList-test.js b/src/jsutils/__tests__/suggestionList-test.ts similarity index 100% rename from src/jsutils/__tests__/suggestionList-test.js rename to src/jsutils/__tests__/suggestionList-test.ts diff --git a/src/jsutils/__tests__/toObjMap-test.js b/src/jsutils/__tests__/toObjMap-test.ts similarity index 100% rename from src/jsutils/__tests__/toObjMap-test.js rename to src/jsutils/__tests__/toObjMap-test.ts diff --git a/src/jsutils/devAssert.js b/src/jsutils/devAssert.ts similarity index 100% rename from src/jsutils/devAssert.js rename to src/jsutils/devAssert.ts diff --git a/src/jsutils/didYouMean.js b/src/jsutils/didYouMean.ts similarity index 100% rename from src/jsutils/didYouMean.js rename to src/jsutils/didYouMean.ts diff --git a/src/jsutils/identityFunc.js b/src/jsutils/identityFunc.ts similarity index 100% rename from src/jsutils/identityFunc.js rename to src/jsutils/identityFunc.ts diff --git a/src/jsutils/inspect.js b/src/jsutils/inspect.ts similarity index 100% rename from src/jsutils/inspect.js rename to src/jsutils/inspect.ts diff --git a/src/jsutils/instanceOf.js b/src/jsutils/instanceOf.ts similarity index 100% rename from src/jsutils/instanceOf.js rename to src/jsutils/instanceOf.ts diff --git a/src/jsutils/invariant.js b/src/jsutils/invariant.ts similarity index 100% rename from src/jsutils/invariant.js rename to src/jsutils/invariant.ts diff --git a/src/jsutils/isAsyncIterable.js b/src/jsutils/isAsyncIterable.ts similarity index 100% rename from src/jsutils/isAsyncIterable.js rename to src/jsutils/isAsyncIterable.ts diff --git a/src/jsutils/isIteratableObject.js b/src/jsutils/isIteratableObject.ts similarity index 100% rename from src/jsutils/isIteratableObject.js rename to src/jsutils/isIteratableObject.ts diff --git a/src/jsutils/isObjectLike.js b/src/jsutils/isObjectLike.ts similarity index 100% rename from src/jsutils/isObjectLike.js rename to src/jsutils/isObjectLike.ts diff --git a/src/jsutils/isPromise.js b/src/jsutils/isPromise.ts similarity index 100% rename from src/jsutils/isPromise.js rename to src/jsutils/isPromise.ts diff --git a/src/jsutils/keyMap.js b/src/jsutils/keyMap.ts similarity index 100% rename from src/jsutils/keyMap.js rename to src/jsutils/keyMap.ts diff --git a/src/jsutils/keyValMap.js b/src/jsutils/keyValMap.ts similarity index 100% rename from src/jsutils/keyValMap.js rename to src/jsutils/keyValMap.ts diff --git a/src/jsutils/mapValue.js b/src/jsutils/mapValue.ts similarity index 100% rename from src/jsutils/mapValue.js rename to src/jsutils/mapValue.ts diff --git a/src/jsutils/memoize3.js b/src/jsutils/memoize3.ts similarity index 100% rename from src/jsutils/memoize3.js rename to src/jsutils/memoize3.ts diff --git a/src/jsutils/naturalCompare.js b/src/jsutils/naturalCompare.ts similarity index 100% rename from src/jsutils/naturalCompare.js rename to src/jsutils/naturalCompare.ts diff --git a/src/jsutils/printPathArray.js b/src/jsutils/printPathArray.ts similarity index 100% rename from src/jsutils/printPathArray.js rename to src/jsutils/printPathArray.ts diff --git a/src/jsutils/promiseForObject.js b/src/jsutils/promiseForObject.ts similarity index 100% rename from src/jsutils/promiseForObject.js rename to src/jsutils/promiseForObject.ts diff --git a/src/jsutils/promiseReduce.js b/src/jsutils/promiseReduce.ts similarity index 100% rename from src/jsutils/promiseReduce.js rename to src/jsutils/promiseReduce.ts diff --git a/src/jsutils/suggestionList.js b/src/jsutils/suggestionList.ts similarity index 100% rename from src/jsutils/suggestionList.js rename to src/jsutils/suggestionList.ts diff --git a/src/jsutils/toObjMap.js b/src/jsutils/toObjMap.ts similarity index 100% rename from src/jsutils/toObjMap.js rename to src/jsutils/toObjMap.ts diff --git a/src/language/__tests__/blockString-fuzz.js b/src/language/__tests__/blockString-fuzz.ts similarity index 100% rename from src/language/__tests__/blockString-fuzz.js rename to src/language/__tests__/blockString-fuzz.ts diff --git a/src/language/__tests__/blockString-test.js b/src/language/__tests__/blockString-test.ts similarity index 100% rename from src/language/__tests__/blockString-test.js rename to src/language/__tests__/blockString-test.ts diff --git a/src/language/__tests__/lexer-test.js b/src/language/__tests__/lexer-test.ts similarity index 100% rename from src/language/__tests__/lexer-test.js rename to src/language/__tests__/lexer-test.ts diff --git a/src/language/__tests__/parser-test.js b/src/language/__tests__/parser-test.ts similarity index 100% rename from src/language/__tests__/parser-test.js rename to src/language/__tests__/parser-test.ts diff --git a/src/language/__tests__/predicates-test.js b/src/language/__tests__/predicates-test.ts similarity index 100% rename from src/language/__tests__/predicates-test.js rename to src/language/__tests__/predicates-test.ts diff --git a/src/language/__tests__/printLocation-test.js b/src/language/__tests__/printLocation-test.ts similarity index 100% rename from src/language/__tests__/printLocation-test.js rename to src/language/__tests__/printLocation-test.ts diff --git a/src/language/__tests__/printer-test.js b/src/language/__tests__/printer-test.ts similarity index 100% rename from src/language/__tests__/printer-test.js rename to src/language/__tests__/printer-test.ts diff --git a/src/language/__tests__/schema-parser-test.js b/src/language/__tests__/schema-parser-test.ts similarity index 100% rename from src/language/__tests__/schema-parser-test.js rename to src/language/__tests__/schema-parser-test.ts diff --git a/src/language/__tests__/schema-printer-test.js b/src/language/__tests__/schema-printer-test.ts similarity index 100% rename from src/language/__tests__/schema-printer-test.js rename to src/language/__tests__/schema-printer-test.ts diff --git a/src/language/__tests__/source-test.js b/src/language/__tests__/source-test.ts similarity index 100% rename from src/language/__tests__/source-test.js rename to src/language/__tests__/source-test.ts diff --git a/src/language/__tests__/toJSONDeep.js b/src/language/__tests__/toJSONDeep.ts similarity index 100% rename from src/language/__tests__/toJSONDeep.js rename to src/language/__tests__/toJSONDeep.ts diff --git a/src/language/__tests__/visitor-test.js b/src/language/__tests__/visitor-test.ts similarity index 100% rename from src/language/__tests__/visitor-test.js rename to src/language/__tests__/visitor-test.ts diff --git a/src/language/ast.js b/src/language/ast.ts similarity index 100% rename from src/language/ast.js rename to src/language/ast.ts diff --git a/src/language/blockString.js b/src/language/blockString.ts similarity index 100% rename from src/language/blockString.js rename to src/language/blockString.ts diff --git a/src/language/directiveLocation.js b/src/language/directiveLocation.ts similarity index 100% rename from src/language/directiveLocation.js rename to src/language/directiveLocation.ts diff --git a/src/language/index.js b/src/language/index.ts similarity index 100% rename from src/language/index.js rename to src/language/index.ts diff --git a/src/language/kinds.js b/src/language/kinds.ts similarity index 100% rename from src/language/kinds.js rename to src/language/kinds.ts diff --git a/src/language/lexer.js b/src/language/lexer.ts similarity index 100% rename from src/language/lexer.js rename to src/language/lexer.ts diff --git a/src/language/location.js b/src/language/location.ts similarity index 100% rename from src/language/location.js rename to src/language/location.ts diff --git a/src/language/parser.js b/src/language/parser.ts similarity index 100% rename from src/language/parser.js rename to src/language/parser.ts diff --git a/src/language/predicates.js b/src/language/predicates.ts similarity index 100% rename from src/language/predicates.js rename to src/language/predicates.ts diff --git a/src/language/printLocation.js b/src/language/printLocation.ts similarity index 100% rename from src/language/printLocation.js rename to src/language/printLocation.ts diff --git a/src/language/printer.js b/src/language/printer.ts similarity index 100% rename from src/language/printer.js rename to src/language/printer.ts diff --git a/src/language/source.js b/src/language/source.ts similarity index 100% rename from src/language/source.js rename to src/language/source.ts diff --git a/src/language/tokenKind.js b/src/language/tokenKind.ts similarity index 100% rename from src/language/tokenKind.js rename to src/language/tokenKind.ts diff --git a/src/language/visitor.js b/src/language/visitor.ts similarity index 100% rename from src/language/visitor.js rename to src/language/visitor.ts diff --git a/src/subscription/__tests__/mapAsyncIterator-test.js b/src/subscription/__tests__/mapAsyncIterator-test.ts similarity index 100% rename from src/subscription/__tests__/mapAsyncIterator-test.js rename to src/subscription/__tests__/mapAsyncIterator-test.ts diff --git a/src/subscription/__tests__/simplePubSub-test.js b/src/subscription/__tests__/simplePubSub-test.ts similarity index 100% rename from src/subscription/__tests__/simplePubSub-test.js rename to src/subscription/__tests__/simplePubSub-test.ts diff --git a/src/subscription/__tests__/simplePubSub.js b/src/subscription/__tests__/simplePubSub.ts similarity index 100% rename from src/subscription/__tests__/simplePubSub.js rename to src/subscription/__tests__/simplePubSub.ts diff --git a/src/subscription/__tests__/subscribe-test.js b/src/subscription/__tests__/subscribe-test.ts similarity index 100% rename from src/subscription/__tests__/subscribe-test.js rename to src/subscription/__tests__/subscribe-test.ts diff --git a/src/subscription/index.js b/src/subscription/index.ts similarity index 100% rename from src/subscription/index.js rename to src/subscription/index.ts diff --git a/src/subscription/mapAsyncIterator.js b/src/subscription/mapAsyncIterator.ts similarity index 100% rename from src/subscription/mapAsyncIterator.js rename to src/subscription/mapAsyncIterator.ts diff --git a/src/subscription/subscribe.js b/src/subscription/subscribe.ts similarity index 100% rename from src/subscription/subscribe.js rename to src/subscription/subscribe.ts diff --git a/src/type/__tests__/definition-test.js b/src/type/__tests__/definition-test.ts similarity index 100% rename from src/type/__tests__/definition-test.js rename to src/type/__tests__/definition-test.ts diff --git a/src/type/__tests__/directive-test.js b/src/type/__tests__/directive-test.ts similarity index 100% rename from src/type/__tests__/directive-test.js rename to src/type/__tests__/directive-test.ts diff --git a/src/type/__tests__/enumType-test.js b/src/type/__tests__/enumType-test.ts similarity index 100% rename from src/type/__tests__/enumType-test.js rename to src/type/__tests__/enumType-test.ts diff --git a/src/type/__tests__/extensions-test.js b/src/type/__tests__/extensions-test.ts similarity index 100% rename from src/type/__tests__/extensions-test.js rename to src/type/__tests__/extensions-test.ts diff --git a/src/type/__tests__/introspection-test.js b/src/type/__tests__/introspection-test.ts similarity index 100% rename from src/type/__tests__/introspection-test.js rename to src/type/__tests__/introspection-test.ts diff --git a/src/type/__tests__/predicate-test.js b/src/type/__tests__/predicate-test.ts similarity index 100% rename from src/type/__tests__/predicate-test.js rename to src/type/__tests__/predicate-test.ts diff --git a/src/type/__tests__/scalars-test.js b/src/type/__tests__/scalars-test.ts similarity index 100% rename from src/type/__tests__/scalars-test.js rename to src/type/__tests__/scalars-test.ts diff --git a/src/type/__tests__/schema-test.js b/src/type/__tests__/schema-test.ts similarity index 100% rename from src/type/__tests__/schema-test.js rename to src/type/__tests__/schema-test.ts diff --git a/src/type/__tests__/validation-test.js b/src/type/__tests__/validation-test.ts similarity index 100% rename from src/type/__tests__/validation-test.js rename to src/type/__tests__/validation-test.ts diff --git a/src/type/definition.js b/src/type/definition.ts similarity index 100% rename from src/type/definition.js rename to src/type/definition.ts diff --git a/src/type/directives.js b/src/type/directives.ts similarity index 100% rename from src/type/directives.js rename to src/type/directives.ts diff --git a/src/type/index.js b/src/type/index.ts similarity index 100% rename from src/type/index.js rename to src/type/index.ts diff --git a/src/type/introspection.js b/src/type/introspection.ts similarity index 100% rename from src/type/introspection.js rename to src/type/introspection.ts diff --git a/src/type/scalars.js b/src/type/scalars.ts similarity index 100% rename from src/type/scalars.js rename to src/type/scalars.ts diff --git a/src/type/schema.js b/src/type/schema.ts similarity index 100% rename from src/type/schema.js rename to src/type/schema.ts diff --git a/src/type/validate.js b/src/type/validate.ts similarity index 100% rename from src/type/validate.js rename to src/type/validate.ts diff --git a/src/utilities/TypeInfo.js b/src/utilities/TypeInfo.ts similarity index 100% rename from src/utilities/TypeInfo.js rename to src/utilities/TypeInfo.ts diff --git a/src/utilities/__tests__/TypeInfo-test.js b/src/utilities/__tests__/TypeInfo-test.ts similarity index 100% rename from src/utilities/__tests__/TypeInfo-test.js rename to src/utilities/__tests__/TypeInfo-test.ts diff --git a/src/utilities/__tests__/assertValidName-test.js b/src/utilities/__tests__/assertValidName-test.ts similarity index 100% rename from src/utilities/__tests__/assertValidName-test.js rename to src/utilities/__tests__/assertValidName-test.ts diff --git a/src/utilities/__tests__/astFromValue-test.js b/src/utilities/__tests__/astFromValue-test.ts similarity index 100% rename from src/utilities/__tests__/astFromValue-test.js rename to src/utilities/__tests__/astFromValue-test.ts diff --git a/src/utilities/__tests__/buildASTSchema-test.js b/src/utilities/__tests__/buildASTSchema-test.ts similarity index 100% rename from src/utilities/__tests__/buildASTSchema-test.js rename to src/utilities/__tests__/buildASTSchema-test.ts diff --git a/src/utilities/__tests__/buildClientSchema-test.js b/src/utilities/__tests__/buildClientSchema-test.ts similarity index 100% rename from src/utilities/__tests__/buildClientSchema-test.js rename to src/utilities/__tests__/buildClientSchema-test.ts diff --git a/src/utilities/__tests__/coerceInputValue-test.js b/src/utilities/__tests__/coerceInputValue-test.ts similarity index 100% rename from src/utilities/__tests__/coerceInputValue-test.js rename to src/utilities/__tests__/coerceInputValue-test.ts diff --git a/src/utilities/__tests__/concatAST-test.js b/src/utilities/__tests__/concatAST-test.ts similarity index 100% rename from src/utilities/__tests__/concatAST-test.js rename to src/utilities/__tests__/concatAST-test.ts diff --git a/src/utilities/__tests__/extendSchema-test.js b/src/utilities/__tests__/extendSchema-test.ts similarity index 100% rename from src/utilities/__tests__/extendSchema-test.js rename to src/utilities/__tests__/extendSchema-test.ts diff --git a/src/utilities/__tests__/findBreakingChanges-test.js b/src/utilities/__tests__/findBreakingChanges-test.ts similarity index 100% rename from src/utilities/__tests__/findBreakingChanges-test.js rename to src/utilities/__tests__/findBreakingChanges-test.ts diff --git a/src/utilities/__tests__/getIntrospectionQuery-test.js b/src/utilities/__tests__/getIntrospectionQuery-test.ts similarity index 100% rename from src/utilities/__tests__/getIntrospectionQuery-test.js rename to src/utilities/__tests__/getIntrospectionQuery-test.ts diff --git a/src/utilities/__tests__/getOperationAST-test.js b/src/utilities/__tests__/getOperationAST-test.ts similarity index 100% rename from src/utilities/__tests__/getOperationAST-test.js rename to src/utilities/__tests__/getOperationAST-test.ts diff --git a/src/utilities/__tests__/getOperationRootType-test.js b/src/utilities/__tests__/getOperationRootType-test.ts similarity index 100% rename from src/utilities/__tests__/getOperationRootType-test.js rename to src/utilities/__tests__/getOperationRootType-test.ts diff --git a/src/utilities/__tests__/introspectionFromSchema-test.js b/src/utilities/__tests__/introspectionFromSchema-test.ts similarity index 100% rename from src/utilities/__tests__/introspectionFromSchema-test.js rename to src/utilities/__tests__/introspectionFromSchema-test.ts diff --git a/src/utilities/__tests__/lexicographicSortSchema-test.js b/src/utilities/__tests__/lexicographicSortSchema-test.ts similarity index 100% rename from src/utilities/__tests__/lexicographicSortSchema-test.js rename to src/utilities/__tests__/lexicographicSortSchema-test.ts diff --git a/src/utilities/__tests__/printSchema-test.js b/src/utilities/__tests__/printSchema-test.ts similarity index 100% rename from src/utilities/__tests__/printSchema-test.js rename to src/utilities/__tests__/printSchema-test.ts diff --git a/src/utilities/__tests__/separateOperations-test.js b/src/utilities/__tests__/separateOperations-test.ts similarity index 100% rename from src/utilities/__tests__/separateOperations-test.js rename to src/utilities/__tests__/separateOperations-test.ts diff --git a/src/utilities/__tests__/stripIgnoredCharacters-fuzz.js b/src/utilities/__tests__/stripIgnoredCharacters-fuzz.ts similarity index 100% rename from src/utilities/__tests__/stripIgnoredCharacters-fuzz.js rename to src/utilities/__tests__/stripIgnoredCharacters-fuzz.ts diff --git a/src/utilities/__tests__/stripIgnoredCharacters-test.js b/src/utilities/__tests__/stripIgnoredCharacters-test.ts similarity index 100% rename from src/utilities/__tests__/stripIgnoredCharacters-test.js rename to src/utilities/__tests__/stripIgnoredCharacters-test.ts diff --git a/src/utilities/__tests__/typeComparators-test.js b/src/utilities/__tests__/typeComparators-test.ts similarity index 100% rename from src/utilities/__tests__/typeComparators-test.js rename to src/utilities/__tests__/typeComparators-test.ts diff --git a/src/utilities/__tests__/valueFromAST-test.js b/src/utilities/__tests__/valueFromAST-test.ts similarity index 100% rename from src/utilities/__tests__/valueFromAST-test.js rename to src/utilities/__tests__/valueFromAST-test.ts diff --git a/src/utilities/__tests__/valueFromASTUntyped-test.js b/src/utilities/__tests__/valueFromASTUntyped-test.ts similarity index 100% rename from src/utilities/__tests__/valueFromASTUntyped-test.js rename to src/utilities/__tests__/valueFromASTUntyped-test.ts diff --git a/src/utilities/assertValidName.js b/src/utilities/assertValidName.ts similarity index 100% rename from src/utilities/assertValidName.js rename to src/utilities/assertValidName.ts diff --git a/src/utilities/astFromValue.js b/src/utilities/astFromValue.ts similarity index 100% rename from src/utilities/astFromValue.js rename to src/utilities/astFromValue.ts diff --git a/src/utilities/buildASTSchema.js b/src/utilities/buildASTSchema.ts similarity index 100% rename from src/utilities/buildASTSchema.js rename to src/utilities/buildASTSchema.ts diff --git a/src/utilities/buildClientSchema.js b/src/utilities/buildClientSchema.ts similarity index 100% rename from src/utilities/buildClientSchema.js rename to src/utilities/buildClientSchema.ts diff --git a/src/utilities/coerceInputValue.js b/src/utilities/coerceInputValue.ts similarity index 100% rename from src/utilities/coerceInputValue.js rename to src/utilities/coerceInputValue.ts diff --git a/src/utilities/concatAST.js b/src/utilities/concatAST.ts similarity index 100% rename from src/utilities/concatAST.js rename to src/utilities/concatAST.ts diff --git a/src/utilities/extendSchema.js b/src/utilities/extendSchema.ts similarity index 100% rename from src/utilities/extendSchema.js rename to src/utilities/extendSchema.ts diff --git a/src/utilities/findBreakingChanges.js b/src/utilities/findBreakingChanges.ts similarity index 100% rename from src/utilities/findBreakingChanges.js rename to src/utilities/findBreakingChanges.ts diff --git a/src/utilities/getIntrospectionQuery.js b/src/utilities/getIntrospectionQuery.ts similarity index 100% rename from src/utilities/getIntrospectionQuery.js rename to src/utilities/getIntrospectionQuery.ts diff --git a/src/utilities/getOperationAST.js b/src/utilities/getOperationAST.ts similarity index 100% rename from src/utilities/getOperationAST.js rename to src/utilities/getOperationAST.ts diff --git a/src/utilities/getOperationRootType.js b/src/utilities/getOperationRootType.ts similarity index 100% rename from src/utilities/getOperationRootType.js rename to src/utilities/getOperationRootType.ts diff --git a/src/utilities/index.js b/src/utilities/index.ts similarity index 100% rename from src/utilities/index.js rename to src/utilities/index.ts diff --git a/src/utilities/introspectionFromSchema.js b/src/utilities/introspectionFromSchema.ts similarity index 100% rename from src/utilities/introspectionFromSchema.js rename to src/utilities/introspectionFromSchema.ts diff --git a/src/utilities/lexicographicSortSchema.js b/src/utilities/lexicographicSortSchema.ts similarity index 100% rename from src/utilities/lexicographicSortSchema.js rename to src/utilities/lexicographicSortSchema.ts diff --git a/src/utilities/printSchema.js b/src/utilities/printSchema.ts similarity index 100% rename from src/utilities/printSchema.js rename to src/utilities/printSchema.ts diff --git a/src/utilities/separateOperations.js b/src/utilities/separateOperations.ts similarity index 100% rename from src/utilities/separateOperations.js rename to src/utilities/separateOperations.ts diff --git a/src/utilities/stripIgnoredCharacters.js b/src/utilities/stripIgnoredCharacters.ts similarity index 100% rename from src/utilities/stripIgnoredCharacters.js rename to src/utilities/stripIgnoredCharacters.ts diff --git a/src/utilities/typeComparators.js b/src/utilities/typeComparators.ts similarity index 100% rename from src/utilities/typeComparators.js rename to src/utilities/typeComparators.ts diff --git a/src/utilities/typeFromAST.js b/src/utilities/typeFromAST.ts similarity index 100% rename from src/utilities/typeFromAST.js rename to src/utilities/typeFromAST.ts diff --git a/src/utilities/valueFromAST.js b/src/utilities/valueFromAST.ts similarity index 100% rename from src/utilities/valueFromAST.js rename to src/utilities/valueFromAST.ts diff --git a/src/utilities/valueFromASTUntyped.js b/src/utilities/valueFromASTUntyped.ts similarity index 100% rename from src/utilities/valueFromASTUntyped.js rename to src/utilities/valueFromASTUntyped.ts diff --git a/src/validation/ValidationContext.js b/src/validation/ValidationContext.ts similarity index 100% rename from src/validation/ValidationContext.js rename to src/validation/ValidationContext.ts diff --git a/src/validation/__tests__/ExecutableDefinitionsRule-test.js b/src/validation/__tests__/ExecutableDefinitionsRule-test.ts similarity index 100% rename from src/validation/__tests__/ExecutableDefinitionsRule-test.js rename to src/validation/__tests__/ExecutableDefinitionsRule-test.ts diff --git a/src/validation/__tests__/FieldsOnCorrectTypeRule-test.js b/src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts similarity index 100% rename from src/validation/__tests__/FieldsOnCorrectTypeRule-test.js rename to src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts diff --git a/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js b/src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts similarity index 100% rename from src/validation/__tests__/FragmentsOnCompositeTypesRule-test.js rename to src/validation/__tests__/FragmentsOnCompositeTypesRule-test.ts diff --git a/src/validation/__tests__/KnownArgumentNamesRule-test.js b/src/validation/__tests__/KnownArgumentNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/KnownArgumentNamesRule-test.js rename to src/validation/__tests__/KnownArgumentNamesRule-test.ts diff --git a/src/validation/__tests__/KnownDirectivesRule-test.js b/src/validation/__tests__/KnownDirectivesRule-test.ts similarity index 100% rename from src/validation/__tests__/KnownDirectivesRule-test.js rename to src/validation/__tests__/KnownDirectivesRule-test.ts diff --git a/src/validation/__tests__/KnownFragmentNamesRule-test.js b/src/validation/__tests__/KnownFragmentNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/KnownFragmentNamesRule-test.js rename to src/validation/__tests__/KnownFragmentNamesRule-test.ts diff --git a/src/validation/__tests__/KnownTypeNamesRule-test.js b/src/validation/__tests__/KnownTypeNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/KnownTypeNamesRule-test.js rename to src/validation/__tests__/KnownTypeNamesRule-test.ts diff --git a/src/validation/__tests__/LoneAnonymousOperationRule-test.js b/src/validation/__tests__/LoneAnonymousOperationRule-test.ts similarity index 100% rename from src/validation/__tests__/LoneAnonymousOperationRule-test.js rename to src/validation/__tests__/LoneAnonymousOperationRule-test.ts diff --git a/src/validation/__tests__/LoneSchemaDefinitionRule-test.js b/src/validation/__tests__/LoneSchemaDefinitionRule-test.ts similarity index 100% rename from src/validation/__tests__/LoneSchemaDefinitionRule-test.js rename to src/validation/__tests__/LoneSchemaDefinitionRule-test.ts diff --git a/src/validation/__tests__/NoDeprecatedCustomRule-test.js b/src/validation/__tests__/NoDeprecatedCustomRule-test.ts similarity index 100% rename from src/validation/__tests__/NoDeprecatedCustomRule-test.js rename to src/validation/__tests__/NoDeprecatedCustomRule-test.ts diff --git a/src/validation/__tests__/NoFragmentCyclesRule-test.js b/src/validation/__tests__/NoFragmentCyclesRule-test.ts similarity index 100% rename from src/validation/__tests__/NoFragmentCyclesRule-test.js rename to src/validation/__tests__/NoFragmentCyclesRule-test.ts diff --git a/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js b/src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.ts similarity index 100% rename from src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.js rename to src/validation/__tests__/NoSchemaIntrospectionCustomRule-test.ts diff --git a/src/validation/__tests__/NoUndefinedVariablesRule-test.js b/src/validation/__tests__/NoUndefinedVariablesRule-test.ts similarity index 100% rename from src/validation/__tests__/NoUndefinedVariablesRule-test.js rename to src/validation/__tests__/NoUndefinedVariablesRule-test.ts diff --git a/src/validation/__tests__/NoUnusedFragmentsRule-test.js b/src/validation/__tests__/NoUnusedFragmentsRule-test.ts similarity index 100% rename from src/validation/__tests__/NoUnusedFragmentsRule-test.js rename to src/validation/__tests__/NoUnusedFragmentsRule-test.ts diff --git a/src/validation/__tests__/NoUnusedVariablesRule-test.js b/src/validation/__tests__/NoUnusedVariablesRule-test.ts similarity index 100% rename from src/validation/__tests__/NoUnusedVariablesRule-test.js rename to src/validation/__tests__/NoUnusedVariablesRule-test.ts diff --git a/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js b/src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts similarity index 100% rename from src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.js rename to src/validation/__tests__/OverlappingFieldsCanBeMergedRule-test.ts diff --git a/src/validation/__tests__/PossibleFragmentSpreadsRule-test.js b/src/validation/__tests__/PossibleFragmentSpreadsRule-test.ts similarity index 100% rename from src/validation/__tests__/PossibleFragmentSpreadsRule-test.js rename to src/validation/__tests__/PossibleFragmentSpreadsRule-test.ts diff --git a/src/validation/__tests__/PossibleTypeExtensionsRule-test.js b/src/validation/__tests__/PossibleTypeExtensionsRule-test.ts similarity index 100% rename from src/validation/__tests__/PossibleTypeExtensionsRule-test.js rename to src/validation/__tests__/PossibleTypeExtensionsRule-test.ts diff --git a/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js b/src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts similarity index 100% rename from src/validation/__tests__/ProvidedRequiredArgumentsRule-test.js rename to src/validation/__tests__/ProvidedRequiredArgumentsRule-test.ts diff --git a/src/validation/__tests__/ScalarLeafsRule-test.js b/src/validation/__tests__/ScalarLeafsRule-test.ts similarity index 100% rename from src/validation/__tests__/ScalarLeafsRule-test.js rename to src/validation/__tests__/ScalarLeafsRule-test.ts diff --git a/src/validation/__tests__/SingleFieldSubscriptionsRule-test.js b/src/validation/__tests__/SingleFieldSubscriptionsRule-test.ts similarity index 100% rename from src/validation/__tests__/SingleFieldSubscriptionsRule-test.js rename to src/validation/__tests__/SingleFieldSubscriptionsRule-test.ts diff --git a/src/validation/__tests__/UniqueArgumentNamesRule-test.js b/src/validation/__tests__/UniqueArgumentNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueArgumentNamesRule-test.js rename to src/validation/__tests__/UniqueArgumentNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueDirectiveNamesRule-test.js b/src/validation/__tests__/UniqueDirectiveNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueDirectiveNamesRule-test.js rename to src/validation/__tests__/UniqueDirectiveNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js b/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueDirectivesPerLocationRule-test.js rename to src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts diff --git a/src/validation/__tests__/UniqueEnumValueNamesRule-test.js b/src/validation/__tests__/UniqueEnumValueNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueEnumValueNamesRule-test.js rename to src/validation/__tests__/UniqueEnumValueNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js b/src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.js rename to src/validation/__tests__/UniqueFieldDefinitionNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueFragmentNamesRule-test.js b/src/validation/__tests__/UniqueFragmentNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueFragmentNamesRule-test.js rename to src/validation/__tests__/UniqueFragmentNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueInputFieldNamesRule-test.js b/src/validation/__tests__/UniqueInputFieldNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueInputFieldNamesRule-test.js rename to src/validation/__tests__/UniqueInputFieldNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueOperationNamesRule-test.js b/src/validation/__tests__/UniqueOperationNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueOperationNamesRule-test.js rename to src/validation/__tests__/UniqueOperationNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueOperationTypesRule-test.js b/src/validation/__tests__/UniqueOperationTypesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueOperationTypesRule-test.js rename to src/validation/__tests__/UniqueOperationTypesRule-test.ts diff --git a/src/validation/__tests__/UniqueTypeNamesRule-test.js b/src/validation/__tests__/UniqueTypeNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueTypeNamesRule-test.js rename to src/validation/__tests__/UniqueTypeNamesRule-test.ts diff --git a/src/validation/__tests__/UniqueVariableNamesRule-test.js b/src/validation/__tests__/UniqueVariableNamesRule-test.ts similarity index 100% rename from src/validation/__tests__/UniqueVariableNamesRule-test.js rename to src/validation/__tests__/UniqueVariableNamesRule-test.ts diff --git a/src/validation/__tests__/ValuesOfCorrectTypeRule-test.js b/src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts similarity index 100% rename from src/validation/__tests__/ValuesOfCorrectTypeRule-test.js rename to src/validation/__tests__/ValuesOfCorrectTypeRule-test.ts diff --git a/src/validation/__tests__/VariablesAreInputTypesRule-test.js b/src/validation/__tests__/VariablesAreInputTypesRule-test.ts similarity index 100% rename from src/validation/__tests__/VariablesAreInputTypesRule-test.js rename to src/validation/__tests__/VariablesAreInputTypesRule-test.ts diff --git a/src/validation/__tests__/VariablesInAllowedPositionRule-test.js b/src/validation/__tests__/VariablesInAllowedPositionRule-test.ts similarity index 100% rename from src/validation/__tests__/VariablesInAllowedPositionRule-test.js rename to src/validation/__tests__/VariablesInAllowedPositionRule-test.ts diff --git a/src/validation/__tests__/harness.js b/src/validation/__tests__/harness.ts similarity index 100% rename from src/validation/__tests__/harness.js rename to src/validation/__tests__/harness.ts diff --git a/src/validation/__tests__/validation-test.js b/src/validation/__tests__/validation-test.ts similarity index 100% rename from src/validation/__tests__/validation-test.js rename to src/validation/__tests__/validation-test.ts diff --git a/src/validation/index.js b/src/validation/index.ts similarity index 100% rename from src/validation/index.js rename to src/validation/index.ts diff --git a/src/validation/rules/ExecutableDefinitionsRule.js b/src/validation/rules/ExecutableDefinitionsRule.ts similarity index 100% rename from src/validation/rules/ExecutableDefinitionsRule.js rename to src/validation/rules/ExecutableDefinitionsRule.ts diff --git a/src/validation/rules/FieldsOnCorrectTypeRule.js b/src/validation/rules/FieldsOnCorrectTypeRule.ts similarity index 100% rename from src/validation/rules/FieldsOnCorrectTypeRule.js rename to src/validation/rules/FieldsOnCorrectTypeRule.ts diff --git a/src/validation/rules/FragmentsOnCompositeTypesRule.js b/src/validation/rules/FragmentsOnCompositeTypesRule.ts similarity index 100% rename from src/validation/rules/FragmentsOnCompositeTypesRule.js rename to src/validation/rules/FragmentsOnCompositeTypesRule.ts diff --git a/src/validation/rules/KnownArgumentNamesRule.js b/src/validation/rules/KnownArgumentNamesRule.ts similarity index 100% rename from src/validation/rules/KnownArgumentNamesRule.js rename to src/validation/rules/KnownArgumentNamesRule.ts diff --git a/src/validation/rules/KnownDirectivesRule.js b/src/validation/rules/KnownDirectivesRule.ts similarity index 100% rename from src/validation/rules/KnownDirectivesRule.js rename to src/validation/rules/KnownDirectivesRule.ts diff --git a/src/validation/rules/KnownFragmentNamesRule.js b/src/validation/rules/KnownFragmentNamesRule.ts similarity index 100% rename from src/validation/rules/KnownFragmentNamesRule.js rename to src/validation/rules/KnownFragmentNamesRule.ts diff --git a/src/validation/rules/KnownTypeNamesRule.js b/src/validation/rules/KnownTypeNamesRule.ts similarity index 100% rename from src/validation/rules/KnownTypeNamesRule.js rename to src/validation/rules/KnownTypeNamesRule.ts diff --git a/src/validation/rules/LoneAnonymousOperationRule.js b/src/validation/rules/LoneAnonymousOperationRule.ts similarity index 100% rename from src/validation/rules/LoneAnonymousOperationRule.js rename to src/validation/rules/LoneAnonymousOperationRule.ts diff --git a/src/validation/rules/LoneSchemaDefinitionRule.js b/src/validation/rules/LoneSchemaDefinitionRule.ts similarity index 100% rename from src/validation/rules/LoneSchemaDefinitionRule.js rename to src/validation/rules/LoneSchemaDefinitionRule.ts diff --git a/src/validation/rules/NoFragmentCyclesRule.js b/src/validation/rules/NoFragmentCyclesRule.ts similarity index 100% rename from src/validation/rules/NoFragmentCyclesRule.js rename to src/validation/rules/NoFragmentCyclesRule.ts diff --git a/src/validation/rules/NoUndefinedVariablesRule.js b/src/validation/rules/NoUndefinedVariablesRule.ts similarity index 100% rename from src/validation/rules/NoUndefinedVariablesRule.js rename to src/validation/rules/NoUndefinedVariablesRule.ts diff --git a/src/validation/rules/NoUnusedFragmentsRule.js b/src/validation/rules/NoUnusedFragmentsRule.ts similarity index 100% rename from src/validation/rules/NoUnusedFragmentsRule.js rename to src/validation/rules/NoUnusedFragmentsRule.ts diff --git a/src/validation/rules/NoUnusedVariablesRule.js b/src/validation/rules/NoUnusedVariablesRule.ts similarity index 100% rename from src/validation/rules/NoUnusedVariablesRule.js rename to src/validation/rules/NoUnusedVariablesRule.ts diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.js b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts similarity index 100% rename from src/validation/rules/OverlappingFieldsCanBeMergedRule.js rename to src/validation/rules/OverlappingFieldsCanBeMergedRule.ts diff --git a/src/validation/rules/PossibleFragmentSpreadsRule.js b/src/validation/rules/PossibleFragmentSpreadsRule.ts similarity index 100% rename from src/validation/rules/PossibleFragmentSpreadsRule.js rename to src/validation/rules/PossibleFragmentSpreadsRule.ts diff --git a/src/validation/rules/PossibleTypeExtensionsRule.js b/src/validation/rules/PossibleTypeExtensionsRule.ts similarity index 100% rename from src/validation/rules/PossibleTypeExtensionsRule.js rename to src/validation/rules/PossibleTypeExtensionsRule.ts diff --git a/src/validation/rules/ProvidedRequiredArgumentsRule.js b/src/validation/rules/ProvidedRequiredArgumentsRule.ts similarity index 100% rename from src/validation/rules/ProvidedRequiredArgumentsRule.js rename to src/validation/rules/ProvidedRequiredArgumentsRule.ts diff --git a/src/validation/rules/ScalarLeafsRule.js b/src/validation/rules/ScalarLeafsRule.ts similarity index 100% rename from src/validation/rules/ScalarLeafsRule.js rename to src/validation/rules/ScalarLeafsRule.ts diff --git a/src/validation/rules/SingleFieldSubscriptionsRule.js b/src/validation/rules/SingleFieldSubscriptionsRule.ts similarity index 100% rename from src/validation/rules/SingleFieldSubscriptionsRule.js rename to src/validation/rules/SingleFieldSubscriptionsRule.ts diff --git a/src/validation/rules/UniqueArgumentNamesRule.js b/src/validation/rules/UniqueArgumentNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueArgumentNamesRule.js rename to src/validation/rules/UniqueArgumentNamesRule.ts diff --git a/src/validation/rules/UniqueDirectiveNamesRule.js b/src/validation/rules/UniqueDirectiveNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueDirectiveNamesRule.js rename to src/validation/rules/UniqueDirectiveNamesRule.ts diff --git a/src/validation/rules/UniqueDirectivesPerLocationRule.js b/src/validation/rules/UniqueDirectivesPerLocationRule.ts similarity index 100% rename from src/validation/rules/UniqueDirectivesPerLocationRule.js rename to src/validation/rules/UniqueDirectivesPerLocationRule.ts diff --git a/src/validation/rules/UniqueEnumValueNamesRule.js b/src/validation/rules/UniqueEnumValueNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueEnumValueNamesRule.js rename to src/validation/rules/UniqueEnumValueNamesRule.ts diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.js b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueFieldDefinitionNamesRule.js rename to src/validation/rules/UniqueFieldDefinitionNamesRule.ts diff --git a/src/validation/rules/UniqueFragmentNamesRule.js b/src/validation/rules/UniqueFragmentNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueFragmentNamesRule.js rename to src/validation/rules/UniqueFragmentNamesRule.ts diff --git a/src/validation/rules/UniqueInputFieldNamesRule.js b/src/validation/rules/UniqueInputFieldNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueInputFieldNamesRule.js rename to src/validation/rules/UniqueInputFieldNamesRule.ts diff --git a/src/validation/rules/UniqueOperationNamesRule.js b/src/validation/rules/UniqueOperationNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueOperationNamesRule.js rename to src/validation/rules/UniqueOperationNamesRule.ts diff --git a/src/validation/rules/UniqueOperationTypesRule.js b/src/validation/rules/UniqueOperationTypesRule.ts similarity index 100% rename from src/validation/rules/UniqueOperationTypesRule.js rename to src/validation/rules/UniqueOperationTypesRule.ts diff --git a/src/validation/rules/UniqueTypeNamesRule.js b/src/validation/rules/UniqueTypeNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueTypeNamesRule.js rename to src/validation/rules/UniqueTypeNamesRule.ts diff --git a/src/validation/rules/UniqueVariableNamesRule.js b/src/validation/rules/UniqueVariableNamesRule.ts similarity index 100% rename from src/validation/rules/UniqueVariableNamesRule.js rename to src/validation/rules/UniqueVariableNamesRule.ts diff --git a/src/validation/rules/ValuesOfCorrectTypeRule.js b/src/validation/rules/ValuesOfCorrectTypeRule.ts similarity index 100% rename from src/validation/rules/ValuesOfCorrectTypeRule.js rename to src/validation/rules/ValuesOfCorrectTypeRule.ts diff --git a/src/validation/rules/VariablesAreInputTypesRule.js b/src/validation/rules/VariablesAreInputTypesRule.ts similarity index 100% rename from src/validation/rules/VariablesAreInputTypesRule.js rename to src/validation/rules/VariablesAreInputTypesRule.ts diff --git a/src/validation/rules/VariablesInAllowedPositionRule.js b/src/validation/rules/VariablesInAllowedPositionRule.ts similarity index 100% rename from src/validation/rules/VariablesInAllowedPositionRule.js rename to src/validation/rules/VariablesInAllowedPositionRule.ts diff --git a/src/validation/rules/custom/NoDeprecatedCustomRule.js b/src/validation/rules/custom/NoDeprecatedCustomRule.ts similarity index 100% rename from src/validation/rules/custom/NoDeprecatedCustomRule.js rename to src/validation/rules/custom/NoDeprecatedCustomRule.ts diff --git a/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js b/src/validation/rules/custom/NoSchemaIntrospectionCustomRule.ts similarity index 100% rename from src/validation/rules/custom/NoSchemaIntrospectionCustomRule.js rename to src/validation/rules/custom/NoSchemaIntrospectionCustomRule.ts diff --git a/src/validation/specifiedRules.js b/src/validation/specifiedRules.ts similarity index 100% rename from src/validation/specifiedRules.js rename to src/validation/specifiedRules.ts diff --git a/src/validation/validate.js b/src/validation/validate.ts similarity index 100% rename from src/validation/validate.js rename to src/validation/validate.ts diff --git a/src/version.js b/src/version.ts similarity index 100% rename from src/version.js rename to src/version.ts From 46130e9b162cb24248635c2586b90852be7250ae Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 20 Oct 2020 14:50:35 -0500 Subject: [PATCH 02/65] convert flow's exact object type to TS --- .../__tests__/genFuzzStrings-test.ts | 8 +- src/__testUtils__/genFuzzStrings.ts | 8 +- src/__tests__/starWarsData.ts | 12 +- src/error/formatError.ts | 4 +- src/execution/__tests__/abstract-test.ts | 6 +- src/execution/__tests__/lists-test.ts | 2 +- src/execution/__tests__/resolve-test.ts | 2 +- src/execution/execute.ts | 16 +- src/execution/values.ts | 6 +- src/graphql.ts | 4 +- src/jsutils/Path.ts | 4 +- src/language/__tests__/source-test.ts | 2 +- src/language/ast.ts | 182 +++++++++--------- src/language/location.ts | 4 +- src/language/parser.ts | 6 +- src/language/source.ts | 4 +- src/language/visitor.ts | 4 +- src/subscription/__tests__/subscribe-test.ts | 4 +- src/subscription/subscribe.ts | 4 +- src/type/__tests__/predicate-test.ts | 8 +- src/type/definition.ts | 84 ++++---- src/type/directives.ts | 8 +- src/type/schema.ts | 20 +- src/utilities/buildASTSchema.ts | 6 +- src/utilities/extendSchema.ts | 8 +- src/utilities/findBreakingChanges.ts | 12 +- src/utilities/getIntrospectionQuery.ts | 64 +++--- src/validation/ValidationContext.ts | 4 +- src/validation/__tests__/validation-test.ts | 2 +- .../rules/FieldsOnCorrectTypeRule.ts | 2 +- src/validation/validate.ts | 2 +- 31 files changed, 251 insertions(+), 251 deletions(-) diff --git a/src/__testUtils__/__tests__/genFuzzStrings-test.ts b/src/__testUtils__/__tests__/genFuzzStrings-test.ts index 70f267353b..da69c8a5f5 100644 --- a/src/__testUtils__/__tests__/genFuzzStrings-test.ts +++ b/src/__testUtils__/__tests__/genFuzzStrings-test.ts @@ -3,10 +3,10 @@ import { describe, it } from 'mocha'; import { genFuzzStrings } from '../genFuzzStrings'; -function expectFuzzStrings(options: {| - allowedChars: Array, - maxLength: number, -|}) { +function expectFuzzStrings(options: { + allowedChars: Array; + maxLength: number; +}) { return expect(Array.from(genFuzzStrings(options))); } diff --git a/src/__testUtils__/genFuzzStrings.ts b/src/__testUtils__/genFuzzStrings.ts index 86aaf96709..9a9ffeac99 100644 --- a/src/__testUtils__/genFuzzStrings.ts +++ b/src/__testUtils__/genFuzzStrings.ts @@ -1,10 +1,10 @@ /** * Generator that produces all possible combinations of allowed characters. */ -export function* genFuzzStrings(options: {| - allowedChars: Array, - maxLength: number, -|}): Generator { +export function* genFuzzStrings(options: { + allowedChars: Array; + maxLength: number; +}): Generator { const { allowedChars, maxLength } = options; const numAllowedChars = allowedChars.length; diff --git a/src/__tests__/starWarsData.ts b/src/__tests__/starWarsData.ts index 7e1917b8bd..45fed55edd 100644 --- a/src/__tests__/starWarsData.ts +++ b/src/__tests__/starWarsData.ts @@ -10,23 +10,23 @@ export type Character = { ... }; -export type Human = {| +export type Human = { type: 'Human', id: string, name: string, friends: Array, appearsIn: Array, homePlanet?: string, -|}; +}; -export type Droid = {| +export type Droid = { type: 'Droid', id: string, name: string, friends: Array, appearsIn: Array, primaryFunction: string, -|}; +}; /** * This defines a basic set of data for our Star Wars Schema. @@ -79,7 +79,7 @@ const tarkin: Human = { appearsIn: [4], }; -const humanData: {| [id: string]: Human |} = { +const humanData: { [id: string]: Human } = { [luke.id]: luke, [vader.id]: vader, [han.id]: han, @@ -105,7 +105,7 @@ const artoo: Droid = { primaryFunction: 'Astromech', }; -const droidData: {| [id: string]: Droid |} = { +const droidData: { [id: string]: Droid } = { [threepio.id]: threepio, [artoo.id]: artoo, }; diff --git a/src/error/formatError.ts b/src/error/formatError.ts index ef59ad8df8..520c7be76c 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -23,7 +23,7 @@ export function formatError(error: GraphQLError): GraphQLFormattedError { /** * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors */ -export type GraphQLFormattedError = {| +export type GraphQLFormattedError = { /** * A short, human-readable summary of the problem that **SHOULD NOT** change * from occurrence to occurrence of the problem, except for purposes of @@ -47,4 +47,4 @@ export type GraphQLFormattedError = {| * and hence there are no additional restrictions on its contents. */ +extensions?: { [key: string]: mixed, ... }, -|}; +}; diff --git a/src/execution/__tests__/abstract-test.ts b/src/execution/__tests__/abstract-test.ts index 519585af0f..8c77046f34 100644 --- a/src/execution/__tests__/abstract-test.ts +++ b/src/execution/__tests__/abstract-test.ts @@ -16,11 +16,11 @@ import { buildSchema } from '../../utilities/buildASTSchema'; import { executeSync, execute } from '../execute'; -async function executeQuery(args: {| +async function executeQuery(args: { schema: GraphQLSchema, query: string, rootValue?: mixed, -|}) { +}) { const { schema, query, rootValue } = args; const document = parse(query); const result = executeSync({ @@ -533,7 +533,7 @@ describe('Execute: Handles execution of abstract types', () => { } `); - function expectError({ forTypeName }: {| forTypeName: mixed |}) { + function expectError({ forTypeName }: { forTypeName: mixed }) { const rootValue = { pet: { __typename: forTypeName } }; const result = executeSync({ schema, document, rootValue }); return { diff --git a/src/execution/__tests__/lists-test.ts b/src/execution/__tests__/lists-test.ts index 5654b55ccc..bf32a2b069 100644 --- a/src/execution/__tests__/lists-test.ts +++ b/src/execution/__tests__/lists-test.ts @@ -65,7 +65,7 @@ describe('Execute: Accepts any iterable as list value', () => { }); describe('Execute: Handles list nullability', () => { - async function complete(args: {| listField: mixed, as: string |}) { + async function complete(args: { listField: mixed; as: string }) { const { listField, as } = args; const schema = buildSchema(`type Query { listField: ${as} }`); const document = parse('{ listField }'); diff --git a/src/execution/__tests__/resolve-test.ts b/src/execution/__tests__/resolve-test.ts index afe911e7bc..b8d28a615b 100644 --- a/src/execution/__tests__/resolve-test.ts +++ b/src/execution/__tests__/resolve-test.ts @@ -64,7 +64,7 @@ describe('Execute: resolve function', () => { this._num = num; } - test(args: {| addend1: number |}, context: {| addend2: number |}) { + test(args: { addend1: number }, context: { addend2: number }) { return this._num + args.addend1 + context.addend2; } } diff --git a/src/execution/execute.ts b/src/execution/execute.ts index eff16ebdba..8637aef744 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -92,7 +92,7 @@ import { * Namely, schema of the type system that is currently executing, * and the fragments defined in the query document */ -export type ExecutionContext = {| +export type ExecutionContext = { schema: GraphQLSchema, fragments: ObjMap, rootValue: mixed, @@ -102,7 +102,7 @@ export type ExecutionContext = {| fieldResolver: GraphQLFieldResolver, typeResolver: GraphQLTypeResolver, errors: Array, -|}; +}; /** * The result of GraphQL execution. @@ -111,19 +111,19 @@ export type ExecutionContext = {| * - `data` is the result of a successful execution of the query. * - `extensions` is reserved for adding non-standard properties. */ -export type ExecutionResult = {| +export type ExecutionResult = { errors?: $ReadOnlyArray, data?: ObjMap | null, extensions?: ObjMap, -|}; +}; -export type FormattedExecutionResult = {| +export type FormattedExecutionResult = { errors?: $ReadOnlyArray, data?: ObjMap | null, extensions?: ObjMap, -|}; +}; -export type ExecutionArgs = {| +export type ExecutionArgs = { schema: GraphQLSchema, document: DocumentNode, rootValue?: mixed, @@ -132,7 +132,7 @@ export type ExecutionArgs = {| operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, -|}; +}; /** * Implements the "Evaluating requests" section of the GraphQL specification. diff --git a/src/execution/values.ts b/src/execution/values.ts index d91633acd4..f188dbf8e5 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -23,8 +23,8 @@ import { valueFromAST } from '../utilities/valueFromAST'; import { coerceInputValue } from '../utilities/coerceInputValue'; type CoercedVariableValues = - | {| errors: $ReadOnlyArray |} - | {| coerced: { [variable: string]: mixed, ... } |}; + | { errors: $ReadOnlyArray } + | { coerced: { [variable: string]: mixed, ... } }; /** * Prepares an object map of variableValues of the correct type based on the @@ -41,7 +41,7 @@ export function getVariableValues( schema: GraphQLSchema, varDefNodes: $ReadOnlyArray, inputs: { +[variable: string]: mixed, ... }, - options?: {| maxErrors?: number |}, + options?: { maxErrors?: number }, ): CoercedVariableValues { const errors = []; const maxErrors = options?.maxErrors; diff --git a/src/graphql.ts b/src/graphql.ts index 3938b157bd..1aaf5e11bd 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -55,7 +55,7 @@ import { execute } from './execution/execute'; * If not provided, the default type resolver is used (which looks for a * `__typename` field or alternatively calls the `isTypeOf` method). */ -export type GraphQLArgs = {| +export type GraphQLArgs = { schema: GraphQLSchema, source: string | Source, rootValue?: mixed, @@ -64,7 +64,7 @@ export type GraphQLArgs = {| operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, -|}; +}; export function graphql(args: GraphQLArgs): Promise { // Always return a Promise for a consistent API. diff --git a/src/jsutils/Path.ts b/src/jsutils/Path.ts index 47e8c7693c..f7888ae027 100644 --- a/src/jsutils/Path.ts +++ b/src/jsutils/Path.ts @@ -1,8 +1,8 @@ -export type Path = {| +export type Path = { +prev: Path | void, +key: string | number, +typename: string | void, -|}; +}; /** * Given a Path and a key, return a new Path containing the new key. diff --git a/src/language/__tests__/source-test.ts b/src/language/__tests__/source-test.ts index 31a34aa16d..5510bf1fc6 100644 --- a/src/language/__tests__/source-test.ts +++ b/src/language/__tests__/source-test.ts @@ -25,7 +25,7 @@ describe('Source', () => { }); it('rejects invalid locationOffset', () => { - function createSource(locationOffset: {| line: number, column: number |}) { + function createSource(locationOffset: { line: number; column: number }) { return new Source('', '', locationOffset); } diff --git a/src/language/ast.ts b/src/language/ast.ts index c0a9a615e7..8b73ec685b 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -39,7 +39,7 @@ export class Location { this.source = source; } - toJSON(): {| start: number, end: number |} { + toJSON(): { start: number, end: number } { return { start: this.start, end: this.end }; } } @@ -106,12 +106,12 @@ export class Token { this.next = null; } - toJSON(): {| + toJSON(): { kind: TokenKindEnum, value: string | void, line: number, column: number, - |} { + } { return { kind: this.kind, value: this.value, @@ -179,7 +179,7 @@ export type ASTNode = /** * Utility type listing all nodes indexed by their kind. */ -export type ASTKindToNode = {| +export type ASTKindToNode = { Name: NameNode, Document: DocumentNode, OperationDefinition: OperationDefinitionNode, @@ -223,23 +223,23 @@ export type ASTKindToNode = {| UnionTypeExtension: UnionTypeExtensionNode, EnumTypeExtension: EnumTypeExtensionNode, InputObjectTypeExtension: InputObjectTypeExtensionNode, -|}; +}; // Name -export type NameNode = {| +export type NameNode = { +kind: 'Name', +loc?: Location, +value: string, -|}; +}; // Document -export type DocumentNode = {| +export type DocumentNode = { +kind: 'Document', +loc?: Location, +definitions: $ReadOnlyArray, -|}; +}; export type DefinitionNode = | ExecutableDefinitionNode @@ -250,7 +250,7 @@ export type ExecutableDefinitionNode = | OperationDefinitionNode | FragmentDefinitionNode; -export type OperationDefinitionNode = {| +export type OperationDefinitionNode = { +kind: 'OperationDefinition', +loc?: Location, +operation: OperationTypeNode, @@ -258,34 +258,34 @@ export type OperationDefinitionNode = {| +variableDefinitions?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +selectionSet: SelectionSetNode, -|}; +}; export type OperationTypeNode = 'query' | 'mutation' | 'subscription'; -export type VariableDefinitionNode = {| +export type VariableDefinitionNode = { +kind: 'VariableDefinition', +loc?: Location, +variable: VariableNode, +type: TypeNode, +defaultValue?: ValueNode, +directives?: $ReadOnlyArray, -|}; +}; -export type VariableNode = {| +export type VariableNode = { +kind: 'Variable', +loc?: Location, +name: NameNode, -|}; +}; -export type SelectionSetNode = {| +export type SelectionSetNode = { kind: 'SelectionSet', loc?: Location, selections: $ReadOnlyArray, -|}; +}; export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; -export type FieldNode = {| +export type FieldNode = { +kind: 'Field', +loc?: Location, +alias?: NameNode, @@ -293,33 +293,33 @@ export type FieldNode = {| +arguments?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +selectionSet?: SelectionSetNode, -|}; +}; -export type ArgumentNode = {| +export type ArgumentNode = { +kind: 'Argument', +loc?: Location, +name: NameNode, +value: ValueNode, -|}; +}; // Fragments -export type FragmentSpreadNode = {| +export type FragmentSpreadNode = { +kind: 'FragmentSpread', +loc?: Location, +name: NameNode, +directives?: $ReadOnlyArray, -|}; +}; -export type InlineFragmentNode = {| +export type InlineFragmentNode = { +kind: 'InlineFragment', +loc?: Location, +typeCondition?: NamedTypeNode, +directives?: $ReadOnlyArray, +selectionSet: SelectionSetNode, -|}; +}; -export type FragmentDefinitionNode = {| +export type FragmentDefinitionNode = { +kind: 'FragmentDefinition', +loc?: Location, +name: NameNode, @@ -328,7 +328,7 @@ export type FragmentDefinitionNode = {| +typeCondition: NamedTypeNode, +directives?: $ReadOnlyArray, +selectionSet: SelectionSetNode, -|}; +}; // Values @@ -343,91 +343,91 @@ export type ValueNode = | ListValueNode | ObjectValueNode; -export type IntValueNode = {| +export type IntValueNode = { +kind: 'IntValue', +loc?: Location, +value: string, -|}; +}; -export type FloatValueNode = {| +export type FloatValueNode = { +kind: 'FloatValue', +loc?: Location, +value: string, -|}; +}; -export type StringValueNode = {| +export type StringValueNode = { +kind: 'StringValue', +loc?: Location, +value: string, +block?: boolean, -|}; +}; -export type BooleanValueNode = {| +export type BooleanValueNode = { +kind: 'BooleanValue', +loc?: Location, +value: boolean, -|}; +}; -export type NullValueNode = {| +export type NullValueNode = { +kind: 'NullValue', +loc?: Location, -|}; +}; -export type EnumValueNode = {| +export type EnumValueNode = { +kind: 'EnumValue', +loc?: Location, +value: string, -|}; +}; -export type ListValueNode = {| +export type ListValueNode = { +kind: 'ListValue', +loc?: Location, +values: $ReadOnlyArray, -|}; +}; -export type ObjectValueNode = {| +export type ObjectValueNode = { +kind: 'ObjectValue', +loc?: Location, +fields: $ReadOnlyArray, -|}; +}; -export type ObjectFieldNode = {| +export type ObjectFieldNode = { +kind: 'ObjectField', +loc?: Location, +name: NameNode, +value: ValueNode, -|}; +}; // Directives -export type DirectiveNode = {| +export type DirectiveNode = { +kind: 'Directive', +loc?: Location, +name: NameNode, +arguments?: $ReadOnlyArray, -|}; +}; // Type Reference export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; -export type NamedTypeNode = {| +export type NamedTypeNode = { +kind: 'NamedType', +loc?: Location, +name: NameNode, -|}; +}; -export type ListTypeNode = {| +export type ListTypeNode = { +kind: 'ListType', +loc?: Location, +type: TypeNode, -|}; +}; -export type NonNullTypeNode = {| +export type NonNullTypeNode = { +kind: 'NonNullType', +loc?: Location, +type: NamedTypeNode | ListTypeNode, -|}; +}; // Type System Definition @@ -436,20 +436,20 @@ export type TypeSystemDefinitionNode = | TypeDefinitionNode | DirectiveDefinitionNode; -export type SchemaDefinitionNode = {| +export type SchemaDefinitionNode = { +kind: 'SchemaDefinition', +loc?: Location, +description?: StringValueNode, +directives?: $ReadOnlyArray, +operationTypes: $ReadOnlyArray, -|}; +}; -export type OperationTypeDefinitionNode = {| +export type OperationTypeDefinitionNode = { +kind: 'OperationTypeDefinition', +loc?: Location, +operation: OperationTypeNode, +type: NamedTypeNode, -|}; +}; // Type Definition @@ -461,15 +461,15 @@ export type TypeDefinitionNode = | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode; -export type ScalarTypeDefinitionNode = {| +export type ScalarTypeDefinitionNode = { +kind: 'ScalarTypeDefinition', +loc?: Location, +description?: StringValueNode, +name: NameNode, +directives?: $ReadOnlyArray, -|}; +}; -export type ObjectTypeDefinitionNode = {| +export type ObjectTypeDefinitionNode = { +kind: 'ObjectTypeDefinition', +loc?: Location, +description?: StringValueNode, @@ -477,9 +477,9 @@ export type ObjectTypeDefinitionNode = {| +interfaces?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; -export type FieldDefinitionNode = {| +export type FieldDefinitionNode = { +kind: 'FieldDefinition', +loc?: Location, +description?: StringValueNode, @@ -487,9 +487,9 @@ export type FieldDefinitionNode = {| +arguments?: $ReadOnlyArray, +type: TypeNode, +directives?: $ReadOnlyArray, -|}; +}; -export type InputValueDefinitionNode = {| +export type InputValueDefinitionNode = { +kind: 'InputValueDefinition', +loc?: Location, +description?: StringValueNode, @@ -497,9 +497,9 @@ export type InputValueDefinitionNode = {| +type: TypeNode, +defaultValue?: ValueNode, +directives?: $ReadOnlyArray, -|}; +}; -export type InterfaceTypeDefinitionNode = {| +export type InterfaceTypeDefinitionNode = { +kind: 'InterfaceTypeDefinition', +loc?: Location, +description?: StringValueNode, @@ -507,46 +507,46 @@ export type InterfaceTypeDefinitionNode = {| +interfaces?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; -export type UnionTypeDefinitionNode = {| +export type UnionTypeDefinitionNode = { +kind: 'UnionTypeDefinition', +loc?: Location, +description?: StringValueNode, +name: NameNode, +directives?: $ReadOnlyArray, +types?: $ReadOnlyArray, -|}; +}; -export type EnumTypeDefinitionNode = {| +export type EnumTypeDefinitionNode = { +kind: 'EnumTypeDefinition', +loc?: Location, +description?: StringValueNode, +name: NameNode, +directives?: $ReadOnlyArray, +values?: $ReadOnlyArray, -|}; +}; -export type EnumValueDefinitionNode = {| +export type EnumValueDefinitionNode = { +kind: 'EnumValueDefinition', +loc?: Location, +description?: StringValueNode, +name: NameNode, +directives?: $ReadOnlyArray, -|}; +}; -export type InputObjectTypeDefinitionNode = {| +export type InputObjectTypeDefinitionNode = { +kind: 'InputObjectTypeDefinition', +loc?: Location, +description?: StringValueNode, +name: NameNode, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; // Directive Definitions -export type DirectiveDefinitionNode = {| +export type DirectiveDefinitionNode = { +kind: 'DirectiveDefinition', +loc?: Location, +description?: StringValueNode, @@ -554,18 +554,18 @@ export type DirectiveDefinitionNode = {| +arguments?: $ReadOnlyArray, +repeatable: boolean, +locations: $ReadOnlyArray, -|}; +}; // Type System Extensions export type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; -export type SchemaExtensionNode = {| +export type SchemaExtensionNode = { +kind: 'SchemaExtension', +loc?: Location, +directives?: $ReadOnlyArray, +operationTypes?: $ReadOnlyArray, -|}; +}; // Type Extensions @@ -577,51 +577,51 @@ export type TypeExtensionNode = | EnumTypeExtensionNode | InputObjectTypeExtensionNode; -export type ScalarTypeExtensionNode = {| +export type ScalarTypeExtensionNode = { +kind: 'ScalarTypeExtension', +loc?: Location, +name: NameNode, +directives?: $ReadOnlyArray, -|}; +}; -export type ObjectTypeExtensionNode = {| +export type ObjectTypeExtensionNode = { +kind: 'ObjectTypeExtension', +loc?: Location, +name: NameNode, +interfaces?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; -export type InterfaceTypeExtensionNode = {| +export type InterfaceTypeExtensionNode = { +kind: 'InterfaceTypeExtension', +loc?: Location, +name: NameNode, +interfaces?: $ReadOnlyArray, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; -export type UnionTypeExtensionNode = {| +export type UnionTypeExtensionNode = { +kind: 'UnionTypeExtension', +loc?: Location, +name: NameNode, +directives?: $ReadOnlyArray, +types?: $ReadOnlyArray, -|}; +}; -export type EnumTypeExtensionNode = {| +export type EnumTypeExtensionNode = { +kind: 'EnumTypeExtension', +loc?: Location, +name: NameNode, +directives?: $ReadOnlyArray, +values?: $ReadOnlyArray, -|}; +}; -export type InputObjectTypeExtensionNode = {| +export type InputObjectTypeExtensionNode = { +kind: 'InputObjectTypeExtension', +loc?: Location, +name: NameNode, +directives?: $ReadOnlyArray, +fields?: $ReadOnlyArray, -|}; +}; diff --git a/src/language/location.ts b/src/language/location.ts index 8da175d4f2..4695d52e71 100644 --- a/src/language/location.ts +++ b/src/language/location.ts @@ -3,10 +3,10 @@ import type { Source } from './source'; /** * Represents a location in a Source. */ -export type SourceLocation = {| +export type SourceLocation = { +line: number, +column: number, -|}; +}; /** * Takes a Source and a UTF-8 character offset, and returns the corresponding diff --git a/src/language/parser.ts b/src/language/parser.ts index f5f0a876b1..8914f75173 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -58,7 +58,7 @@ import { Lexer, isPunctuatorTokenKind } from './lexer'; /** * Configuration options to control parser behavior */ -export type ParseOptions = {| +export type ParseOptions = { /** * By default, the parser creates AST nodes that know the location * in the source that they correspond to. This configuration flag @@ -80,8 +80,8 @@ export type ParseOptions = {| * } * */ - allowLegacyFragmentVariables?: boolean, -|}; + allowLegacyFragmentVariables?: boolean; +}; /** * Given a GraphQL source, parses it into a Document. diff --git a/src/language/source.ts b/src/language/source.ts index dd4837ce06..a3bfd14f92 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -2,10 +2,10 @@ import { inspect } from '../jsutils/inspect'; import { devAssert } from '../jsutils/devAssert'; import { instanceOf } from '../jsutils/instanceOf'; -type Location = {| +type Location = { line: number, column: number, -|}; +}; /** * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 582aaf4423..8cdd9a4f61 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -14,10 +14,10 @@ type KindVisitor = $ObjMap< (Node) => ASTVisitFn | EnterLeaveVisitor, >; -type EnterLeaveVisitor = {| +type EnterLeaveVisitor = { +enter?: ASTVisitFn, +leave?: ASTVisitFn, -|}; +}; /** * A visitor is comprised of visit functions, which are called on each node diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 54aa6714e0..757329fc75 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -17,12 +17,12 @@ import { createSourceEventStream, subscribe } from '../subscribe'; import { SimplePubSub } from './simplePubSub'; -type Email = {| +type Email = { from: string, subject: string, message: string, unread: boolean, -|}; +}; const EmailType = new GraphQLObjectType({ name: 'Email', diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 94f1f83a00..50492d4487 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -25,7 +25,7 @@ import { getOperationRootType } from '../utilities/getOperationRootType'; import { mapAsyncIterator } from './mapAsyncIterator'; -export type SubscriptionArgs = {| +export type SubscriptionArgs = { schema: GraphQLSchema, document: DocumentNode, rootValue?: mixed, @@ -34,7 +34,7 @@ export type SubscriptionArgs = {| operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, subscribeFieldResolver?: ?GraphQLFieldResolver, -|}; +}; /** * Implements the "Subscribe" algorithm described in the GraphQL specification. diff --git a/src/type/__tests__/predicate-test.ts b/src/type/__tests__/predicate-test.ts index f94bed1030..9c011a240c 100644 --- a/src/type/__tests__/predicate-test.ts +++ b/src/type/__tests__/predicate-test.ts @@ -563,10 +563,10 @@ describe('Type predicates', () => { }); describe('isRequiredArgument', () => { - function buildArg(config: {| + function buildArg(config: { type: GraphQLInputType, defaultValue?: mixed, - |}): GraphQLArgument { + }): GraphQLArgument { return { name: 'someArg', type: config.type, @@ -611,10 +611,10 @@ describe('Type predicates', () => { }); describe('isRequiredInputField', () => { - function buildInputField(config: {| + function buildInputField(config: { type: GraphQLInputType, defaultValue?: mixed, - |}): GraphQLInputField { + }): GraphQLInputField { return { name: 'someInputField', type: config.type, diff --git a/src/type/definition.ts b/src/type/definition.ts index 04c5f05ef3..e4b206e2be 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -635,7 +635,7 @@ export type GraphQLScalarLiteralParser = ( variables: ?ObjMap, ) => ?TInternal; -export type GraphQLScalarTypeConfig = {| +export type GraphQLScalarTypeConfig = { name: string, description?: ?string, specifiedByUrl?: ?string, @@ -648,16 +648,16 @@ export type GraphQLScalarTypeConfig = {| extensions?: ?ReadOnlyObjMapLike, astNode?: ?ScalarTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -type GraphQLScalarTypeNormalizedConfig = {| +type GraphQLScalarTypeNormalizedConfig = { ...GraphQLScalarTypeConfig, serialize: GraphQLScalarSerializer, parseValue: GraphQLScalarValueParser, parseLiteral: GraphQLScalarLiteralParser, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; /** * Object Type Definition @@ -872,7 +872,7 @@ export function argsToArgsConfig( ); } -export type GraphQLObjectTypeConfig = {| +export type GraphQLObjectTypeConfig = { name: string, description?: ?string, interfaces?: ThunkArray, @@ -881,15 +881,15 @@ export type GraphQLObjectTypeConfig = {| extensions?: ?ReadOnlyObjMapLike, astNode?: ?ObjectTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -type GraphQLObjectTypeNormalizedConfig = {| +type GraphQLObjectTypeNormalizedConfig = { ...GraphQLObjectTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; /** * Note: returning GraphQLObjectType is deprecated and will be removed in v16.0.0 @@ -918,7 +918,7 @@ export type GraphQLFieldResolver< info: GraphQLResolveInfo, ) => mixed; -export type GraphQLResolveInfo = {| +export type GraphQLResolveInfo = { +fieldName: string, +fieldNodes: $ReadOnlyArray, +returnType: GraphQLOutputType, @@ -929,13 +929,13 @@ export type GraphQLResolveInfo = {| +rootValue: mixed, +operation: OperationDefinitionNode, +variableValues: { [variable: string]: mixed, ... }, -|}; +}; export type GraphQLFieldConfig< TSource, TContext, TArgs = { [argument: string]: any, ... }, -> = {| +> = { description?: ?string, type: GraphQLOutputType, args?: GraphQLFieldConfigArgumentMap, @@ -944,18 +944,18 @@ export type GraphQLFieldConfig< deprecationReason?: ?string, extensions?: ?ReadOnlyObjMapLike, astNode?: ?FieldDefinitionNode, -|}; +}; export type GraphQLFieldConfigArgumentMap = ObjMap; -export type GraphQLArgumentConfig = {| +export type GraphQLArgumentConfig = { description?: ?string, type: GraphQLInputType, defaultValue?: mixed, extensions?: ?ReadOnlyObjMapLike, deprecationReason?: ?string, astNode?: ?InputValueDefinitionNode, -|}; +}; export type GraphQLFieldConfigMap = ObjMap< GraphQLFieldConfig, @@ -965,7 +965,7 @@ export type GraphQLField< TSource, TContext, TArgs = { [argument: string]: any, ... }, -> = {| +> = { name: string, description: ?string, type: GraphQLOutputType, @@ -975,9 +975,9 @@ export type GraphQLField< deprecationReason: ?string, extensions: ?ReadOnlyObjMap, astNode: ?FieldDefinitionNode, -|}; +}; -export type GraphQLArgument = {| +export type GraphQLArgument = { name: string, description: ?string, type: GraphQLInputType, @@ -985,7 +985,7 @@ export type GraphQLArgument = {| deprecationReason: ?string, extensions: ?ReadOnlyObjMap, astNode: ?InputValueDefinitionNode, -|}; +}; export function isRequiredArgument(arg: GraphQLArgument): boolean %checks { return isNonNullType(arg.type) && arg.defaultValue === undefined; @@ -1083,7 +1083,7 @@ export class GraphQLInterfaceType { } } -export type GraphQLInterfaceTypeConfig = {| +export type GraphQLInterfaceTypeConfig = { name: string, description?: ?string, interfaces?: ThunkArray, @@ -1097,15 +1097,15 @@ export type GraphQLInterfaceTypeConfig = {| extensions?: ?ReadOnlyObjMapLike, astNode?: ?InterfaceTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -export type GraphQLInterfaceTypeNormalizedConfig = {| +export type GraphQLInterfaceTypeNormalizedConfig = { ...GraphQLInterfaceTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; /** * Union Type Definition @@ -1201,7 +1201,7 @@ function defineTypes( return types; } -export type GraphQLUnionTypeConfig = {| +export type GraphQLUnionTypeConfig = { name: string, description?: ?string, types: ThunkArray, @@ -1214,14 +1214,14 @@ export type GraphQLUnionTypeConfig = {| extensions?: ?ReadOnlyObjMapLike, astNode?: ?UnionTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -type GraphQLUnionTypeNormalizedConfig = {| +type GraphQLUnionTypeNormalizedConfig = { ...GraphQLUnionTypeConfig, types: Array, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; /** * Enum Type Definition @@ -1403,39 +1403,39 @@ function defineEnumValues( }); } -export type GraphQLEnumTypeConfig /* */ = {| +export type GraphQLEnumTypeConfig /* */ = { name: string, description?: ?string, values: GraphQLEnumValueConfigMap /* */, extensions?: ?ReadOnlyObjMapLike, astNode?: ?EnumTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -type GraphQLEnumTypeNormalizedConfig = {| +type GraphQLEnumTypeNormalizedConfig = { ...GraphQLEnumTypeConfig, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; export type GraphQLEnumValueConfigMap /* */ = ObjMap */>; -export type GraphQLEnumValueConfig /* */ = {| +export type GraphQLEnumValueConfig /* */ = { description?: ?string, value?: any /* T */, deprecationReason?: ?string, extensions?: ?ReadOnlyObjMapLike, astNode?: ?EnumValueDefinitionNode, -|}; +}; -export type GraphQLEnumValue /* */ = {| +export type GraphQLEnumValue /* */ = { name: string, description: ?string, value: any /* T */, deprecationReason: ?string, extensions: ?ReadOnlyObjMap, astNode: ?EnumValueDefinitionNode, -|}; +}; /** * Input Object Type Definition @@ -1543,34 +1543,34 @@ function defineInputFieldMap( }); } -export type GraphQLInputObjectTypeConfig = {| +export type GraphQLInputObjectTypeConfig = { name: string, description?: ?string, fields: ThunkObjMap, extensions?: ?ReadOnlyObjMapLike, astNode?: ?InputObjectTypeDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, -|}; +}; -type GraphQLInputObjectTypeNormalizedConfig = {| +type GraphQLInputObjectTypeNormalizedConfig = { ...GraphQLInputObjectTypeConfig, fields: GraphQLInputFieldConfigMap, extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, -|}; +}; -export type GraphQLInputFieldConfig = {| +export type GraphQLInputFieldConfig = { description?: ?string, type: GraphQLInputType, defaultValue?: mixed, deprecationReason?: ?string, extensions?: ?ReadOnlyObjMapLike, astNode?: ?InputValueDefinitionNode, -|}; +}; export type GraphQLInputFieldConfigMap = ObjMap; -export type GraphQLInputField = {| +export type GraphQLInputField = { name: string, description: ?string, type: GraphQLInputType, @@ -1578,7 +1578,7 @@ export type GraphQLInputField = {| deprecationReason: ?string, extensions: ?ReadOnlyObjMap, astNode: ?InputValueDefinitionNode, -|}; +}; export function isRequiredInputField( field: GraphQLInputField, diff --git a/src/type/directives.ts b/src/type/directives.ts index cbe32751a4..0b7ed3f167 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -106,7 +106,7 @@ export class GraphQLDirective { } } -export type GraphQLDirectiveConfig = {| +export type GraphQLDirectiveConfig = { name: string, description?: ?string, locations: Array, @@ -114,14 +114,14 @@ export type GraphQLDirectiveConfig = {| isRepeatable?: ?boolean, extensions?: ?ReadOnlyObjMapLike, astNode?: ?DirectiveDefinitionNode, -|}; +}; -type GraphQLDirectiveNormalizedConfig = {| +type GraphQLDirectiveNormalizedConfig = { ...GraphQLDirectiveConfig, args: GraphQLFieldConfigArgumentMap, isRepeatable: boolean, extensions: ?ReadOnlyObjMap, -|}; +}; /** * Used to conditionally include fields or fragments. diff --git a/src/type/schema.ts b/src/type/schema.ts index be67ffd270..cb8d3b229e 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -129,10 +129,10 @@ export class GraphQLSchema { _directives: $ReadOnlyArray; _typeMap: TypeMap; _subTypeMap: ObjMap>; - _implementationsMap: ObjMap<{| + _implementationsMap: ObjMap<{ objects: Array, interfaces: Array, - |}>; + }>; // Used as a cache for validateSchema(). __validationErrors: ?$ReadOnlyArray; @@ -284,10 +284,10 @@ export class GraphQLSchema { getImplementations( interfaceType: GraphQLInterfaceType, - ): {| + ): { objects: /* $ReadOnly */ Array, interfaces: /* $ReadOnly */ Array, - |} { + } { const implementations = this._implementationsMap[interfaceType.name]; return implementations ?? { objects: [], interfaces: [] }; } @@ -350,7 +350,7 @@ export class GraphQLSchema { type TypeMap = ObjMap; -export type GraphQLSchemaValidationOptions = {| +export type GraphQLSchemaValidationOptions = { /** * When building a schema from a GraphQL service's introspection result, it * might be safe to assume the schema is valid. Set to true to assume the @@ -359,9 +359,9 @@ export type GraphQLSchemaValidationOptions = {| * Default: false */ assumeValid?: boolean, -|}; +}; -export type GraphQLSchemaConfig = {| +export type GraphQLSchemaConfig = { description?: ?string, query?: ?GraphQLObjectType, mutation?: ?GraphQLObjectType, @@ -372,12 +372,12 @@ export type GraphQLSchemaConfig = {| astNode?: ?SchemaDefinitionNode, extensionASTNodes?: ?$ReadOnlyArray, ...GraphQLSchemaValidationOptions, -|}; +}; /** * @internal */ -export type GraphQLSchemaNormalizedConfig = {| +export type GraphQLSchemaNormalizedConfig = { ...GraphQLSchemaConfig, description: ?string, types: Array, @@ -385,7 +385,7 @@ export type GraphQLSchemaNormalizedConfig = {| extensions: ?ReadOnlyObjMap, extensionASTNodes: $ReadOnlyArray, assumeValid: boolean, -|}; +}; function collectReferencedTypes( type: GraphQLType, diff --git a/src/utilities/buildASTSchema.ts b/src/utilities/buildASTSchema.ts index ab3ae1b6aa..4ab5333537 100644 --- a/src/utilities/buildASTSchema.ts +++ b/src/utilities/buildASTSchema.ts @@ -14,7 +14,7 @@ import { specifiedDirectives } from '../type/directives'; import { extendSchemaImpl } from './extendSchema'; -export type BuildSchemaOptions = {| +export type BuildSchemaOptions = { ...GraphQLSchemaValidationOptions, /** @@ -23,7 +23,7 @@ export type BuildSchemaOptions = {| * Default: false */ assumeValidSDL?: boolean, -|}; +}; /** * This takes the ast of a schema document produced by the parse function in @@ -94,7 +94,7 @@ export function buildASTSchema( */ export function buildSchema( source: string | Source, - options?: {| ...BuildSchemaOptions, ...ParseOptions |}, + options?: { ...BuildSchemaOptions, ...ParseOptions }, ): GraphQLSchema { const document = parse(source, { noLocation: options?.noLocation, diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index ba79e9645f..6c8ccdc145 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -82,7 +82,7 @@ import { import { valueFromAST } from './valueFromAST'; -type Options = {| +type Options = { ...GraphQLSchemaValidationOptions, /** @@ -91,7 +91,7 @@ type Options = {| * Default: false */ assumeValidSDL?: boolean, -|}; +}; /** * Produces a new schema given an existing schema and a document which may @@ -394,11 +394,11 @@ export function extendSchemaImpl( function getOperationTypes( nodes: $ReadOnlyArray, - ): {| + ): { query: ?GraphQLObjectType, mutation: ?GraphQLObjectType, subscription: ?GraphQLObjectType, - |} { + } { const opTypes = {}; for (const node of nodes) { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 2a13d4655b..afe369d4eb 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -63,15 +63,15 @@ export const DangerousChangeType = Object.freeze({ ARG_DEFAULT_VALUE_CHANGE: 'ARG_DEFAULT_VALUE_CHANGE', }); -export type BreakingChange = {| +export type BreakingChange = { type: $Keys, description: string, -|}; +}; -export type DangerousChange = {| +export type DangerousChange = { type: $Keys, description: string, -|}; +}; /** * Given two schemas, returns an Array containing descriptions of all the types @@ -556,11 +556,11 @@ function stringifyValue(value: mixed, type: GraphQLInputType): string { function diff( oldArray: $ReadOnlyArray, newArray: $ReadOnlyArray, -): {| +): { added: Array, removed: Array, persisted: Array<[T, T]>, -|} { +} { const added = []; const removed = []; const persisted = []; diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 1c9abb4204..ea67f6be37 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -1,6 +1,6 @@ import type { DirectiveLocationEnum } from '../language/directiveLocation'; -export type IntrospectionOptions = {| +export type IntrospectionOptions = { // Whether to include descriptions in the introspection result. // Default: true descriptions?: boolean, @@ -20,7 +20,7 @@ export type IntrospectionOptions = {| // Whether target GraphQL server support deprecation of input values. // Default: false inputValueDeprecation?: boolean, -|}; +}; export function getIntrospectionQuery(options?: IntrospectionOptions): string { const optionsWithDefault = { @@ -147,18 +147,18 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string { `; } -export type IntrospectionQuery = {| +export type IntrospectionQuery = { +__schema: IntrospectionSchema, -|}; +}; -export type IntrospectionSchema = {| +export type IntrospectionSchema = { +description?: ?string, +queryType: IntrospectionNamedTypeRef, +mutationType: ?IntrospectionNamedTypeRef, +subscriptionType: ?IntrospectionNamedTypeRef, +types: $ReadOnlyArray, +directives: $ReadOnlyArray, -|}; +}; export type IntrospectionType = | IntrospectionScalarType @@ -180,14 +180,14 @@ export type IntrospectionInputType = | IntrospectionEnumType | IntrospectionInputObjectType; -export type IntrospectionScalarType = {| +export type IntrospectionScalarType = { +kind: 'SCALAR', +name: string, +description?: ?string, +specifiedByUrl?: ?string, -|}; +}; -export type IntrospectionObjectType = {| +export type IntrospectionObjectType = { +kind: 'OBJECT', +name: string, +description?: ?string, @@ -195,9 +195,9 @@ export type IntrospectionObjectType = {| +interfaces: $ReadOnlyArray< IntrospectionNamedTypeRef, >, -|}; +}; -export type IntrospectionInterfaceType = {| +export type IntrospectionInterfaceType = { +kind: 'INTERFACE', +name: string, +description?: ?string, @@ -208,44 +208,44 @@ export type IntrospectionInterfaceType = {| +possibleTypes: $ReadOnlyArray< IntrospectionNamedTypeRef, >, -|}; +}; -export type IntrospectionUnionType = {| +export type IntrospectionUnionType = { +kind: 'UNION', +name: string, +description?: ?string, +possibleTypes: $ReadOnlyArray< IntrospectionNamedTypeRef, >, -|}; +}; -export type IntrospectionEnumType = {| +export type IntrospectionEnumType = { +kind: 'ENUM', +name: string, +description?: ?string, +enumValues: $ReadOnlyArray, -|}; +}; -export type IntrospectionInputObjectType = {| +export type IntrospectionInputObjectType = { +kind: 'INPUT_OBJECT', +name: string, +description?: ?string, +inputFields: $ReadOnlyArray, -|}; +}; export type IntrospectionListTypeRef< T: IntrospectionTypeRef = IntrospectionTypeRef, -> = {| +> = { +kind: 'LIST', +ofType: T, -|}; +}; export type IntrospectionNonNullTypeRef< T: IntrospectionTypeRef = IntrospectionTypeRef, -> = {| +> = { +kind: 'NON_NULL', +ofType: T, -|}; +}; export type IntrospectionTypeRef = | IntrospectionNamedTypeRef<> @@ -272,40 +272,40 @@ export type IntrospectionInputTypeRef = export type IntrospectionNamedTypeRef< T: IntrospectionType = IntrospectionType, -> = {| +> = { +kind: $PropertyType, +name: string, -|}; +}; -export type IntrospectionField = {| +export type IntrospectionField = { +name: string, +description?: ?string, +args: $ReadOnlyArray, +type: IntrospectionOutputTypeRef, +isDeprecated: boolean, +deprecationReason: ?string, -|}; +}; -export type IntrospectionInputValue = {| +export type IntrospectionInputValue = { +name: string, +description?: ?string, +type: IntrospectionInputTypeRef, +defaultValue: ?string, +isDeprecated?: boolean, +deprecationReason?: ?string, -|}; +}; -export type IntrospectionEnumValue = {| +export type IntrospectionEnumValue = { +name: string, +description?: ?string, +isDeprecated: boolean, +deprecationReason: ?string, -|}; +}; -export type IntrospectionDirective = {| +export type IntrospectionDirective = { +name: string, +description?: ?string, +isRepeatable?: boolean, +locations: $ReadOnlyArray, +args: $ReadOnlyArray, -|}; +}; diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index c2f602a8ca..90918afb06 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -29,11 +29,11 @@ import type { import { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo'; type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; -type VariableUsage = {| +type VariableUsage = { +node: VariableNode, +type: ?GraphQLInputType, +defaultValue: ?mixed, -|}; +}; /** * An instance of this class is passed as the "this" context to all validators, diff --git a/src/validation/__tests__/validation-test.ts b/src/validation/__tests__/validation-test.ts index 1b2d7f8bcd..3a6895aa82 100644 --- a/src/validation/__tests__/validation-test.ts +++ b/src/validation/__tests__/validation-test.ts @@ -128,7 +128,7 @@ describe('Validate: Limit maximum number of validation errors', () => { `; const doc = parse(query, { noLocation: true }); - function validateDocument(options: {| maxErrors?: number |}) { + function validateDocument(options: { maxErrors?: number }) { return validate(testSchema, doc, undefined, options); } diff --git a/src/validation/rules/FieldsOnCorrectTypeRule.ts b/src/validation/rules/FieldsOnCorrectTypeRule.ts index 6a1789b60f..3c643283d0 100644 --- a/src/validation/rules/FieldsOnCorrectTypeRule.ts +++ b/src/validation/rules/FieldsOnCorrectTypeRule.ts @@ -81,7 +81,7 @@ function getSuggestedTypeNames( } const suggestedTypes: Set< - GraphQLObjectType | GraphQLInterfaceType, + GraphQLObjectType | GraphQLInterfaceType > = new Set(); const usageCount = Object.create(null); for (const possibleType of schema.getPossibleTypes(type)) { diff --git a/src/validation/validate.ts b/src/validation/validate.ts index 8ba03bbfb4..7a4bcf43b6 100644 --- a/src/validation/validate.ts +++ b/src/validation/validate.ts @@ -34,7 +34,7 @@ export function validate( schema: GraphQLSchema, documentAST: DocumentNode, rules: $ReadOnlyArray = specifiedRules, - options: {| maxErrors?: number |} = { maxErrors: undefined }, + options: { maxErrors?: number } = { maxErrors: undefined }, // @deprecate will be removed in 17.0.0 typeInfo: TypeInfo = new TypeInfo(schema), From b7fdc967d2c2182dba0dce472d2b5bae2a0ff8e8 Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 20 Oct 2020 14:53:33 -0500 Subject: [PATCH 03/65] convert $ReadonlyArray (flow) to ReadonlyArray (TS) --- src/__testUtils__/dedent.ts | 4 +- src/error/GraphQLError.ts | 14 +-- src/error/formatError.ts | 4 +- src/error/locatedError.ts | 4 +- src/execution/execute.ts | 28 ++--- src/execution/values.ts | 8 +- src/jsutils/didYouMean.ts | 4 +- src/jsutils/keyMap.ts | 2 +- src/jsutils/keyValMap.ts | 2 +- src/jsutils/memoize3.ts | 6 +- src/jsutils/printPathArray.ts | 2 +- src/jsutils/promiseReduce.ts | 2 +- src/jsutils/suggestionList.ts | 2 +- src/language/ast.ts | 100 +++++++++--------- src/language/printLocation.ts | 2 +- src/language/visitor.ts | 8 +- src/type/definition.ts | 40 +++---- src/type/directives.ts | 2 +- src/type/introspection.ts | 2 +- src/type/scalars.ts | 2 +- src/type/schema.ts | 14 +-- src/type/validate.ts | 12 +-- .../__tests__/buildASTSchema-test.ts | 2 +- src/utilities/__tests__/extendSchema-test.ts | 2 +- src/utilities/buildClientSchema.ts | 2 +- src/utilities/coerceInputValue.ts | 4 +- src/utilities/concatAST.ts | 2 +- src/utilities/extendSchema.ts | 14 +-- src/utilities/findBreakingChanges.ts | 4 +- src/utilities/getIntrospectionQuery.ts | 26 ++--- src/utilities/lexicographicSortSchema.ts | 6 +- src/utilities/printSchema.ts | 2 +- src/validation/ValidationContext.ts | 16 +-- src/validation/rules/KnownDirectivesRule.ts | 2 +- src/validation/rules/KnownTypeNamesRule.ts | 2 +- .../rules/OverlappingFieldsCanBeMergedRule.ts | 6 +- .../rules/UniqueFieldDefinitionNamesRule.ts | 2 +- src/validation/specifiedRules.ts | 4 +- src/validation/validate.ts | 8 +- 39 files changed, 184 insertions(+), 184 deletions(-) diff --git a/src/__testUtils__/dedent.ts b/src/__testUtils__/dedent.ts index a628aad3e9..f123344d3d 100644 --- a/src/__testUtils__/dedent.ts +++ b/src/__testUtils__/dedent.ts @@ -27,8 +27,8 @@ export function dedentString(string: string): string { * str === "{\n test\n}"; */ export function dedent( - strings: $ReadOnlyArray, - ...values: $ReadOnlyArray + strings: ReadonlyArray, + ...values: ReadonlyArray ): string { let str = ''; diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index a8cb027bd4..f15537b87a 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -35,7 +35,7 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - +locations: $ReadOnlyArray | void; + +locations: ReadonlyArray | void; /** * An array describing the JSON-path into the execution response which @@ -43,12 +43,12 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - +path: $ReadOnlyArray | void; + +path: ReadonlyArray | void; /** * An array of GraphQL AST Nodes corresponding to this error. */ - +nodes: $ReadOnlyArray | void; + +nodes: ReadonlyArray | void; /** * The source GraphQL document for the first location of this error. @@ -62,7 +62,7 @@ export class GraphQLError extends Error { * An array of character offsets within the source GraphQL document * which correspond to this error. */ - +positions: $ReadOnlyArray | void; + +positions: ReadonlyArray | void; /** * The original error thrown from a field resolver during execution. @@ -76,10 +76,10 @@ export class GraphQLError extends Error { constructor( message: string, - nodes?: $ReadOnlyArray | ASTNode | void | null, + nodes?: ReadonlyArray | ASTNode | void | null, source?: ?Source, - positions?: ?$ReadOnlyArray, - path?: ?$ReadOnlyArray, + positions?: ?ReadonlyArray, + path?: ?ReadonlyArray, originalError?: ?(Error & { +extensions?: mixed, ... }), extensions?: ?{ [key: string]: mixed, ... }, ) { diff --git a/src/error/formatError.ts b/src/error/formatError.ts index 520c7be76c..98f4bb0102 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -34,14 +34,14 @@ export type GraphQLFormattedError = { * If an error can be associated to a particular point in the requested * GraphQL document, it should contain a list of locations. */ - +locations: $ReadOnlyArray | void, + +locations: ReadonlyArray | void, /** * If an error can be associated to a particular field in the GraphQL result, * it _must_ contain an entry with the key `path` that details the path of * the response field which experienced the error. This allows clients to * identify whether a null result is intentional or caused by a runtime error. */ - +path: $ReadOnlyArray | void, + +path: ReadonlyArray | void, /** * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index 34fd247855..4c6d7018d2 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -11,8 +11,8 @@ import { GraphQLError } from './GraphQLError'; */ export function locatedError( rawOriginalError: mixed, - nodes: ASTNode | $ReadOnlyArray | void | null, - path?: ?$ReadOnlyArray, + nodes: ASTNode | ReadonlyArray | void | null, + path?: ?ReadonlyArray, ): GraphQLError { // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. const originalError: Error | GraphQLError = diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 8637aef744..41056a2b7a 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -112,13 +112,13 @@ export type ExecutionContext = { * - `extensions` is reserved for adding non-standard properties. */ export type ExecutionResult = { - errors?: $ReadOnlyArray, + errors?: ReadonlyArray, data?: ObjMap | null, extensions?: ObjMap, }; export type FormattedExecutionResult = { - errors?: $ReadOnlyArray, + errors?: ReadonlyArray, data?: ObjMap | null, extensions?: ObjMap, }; @@ -260,7 +260,7 @@ export function buildExecutionContext( operationName: ?string, fieldResolver: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, -): $ReadOnlyArray | ExecutionContext { +): ReadonlyArray | ExecutionContext { let operation: OperationDefinitionNode | void; const fragments: ObjMap = Object.create(null); for (const definition of document.definitions) { @@ -586,7 +586,7 @@ function resolveField( exeContext: ExecutionContext, parentType: GraphQLObjectType, source: mixed, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, path: Path, ): PromiseOrValue { const fieldNode = fieldNodes[0]; @@ -663,7 +663,7 @@ function resolveField( export function buildResolveInfo( exeContext: ExecutionContext, fieldDef: GraphQLField, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, parentType: GraphQLObjectType, path: Path, ): GraphQLResolveInfo { @@ -724,7 +724,7 @@ function handleFieldError( function completeValue( exeContext: ExecutionContext, returnType: GraphQLOutputType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, result: mixed, @@ -817,11 +817,11 @@ function completeValue( function completeListValue( exeContext: ExecutionContext, returnType: GraphQLList, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, result: mixed, -): PromiseOrValue<$ReadOnlyArray> { +): PromiseOrValue> { if (!isIteratableObject(result)) { throw new GraphQLError( `Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`, @@ -905,7 +905,7 @@ function completeLeafValue(returnType: GraphQLLeafType, result: mixed): mixed { function completeAbstractValue( exeContext: ExecutionContext, returnType: GraphQLAbstractType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, result: mixed, @@ -955,7 +955,7 @@ function ensureValidRuntimeType( runtimeTypeName: mixed, exeContext: ExecutionContext, returnType: GraphQLAbstractType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, result: mixed, ): GraphQLObjectType { @@ -1012,7 +1012,7 @@ function ensureValidRuntimeType( function completeObjectValue( exeContext: ExecutionContext, returnType: GraphQLObjectType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, result: mixed, @@ -1055,7 +1055,7 @@ function completeObjectValue( function invalidReturnTypeError( returnType: GraphQLObjectType, result: mixed, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, ): GraphQLError { return new GraphQLError( `Expected value of type "${returnType.name}" but got: ${inspect(result)}.`, @@ -1066,7 +1066,7 @@ function invalidReturnTypeError( function collectAndExecuteSubfields( exeContext: ExecutionContext, returnType: GraphQLObjectType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, path: Path, result: mixed, ): PromiseOrValue> { @@ -1084,7 +1084,7 @@ const collectSubfields = memoize3(_collectSubfields); function _collectSubfields( exeContext: ExecutionContext, returnType: GraphQLObjectType, - fieldNodes: $ReadOnlyArray, + fieldNodes: ReadonlyArray, ): ObjMap> { let subFieldNodes = Object.create(null); const visitedFragmentNames = Object.create(null); diff --git a/src/execution/values.ts b/src/execution/values.ts index f188dbf8e5..6fc196e191 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -23,7 +23,7 @@ import { valueFromAST } from '../utilities/valueFromAST'; import { coerceInputValue } from '../utilities/coerceInputValue'; type CoercedVariableValues = - | { errors: $ReadOnlyArray } + | { errors: ReadonlyArray } | { coerced: { [variable: string]: mixed, ... } }; /** @@ -39,7 +39,7 @@ type CoercedVariableValues = */ export function getVariableValues( schema: GraphQLSchema, - varDefNodes: $ReadOnlyArray, + varDefNodes: ReadonlyArray, inputs: { +[variable: string]: mixed, ... }, options?: { maxErrors?: number }, ): CoercedVariableValues { @@ -72,7 +72,7 @@ export function getVariableValues( function coerceVariableValues( schema: GraphQLSchema, - varDefNodes: $ReadOnlyArray, + varDefNodes: ReadonlyArray, inputs: { +[variable: string]: mixed, ... }, onError: (GraphQLError) => void, ): { [variable: string]: mixed, ... } { @@ -244,7 +244,7 @@ export function getArgumentValues( */ export function getDirectiveValues( directiveDef: GraphQLDirective, - node: { +directives?: $ReadOnlyArray, ... }, + node: { +directives?: ReadonlyArray, ... }, variableValues?: ?ObjMap, ): void | { [argument: string]: mixed, ... } { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') diff --git a/src/jsutils/didYouMean.ts b/src/jsutils/didYouMean.ts index ad1ef1203e..1efe2c80ce 100644 --- a/src/jsutils/didYouMean.ts +++ b/src/jsutils/didYouMean.ts @@ -3,11 +3,11 @@ const MAX_SUGGESTIONS = 5; /** * Given [ A, B, C ] return ' Did you mean A, B, or C?'. */ -declare function didYouMean(suggestions: $ReadOnlyArray): string; +declare function didYouMean(suggestions: ReadonlyArray): string; // eslint-disable-next-line no-redeclare declare function didYouMean( subMessage: string, - suggestions: $ReadOnlyArray, + suggestions: ReadonlyArray, ): string; // eslint-disable-next-line no-redeclare diff --git a/src/jsutils/keyMap.ts b/src/jsutils/keyMap.ts index 8bfaf2727c..2425850b06 100644 --- a/src/jsutils/keyMap.ts +++ b/src/jsutils/keyMap.ts @@ -24,7 +24,7 @@ import type { ObjMap } from './ObjMap'; * */ export function keyMap( - list: $ReadOnlyArray, + list: ReadonlyArray, keyFn: (item: T) => string, ): ObjMap { const result = Object.create(null); diff --git a/src/jsutils/keyValMap.ts b/src/jsutils/keyValMap.ts index d046cbd5e3..c6013aaa16 100644 --- a/src/jsutils/keyValMap.ts +++ b/src/jsutils/keyValMap.ts @@ -18,7 +18,7 @@ import type { ObjMap } from './ObjMap'; * */ export function keyValMap( - list: $ReadOnlyArray, + list: ReadonlyArray, keyFn: (item: T) => string, valFn: (item: T) => V, ): ObjMap { diff --git a/src/jsutils/memoize3.ts b/src/jsutils/memoize3.ts index 925b72d570..0e929cee73 100644 --- a/src/jsutils/memoize3.ts +++ b/src/jsutils/memoize3.ts @@ -2,9 +2,9 @@ * Memoizes the provided three-argument function. */ export function memoize3< - A1: { ... } | $ReadOnlyArray, - A2: { ... } | $ReadOnlyArray, - A3: { ... } | $ReadOnlyArray, + A1: { ... } | ReadonlyArray, + A2: { ... } | ReadonlyArray, + A3: { ... } | ReadonlyArray, R, >(fn: (A1, A2, A3) => R): (A1, A2, A3) => R { let cache0; diff --git a/src/jsutils/printPathArray.ts b/src/jsutils/printPathArray.ts index 4e9e773afa..0d9fcc2b19 100644 --- a/src/jsutils/printPathArray.ts +++ b/src/jsutils/printPathArray.ts @@ -1,7 +1,7 @@ /** * Build a string describing the path. */ -export function printPathArray(path: $ReadOnlyArray): string { +export function printPathArray(path: ReadonlyArray): string { return path .map((key) => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key, diff --git a/src/jsutils/promiseReduce.ts b/src/jsutils/promiseReduce.ts index 45a1d7964c..082b2e62ed 100644 --- a/src/jsutils/promiseReduce.ts +++ b/src/jsutils/promiseReduce.ts @@ -10,7 +10,7 @@ import { isPromise } from './isPromise'; * return a Promise. */ export function promiseReduce( - values: $ReadOnlyArray, + values: ReadonlyArray, callback: (U, T) => PromiseOrValue, initialValue: PromiseOrValue, ): PromiseOrValue { diff --git a/src/jsutils/suggestionList.ts b/src/jsutils/suggestionList.ts index d500648031..40838ed92b 100644 --- a/src/jsutils/suggestionList.ts +++ b/src/jsutils/suggestionList.ts @@ -6,7 +6,7 @@ import { naturalCompare } from './naturalCompare'; */ export function suggestionList( input: string, - options: $ReadOnlyArray, + options: ReadonlyArray, ): Array { const optionsByDistance = Object.create(null); const lexicalDistance = new LexicalDistance(input); diff --git a/src/language/ast.ts b/src/language/ast.ts index 8b73ec685b..be78f6df68 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -238,7 +238,7 @@ export type NameNode = { export type DocumentNode = { +kind: 'Document', +loc?: Location, - +definitions: $ReadOnlyArray, + +definitions: ReadonlyArray, }; export type DefinitionNode = @@ -255,8 +255,8 @@ export type OperationDefinitionNode = { +loc?: Location, +operation: OperationTypeNode, +name?: NameNode, - +variableDefinitions?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, + +variableDefinitions?: ReadonlyArray, + +directives?: ReadonlyArray, +selectionSet: SelectionSetNode, }; @@ -268,7 +268,7 @@ export type VariableDefinitionNode = { +variable: VariableNode, +type: TypeNode, +defaultValue?: ValueNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type VariableNode = { @@ -280,7 +280,7 @@ export type VariableNode = { export type SelectionSetNode = { kind: 'SelectionSet', loc?: Location, - selections: $ReadOnlyArray, + selections: ReadonlyArray, }; export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; @@ -290,8 +290,8 @@ export type FieldNode = { +loc?: Location, +alias?: NameNode, +name: NameNode, - +arguments?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, + +arguments?: ReadonlyArray, + +directives?: ReadonlyArray, +selectionSet?: SelectionSetNode, }; @@ -308,14 +308,14 @@ export type FragmentSpreadNode = { +kind: 'FragmentSpread', +loc?: Location, +name: NameNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type InlineFragmentNode = { +kind: 'InlineFragment', +loc?: Location, +typeCondition?: NamedTypeNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, +selectionSet: SelectionSetNode, }; @@ -324,9 +324,9 @@ export type FragmentDefinitionNode = { +loc?: Location, +name: NameNode, // Note: fragment variable definitions are deprecated and will removed in v17.0.0 - +variableDefinitions?: $ReadOnlyArray, + +variableDefinitions?: ReadonlyArray, +typeCondition: NamedTypeNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, +selectionSet: SelectionSetNode, }; @@ -382,13 +382,13 @@ export type EnumValueNode = { export type ListValueNode = { +kind: 'ListValue', +loc?: Location, - +values: $ReadOnlyArray, + +values: ReadonlyArray, }; export type ObjectValueNode = { +kind: 'ObjectValue', +loc?: Location, - +fields: $ReadOnlyArray, + +fields: ReadonlyArray, }; export type ObjectFieldNode = { @@ -404,7 +404,7 @@ export type DirectiveNode = { +kind: 'Directive', +loc?: Location, +name: NameNode, - +arguments?: $ReadOnlyArray, + +arguments?: ReadonlyArray, }; // Type Reference @@ -440,8 +440,8 @@ export type SchemaDefinitionNode = { +kind: 'SchemaDefinition', +loc?: Location, +description?: StringValueNode, - +directives?: $ReadOnlyArray, - +operationTypes: $ReadOnlyArray, + +directives?: ReadonlyArray, + +operationTypes: ReadonlyArray, }; export type OperationTypeDefinitionNode = { @@ -466,7 +466,7 @@ export type ScalarTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type ObjectTypeDefinitionNode = { @@ -474,9 +474,9 @@ export type ObjectTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +interfaces?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +interfaces?: ReadonlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; export type FieldDefinitionNode = { @@ -484,9 +484,9 @@ export type FieldDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +arguments?: $ReadOnlyArray, + +arguments?: ReadonlyArray, +type: TypeNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type InputValueDefinitionNode = { @@ -496,7 +496,7 @@ export type InputValueDefinitionNode = { +name: NameNode, +type: TypeNode, +defaultValue?: ValueNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type InterfaceTypeDefinitionNode = { @@ -504,9 +504,9 @@ export type InterfaceTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +interfaces?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +interfaces?: ReadonlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; export type UnionTypeDefinitionNode = { @@ -514,8 +514,8 @@ export type UnionTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +directives?: $ReadOnlyArray, - +types?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +types?: ReadonlyArray, }; export type EnumTypeDefinitionNode = { @@ -523,8 +523,8 @@ export type EnumTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +directives?: $ReadOnlyArray, - +values?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +values?: ReadonlyArray, }; export type EnumValueDefinitionNode = { @@ -532,7 +532,7 @@ export type EnumValueDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type InputObjectTypeDefinitionNode = { @@ -540,8 +540,8 @@ export type InputObjectTypeDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; // Directive Definitions @@ -551,9 +551,9 @@ export type DirectiveDefinitionNode = { +loc?: Location, +description?: StringValueNode, +name: NameNode, - +arguments?: $ReadOnlyArray, + +arguments?: ReadonlyArray, +repeatable: boolean, - +locations: $ReadOnlyArray, + +locations: ReadonlyArray, }; // Type System Extensions @@ -563,8 +563,8 @@ export type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; export type SchemaExtensionNode = { +kind: 'SchemaExtension', +loc?: Location, - +directives?: $ReadOnlyArray, - +operationTypes?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +operationTypes?: ReadonlyArray, }; // Type Extensions @@ -581,47 +581,47 @@ export type ScalarTypeExtensionNode = { +kind: 'ScalarTypeExtension', +loc?: Location, +name: NameNode, - +directives?: $ReadOnlyArray, + +directives?: ReadonlyArray, }; export type ObjectTypeExtensionNode = { +kind: 'ObjectTypeExtension', +loc?: Location, +name: NameNode, - +interfaces?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +interfaces?: ReadonlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; export type InterfaceTypeExtensionNode = { +kind: 'InterfaceTypeExtension', +loc?: Location, +name: NameNode, - +interfaces?: $ReadOnlyArray, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +interfaces?: ReadonlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; export type UnionTypeExtensionNode = { +kind: 'UnionTypeExtension', +loc?: Location, +name: NameNode, - +directives?: $ReadOnlyArray, - +types?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +types?: ReadonlyArray, }; export type EnumTypeExtensionNode = { +kind: 'EnumTypeExtension', +loc?: Location, +name: NameNode, - +directives?: $ReadOnlyArray, - +values?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +values?: ReadonlyArray, }; export type InputObjectTypeExtensionNode = { +kind: 'InputObjectTypeExtension', +loc?: Location, +name: NameNode, - +directives?: $ReadOnlyArray, - +fields?: $ReadOnlyArray, + +directives?: ReadonlyArray, + +fields?: ReadonlyArray, }; diff --git a/src/language/printLocation.ts b/src/language/printLocation.ts index 62f1276da4..faa9fda6b2 100644 --- a/src/language/printLocation.ts +++ b/src/language/printLocation.ts @@ -66,7 +66,7 @@ export function printSourceLocation( ); } -function printPrefixedLines(lines: $ReadOnlyArray<[string, string]>): string { +function printPrefixedLines(lines: ReadonlyArray<[string, string]>): string { const existingLines = lines.filter(([_, line]) => line !== undefined); const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 8cdd9a4f61..eebbaf26a2 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -29,13 +29,13 @@ export type ASTVisitFn = ( // The index or key to this node from the parent node or Array. key: string | number | void, // The parent immediately above this node, which may be an Array. - parent: ASTNode | $ReadOnlyArray | void, + parent: ASTNode | ReadonlyArray | void, // The key path to get to this node from the root node. - path: $ReadOnlyArray, + path: ReadonlyArray, // All nodes and Arrays visited before reaching parent of this node. // These correspond to array indices in `path`. // Note: ancestors includes arrays which contain the parent of visited node. - ancestors: $ReadOnlyArray>, + ancestors: ReadonlyArray>, ) => any; const QueryDocumentKeys = { @@ -327,7 +327,7 @@ export function visit(root: ASTNode, visitor: ASTVisitor): any { * If a prior visitor edits a node, no following visitors will see that node. */ export function visitInParallel( - visitors: $ReadOnlyArray, + visitors: ReadonlyArray, ): ASTVisitor { const skipping = new Array(visitors.length); diff --git a/src/type/definition.ts b/src/type/definition.ts index e4b206e2be..657c5d724d 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -555,7 +555,7 @@ export class GraphQLScalarType { parseLiteral: GraphQLScalarLiteralParser; extensions: ?ReadOnlyObjMap; astNode: ?ScalarTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; constructor(config: $ReadOnly>) { const parseValue = config.parseValue ?? identityFunc; @@ -647,7 +647,7 @@ export type GraphQLScalarTypeConfig = { parseLiteral?: GraphQLScalarLiteralParser, extensions?: ?ReadOnlyObjMapLike, astNode?: ?ScalarTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; type GraphQLScalarTypeNormalizedConfig = { @@ -656,7 +656,7 @@ type GraphQLScalarTypeNormalizedConfig = { parseValue: GraphQLScalarValueParser, parseLiteral: GraphQLScalarLiteralParser, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; /** @@ -702,7 +702,7 @@ export class GraphQLObjectType { isTypeOf: ?GraphQLIsTypeOfFn; extensions: ?ReadOnlyObjMap; astNode: ?ObjectTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap>; _interfaces: ThunkArray; @@ -856,7 +856,7 @@ function fieldsToFieldsConfig( * @internal */ export function argsToArgsConfig( - args: $ReadOnlyArray, + args: ReadonlyArray, ): GraphQLFieldConfigArgumentMap { return keyValMap( args, @@ -880,7 +880,7 @@ export type GraphQLObjectTypeConfig = { isTypeOf?: ?GraphQLIsTypeOfFn, extensions?: ?ReadOnlyObjMapLike, astNode?: ?ObjectTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; type GraphQLObjectTypeNormalizedConfig = { @@ -888,7 +888,7 @@ type GraphQLObjectTypeNormalizedConfig = { interfaces: Array, fields: GraphQLFieldConfigMap, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; /** @@ -920,7 +920,7 @@ export type GraphQLFieldResolver< export type GraphQLResolveInfo = { +fieldName: string, - +fieldNodes: $ReadOnlyArray, + +fieldNodes: ReadonlyArray, +returnType: GraphQLOutputType, +parentType: GraphQLObjectType, +path: Path, @@ -1019,7 +1019,7 @@ export class GraphQLInterfaceType { resolveType: ?GraphQLTypeResolver; extensions: ?ReadOnlyObjMap; astNode: ?InterfaceTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap>; _interfaces: ThunkArray; @@ -1096,7 +1096,7 @@ export type GraphQLInterfaceTypeConfig = { resolveType?: ?GraphQLTypeResolver, extensions?: ?ReadOnlyObjMapLike, astNode?: ?InterfaceTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; export type GraphQLInterfaceTypeNormalizedConfig = { @@ -1104,7 +1104,7 @@ export type GraphQLInterfaceTypeNormalizedConfig = { interfaces: Array, fields: GraphQLFieldConfigMap, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; /** @@ -1136,7 +1136,7 @@ export class GraphQLUnionType { resolveType: ?GraphQLTypeResolver; extensions: ?ReadOnlyObjMap; astNode: ?UnionTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _types: ThunkArray; @@ -1213,14 +1213,14 @@ export type GraphQLUnionTypeConfig = { resolveType?: ?GraphQLTypeResolver, extensions?: ?ReadOnlyObjMapLike, astNode?: ?UnionTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; type GraphQLUnionTypeNormalizedConfig = { ...GraphQLUnionTypeConfig, types: Array, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; /** @@ -1249,7 +1249,7 @@ export class GraphQLEnumType /* */ { description: ?string; extensions: ?ReadOnlyObjMap; astNode: ?EnumTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _values: Array */>; _valueLookup: Map; @@ -1409,13 +1409,13 @@ export type GraphQLEnumTypeConfig /* */ = { values: GraphQLEnumValueConfigMap /* */, extensions?: ?ReadOnlyObjMapLike, astNode?: ?EnumTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; type GraphQLEnumTypeNormalizedConfig = { ...GraphQLEnumTypeConfig, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; export type GraphQLEnumValueConfigMap /* */ = ObjMap */>; @@ -1462,7 +1462,7 @@ export class GraphQLInputObjectType { description: ?string; extensions: ?ReadOnlyObjMap; astNode: ?InputObjectTypeDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap; @@ -1549,14 +1549,14 @@ export type GraphQLInputObjectTypeConfig = { fields: ThunkObjMap, extensions?: ?ReadOnlyObjMapLike, astNode?: ?InputObjectTypeDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, }; type GraphQLInputObjectTypeNormalizedConfig = { ...GraphQLInputObjectTypeConfig, fields: GraphQLInputFieldConfigMap, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, }; export type GraphQLInputFieldConfig = { diff --git a/src/type/directives.ts b/src/type/directives.ts index 0b7ed3f167..553b10cd83 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -212,7 +212,7 @@ export const GraphQLSpecifiedByDirective: GraphQLDirective = new GraphQLDirectiv /** * The full list of specified directives. */ -export const specifiedDirectives: $ReadOnlyArray = Object.freeze( +export const specifiedDirectives: ReadonlyArray = Object.freeze( [ GraphQLIncludeDirective, GraphQLSkipDirective, diff --git a/src/type/introspection.ts b/src/type/introspection.ts index 826fb58aa8..a9132ee1c4 100644 --- a/src/type/introspection.ts +++ b/src/type/introspection.ts @@ -528,7 +528,7 @@ export const TypeNameMetaFieldDef: GraphQLField = { astNode: undefined, }; -export const introspectionTypes: $ReadOnlyArray = Object.freeze( +export const introspectionTypes: ReadonlyArray = Object.freeze( [ __Schema, __Directive, diff --git a/src/type/scalars.ts b/src/type/scalars.ts index 0d9bdc955b..2c59a47708 100644 --- a/src/type/scalars.ts +++ b/src/type/scalars.ts @@ -270,7 +270,7 @@ export const GraphQLID: GraphQLScalarType = new GraphQLScalarType({ }, }); -export const specifiedScalarTypes: $ReadOnlyArray = Object.freeze( +export const specifiedScalarTypes: ReadonlyArray = Object.freeze( [GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID], ); diff --git a/src/type/schema.ts b/src/type/schema.ts index cb8d3b229e..85b6fff87c 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -121,12 +121,12 @@ export class GraphQLSchema { description: ?string; extensions: ?ReadOnlyObjMap; astNode: ?SchemaDefinitionNode; - extensionASTNodes: $ReadOnlyArray; + extensionASTNodes: ReadonlyArray; _queryType: ?GraphQLObjectType; _mutationType: ?GraphQLObjectType; _subscriptionType: ?GraphQLObjectType; - _directives: $ReadOnlyArray; + _directives: ReadonlyArray; _typeMap: TypeMap; _subTypeMap: ObjMap>; _implementationsMap: ObjMap<{ @@ -135,7 +135,7 @@ export class GraphQLSchema { }>; // Used as a cache for validateSchema(). - __validationErrors: ?$ReadOnlyArray; + __validationErrors: ?ReadonlyArray; constructor(config: $ReadOnly) { // If this schema was built from a source known to be valid, then it may be @@ -276,7 +276,7 @@ export class GraphQLSchema { getPossibleTypes( abstractType: GraphQLAbstractType, - ): $ReadOnlyArray { + ): ReadonlyArray { return isUnionType(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; @@ -319,7 +319,7 @@ export class GraphQLSchema { return map[maybeSubType.name] !== undefined; } - getDirectives(): $ReadOnlyArray { + getDirectives(): ReadonlyArray { return this._directives; } @@ -370,7 +370,7 @@ export type GraphQLSchemaConfig = { directives?: ?Array, extensions?: ?ReadOnlyObjMapLike, astNode?: ?SchemaDefinitionNode, - extensionASTNodes?: ?$ReadOnlyArray, + extensionASTNodes?: ?ReadonlyArray, ...GraphQLSchemaValidationOptions, }; @@ -383,7 +383,7 @@ export type GraphQLSchemaNormalizedConfig = { types: Array, directives: Array, extensions: ?ReadOnlyObjMap, - extensionASTNodes: $ReadOnlyArray, + extensionASTNodes: ReadonlyArray, assumeValid: boolean, }; diff --git a/src/type/validate.ts b/src/type/validate.ts index bc0763a0f7..d48ea6e60a 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -47,7 +47,7 @@ import { */ export function validateSchema( schema: GraphQLSchema, -): $ReadOnlyArray { +): ReadonlyArray { // First check to ensure the provided value is in fact a GraphQLSchema. assertSchema(schema); @@ -91,7 +91,7 @@ class SchemaValidationContext { reportError( message: string, - nodes?: $ReadOnlyArray | ?ASTNode, + nodes?: ReadonlyArray | ?ASTNode, ): void { const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; this.addError(new GraphQLError(message, _nodes)); @@ -101,7 +101,7 @@ class SchemaValidationContext { this._errors.push(error); } - getErrors(): $ReadOnlyArray { + getErrors(): ReadonlyArray { return this._errors; } } @@ -610,7 +610,7 @@ function createInputObjectCircularRefsValidator( function getAllImplementsInterfaceNodes( type: GraphQLObjectType | GraphQLInterfaceType, iface: GraphQLInterfaceType, -): $ReadOnlyArray { +): ReadonlyArray { const { astNode, extensionASTNodes } = type; const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; @@ -624,7 +624,7 @@ function getAllImplementsInterfaceNodes( function getUnionMemberTypeNodes( union: GraphQLUnionType, typeName: string, -): ?$ReadOnlyArray { +): ?ReadonlyArray { const { astNode, extensionASTNodes } = union; const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; @@ -636,7 +636,7 @@ function getUnionMemberTypeNodes( } function getDeprecatedDirectiveNode( - definitionNode: ?{ +directives?: $ReadOnlyArray, ... }, + definitionNode: ?{ +directives?: ReadonlyArray, ... }, ): ?DirectiveNode { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return definitionNode?.directives?.find( diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index a315a08422..2aaa6c9e3e 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -57,7 +57,7 @@ function expectASTNode(obj: ?{ +astNode: ?ASTNode, ... }) { } function expectExtensionASTNodes(obj: { - +extensionASTNodes: $ReadOnlyArray, + +extensionASTNodes: ReadonlyArray, ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index 7f358ade6e..8f631008b4 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -36,7 +36,7 @@ import { extendSchema } from '../extendSchema'; import { buildSchema } from '../buildASTSchema'; function expectExtensionASTNodes(obj: { - +extensionASTNodes: $ReadOnlyArray, + +extensionASTNodes: ReadonlyArray, ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); diff --git a/src/utilities/buildClientSchema.ts b/src/utilities/buildClientSchema.ts index dd03316a45..6a76632c6c 100644 --- a/src/utilities/buildClientSchema.ts +++ b/src/utilities/buildClientSchema.ts @@ -349,7 +349,7 @@ export function buildClientSchema( } function buildInputValueDefMap( - inputValueIntrospections: $ReadOnlyArray, + inputValueIntrospections: ReadonlyArray, ) { return keyValMap( inputValueIntrospections, diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 9b0529c53c..64d7f913fb 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -19,7 +19,7 @@ import { } from '../type/definition'; type OnErrorCB = ( - path: $ReadOnlyArray, + path: ReadonlyArray, invalidValue: mixed, error: GraphQLError, ) => void; @@ -36,7 +36,7 @@ export function coerceInputValue( } function defaultOnError( - path: $ReadOnlyArray, + path: ReadonlyArray, invalidValue: mixed, error: GraphQLError, ): void { diff --git a/src/utilities/concatAST.ts b/src/utilities/concatAST.ts index b7a0ea4726..f3ce0614f7 100644 --- a/src/utilities/concatAST.ts +++ b/src/utilities/concatAST.ts @@ -6,7 +6,7 @@ import type { DocumentNode } from '../language/ast'; * GraphQL source files which together represent one conceptual application. */ export function concatAST( - documents: $ReadOnlyArray, + documents: ReadonlyArray, ): DocumentNode { let definitions = []; for (const doc of documents) { diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 6c8ccdc145..a36302c106 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -393,7 +393,7 @@ export function extendSchemaImpl( } function getOperationTypes( - nodes: $ReadOnlyArray, + nodes: ReadonlyArray, ): { query: ?GraphQLObjectType, mutation: ?GraphQLObjectType, @@ -452,7 +452,7 @@ export function extendSchemaImpl( } function buildFieldMap( - nodes: $ReadOnlyArray< + nodes: ReadonlyArray< | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode @@ -481,7 +481,7 @@ export function extendSchemaImpl( } function buildArgumentMap( - args: ?$ReadOnlyArray, + args: ?ReadonlyArray, ): GraphQLFieldConfigArgumentMap { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const argsNodes = args ?? []; @@ -505,7 +505,7 @@ export function extendSchemaImpl( } function buildInputFieldMap( - nodes: $ReadOnlyArray< + nodes: ReadonlyArray< InputObjectTypeDefinitionNode | InputObjectTypeExtensionNode, >, ): GraphQLInputFieldConfigMap { @@ -533,7 +533,7 @@ export function extendSchemaImpl( } function buildEnumValueMap( - nodes: $ReadOnlyArray, + nodes: ReadonlyArray, ): GraphQLEnumValueConfigMap { const enumValueMap = Object.create(null); for (const node of nodes) { @@ -552,7 +552,7 @@ export function extendSchemaImpl( } function buildInterfaces( - nodes: $ReadOnlyArray< + nodes: ReadonlyArray< | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode @@ -576,7 +576,7 @@ export function extendSchemaImpl( } function buildUnionTypes( - nodes: $ReadOnlyArray, + nodes: ReadonlyArray, ): Array { const types = []; for (const node of nodes) { diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index afe369d4eb..fc4ec37e4a 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -554,8 +554,8 @@ function stringifyValue(value: mixed, type: GraphQLInputType): string { } function diff( - oldArray: $ReadOnlyArray, - newArray: $ReadOnlyArray, + oldArray: ReadonlyArray, + newArray: ReadonlyArray, ): { added: Array, removed: Array, diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index ea67f6be37..3e2352ea0f 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -156,8 +156,8 @@ export type IntrospectionSchema = { +queryType: IntrospectionNamedTypeRef, +mutationType: ?IntrospectionNamedTypeRef, +subscriptionType: ?IntrospectionNamedTypeRef, - +types: $ReadOnlyArray, - +directives: $ReadOnlyArray, + +types: ReadonlyArray, + +directives: ReadonlyArray, }; export type IntrospectionType = @@ -191,8 +191,8 @@ export type IntrospectionObjectType = { +kind: 'OBJECT', +name: string, +description?: ?string, - +fields: $ReadOnlyArray, - +interfaces: $ReadOnlyArray< + +fields: ReadonlyArray, + +interfaces: ReadonlyArray< IntrospectionNamedTypeRef, >, }; @@ -201,11 +201,11 @@ export type IntrospectionInterfaceType = { +kind: 'INTERFACE', +name: string, +description?: ?string, - +fields: $ReadOnlyArray, - +interfaces: $ReadOnlyArray< + +fields: ReadonlyArray, + +interfaces: ReadonlyArray< IntrospectionNamedTypeRef, >, - +possibleTypes: $ReadOnlyArray< + +possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef, >, }; @@ -214,7 +214,7 @@ export type IntrospectionUnionType = { +kind: 'UNION', +name: string, +description?: ?string, - +possibleTypes: $ReadOnlyArray< + +possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef, >, }; @@ -223,14 +223,14 @@ export type IntrospectionEnumType = { +kind: 'ENUM', +name: string, +description?: ?string, - +enumValues: $ReadOnlyArray, + +enumValues: ReadonlyArray, }; export type IntrospectionInputObjectType = { +kind: 'INPUT_OBJECT', +name: string, +description?: ?string, - +inputFields: $ReadOnlyArray, + +inputFields: ReadonlyArray, }; export type IntrospectionListTypeRef< @@ -280,7 +280,7 @@ export type IntrospectionNamedTypeRef< export type IntrospectionField = { +name: string, +description?: ?string, - +args: $ReadOnlyArray, + +args: ReadonlyArray, +type: IntrospectionOutputTypeRef, +isDeprecated: boolean, +deprecationReason: ?string, @@ -306,6 +306,6 @@ export type IntrospectionDirective = { +name: string, +description?: ?string, +isRepeatable?: boolean, - +locations: $ReadOnlyArray, - +args: $ReadOnlyArray, + +locations: ReadonlyArray, + +args: ReadonlyArray, }; diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index dc368426bf..2ec0c9283e 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -104,7 +104,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { })); } - function sortTypes(arr: $ReadOnlyArray): Array { + function sortTypes(arr: ReadonlyArray): Array { return sortByName(arr).map(replaceNamedType); } @@ -166,13 +166,13 @@ function sortObjMap(map: ObjMap, sortValueFn: (T) => R): ObjMap { } function sortByName( - array: $ReadOnlyArray, + array: ReadonlyArray, ): Array { return sortBy(array, (obj) => obj.name); } function sortBy( - array: $ReadOnlyArray, + array: ReadonlyArray, mapToKey: (T) => string, ): Array { return array.slice().sort((obj1, obj2) => { diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index f68ab4187a..ddd9bae2b4 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -223,7 +223,7 @@ function printFields(type: GraphQLObjectType | GraphQLInterfaceType): string { return printBlock(fields); } -function printBlock(items: $ReadOnlyArray): string { +function printBlock(items: ReadonlyArray): string { return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : ''; } diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index 90918afb06..528540ae45 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -44,10 +44,10 @@ export class ASTValidationContext { _ast: DocumentNode; _onError: (err: GraphQLError) => void; _fragments: ?ObjMap; - _fragmentSpreads: Map>; + _fragmentSpreads: Map>; _recursivelyReferencedFragments: Map< OperationDefinitionNode, - $ReadOnlyArray, + ReadonlyArray, >; constructor(ast: DocumentNode, onError: (err: GraphQLError) => void) { @@ -80,7 +80,7 @@ export class ASTValidationContext { getFragmentSpreads( node: SelectionSetNode, - ): $ReadOnlyArray { + ): ReadonlyArray { let spreads = this._fragmentSpreads.get(node); if (!spreads) { spreads = []; @@ -102,7 +102,7 @@ export class ASTValidationContext { getRecursivelyReferencedFragments( operation: OperationDefinitionNode, - ): $ReadOnlyArray { + ): ReadonlyArray { let fragments = this._recursivelyReferencedFragments.get(operation); if (!fragments) { fragments = []; @@ -152,10 +152,10 @@ export type SDLValidationRule = (SDLValidationContext) => ASTVisitor; export class ValidationContext extends ASTValidationContext { _schema: GraphQLSchema; _typeInfo: TypeInfo; - _variableUsages: Map>; + _variableUsages: Map>; _recursiveVariableUsages: Map< OperationDefinitionNode, - $ReadOnlyArray, + ReadonlyArray, >; constructor( @@ -175,7 +175,7 @@ export class ValidationContext extends ASTValidationContext { return this._schema; } - getVariableUsages(node: NodeWithSelectionSet): $ReadOnlyArray { + getVariableUsages(node: NodeWithSelectionSet): ReadonlyArray { let usages = this._variableUsages.get(node); if (!usages) { const newUsages = []; @@ -201,7 +201,7 @@ export class ValidationContext extends ASTValidationContext { getRecursiveVariableUsages( operation: OperationDefinitionNode, - ): $ReadOnlyArray { + ): ReadonlyArray { let usages = this._recursiveVariableUsages.get(operation); if (!usages) { usages = this.getVariableUsages(operation); diff --git a/src/validation/rules/KnownDirectivesRule.ts b/src/validation/rules/KnownDirectivesRule.ts index 8c1e9191d1..575db896e9 100644 --- a/src/validation/rules/KnownDirectivesRule.ts +++ b/src/validation/rules/KnownDirectivesRule.ts @@ -68,7 +68,7 @@ export function KnownDirectivesRule( } function getDirectiveLocationForASTPath( - ancestors: $ReadOnlyArray>, + ancestors: ReadonlyArray>, ): DirectiveLocationEnum | void { const appliedTo = ancestors[ancestors.length - 1]; invariant(!Array.isArray(appliedTo)); diff --git a/src/validation/rules/KnownTypeNamesRule.ts b/src/validation/rules/KnownTypeNamesRule.ts index 86046484d1..6d2ec6985b 100644 --- a/src/validation/rules/KnownTypeNamesRule.ts +++ b/src/validation/rules/KnownTypeNamesRule.ts @@ -72,7 +72,7 @@ const standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map( (type) => type.name, ); -function isSDLNode(value: ASTNode | $ReadOnlyArray): boolean { +function isSDLNode(value: ASTNode | ReadonlyArray): boolean { return ( !Array.isArray(value) && (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value)) diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts index a0e6773f73..6afeaec582 100644 --- a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts +++ b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts @@ -620,8 +620,8 @@ function findConflict( } function sameArguments( - arguments1: $ReadOnlyArray, - arguments2: $ReadOnlyArray, + arguments1: ReadonlyArray, + arguments2: ReadonlyArray, ): boolean { if (arguments1.length !== arguments2.length) { return false; @@ -766,7 +766,7 @@ function _collectFieldsAndFragmentNames( // Given a series of Conflicts which occurred between two sub-fields, generate // a single Conflict. function subfieldConflicts( - conflicts: $ReadOnlyArray, + conflicts: ReadonlyArray, responseName: string, node1: FieldNode, node2: FieldNode, diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts index f912a8489f..b90c1daa37 100644 --- a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts +++ b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts @@ -39,7 +39,7 @@ export function UniqueFieldDefinitionNamesRule( function checkFieldUniqueness(node: { +name: NameNode, - +fields?: $ReadOnlyArray, + +fields?: ReadonlyArray, ... }) { const typeName = node.name.value; diff --git a/src/validation/specifiedRules.ts b/src/validation/specifiedRules.ts index 5f622d27ca..e8ffa11bd6 100644 --- a/src/validation/specifiedRules.ts +++ b/src/validation/specifiedRules.ts @@ -99,7 +99,7 @@ import { PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensionsRule'; * The order of the rules in this list has been adjusted to lead to the * most clear output when encountering multiple validation errors. */ -export const specifiedRules: $ReadOnlyArray = Object.freeze([ +export const specifiedRules: ReadonlyArray = Object.freeze([ ExecutableDefinitionsRule, UniqueOperationNamesRule, LoneAnonymousOperationRule, @@ -131,7 +131,7 @@ export const specifiedRules: $ReadOnlyArray = Object.freeze([ /** * @internal */ -export const specifiedSDLRules: $ReadOnlyArray = Object.freeze( +export const specifiedSDLRules: ReadonlyArray = Object.freeze( [ LoneSchemaDefinitionRule, UniqueOperationTypesRule, diff --git a/src/validation/validate.ts b/src/validation/validate.ts index 7a4bcf43b6..4ff1464768 100644 --- a/src/validation/validate.ts +++ b/src/validation/validate.ts @@ -33,12 +33,12 @@ import { SDLValidationContext, ValidationContext } from './ValidationContext'; export function validate( schema: GraphQLSchema, documentAST: DocumentNode, - rules: $ReadOnlyArray = specifiedRules, + rules: ReadonlyArray = specifiedRules, options: { maxErrors?: number } = { maxErrors: undefined }, // @deprecate will be removed in 17.0.0 typeInfo: TypeInfo = new TypeInfo(schema), -): $ReadOnlyArray { +): ReadonlyArray { devAssert(documentAST, 'Must provide document.'); // If the schema used for validation is invalid, throw an error. assertValidSchema(schema); @@ -83,8 +83,8 @@ export function validate( export function validateSDL( documentAST: DocumentNode, schemaToExtend?: ?GraphQLSchema, - rules: $ReadOnlyArray = specifiedSDLRules, -): $ReadOnlyArray { + rules: ReadonlyArray = specifiedSDLRules, +): ReadonlyArray { const errors = []; const context = new SDLValidationContext( documentAST, From 3ab7ecfae6bccf5eefda5d3ff760d04be18b80d3 Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 20 Oct 2020 15:29:55 -0500 Subject: [PATCH 04/65] convert `+` (flow) to `readonly` (TS) --- src/error/GraphQLError.ts | 16 +- src/error/formatError.ts | 8 +- src/execution/execute.ts | 6 +- src/execution/values.ts | 4 +- src/graphql.ts | 2 +- src/jsutils/ObjMap.ts | 4 +- src/jsutils/Path.ts | 10 +- src/language/ast.ts | 420 +++++++++--------- src/language/location.ts | 4 +- src/language/visitor.ts | 4 +- src/subscription/subscribe.ts | 4 +- src/type/__tests__/enumType-test.ts | 2 +- src/type/definition.ts | 24 +- src/type/validate.ts | 8 +- .../__tests__/buildASTSchema-test.ts | 4 +- src/utilities/__tests__/extendSchema-test.ts | 4 +- src/utilities/getIntrospectionQuery.ts | 122 ++--- src/utilities/lexicographicSortSchema.ts | 2 +- src/utilities/printSchema.ts | 2 +- src/validation/ValidationContext.ts | 10 +- .../rules/UniqueFieldDefinitionNamesRule.ts | 4 +- 21 files changed, 332 insertions(+), 332 deletions(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index f15537b87a..ad05409663 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -35,7 +35,7 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - +locations: ReadonlyArray | void; + readonly locations: ReadonlyArray | void; /** * An array describing the JSON-path into the execution response which @@ -43,12 +43,12 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - +path: ReadonlyArray | void; + readonly path: ReadonlyArray | void; /** * An array of GraphQL AST Nodes corresponding to this error. */ - +nodes: ReadonlyArray | void; + readonly nodes: ReadonlyArray | void; /** * The source GraphQL document for the first location of this error. @@ -56,23 +56,23 @@ export class GraphQLError extends Error { * Note that if this Error represents more than one node, the source may not * represent nodes after the first node. */ - +source: Source | void; + readonly source: Source | void; /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ - +positions: ReadonlyArray | void; + readonly positions: ReadonlyArray | void; /** * The original error thrown from a field resolver during execution. */ - +originalError: ?Error; + readonly originalError: ?Error; /** * Extension fields to add to the formatted error. */ - +extensions: { [key: string]: mixed, ... } | void; + readonly extensions: { [key: string]: mixed, ... } | void; constructor( message: string, @@ -80,7 +80,7 @@ export class GraphQLError extends Error { source?: ?Source, positions?: ?ReadonlyArray, path?: ?ReadonlyArray, - originalError?: ?(Error & { +extensions?: mixed, ... }), + originalError?: ?(Error & { readonly extensions?: mixed, ... }), extensions?: ?{ [key: string]: mixed, ... }, ) { super(message); diff --git a/src/error/formatError.ts b/src/error/formatError.ts index 98f4bb0102..83d3eeace7 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -29,22 +29,22 @@ export type GraphQLFormattedError = { * from occurrence to occurrence of the problem, except for purposes of * localization. */ - +message: string, + readonly message: string, /** * If an error can be associated to a particular point in the requested * GraphQL document, it should contain a list of locations. */ - +locations: ReadonlyArray | void, + readonly locations: ReadonlyArray | void, /** * If an error can be associated to a particular field in the GraphQL result, * it _must_ contain an entry with the key `path` that details the path of * the response field which experienced the error. This allows clients to * identify whether a null result is intentional or caused by a runtime error. */ - +path: ReadonlyArray | void, + readonly path: ReadonlyArray | void, /** * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - +extensions?: { [key: string]: mixed, ... }, + readonly extensions?: { [key: string]: mixed, ... }, }; diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 41056a2b7a..f5a367ee5d 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -128,7 +128,7 @@ export type ExecutionArgs = { document: DocumentNode, rootValue?: mixed, contextValue?: mixed, - variableValues?: ?{ +[variable: string]: mixed, ... }, + variableValues?: ?{ readonly [variable: string]: mixed, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, @@ -229,7 +229,7 @@ function buildResponse( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: ?{ +[variable: string]: mixed, ... }, + rawVariableValues: ?{ readonly [variable: string]: mixed, ... }, ): void { devAssert(document, 'Must provide document.'); @@ -256,7 +256,7 @@ export function buildExecutionContext( document: DocumentNode, rootValue: mixed, contextValue: mixed, - rawVariableValues: ?{ +[variable: string]: mixed, ... }, + rawVariableValues: ?{ readonly [variable: string]: mixed, ... }, operationName: ?string, fieldResolver: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, diff --git a/src/execution/values.ts b/src/execution/values.ts index 6fc196e191..2167dfc671 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -40,7 +40,7 @@ type CoercedVariableValues = export function getVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { +[variable: string]: mixed, ... }, + inputs: { readonly [variable: string]: mixed, ... }, options?: { maxErrors?: number }, ): CoercedVariableValues { const errors = []; @@ -73,7 +73,7 @@ export function getVariableValues( function coerceVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { +[variable: string]: mixed, ... }, + inputs: { readonly [variable: string]: mixed, ... }, onError: (GraphQLError) => void, ): { [variable: string]: mixed, ... } { const coercedValues = {}; diff --git a/src/graphql.ts b/src/graphql.ts index 1aaf5e11bd..6c8021dd84 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -60,7 +60,7 @@ export type GraphQLArgs = { source: string | Source, rootValue?: mixed, contextValue?: mixed, - variableValues?: ?{ +[variable: string]: mixed, ... }, + variableValues?: ?{ readonly [variable: string]: mixed, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, diff --git a/src/jsutils/ObjMap.ts b/src/jsutils/ObjMap.ts index 9b6ef5e16e..d3c1ef89e4 100644 --- a/src/jsutils/ObjMap.ts +++ b/src/jsutils/ObjMap.ts @@ -1,7 +1,7 @@ export type ObjMap = { [key: string]: T, __proto__: null, ... }; export type ObjMapLike = ObjMap | { [key: string]: T, ... }; -export type ReadOnlyObjMap = { +[key: string]: T, __proto__: null, ... }; +export type ReadOnlyObjMap = { readonly [key: string]: T, __proto__: null, ... }; export type ReadOnlyObjMapLike = | ReadOnlyObjMap - | { +[key: string]: T, ... }; + | { readonly [key: string]: T, ... }; diff --git a/src/jsutils/Path.ts b/src/jsutils/Path.ts index f7888ae027..d0a53fc67a 100644 --- a/src/jsutils/Path.ts +++ b/src/jsutils/Path.ts @@ -1,14 +1,14 @@ export type Path = { - +prev: Path | void, - +key: string | number, - +typename: string | void, + readonly prev: Path | void; + readonly key: string | number; + readonly typename: string | void; }; /** * Given a Path and a key, return a new Path containing the new key. */ export function addPath( - prev: $ReadOnly | void, + prev: Readonly | void, key: string | number, typename: string | void, ): Path { @@ -18,7 +18,7 @@ export function addPath( /** * Given a Path, return an Array of the path keys. */ -export function pathToArray(path: ?$ReadOnly): Array { +export function pathToArray(path: ?Readonly): Array { const flattened = []; let curr = path; while (curr) { diff --git a/src/language/ast.ts b/src/language/ast.ts index be78f6df68..97d44b32f2 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -9,27 +9,27 @@ export class Location { /** * The character offset at which this Node begins. */ - +start: number; + readonly start: number; /** * The character offset at which this Node ends. */ - +end: number; + readonly end: number; /** * The Token at which this Node begins. */ - +startToken: Token; + readonly startToken: Token; /** * The Token at which this Node ends. */ - +endToken: Token; + readonly endToken: Token; /** * The Source document the AST represents. */ - +source: Source; + readonly source: Source; constructor(startToken: Token, endToken: Token, source: Source) { this.start = startToken.start; @@ -52,40 +52,40 @@ export class Token { /** * The kind of Token. */ - +kind: TokenKindEnum; + readonly kind: TokenKindEnum; /** * The character offset at which this Node begins. */ - +start: number; + readonly start: number; /** * The character offset at which this Node ends. */ - +end: number; + readonly end: number; /** * The 1-indexed line number on which this Token appears. */ - +line: number; + readonly line: number; /** * The 1-indexed column number at which this Token begins. */ - +column: number; + readonly column: number; /** * For non-punctuation tokens, represents the interpreted value of the token. */ - +value: string | void; + readonly value: string | void; /** * Tokens exist as nodes in a double-linked-list amongst all tokens * including ignored tokens. is always the first node and * the last. */ - +prev: Token | null; - +next: Token | null; + readonly prev: Token | null; + readonly next: Token | null; constructor( kind: TokenKindEnum, @@ -228,17 +228,17 @@ export type ASTKindToNode = { // Name export type NameNode = { - +kind: 'Name', - +loc?: Location, - +value: string, + readonly kind: 'Name', + readonly loc?: Location, + readonly value: string, }; // Document export type DocumentNode = { - +kind: 'Document', - +loc?: Location, - +definitions: ReadonlyArray, + readonly kind: 'Document', + readonly loc?: Location, + readonly definitions: ReadonlyArray, }; export type DefinitionNode = @@ -251,30 +251,30 @@ export type ExecutableDefinitionNode = | FragmentDefinitionNode; export type OperationDefinitionNode = { - +kind: 'OperationDefinition', - +loc?: Location, - +operation: OperationTypeNode, - +name?: NameNode, - +variableDefinitions?: ReadonlyArray, - +directives?: ReadonlyArray, - +selectionSet: SelectionSetNode, + readonly kind: 'OperationDefinition', + readonly loc?: Location, + readonly operation: OperationTypeNode, + readonly name?: NameNode, + readonly variableDefinitions?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly selectionSet: SelectionSetNode, }; export type OperationTypeNode = 'query' | 'mutation' | 'subscription'; export type VariableDefinitionNode = { - +kind: 'VariableDefinition', - +loc?: Location, - +variable: VariableNode, - +type: TypeNode, - +defaultValue?: ValueNode, - +directives?: ReadonlyArray, + readonly kind: 'VariableDefinition', + readonly loc?: Location, + readonly variable: VariableNode, + readonly type: TypeNode, + readonly defaultValue?: ValueNode, + readonly directives?: ReadonlyArray, }; export type VariableNode = { - +kind: 'Variable', - +loc?: Location, - +name: NameNode, + readonly kind: 'Variable', + readonly loc?: Location, + readonly name: NameNode, }; export type SelectionSetNode = { @@ -286,48 +286,48 @@ export type SelectionSetNode = { export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; export type FieldNode = { - +kind: 'Field', - +loc?: Location, - +alias?: NameNode, - +name: NameNode, - +arguments?: ReadonlyArray, - +directives?: ReadonlyArray, - +selectionSet?: SelectionSetNode, + readonly kind: 'Field', + readonly loc?: Location, + readonly alias?: NameNode, + readonly name: NameNode, + readonly arguments?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly selectionSet?: SelectionSetNode, }; export type ArgumentNode = { - +kind: 'Argument', - +loc?: Location, - +name: NameNode, - +value: ValueNode, + readonly kind: 'Argument', + readonly loc?: Location, + readonly name: NameNode, + readonly value: ValueNode, }; // Fragments export type FragmentSpreadNode = { - +kind: 'FragmentSpread', - +loc?: Location, - +name: NameNode, - +directives?: ReadonlyArray, + readonly kind: 'FragmentSpread', + readonly loc?: Location, + readonly name: NameNode, + readonly directives?: ReadonlyArray, }; export type InlineFragmentNode = { - +kind: 'InlineFragment', - +loc?: Location, - +typeCondition?: NamedTypeNode, - +directives?: ReadonlyArray, - +selectionSet: SelectionSetNode, + readonly kind: 'InlineFragment', + readonly loc?: Location, + readonly typeCondition?: NamedTypeNode, + readonly directives?: ReadonlyArray, + readonly selectionSet: SelectionSetNode, }; export type FragmentDefinitionNode = { - +kind: 'FragmentDefinition', - +loc?: Location, - +name: NameNode, + readonly kind: 'FragmentDefinition', + readonly loc?: Location, + readonly name: NameNode, // Note: fragment variable definitions are deprecated and will removed in v17.0.0 - +variableDefinitions?: ReadonlyArray, - +typeCondition: NamedTypeNode, - +directives?: ReadonlyArray, - +selectionSet: SelectionSetNode, + readonly variableDefinitions?: ReadonlyArray, + readonly typeCondition: NamedTypeNode, + readonly directives?: ReadonlyArray, + readonly selectionSet: SelectionSetNode, }; // Values @@ -344,67 +344,67 @@ export type ValueNode = | ObjectValueNode; export type IntValueNode = { - +kind: 'IntValue', - +loc?: Location, - +value: string, + readonly kind: 'IntValue', + readonly loc?: Location, + readonly value: string, }; export type FloatValueNode = { - +kind: 'FloatValue', - +loc?: Location, - +value: string, + readonly kind: 'FloatValue', + readonly loc?: Location, + readonly value: string, }; export type StringValueNode = { - +kind: 'StringValue', - +loc?: Location, - +value: string, - +block?: boolean, + readonly kind: 'StringValue', + readonly loc?: Location, + readonly value: string, + readonly block?: boolean, }; export type BooleanValueNode = { - +kind: 'BooleanValue', - +loc?: Location, - +value: boolean, + readonly kind: 'BooleanValue', + readonly loc?: Location, + readonly value: boolean, }; export type NullValueNode = { - +kind: 'NullValue', - +loc?: Location, + readonly kind: 'NullValue', + readonly loc?: Location, }; export type EnumValueNode = { - +kind: 'EnumValue', - +loc?: Location, - +value: string, + readonly kind: 'EnumValue', + readonly loc?: Location, + readonly value: string, }; export type ListValueNode = { - +kind: 'ListValue', - +loc?: Location, - +values: ReadonlyArray, + readonly kind: 'ListValue', + readonly loc?: Location, + readonly values: ReadonlyArray, }; export type ObjectValueNode = { - +kind: 'ObjectValue', - +loc?: Location, - +fields: ReadonlyArray, + readonly kind: 'ObjectValue', + readonly loc?: Location, + readonly fields: ReadonlyArray, }; export type ObjectFieldNode = { - +kind: 'ObjectField', - +loc?: Location, - +name: NameNode, - +value: ValueNode, + readonly kind: 'ObjectField', + readonly loc?: Location, + readonly name: NameNode, + readonly value: ValueNode, }; // Directives export type DirectiveNode = { - +kind: 'Directive', - +loc?: Location, - +name: NameNode, - +arguments?: ReadonlyArray, + readonly kind: 'Directive', + readonly loc?: Location, + readonly name: NameNode, + readonly arguments?: ReadonlyArray, }; // Type Reference @@ -412,21 +412,21 @@ export type DirectiveNode = { export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; export type NamedTypeNode = { - +kind: 'NamedType', - +loc?: Location, - +name: NameNode, + readonly kind: 'NamedType', + readonly loc?: Location, + readonly name: NameNode, }; export type ListTypeNode = { - +kind: 'ListType', - +loc?: Location, - +type: TypeNode, + readonly kind: 'ListType', + readonly loc?: Location, + readonly type: TypeNode, }; export type NonNullTypeNode = { - +kind: 'NonNullType', - +loc?: Location, - +type: NamedTypeNode | ListTypeNode, + readonly kind: 'NonNullType', + readonly loc?: Location, + readonly type: NamedTypeNode | ListTypeNode, }; // Type System Definition @@ -437,18 +437,18 @@ export type TypeSystemDefinitionNode = | DirectiveDefinitionNode; export type SchemaDefinitionNode = { - +kind: 'SchemaDefinition', - +loc?: Location, - +description?: StringValueNode, - +directives?: ReadonlyArray, - +operationTypes: ReadonlyArray, + readonly kind: 'SchemaDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly directives?: ReadonlyArray, + readonly operationTypes: ReadonlyArray, }; export type OperationTypeDefinitionNode = { - +kind: 'OperationTypeDefinition', - +loc?: Location, - +operation: OperationTypeNode, - +type: NamedTypeNode, + readonly kind: 'OperationTypeDefinition', + readonly loc?: Location, + readonly operation: OperationTypeNode, + readonly type: NamedTypeNode, }; // Type Definition @@ -462,98 +462,98 @@ export type TypeDefinitionNode = | InputObjectTypeDefinitionNode; export type ScalarTypeDefinitionNode = { - +kind: 'ScalarTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +directives?: ReadonlyArray, + readonly kind: 'ScalarTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly directives?: ReadonlyArray, }; export type ObjectTypeDefinitionNode = { - +kind: 'ObjectTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +interfaces?: ReadonlyArray, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'ObjectTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly interfaces?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; export type FieldDefinitionNode = { - +kind: 'FieldDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +arguments?: ReadonlyArray, - +type: TypeNode, - +directives?: ReadonlyArray, + readonly kind: 'FieldDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly arguments?: ReadonlyArray, + readonly type: TypeNode, + readonly directives?: ReadonlyArray, }; export type InputValueDefinitionNode = { - +kind: 'InputValueDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +type: TypeNode, - +defaultValue?: ValueNode, - +directives?: ReadonlyArray, + readonly kind: 'InputValueDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly type: TypeNode, + readonly defaultValue?: ValueNode, + readonly directives?: ReadonlyArray, }; export type InterfaceTypeDefinitionNode = { - +kind: 'InterfaceTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +interfaces?: ReadonlyArray, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'InterfaceTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly interfaces?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; export type UnionTypeDefinitionNode = { - +kind: 'UnionTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +directives?: ReadonlyArray, - +types?: ReadonlyArray, + readonly kind: 'UnionTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly types?: ReadonlyArray, }; export type EnumTypeDefinitionNode = { - +kind: 'EnumTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +directives?: ReadonlyArray, - +values?: ReadonlyArray, + readonly kind: 'EnumTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly values?: ReadonlyArray, }; export type EnumValueDefinitionNode = { - +kind: 'EnumValueDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +directives?: ReadonlyArray, + readonly kind: 'EnumValueDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly directives?: ReadonlyArray, }; export type InputObjectTypeDefinitionNode = { - +kind: 'InputObjectTypeDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'InputObjectTypeDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; // Directive Definitions export type DirectiveDefinitionNode = { - +kind: 'DirectiveDefinition', - +loc?: Location, - +description?: StringValueNode, - +name: NameNode, - +arguments?: ReadonlyArray, - +repeatable: boolean, - +locations: ReadonlyArray, + readonly kind: 'DirectiveDefinition', + readonly loc?: Location, + readonly description?: StringValueNode, + readonly name: NameNode, + readonly arguments?: ReadonlyArray, + readonly repeatable: boolean, + readonly locations: ReadonlyArray, }; // Type System Extensions @@ -561,10 +561,10 @@ export type DirectiveDefinitionNode = { export type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; export type SchemaExtensionNode = { - +kind: 'SchemaExtension', - +loc?: Location, - +directives?: ReadonlyArray, - +operationTypes?: ReadonlyArray, + readonly kind: 'SchemaExtension', + readonly loc?: Location, + readonly directives?: ReadonlyArray, + readonly operationTypes?: ReadonlyArray, }; // Type Extensions @@ -578,50 +578,50 @@ export type TypeExtensionNode = | InputObjectTypeExtensionNode; export type ScalarTypeExtensionNode = { - +kind: 'ScalarTypeExtension', - +loc?: Location, - +name: NameNode, - +directives?: ReadonlyArray, + readonly kind: 'ScalarTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly directives?: ReadonlyArray, }; export type ObjectTypeExtensionNode = { - +kind: 'ObjectTypeExtension', - +loc?: Location, - +name: NameNode, - +interfaces?: ReadonlyArray, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'ObjectTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly interfaces?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; export type InterfaceTypeExtensionNode = { - +kind: 'InterfaceTypeExtension', - +loc?: Location, - +name: NameNode, - +interfaces?: ReadonlyArray, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'InterfaceTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly interfaces?: ReadonlyArray, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; export type UnionTypeExtensionNode = { - +kind: 'UnionTypeExtension', - +loc?: Location, - +name: NameNode, - +directives?: ReadonlyArray, - +types?: ReadonlyArray, + readonly kind: 'UnionTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly types?: ReadonlyArray, }; export type EnumTypeExtensionNode = { - +kind: 'EnumTypeExtension', - +loc?: Location, - +name: NameNode, - +directives?: ReadonlyArray, - +values?: ReadonlyArray, + readonly kind: 'EnumTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly values?: ReadonlyArray, }; export type InputObjectTypeExtensionNode = { - +kind: 'InputObjectTypeExtension', - +loc?: Location, - +name: NameNode, - +directives?: ReadonlyArray, - +fields?: ReadonlyArray, + readonly kind: 'InputObjectTypeExtension', + readonly loc?: Location, + readonly name: NameNode, + readonly directives?: ReadonlyArray, + readonly fields?: ReadonlyArray, }; diff --git a/src/language/location.ts b/src/language/location.ts index 4695d52e71..22cd7e4176 100644 --- a/src/language/location.ts +++ b/src/language/location.ts @@ -4,8 +4,8 @@ import type { Source } from './source'; * Represents a location in a Source. */ export type SourceLocation = { - +line: number, - +column: number, + readonly line: number; + readonly column: number; }; /** diff --git a/src/language/visitor.ts b/src/language/visitor.ts index eebbaf26a2..25b2ff67c4 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -15,8 +15,8 @@ type KindVisitor = $ObjMap< >; type EnterLeaveVisitor = { - +enter?: ASTVisitFn, - +leave?: ASTVisitFn, + readonly enter?: ASTVisitFn, + readonly leave?: ASTVisitFn, }; /** diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 50492d4487..1c0b953061 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -30,7 +30,7 @@ export type SubscriptionArgs = { document: DocumentNode, rootValue?: mixed, contextValue?: mixed, - variableValues?: ?{ +[variable: string]: mixed, ... }, + variableValues?: ?{ readonly [variable: string]: mixed, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, subscribeFieldResolver?: ?GraphQLFieldResolver, @@ -140,7 +140,7 @@ export async function createSourceEventStream( document: DocumentNode, rootValue?: mixed, contextValue?: mixed, - variableValues?: ?{ +[variable: string]: mixed, ... }, + variableValues?: ?{ readonly [variable: string]: mixed, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, ): Promise | ExecutionResult> { diff --git a/src/type/__tests__/enumType-test.ts b/src/type/__tests__/enumType-test.ts index 0145657733..4d23279446 100644 --- a/src/type/__tests__/enumType-test.ts +++ b/src/type/__tests__/enumType-test.ts @@ -114,7 +114,7 @@ const schema = new GraphQLSchema({ function executeQuery( source: string, - variableValues?: { +[variable: string]: mixed, ... }, + variableValues?: { readonly [variable: string]: mixed, ... }, ) { return graphqlSync({ schema, source, variableValues }); } diff --git a/src/type/definition.ts b/src/type/definition.ts index 657c5d724d..6068224b18 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -342,7 +342,7 @@ export function assertAbstractType(type: mixed): GraphQLAbstractType { * */ export class GraphQLList<+T: GraphQLType> { - +ofType: T; + readonly ofType: T; constructor(ofType: T) { devAssert( @@ -388,7 +388,7 @@ export class GraphQLList<+T: GraphQLType> { * Note: the enforcement of non-nullability occurs within the executor. */ export class GraphQLNonNull<+T: GraphQLNullableType> { - +ofType: T; + readonly ofType: T; constructor(ofType: T) { devAssert( @@ -919,16 +919,16 @@ export type GraphQLFieldResolver< ) => mixed; export type GraphQLResolveInfo = { - +fieldName: string, - +fieldNodes: ReadonlyArray, - +returnType: GraphQLOutputType, - +parentType: GraphQLObjectType, - +path: Path, - +schema: GraphQLSchema, - +fragments: ObjMap, - +rootValue: mixed, - +operation: OperationDefinitionNode, - +variableValues: { [variable: string]: mixed, ... }, + readonly fieldName: string, + readonly fieldNodes: ReadonlyArray, + readonly returnType: GraphQLOutputType, + readonly parentType: GraphQLObjectType, + readonly path: Path, + readonly schema: GraphQLSchema, + readonly fragments: ObjMap, + readonly rootValue: mixed, + readonly operation: OperationDefinitionNode, + readonly variableValues: { [variable: string]: mixed, ... }, }; export type GraphQLFieldConfig< diff --git a/src/type/validate.ts b/src/type/validate.ts index d48ea6e60a..6285bf7bff 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -81,8 +81,8 @@ export function assertValidSchema(schema: GraphQLSchema): void { } class SchemaValidationContext { - +_errors: Array; - +schema: GraphQLSchema; + readonly _errors: Array; + readonly schema: GraphQLSchema; constructor(schema) { this._errors = []; @@ -196,7 +196,7 @@ function validateDirectives(context: SchemaValidationContext): void { function validateName( context: SchemaValidationContext, - node: { +name: string, +astNode: ?ASTNode, ... }, + node: { readonly name: string, readonly astNode: ?ASTNode, ... }, ): void { // Ensure names are valid, however introspection types opt out. const error = isValidNameError(node.name); @@ -636,7 +636,7 @@ function getUnionMemberTypeNodes( } function getDeprecatedDirectiveNode( - definitionNode: ?{ +directives?: ReadonlyArray, ... }, + definitionNode: ?{ readonly directives?: ReadonlyArray, ... }, ): ?DirectiveNode { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return definitionNode?.directives?.find( diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index 2aaa6c9e3e..7545d510da 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -50,14 +50,14 @@ function cycleSDL(sdl: string): string { return printSchema(buildSchema(sdl)); } -function expectASTNode(obj: ?{ +astNode: ?ASTNode, ... }) { +function expectASTNode(obj: ?{ readonly astNode: ?ASTNode, ... }) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); } function expectExtensionASTNodes(obj: { - +extensionASTNodes: ReadonlyArray, + readonly extensionASTNodes: ReadonlyArray, ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index 8f631008b4..bfdad85cf5 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -36,13 +36,13 @@ import { extendSchema } from '../extendSchema'; import { buildSchema } from '../buildASTSchema'; function expectExtensionASTNodes(obj: { - +extensionASTNodes: ReadonlyArray, + readonly extensionASTNodes: ReadonlyArray, ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } -function expectASTNode(obj: ?{ +astNode: ?ASTNode, ... }) { +function expectASTNode(obj: ?{ readonly astNode: ?ASTNode, ... }) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 3e2352ea0f..ffcf4172f9 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -148,16 +148,16 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string { } export type IntrospectionQuery = { - +__schema: IntrospectionSchema, + readonly __schema: IntrospectionSchema, }; export type IntrospectionSchema = { - +description?: ?string, - +queryType: IntrospectionNamedTypeRef, - +mutationType: ?IntrospectionNamedTypeRef, - +subscriptionType: ?IntrospectionNamedTypeRef, - +types: ReadonlyArray, - +directives: ReadonlyArray, + readonly description?: ?string, + readonly queryType: IntrospectionNamedTypeRef, + readonly mutationType: ?IntrospectionNamedTypeRef, + readonly subscriptionType: ?IntrospectionNamedTypeRef, + readonly types: ReadonlyArray, + readonly directives: ReadonlyArray, }; export type IntrospectionType = @@ -181,70 +181,70 @@ export type IntrospectionInputType = | IntrospectionInputObjectType; export type IntrospectionScalarType = { - +kind: 'SCALAR', - +name: string, - +description?: ?string, - +specifiedByUrl?: ?string, + readonly kind: 'SCALAR', + readonly name: string, + readonly description?: ?string, + readonly specifiedByUrl?: ?string, }; export type IntrospectionObjectType = { - +kind: 'OBJECT', - +name: string, - +description?: ?string, - +fields: ReadonlyArray, - +interfaces: ReadonlyArray< + readonly kind: 'OBJECT', + readonly name: string, + readonly description?: ?string, + readonly fields: ReadonlyArray, + readonly interfaces: ReadonlyArray< IntrospectionNamedTypeRef, >, }; export type IntrospectionInterfaceType = { - +kind: 'INTERFACE', - +name: string, - +description?: ?string, - +fields: ReadonlyArray, - +interfaces: ReadonlyArray< + readonly kind: 'INTERFACE', + readonly name: string, + readonly description?: ?string, + readonly fields: ReadonlyArray, + readonly interfaces: ReadonlyArray< IntrospectionNamedTypeRef, >, - +possibleTypes: ReadonlyArray< + readonly possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef, >, }; export type IntrospectionUnionType = { - +kind: 'UNION', - +name: string, - +description?: ?string, - +possibleTypes: ReadonlyArray< + readonly kind: 'UNION', + readonly name: string, + readonly description?: ?string, + readonly possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef, >, }; export type IntrospectionEnumType = { - +kind: 'ENUM', - +name: string, - +description?: ?string, - +enumValues: ReadonlyArray, + readonly kind: 'ENUM', + readonly name: string, + readonly description?: ?string, + readonly enumValues: ReadonlyArray, }; export type IntrospectionInputObjectType = { - +kind: 'INPUT_OBJECT', - +name: string, - +description?: ?string, - +inputFields: ReadonlyArray, + readonly kind: 'INPUT_OBJECT', + readonly name: string, + readonly description?: ?string, + readonly inputFields: ReadonlyArray, }; export type IntrospectionListTypeRef< T: IntrospectionTypeRef = IntrospectionTypeRef, > = { - +kind: 'LIST', - +ofType: T, + readonly kind: 'LIST', + readonly ofType: T, }; export type IntrospectionNonNullTypeRef< T: IntrospectionTypeRef = IntrospectionTypeRef, > = { - +kind: 'NON_NULL', - +ofType: T, + readonly kind: 'NON_NULL', + readonly ofType: T, }; export type IntrospectionTypeRef = @@ -273,39 +273,39 @@ export type IntrospectionInputTypeRef = export type IntrospectionNamedTypeRef< T: IntrospectionType = IntrospectionType, > = { - +kind: $PropertyType, - +name: string, + readonly kind: $PropertyType, + readonly name: string, }; export type IntrospectionField = { - +name: string, - +description?: ?string, - +args: ReadonlyArray, - +type: IntrospectionOutputTypeRef, - +isDeprecated: boolean, - +deprecationReason: ?string, + readonly name: string, + readonly description?: ?string, + readonly args: ReadonlyArray, + readonly type: IntrospectionOutputTypeRef, + readonly isDeprecated: boolean, + readonly deprecationReason: ?string, }; export type IntrospectionInputValue = { - +name: string, - +description?: ?string, - +type: IntrospectionInputTypeRef, - +defaultValue: ?string, - +isDeprecated?: boolean, - +deprecationReason?: ?string, + readonly name: string, + readonly description?: ?string, + readonly type: IntrospectionInputTypeRef, + readonly defaultValue: ?string, + readonly isDeprecated?: boolean, + readonly deprecationReason?: ?string, }; export type IntrospectionEnumValue = { - +name: string, - +description?: ?string, - +isDeprecated: boolean, - +deprecationReason: ?string, + readonly name: string, + readonly description?: ?string, + readonly isDeprecated: boolean, + readonly deprecationReason: ?string, }; export type IntrospectionDirective = { - +name: string, - +description?: ?string, - +isRepeatable?: boolean, - +locations: ReadonlyArray, - +args: ReadonlyArray, + readonly name: string, + readonly description?: ?string, + readonly isRepeatable?: boolean, + readonly locations: ReadonlyArray, + readonly args: ReadonlyArray, }; diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 2ec0c9283e..eb22bfd686 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -165,7 +165,7 @@ function sortObjMap(map: ObjMap, sortValueFn: (T) => R): ObjMap { return sortedMap; } -function sortByName( +function sortByName( array: ReadonlyArray, ): Array { return sortBy(array, (obj) => obj.name); diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index ddd9bae2b4..218c8f9883 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -303,7 +303,7 @@ function printSpecifiedByUrl(scalar: GraphQLScalarType): string { } function printDescription( - def: { +description: ?string, ... }, + def: { readonly description: ?string, ... }, indentation: string = '', firstInBlock: boolean = true, ): string { diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index 528540ae45..4e0d418d07 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -30,9 +30,9 @@ import { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo'; type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; type VariableUsage = { - +node: VariableNode, - +type: ?GraphQLInputType, - +defaultValue: ?mixed, + readonly node: VariableNode; + readonly type: ?GraphQLInputType; + readonly defaultValue: ?mixed; }; /** @@ -47,7 +47,7 @@ export class ASTValidationContext { _fragmentSpreads: Map>; _recursivelyReferencedFragments: Map< OperationDefinitionNode, - ReadonlyArray, + ReadonlyArray >; constructor(ast: DocumentNode, onError: (err: GraphQLError) => void) { @@ -155,7 +155,7 @@ export class ValidationContext extends ASTValidationContext { _variableUsages: Map>; _recursiveVariableUsages: Map< OperationDefinitionNode, - ReadonlyArray, + ReadonlyArray >; constructor( diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts index b90c1daa37..c45fb781f2 100644 --- a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts +++ b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts @@ -38,8 +38,8 @@ export function UniqueFieldDefinitionNamesRule( }; function checkFieldUniqueness(node: { - +name: NameNode, - +fields?: ReadonlyArray, + readonly name: NameNode, + readonly fields?: ReadonlyArray, ... }) { const typeName = node.name.value; From 4dde86c4fb49c0c63fb29242fb3df09371059993 Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 20 Oct 2020 15:57:23 -0500 Subject: [PATCH 05/65] convert `mixed` (flow) to `unknown` (TS) --- src/error/GraphQLError.ts | 6 +- src/error/formatError.ts | 2 +- src/error/locatedError.ts | 2 +- src/execution/__tests__/abstract-test.ts | 4 +- src/execution/__tests__/lists-test.ts | 8 +- src/execution/__tests__/nonnull-test.ts | 4 +- src/execution/__tests__/resolve-test.ts | 2 +- src/execution/__tests__/variables-test.ts | 2 +- src/execution/execute.ts | 88 ++++----- src/execution/values.ts | 20 +- src/graphql.ts | 6 +- src/jsutils/__tests__/inspect-test.ts | 6 +- src/jsutils/devAssert.ts | 2 +- src/jsutils/inspect.ts | 15 +- src/jsutils/instanceOf.ts | 2 +- src/jsutils/invariant.ts | 2 +- src/jsutils/isAsyncIterable.ts | 2 +- src/jsutils/isIteratableObject.ts | 4 +- src/jsutils/isObjectLike.ts | 2 +- src/jsutils/isPromise.ts | 2 +- src/jsutils/memoize3.ts | 6 +- src/language/__tests__/schema-parser-test.ts | 23 ++- src/language/__tests__/toJSONDeep.ts | 2 +- src/language/ast.ts | 2 +- src/language/source.ts | 2 +- src/subscription/__tests__/simplePubSub.ts | 2 +- src/subscription/__tests__/subscribe-test.ts | 8 +- src/subscription/mapAsyncIterator.ts | 4 +- src/subscription/subscribe.ts | 16 +- src/type/__tests__/definition-test.ts | 2 +- src/type/__tests__/enumType-test.ts | 2 +- src/type/__tests__/extensions-test.ts | 2 +- src/type/__tests__/predicate-test.ts | 12 +- src/type/__tests__/scalars-test.ts | 20 +- src/type/__tests__/validation-test.ts | 4 +- src/type/definition.ts | 174 +++++++++--------- src/type/directives.ts | 10 +- src/type/introspection.ts | 18 +- src/type/scalars.ts | 22 +-- src/type/schema.ts | 10 +- src/utilities/TypeInfo.ts | 32 ++-- .../__tests__/coerceInputValue-test.ts | 2 +- src/utilities/__tests__/printSchema-test.ts | 4 +- .../__tests__/typeComparators-test.ts | 2 +- src/utilities/__tests__/valueFromAST-test.ts | 2 +- .../__tests__/valueFromASTUntyped-test.ts | 2 +- src/utilities/astFromValue.d.ts | 2 +- src/utilities/astFromValue.ts | 4 +- src/utilities/buildClientSchema.ts | 4 +- src/utilities/coerceInputValue.ts | 12 +- src/utilities/extendSchema.ts | 6 +- src/utilities/findBreakingChanges.ts | 6 +- src/utilities/lexicographicSortSchema.ts | 2 +- src/utilities/valueFromAST.d.ts | 2 +- src/utilities/valueFromAST.ts | 8 +- src/utilities/valueFromASTUntyped.ts | 4 +- src/validation/ValidationContext.ts | 4 +- .../rules/OverlappingFieldsCanBeMergedRule.ts | 2 +- .../rules/VariablesInAllowedPositionRule.ts | 2 +- 59 files changed, 317 insertions(+), 307 deletions(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index ad05409663..e6a62bbab1 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -72,7 +72,7 @@ export class GraphQLError extends Error { /** * Extension fields to add to the formatted error. */ - readonly extensions: { [key: string]: mixed, ... } | void; + readonly extensions: { [key: string]: unknown, ... } | void; constructor( message: string, @@ -80,8 +80,8 @@ export class GraphQLError extends Error { source?: ?Source, positions?: ?ReadonlyArray, path?: ?ReadonlyArray, - originalError?: ?(Error & { readonly extensions?: mixed, ... }), - extensions?: ?{ [key: string]: mixed, ... }, + originalError?: ?(Error & { readonly extensions?: unknown, ... }), + extensions?: ?{ [key: string]: unknown, ... }, ) { super(message); diff --git a/src/error/formatError.ts b/src/error/formatError.ts index 83d3eeace7..a48d725d26 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -46,5 +46,5 @@ export type GraphQLFormattedError = { * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - readonly extensions?: { [key: string]: mixed, ... }, + readonly extensions?: { [key: string]: unknown, ... }, }; diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index 4c6d7018d2..d165fc30f2 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -10,7 +10,7 @@ import { GraphQLError } from './GraphQLError'; * document responsible for the original Error. */ export function locatedError( - rawOriginalError: mixed, + rawOriginalError: unknown, nodes: ASTNode | ReadonlyArray | void | null, path?: ?ReadonlyArray, ): GraphQLError { diff --git a/src/execution/__tests__/abstract-test.ts b/src/execution/__tests__/abstract-test.ts index 8c77046f34..7efe2efed9 100644 --- a/src/execution/__tests__/abstract-test.ts +++ b/src/execution/__tests__/abstract-test.ts @@ -19,7 +19,7 @@ import { executeSync, execute } from '../execute'; async function executeQuery(args: { schema: GraphQLSchema, query: string, - rootValue?: mixed, + rootValue?: unknown, }) { const { schema, query, rootValue } = args; const document = parse(query); @@ -533,7 +533,7 @@ describe('Execute: Handles execution of abstract types', () => { } `); - function expectError({ forTypeName }: { forTypeName: mixed }) { + function expectError({ forTypeName }: { forTypeName: unknown }) { const rootValue = { pet: { __typename: forTypeName } }; const result = executeSync({ schema, document, rootValue }); return { diff --git a/src/execution/__tests__/lists-test.ts b/src/execution/__tests__/lists-test.ts index bf32a2b069..e5efd74db5 100644 --- a/src/execution/__tests__/lists-test.ts +++ b/src/execution/__tests__/lists-test.ts @@ -8,7 +8,7 @@ import { buildSchema } from '../../utilities/buildASTSchema'; import { execute, executeSync } from '../execute'; describe('Execute: Accepts any iterable as list value', () => { - function complete(rootValue: mixed) { + function complete(rootValue: unknown) { return executeSync({ schema: buildSchema('type Query { listField: [String] }'), document: parse('{ listField }'), @@ -65,7 +65,7 @@ describe('Execute: Accepts any iterable as list value', () => { }); describe('Execute: Handles list nullability', () => { - async function complete(args: { listField: mixed; as: string }) { + async function complete(args: { listField: unknown; as: string }) { const { listField, as } = args; const schema = buildSchema(`type Query { listField: ${as} }`); const document = parse('{ listField }'); @@ -85,11 +85,11 @@ describe('Execute: Handles list nullability', () => { } return result; - function executeQuery(listValue: mixed) { + function executeQuery(listValue: unknown) { return execute({ schema, document, rootValue: { listField: listValue } }); } - function promisify(value: mixed): Promise { + function promisify(value: unknown): Promise { return value instanceof Error ? Promise.reject(value) : Promise.resolve(value); diff --git a/src/execution/__tests__/nonnull-test.ts b/src/execution/__tests__/nonnull-test.ts index 4eb38f12b6..223c552c33 100644 --- a/src/execution/__tests__/nonnull-test.ts +++ b/src/execution/__tests__/nonnull-test.ts @@ -106,7 +106,7 @@ const schema = buildSchema(` function executeQuery( query: string, - rootValue: mixed, + rootValue: unknown, ): ExecutionResult | Promise { return execute({ schema, document: parse(query), rootValue }); } @@ -122,7 +122,7 @@ function patchData(data: ExecutionResult): ExecutionResult { return JSON.parse(patch(JSON.stringify(data))); } -async function executeSyncAndAsync(query: string, rootValue: mixed) { +async function executeSyncAndAsync(query: string, rootValue: unknown) { const syncResult = executeSync({ schema, document: parse(query), rootValue }); const asyncResult = await execute({ schema, diff --git a/src/execution/__tests__/resolve-test.ts b/src/execution/__tests__/resolve-test.ts index b8d28a615b..f62314f8dc 100644 --- a/src/execution/__tests__/resolve-test.ts +++ b/src/execution/__tests__/resolve-test.ts @@ -95,7 +95,7 @@ describe('Execute: resolve function', () => { resolve: (source, args) => JSON.stringify([source, args]), }); - function executeQuery(query: string, rootValue?: mixed) { + function executeQuery(query: string, rootValue?: unknown) { const document = parse(query); return executeSync({ schema, document, rootValue }); } diff --git a/src/execution/__tests__/variables-test.ts b/src/execution/__tests__/variables-test.ts index 1c45e2bc9d..25e1d4aa37 100644 --- a/src/execution/__tests__/variables-test.ts +++ b/src/execution/__tests__/variables-test.ts @@ -119,7 +119,7 @@ const schema = new GraphQLSchema({ query: TestType }); function executeQuery( query: string, - variableValues?: { [variable: string]: mixed, ... }, + variableValues?: { [variable: string]: unknown, ... }, ) { const document = parse(query); return executeSync({ schema, document, variableValues }); diff --git a/src/execution/execute.ts b/src/execution/execute.ts index f5a367ee5d..125aaeb165 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -95,10 +95,10 @@ import { export type ExecutionContext = { schema: GraphQLSchema, fragments: ObjMap, - rootValue: mixed, - contextValue: mixed, + rootValue: unknown, + contextValue: unknown, operation: OperationDefinitionNode, - variableValues: { [variable: string]: mixed, ... }, + variableValues: { [variable: string]: unknown, ... }, fieldResolver: GraphQLFieldResolver, typeResolver: GraphQLTypeResolver, errors: Array, @@ -113,22 +113,22 @@ export type ExecutionContext = { */ export type ExecutionResult = { errors?: ReadonlyArray, - data?: ObjMap | null, - extensions?: ObjMap, + data?: ObjMap | null, + extensions?: ObjMap, }; export type FormattedExecutionResult = { errors?: ReadonlyArray, - data?: ObjMap | null, - extensions?: ObjMap, + data?: ObjMap | null, + extensions?: ObjMap, }; export type ExecutionArgs = { schema: GraphQLSchema, document: DocumentNode, - rootValue?: mixed, - contextValue?: mixed, - variableValues?: ?{ readonly [variable: string]: mixed, ... }, + rootValue?: unknown, + contextValue?: unknown, + variableValues?: ?{ readonly [variable: string]: unknown, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, @@ -210,7 +210,7 @@ export function executeSync(args: ExecutionArgs): ExecutionResult { */ function buildResponse( exeContext: ExecutionContext, - data: PromiseOrValue | null>, + data: PromiseOrValue | null>, ): PromiseOrValue { if (isPromise(data)) { return data.then((resolved) => buildResponse(exeContext, resolved)); @@ -229,7 +229,7 @@ function buildResponse( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: ?{ readonly [variable: string]: mixed, ... }, + rawVariableValues: ?{ readonly [variable: string]: unknown, ... }, ): void { devAssert(document, 'Must provide document.'); @@ -254,12 +254,12 @@ export function assertValidExecutionArguments( export function buildExecutionContext( schema: GraphQLSchema, document: DocumentNode, - rootValue: mixed, - contextValue: mixed, - rawVariableValues: ?{ readonly [variable: string]: mixed, ... }, + rootValue: unknown, + contextValue: unknown, + rawVariableValues: ?{ readonly [variable: string]: unknown, ... }, operationName: ?string, - fieldResolver: ?GraphQLFieldResolver, - typeResolver?: ?GraphQLTypeResolver, + fieldResolver: ?GraphQLFieldResolver, + typeResolver?: ?GraphQLTypeResolver, ): ReadonlyArray | ExecutionContext { let operation: OperationDefinitionNode | void; const fragments: ObjMap = Object.create(null); @@ -326,8 +326,8 @@ export function buildExecutionContext( function executeOperation( exeContext: ExecutionContext, operation: OperationDefinitionNode, - rootValue: mixed, -): PromiseOrValue | null> { + rootValue: unknown, +): PromiseOrValue | null> { const type = getOperationRootType(exeContext.schema, operation); const fields = collectFields( exeContext, @@ -367,10 +367,10 @@ function executeOperation( function executeFieldsSerially( exeContext: ExecutionContext, parentType: GraphQLObjectType, - sourceValue: mixed, + sourceValue: unknown, path: Path | void, fields: ObjMap>, -): PromiseOrValue> { +): PromiseOrValue> { return promiseReduce( Object.keys(fields), (results, responseName) => { @@ -406,10 +406,10 @@ function executeFieldsSerially( function executeFields( exeContext: ExecutionContext, parentType: GraphQLObjectType, - sourceValue: mixed, + sourceValue: unknown, path: Path | void, fields: ObjMap>, -): PromiseOrValue> { +): PromiseOrValue> { const results = Object.create(null); let containsPromise = false; @@ -585,10 +585,10 @@ function getFieldEntryKey(node: FieldNode): string { function resolveField( exeContext: ExecutionContext, parentType: GraphQLObjectType, - source: mixed, + source: unknown, fieldNodes: ReadonlyArray, path: Path, -): PromiseOrValue { +): PromiseOrValue { const fieldNode = fieldNodes[0]; const fieldName = fieldNode.name.value; @@ -662,7 +662,7 @@ function resolveField( */ export function buildResolveInfo( exeContext: ExecutionContext, - fieldDef: GraphQLField, + fieldDef: GraphQLField, fieldNodes: ReadonlyArray, parentType: GraphQLObjectType, path: Path, @@ -727,8 +727,8 @@ function completeValue( fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, - result: mixed, -): PromiseOrValue { + result: unknown, +): PromiseOrValue { // If result is an Error, throw a located error. if (result instanceof Error) { throw result; @@ -820,8 +820,8 @@ function completeListValue( fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, - result: mixed, -): PromiseOrValue> { + result: unknown, +): PromiseOrValue> { if (!isIteratableObject(result)) { throw new GraphQLError( `Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`, @@ -887,7 +887,7 @@ function completeListValue( * Complete a Scalar or Enum by serializing to a valid value, returning * null if serialization is not possible. */ -function completeLeafValue(returnType: GraphQLLeafType, result: mixed): mixed { +function completeLeafValue(returnType: GraphQLLeafType, result: unknown): unknown { const serializedResult = returnType.serialize(result); if (serializedResult === undefined) { throw new Error( @@ -908,8 +908,8 @@ function completeAbstractValue( fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, - result: mixed, -): PromiseOrValue> { + result: unknown, +): PromiseOrValue> { const resolveTypeFn = returnType.resolveType ?? exeContext.typeResolver; const contextValue = exeContext.contextValue; const runtimeType = resolveTypeFn(result, contextValue, info, returnType); @@ -952,12 +952,12 @@ function completeAbstractValue( } function ensureValidRuntimeType( - runtimeTypeName: mixed, + runtimeTypeName: unknown, exeContext: ExecutionContext, returnType: GraphQLAbstractType, fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, - result: mixed, + result: unknown, ): GraphQLObjectType { if (runtimeTypeName == null) { throw new GraphQLError( @@ -1015,8 +1015,8 @@ function completeObjectValue( fieldNodes: ReadonlyArray, info: GraphQLResolveInfo, path: Path, - result: mixed, -): PromiseOrValue> { + result: unknown, +): PromiseOrValue> { // If there is an isTypeOf predicate function, call it with the // current result. If isTypeOf returns false, then raise an error rather // than continuing execution. @@ -1054,7 +1054,7 @@ function completeObjectValue( function invalidReturnTypeError( returnType: GraphQLObjectType, - result: mixed, + result: unknown, fieldNodes: ReadonlyArray, ): GraphQLError { return new GraphQLError( @@ -1068,8 +1068,8 @@ function collectAndExecuteSubfields( returnType: GraphQLObjectType, fieldNodes: ReadonlyArray, path: Path, - result: mixed, -): PromiseOrValue> { + result: unknown, +): PromiseOrValue> { // Collect sub-fields to execute to complete this value. const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); return executeFields(exeContext, returnType, result, path, subFieldNodes); @@ -1112,7 +1112,7 @@ function _collectSubfields( * Otherwise, test each possible type for the abstract type by calling * isTypeOf for the object being coerced, returning the first type that matches. */ -export const defaultTypeResolver: GraphQLTypeResolver = function ( +export const defaultTypeResolver: GraphQLTypeResolver = function ( value, contextValue, info, @@ -1159,8 +1159,8 @@ export const defaultTypeResolver: GraphQLTypeResolver = function ( * of calling that function while passing along args and context value. */ export const defaultFieldResolver: GraphQLFieldResolver< - mixed, - mixed, + unknown, + unknown, > = function (source: any, args, contextValue, info) { // ensure source is a value for which property access is acceptable. if (isObjectLike(source) || typeof source === 'function') { @@ -1187,7 +1187,7 @@ export function getFieldDef( schema: GraphQLSchema, parentType: GraphQLObjectType, fieldName: string, -): ?GraphQLField { +): ?GraphQLField { if ( fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === parentType diff --git a/src/execution/values.ts b/src/execution/values.ts index 2167dfc671..2dcacf4ddf 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -24,7 +24,7 @@ import { coerceInputValue } from '../utilities/coerceInputValue'; type CoercedVariableValues = | { errors: ReadonlyArray } - | { coerced: { [variable: string]: mixed, ... } }; + | { coerced: { [variable: string]: unknown, ... } }; /** * Prepares an object map of variableValues of the correct type based on the @@ -40,7 +40,7 @@ type CoercedVariableValues = export function getVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { readonly [variable: string]: mixed, ... }, + inputs: { readonly [variable: string]: unknown, ... }, options?: { maxErrors?: number }, ): CoercedVariableValues { const errors = []; @@ -73,9 +73,9 @@ export function getVariableValues( function coerceVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { readonly [variable: string]: mixed, ... }, + inputs: { readonly [variable: string]: unknown, ... }, onError: (GraphQLError) => void, -): { [variable: string]: mixed, ... } { +): { [variable: string]: unknown, ... } { const coercedValues = {}; for (const varDefNode of varDefNodes) { const varName = varDefNode.variable.name.value; @@ -157,10 +157,10 @@ function coerceVariableValues( * @internal */ export function getArgumentValues( - def: GraphQLField | GraphQLDirective, + def: GraphQLField | GraphQLDirective, node: FieldNode | DirectiveNode, - variableValues?: ?ObjMap, -): { [argument: string]: mixed, ... } { + variableValues?: ?ObjMap, +): { [argument: string]: unknown, ... } { const coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') @@ -245,8 +245,8 @@ export function getArgumentValues( export function getDirectiveValues( directiveDef: GraphQLDirective, node: { +directives?: ReadonlyArray, ... }, - variableValues?: ?ObjMap, -): void | { [argument: string]: mixed, ... } { + variableValues?: ?ObjMap, +): void | { [argument: string]: unknown, ... } { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const directiveNode = node.directives?.find( (directive) => directive.name.value === directiveDef.name, @@ -257,6 +257,6 @@ export function getDirectiveValues( } } -function hasOwnProperty(obj: mixed, prop: string): boolean { +function hasOwnProperty(obj: unknown, prop: string): boolean { return Object.prototype.hasOwnProperty.call(obj, prop); } diff --git a/src/graphql.ts b/src/graphql.ts index 6c8021dd84..23d799377d 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -58,9 +58,9 @@ import { execute } from './execution/execute'; export type GraphQLArgs = { schema: GraphQLSchema, source: string | Source, - rootValue?: mixed, - contextValue?: mixed, - variableValues?: ?{ readonly [variable: string]: mixed, ... }, + rootValue?: unknown, + contextValue?: unknown, + variableValues?: ?{ readonly [variable: string]: unknown, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, typeResolver?: ?GraphQLTypeResolver, diff --git a/src/jsutils/__tests__/inspect-test.ts b/src/jsutils/__tests__/inspect-test.ts index 7c3197e581..8edb14123f 100644 --- a/src/jsutils/__tests__/inspect-test.ts +++ b/src/jsutils/__tests__/inspect-test.ts @@ -138,10 +138,10 @@ describe('inspect', () => { expect(inspect(array)).to.equal('[[Circular], [[Circular]]]'); - const mixed = { array: [] }; - mixed.array[0] = mixed; + const unknown = { array: [] }; + unknown.array[0] = unknown; - expect(inspect(mixed)).to.equal('{ array: [[Circular]] }'); + expect(inspect(unknown)).to.equal('{ array: [[Circular]] }'); const customA = { toJSON: () => customB, diff --git a/src/jsutils/devAssert.ts b/src/jsutils/devAssert.ts index 5fcbc16eb7..aeaad3b0f1 100644 --- a/src/jsutils/devAssert.ts +++ b/src/jsutils/devAssert.ts @@ -1,4 +1,4 @@ -export function devAssert(condition: mixed, message: string): void { +export function devAssert(condition: unknown, message: string): void { const booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') if (!booleanCondition) { diff --git a/src/jsutils/inspect.ts b/src/jsutils/inspect.ts index 2c90dc4ca2..3bc29b4614 100644 --- a/src/jsutils/inspect.ts +++ b/src/jsutils/inspect.ts @@ -6,11 +6,11 @@ const MAX_RECURSIVE_DEPTH = 2; /** * Used to print values in error messages. */ -export function inspect(value: mixed): string { +export function inspect(value: unknown): string { return formatValue(value, []); } -function formatValue(value: mixed, seenValues: Array): string { +function formatValue(value: unknown, seenValues: Array): string { switch (typeof value) { case 'string': return JSON.stringify(value); @@ -25,7 +25,7 @@ function formatValue(value: mixed, seenValues: Array): string { function formatObjectValue( value: Object, - previouslySeenValues: Array, + previouslySeenValues: Array, ): string { if (value === null) { return 'null'; @@ -38,7 +38,7 @@ function formatObjectValue( const seenValues = [...previouslySeenValues, value]; if (typeof value.toJSON === 'function') { - const jsonValue = (value.toJSON: () => mixed)(); + const jsonValue = (value.toJSON: () => unknown)(); // check for infinite recursion if (jsonValue !== value) { @@ -53,7 +53,7 @@ function formatObjectValue( return formatObject(value, seenValues); } -function formatObject(object: Object, seenValues: Array): string { +function formatObject(object: Object, seenValues: Array): string { const entries = Object.entries(object); if (entries.length === 0) { return '{}'; @@ -69,7 +69,10 @@ function formatObject(object: Object, seenValues: Array): string { return '{ ' + properties.join(', ') + ' }'; } -function formatArray(array: Array, seenValues: Array): string { +function formatArray( + array: Array, + seenValues: Array, +): string { if (array.length === 0) { return '[]'; } diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index 81b63cbb54..c07565f24f 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -7,7 +7,7 @@ export const instanceOf: (mixed, Constructor) => boolean = process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') - function instanceOf(value: mixed, constructor: Constructor): boolean { + function instanceOf(value: unknown, constructor: Constructor): boolean { return value instanceof constructor; } : function instanceOf(value: any, constructor: Constructor): boolean { diff --git a/src/jsutils/invariant.ts b/src/jsutils/invariant.ts index 099ffd801a..28ef791849 100644 --- a/src/jsutils/invariant.ts +++ b/src/jsutils/invariant.ts @@ -1,4 +1,4 @@ -export function invariant(condition: mixed, message?: string): void { +export function invariant(condition: unknown, message?: string): void { const booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') if (!booleanCondition) { diff --git a/src/jsutils/isAsyncIterable.ts b/src/jsutils/isAsyncIterable.ts index 8a72ff2170..ea63afaf07 100644 --- a/src/jsutils/isAsyncIterable.ts +++ b/src/jsutils/isAsyncIterable.ts @@ -3,7 +3,7 @@ * either implementing a `Symbol.asyncIterator` or `"@@asyncIterator"` method. */ declare function isAsyncIterable( - value: mixed, + value: unknown, // $FlowFixMe[invalid-in-rhs] ): boolean %checks(value instanceof AsyncIterable); diff --git a/src/jsutils/isIteratableObject.ts b/src/jsutils/isIteratableObject.ts index 25f04e4be5..3af1235a52 100644 --- a/src/jsutils/isIteratableObject.ts +++ b/src/jsutils/isIteratableObject.ts @@ -15,12 +15,12 @@ * isIteratableObject({ length: 1, 0: 'Alpha' }) // false */ declare function isIteratableObject( - value: mixed, + value: unknown, // $FlowFixMe[invalid-in-rhs] ): boolean %checks(value instanceof Iterable); // eslint-disable-next-line no-redeclare -export function isIteratableObject(maybeIteratable: mixed): boolean { +export function isIteratableObject(maybeIteratable: unknown): boolean { return ( typeof maybeIteratable === 'object' && typeof maybeIteratable?.[Symbol.iterator] === 'function' diff --git a/src/jsutils/isObjectLike.ts b/src/jsutils/isObjectLike.ts index 9c182ac38d..5960e6d9eb 100644 --- a/src/jsutils/isObjectLike.ts +++ b/src/jsutils/isObjectLike.ts @@ -2,6 +2,6 @@ * Return true if `value` is object-like. A value is object-like if it's not * `null` and has a `typeof` result of "object". */ -export function isObjectLike(value: mixed): boolean %checks { +export function isObjectLike(value: unknown): boolean %checks { return typeof value == 'object' && value !== null; } diff --git a/src/jsutils/isPromise.ts b/src/jsutils/isPromise.ts index 41998354a3..cf747607ed 100644 --- a/src/jsutils/isPromise.ts +++ b/src/jsutils/isPromise.ts @@ -2,7 +2,7 @@ * Returns true if the value acts like a Promise, i.e. has a "then" function, * otherwise returns false. */ -declare function isPromise(value: mixed): boolean %checks(value instanceof +declare function isPromise(value: unknown): boolean %checks(value instanceof Promise); // eslint-disable-next-line no-redeclare diff --git a/src/jsutils/memoize3.ts b/src/jsutils/memoize3.ts index 0e929cee73..db73c56fa6 100644 --- a/src/jsutils/memoize3.ts +++ b/src/jsutils/memoize3.ts @@ -2,9 +2,9 @@ * Memoizes the provided three-argument function. */ export function memoize3< - A1: { ... } | ReadonlyArray, - A2: { ... } | ReadonlyArray, - A3: { ... } | ReadonlyArray, + A1: { ... } | ReadonlyArray, + A2: { ... } | ReadonlyArray, + A3: { ... } | ReadonlyArray, R, >(fn: (A1, A2, A3) => R): (A1, A2, A3) => R { let cache0; diff --git a/src/language/__tests__/schema-parser-test.ts b/src/language/__tests__/schema-parser-test.ts index 38dd13ebbf..e596bba35d 100644 --- a/src/language/__tests__/schema-parser-test.ts +++ b/src/language/__tests__/schema-parser-test.ts @@ -12,7 +12,7 @@ function expectSyntaxError(text: string) { return expect(() => parse(text)).to.throw(); } -function typeNode(name: mixed, loc: mixed) { +function typeNode(name: unknown, loc: unknown) { return { kind: 'NamedType', name: nameNode(name, loc), @@ -20,7 +20,7 @@ function typeNode(name: mixed, loc: mixed) { }; } -function nameNode(name: mixed, loc: mixed) { +function nameNode(name: unknown, loc: unknown) { return { kind: 'Name', value: name, @@ -28,11 +28,16 @@ function nameNode(name: mixed, loc: mixed) { }; } -function fieldNode(name: mixed, type: mixed, loc: mixed) { +function fieldNode(name: unknown, type: unknown, loc: unknown) { return fieldNodeWithArgs(name, type, [], loc); } -function fieldNodeWithArgs(name: mixed, type: mixed, args: mixed, loc: mixed) { +function fieldNodeWithArgs( + name: unknown, + type: unknown, + args: unknown, + loc: unknown, +) { return { kind: 'FieldDefinition', description: undefined, @@ -44,7 +49,7 @@ function fieldNodeWithArgs(name: mixed, type: mixed, args: mixed, loc: mixed) { }; } -function enumValueNode(name: mixed, loc: mixed) { +function enumValueNode(name: unknown, loc: unknown) { return { kind: 'EnumValueDefinition', name: nameNode(name, loc), @@ -55,10 +60,10 @@ function enumValueNode(name: mixed, loc: mixed) { } function inputValueNode( - name: mixed, - type: mixed, - defaultValue: mixed, - loc: mixed, + name: unknown, + type: unknown, + defaultValue: unknown, + loc: unknown, ) { return { kind: 'InputValueDefinition', diff --git a/src/language/__tests__/toJSONDeep.ts b/src/language/__tests__/toJSONDeep.ts index abd4f50b84..9d7221f13b 100644 --- a/src/language/__tests__/toJSONDeep.ts +++ b/src/language/__tests__/toJSONDeep.ts @@ -5,7 +5,7 @@ import { isObjectLike } from '../../jsutils/isObjectLike'; * Deeply transforms an arbitrary value to a JSON-safe value by calling toJSON * on any nested value which defines it. */ -export function toJSONDeep(value: mixed): mixed { +export function toJSONDeep(value: unknown): unknown { if (!isObjectLike(value)) { return value; } diff --git a/src/language/ast.ts b/src/language/ast.ts index 97d44b32f2..2e4f9dfaaf 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -124,7 +124,7 @@ export class Token { /** * @internal */ -export function isNode(maybeNode: mixed): boolean %checks { +export function isNode(maybeNode: unknown): boolean %checks { return maybeNode != null && typeof maybeNode.kind === 'string'; } diff --git a/src/language/source.ts b/src/language/source.ts index a3bfd14f92..9a28468e65 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -53,7 +53,7 @@ export class Source { * * @internal */ -declare function isSource(source: mixed): boolean %checks(source instanceof +declare function isSource(source: unknown): boolean %checks(source instanceof Source); // eslint-disable-next-line no-redeclare export function isSource(source) { diff --git a/src/subscription/__tests__/simplePubSub.ts b/src/subscription/__tests__/simplePubSub.ts index c7f9639419..a3b7972749 100644 --- a/src/subscription/__tests__/simplePubSub.ts +++ b/src/subscription/__tests__/simplePubSub.ts @@ -49,7 +49,7 @@ export class SimplePubSub { emptyQueue(); return Promise.resolve({ value: undefined, done: true }); }, - throw(error: mixed) { + throw(error: unknown) { emptyQueue(); return Promise.reject(error); }, diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 757329fc75..39d141cc19 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -66,9 +66,9 @@ const EmailEventType = new GraphQLObjectType({ const emailSchema = emailSchemaWithResolvers(); -function emailSchemaWithResolvers( - subscribeFn?: (T) => mixed, - resolveFn?: (T) => mixed, +function emailSchemaWithResolvers( + subscribeFn?: (T) => unknown, + resolveFn?: (T) => unknown, ) { return new GraphQLSchema({ query: QueryType, @@ -135,7 +135,7 @@ function createSubscription( } async function expectPromiseToThrow( - promise: () => Promise, + promise: () => Promise, message: string, ) { try { diff --git a/src/subscription/mapAsyncIterator.ts b/src/subscription/mapAsyncIterator.ts index 75e3495148..d3f1c16418 100644 --- a/src/subscription/mapAsyncIterator.ts +++ b/src/subscription/mapAsyncIterator.ts @@ -12,7 +12,7 @@ export function mapAsyncIterator( const iteratorMethod = iterable[Symbol.asyncIterator]; const iterator: any = iteratorMethod.call(iterable); - async function abruptClose(error: mixed) { + async function abruptClose(error: unknown) { if (typeof iterator.return === 'function') { try { await iterator.return(); @@ -48,7 +48,7 @@ export function mapAsyncIterator( ? mapResult(iterator.return()) : Promise.resolve({ value: undefined, done: true }); }, - throw(error?: mixed): Promise> { + throw(error?: unknown): Promise> { if (typeof iterator.throw === 'function') { return mapResult(iterator.throw(error)); } diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 1c0b953061..05bd0889e6 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -28,9 +28,9 @@ import { mapAsyncIterator } from './mapAsyncIterator'; export type SubscriptionArgs = { schema: GraphQLSchema, document: DocumentNode, - rootValue?: mixed, - contextValue?: mixed, - variableValues?: ?{ readonly [variable: string]: mixed, ... }, + rootValue?: unknown, + contextValue?: unknown, + variableValues?: ?{ readonly [variable: string]: unknown, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, subscribeFieldResolver?: ?GraphQLFieldResolver, @@ -138,12 +138,12 @@ export async function subscribe( export async function createSourceEventStream( schema: GraphQLSchema, document: DocumentNode, - rootValue?: mixed, - contextValue?: mixed, - variableValues?: ?{ readonly [variable: string]: mixed, ... }, + rootValue?: unknown, + contextValue?: unknown, + variableValues?: ?{ readonly [variable: string]: unknown, ... }, operationName?: ?string, fieldResolver?: ?GraphQLFieldResolver, -): Promise | ExecutionResult> { +): Promise | ExecutionResult> { // If arguments are missing or incorrectly typed, this is an internal // developer mistake which should throw an early error. assertValidExecutionArguments(schema, document, variableValues); @@ -188,7 +188,7 @@ export async function createSourceEventStream( async function executeSubscription( exeContext: ExecutionContext, -): Promise { +): Promise { const { schema, operation, variableValues, rootValue } = exeContext; const type = getOperationRootType(schema, operation); const fields = collectFields( diff --git a/src/type/__tests__/definition-test.ts b/src/type/__tests__/definition-test.ts index faefd625d6..faac24f21a 100644 --- a/src/type/__tests__/definition-test.ts +++ b/src/type/__tests__/definition-test.ts @@ -922,7 +922,7 @@ describe('Type System: test utility methods', () => { }); it('Object.toStringifies types', () => { - function toString(obj: mixed): string { + function toString(obj: unknown): string { return Object.prototype.toString.call(obj); } diff --git a/src/type/__tests__/enumType-test.ts b/src/type/__tests__/enumType-test.ts index 4d23279446..d4a5cc2753 100644 --- a/src/type/__tests__/enumType-test.ts +++ b/src/type/__tests__/enumType-test.ts @@ -114,7 +114,7 @@ const schema = new GraphQLSchema({ function executeQuery( source: string, - variableValues?: { readonly [variable: string]: mixed, ... }, + variableValues?: { readonly [variable: string]: unknown, ... }, ) { return graphqlSync({ schema, source, variableValues }); } diff --git a/src/type/__tests__/extensions-test.ts b/src/type/__tests__/extensions-test.ts index de218c3db3..93cdedcb6b 100644 --- a/src/type/__tests__/extensions-test.ts +++ b/src/type/__tests__/extensions-test.ts @@ -16,7 +16,7 @@ import { const dummyType = new GraphQLScalarType({ name: 'DummyScalar' }); -function expectObjMap(value: mixed) { +function expectObjMap(value: unknown) { invariant(value != null && typeof value === 'object'); expect(Object.getPrototypeOf(value)).to.equal(null); return expect(value); diff --git a/src/type/__tests__/predicate-test.ts b/src/type/__tests__/predicate-test.ts index 9c011a240c..1c1a5831bb 100644 --- a/src/type/__tests__/predicate-test.ts +++ b/src/type/__tests__/predicate-test.ts @@ -300,7 +300,7 @@ describe('Type predicates', () => { }); describe('isInputType', () => { - function expectInputType(type: mixed) { + function expectInputType(type: unknown) { expect(isInputType(type)).to.equal(true); expect(() => assertInputType(type)).to.not.throw(); } @@ -321,7 +321,7 @@ describe('Type predicates', () => { expectInputType(new GraphQLNonNull(InputObjectType)); }); - function expectNonInputType(type: mixed) { + function expectNonInputType(type: unknown) { expect(isInputType(type)).to.equal(false); expect(() => assertInputType(type)).to.throw(); } @@ -344,7 +344,7 @@ describe('Type predicates', () => { }); describe('isOutputType', () => { - function expectOutputType(type: mixed) { + function expectOutputType(type: unknown) { expect(isOutputType(type)).to.equal(true); expect(() => assertOutputType(type)).to.not.throw(); } @@ -371,7 +371,7 @@ describe('Type predicates', () => { expectOutputType(new GraphQLNonNull(EnumType)); }); - function expectNonOutputType(type: mixed) { + function expectNonOutputType(type: unknown) { expect(isOutputType(type)).to.equal(false); expect(() => assertOutputType(type)).to.throw(); } @@ -565,7 +565,7 @@ describe('Type predicates', () => { describe('isRequiredArgument', () => { function buildArg(config: { type: GraphQLInputType, - defaultValue?: mixed, + defaultValue?: unknown, }): GraphQLArgument { return { name: 'someArg', @@ -613,7 +613,7 @@ describe('Type predicates', () => { describe('isRequiredInputField', () => { function buildInputField(config: { type: GraphQLInputType, - defaultValue?: mixed, + defaultValue?: unknown, }): GraphQLInputField { return { name: 'someInputField', diff --git a/src/type/__tests__/scalars-test.ts b/src/type/__tests__/scalars-test.ts index 8eac0f6266..bdfa337585 100644 --- a/src/type/__tests__/scalars-test.ts +++ b/src/type/__tests__/scalars-test.ts @@ -14,7 +14,7 @@ import { describe('Type System: Specified scalar types', () => { describe('GraphQLInt', () => { it('parseValue', () => { - function parseValue(value: mixed) { + function parseValue(value: unknown) { return GraphQLInt.parseValue(value); } @@ -110,7 +110,7 @@ describe('Type System: Specified scalar types', () => { }); it('serialize', () => { - function serialize(value: mixed) { + function serialize(value: unknown) { return GraphQLInt.serialize(value); } @@ -183,7 +183,7 @@ describe('Type System: Specified scalar types', () => { describe('GraphQLFloat', () => { it('parseValue', () => { - function parseValue(value: mixed) { + function parseValue(value: unknown) { return GraphQLFloat.parseValue(value); } @@ -270,7 +270,7 @@ describe('Type System: Specified scalar types', () => { }); it('serialize', () => { - function serialize(value: mixed) { + function serialize(value: unknown) { return GraphQLFloat.serialize(value); } @@ -313,7 +313,7 @@ describe('Type System: Specified scalar types', () => { describe('GraphQLString', () => { it('parseValue', () => { - function parseValue(value: mixed) { + function parseValue(value: unknown) { return GraphQLString.parseValue(value); } @@ -377,7 +377,7 @@ describe('Type System: Specified scalar types', () => { }); it('serialize', () => { - function serialize(value: mixed) { + function serialize(value: unknown) { return GraphQLString.serialize(value); } @@ -418,7 +418,7 @@ describe('Type System: Specified scalar types', () => { describe('GraphQLBoolean', () => { it('parseValue', () => { - function parseValue(value: mixed) { + function parseValue(value: unknown) { return GraphQLBoolean.parseValue(value); } @@ -495,7 +495,7 @@ describe('Type System: Specified scalar types', () => { }); it('serialize', () => { - function serialize(value: mixed) { + function serialize(value: unknown) { return GraphQLBoolean.serialize(value); } @@ -532,7 +532,7 @@ describe('Type System: Specified scalar types', () => { describe('GraphQLID', () => { it('parseValue', () => { - function parseValue(value: mixed) { + function parseValue(value: unknown) { return GraphQLID.parseValue(value); } @@ -610,7 +610,7 @@ describe('Type System: Specified scalar types', () => { }); it('serialize', () => { - function serialize(value: mixed) { + function serialize(value: unknown) { return GraphQLID.serialize(value); } diff --git a/src/type/__tests__/validation-test.ts b/src/type/__tests__/validation-test.ts index 34939afe93..4fe503bd3e 100644 --- a/src/type/__tests__/validation-test.ts +++ b/src/type/__tests__/validation-test.ts @@ -1007,7 +1007,7 @@ describe('Type System: Enum types must be well defined', () => { describe('Type System: Object fields must have output types', () => { function schemaWithObjectField( - fieldConfig: GraphQLFieldConfig, + fieldConfig: GraphQLFieldConfig, ): GraphQLSchema { const BadObjectType = new GraphQLObjectType({ name: 'BadObject', @@ -1322,7 +1322,7 @@ describe('Type System: Interface extensions should be valid', () => { describe('Type System: Interface fields must have output types', () => { function schemaWithInterfaceField( - fieldConfig: GraphQLFieldConfig, + fieldConfig: GraphQLFieldConfig, ): GraphQLSchema { const fields = { badField: fieldConfig }; diff --git a/src/type/definition.ts b/src/type/definition.ts index 6068224b18..315dca4158 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -62,7 +62,7 @@ export type GraphQLType = | GraphQLList | GraphQLNonNull; -export function isType(type: mixed): boolean %checks { +export function isType(type: unknown): boolean %checks { return ( isScalarType(type) || isObjectType(type) || @@ -75,7 +75,7 @@ export function isType(type: mixed): boolean %checks { ); } -export function assertType(type: mixed): GraphQLType { +export function assertType(type: unknown): GraphQLType { if (!isType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL type.`); } @@ -86,42 +86,42 @@ export function assertType(type: mixed): GraphQLType { * There are predicates for each kind of GraphQL type. */ -declare function isScalarType(type: mixed): boolean %checks(type instanceof +declare function isScalarType(type: unknown): boolean %checks(type instanceof GraphQLScalarType); // eslint-disable-next-line no-redeclare export function isScalarType(type) { return instanceOf(type, GraphQLScalarType); } -export function assertScalarType(type: mixed): GraphQLScalarType { +export function assertScalarType(type: unknown): GraphQLScalarType { if (!isScalarType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Scalar type.`); } return type; } -declare function isObjectType(type: mixed): boolean %checks(type instanceof +declare function isObjectType(type: unknown): boolean %checks(type instanceof GraphQLObjectType); // eslint-disable-next-line no-redeclare export function isObjectType(type) { return instanceOf(type, GraphQLObjectType); } -export function assertObjectType(type: mixed): GraphQLObjectType { +export function assertObjectType(type: unknown): GraphQLObjectType { if (!isObjectType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Object type.`); } return type; } -declare function isInterfaceType(type: mixed): boolean %checks(type instanceof +declare function isInterfaceType(type: unknown): boolean %checks(type instanceof GraphQLInterfaceType); // eslint-disable-next-line no-redeclare export function isInterfaceType(type) { return instanceOf(type, GraphQLInterfaceType); } -export function assertInterfaceType(type: mixed): GraphQLInterfaceType { +export function assertInterfaceType(type: unknown): GraphQLInterfaceType { if (!isInterfaceType(type)) { throw new Error( `Expected ${inspect(type)} to be a GraphQL Interface type.`, @@ -130,42 +130,42 @@ export function assertInterfaceType(type: mixed): GraphQLInterfaceType { return type; } -declare function isUnionType(type: mixed): boolean %checks(type instanceof +declare function isUnionType(type: unknown): boolean %checks(type instanceof GraphQLUnionType); // eslint-disable-next-line no-redeclare export function isUnionType(type) { return instanceOf(type, GraphQLUnionType); } -export function assertUnionType(type: mixed): GraphQLUnionType { +export function assertUnionType(type: unknown): GraphQLUnionType { if (!isUnionType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Union type.`); } return type; } -declare function isEnumType(type: mixed): boolean %checks(type instanceof +declare function isEnumType(type: unknown): boolean %checks(type instanceof GraphQLEnumType); // eslint-disable-next-line no-redeclare export function isEnumType(type) { return instanceOf(type, GraphQLEnumType); } -export function assertEnumType(type: mixed): GraphQLEnumType { +export function assertEnumType(type: unknown): GraphQLEnumType { if (!isEnumType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Enum type.`); } return type; } -declare function isInputObjectType(type: mixed): boolean %checks(type instanceof +declare function isInputObjectType(type: unknown): boolean %checks(type instanceof GraphQLInputObjectType); // eslint-disable-next-line no-redeclare export function isInputObjectType(type) { return instanceOf(type, GraphQLInputObjectType); } -export function assertInputObjectType(type: mixed): GraphQLInputObjectType { +export function assertInputObjectType(type: unknown): GraphQLInputObjectType { if (!isInputObjectType(type)) { throw new Error( `Expected ${inspect(type)} to be a GraphQL Input Object type.`, @@ -174,28 +174,28 @@ export function assertInputObjectType(type: mixed): GraphQLInputObjectType { return type; } -declare function isListType(type: mixed): boolean %checks(type instanceof +declare function isListType(type: unknown): boolean %checks(type instanceof GraphQLList); // eslint-disable-next-line no-redeclare export function isListType(type) { return instanceOf(type, GraphQLList); } -export function assertListType(type: mixed): GraphQLList { +export function assertListType(type: unknown): GraphQLList { if (!isListType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL List type.`); } return type; } -declare function isNonNullType(type: mixed): boolean %checks(type instanceof +declare function isNonNullType(type: unknown): boolean %checks(type instanceof GraphQLNonNull); // eslint-disable-next-line no-redeclare export function isNonNullType(type) { return instanceOf(type, GraphQLNonNull); } -export function assertNonNullType(type: mixed): GraphQLNonNull { +export function assertNonNullType(type: unknown): GraphQLNonNull { if (!isNonNullType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Non-Null type.`); } @@ -217,7 +217,7 @@ export type GraphQLInputType = | GraphQLList, >; -export function isInputType(type: mixed): boolean %checks { +export function isInputType(type: unknown): boolean %checks { return ( isScalarType(type) || isEnumType(type) || @@ -226,7 +226,7 @@ export function isInputType(type: mixed): boolean %checks { ); } -export function assertInputType(type: mixed): GraphQLInputType { +export function assertInputType(type: unknown): GraphQLInputType { if (!isInputType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL input type.`); } @@ -252,7 +252,7 @@ export type GraphQLOutputType = | GraphQLList, >; -export function isOutputType(type: mixed): boolean %checks { +export function isOutputType(type: unknown): boolean %checks { return ( isScalarType(type) || isObjectType(type) || @@ -263,7 +263,7 @@ export function isOutputType(type: mixed): boolean %checks { ); } -export function assertOutputType(type: mixed): GraphQLOutputType { +export function assertOutputType(type: unknown): GraphQLOutputType { if (!isOutputType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL output type.`); } @@ -275,11 +275,11 @@ export function assertOutputType(type: mixed): GraphQLOutputType { */ export type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType; -export function isLeafType(type: mixed): boolean %checks { +export function isLeafType(type: unknown): boolean %checks { return isScalarType(type) || isEnumType(type); } -export function assertLeafType(type: mixed): GraphQLLeafType { +export function assertLeafType(type: unknown): GraphQLLeafType { if (!isLeafType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL leaf type.`); } @@ -294,11 +294,11 @@ export type GraphQLCompositeType = | GraphQLInterfaceType | GraphQLUnionType; -export function isCompositeType(type: mixed): boolean %checks { +export function isCompositeType(type: unknown): boolean %checks { return isObjectType(type) || isInterfaceType(type) || isUnionType(type); } -export function assertCompositeType(type: mixed): GraphQLCompositeType { +export function assertCompositeType(type: unknown): GraphQLCompositeType { if (!isCompositeType(type)) { throw new Error( `Expected ${inspect(type)} to be a GraphQL composite type.`, @@ -312,11 +312,11 @@ export function assertCompositeType(type: mixed): GraphQLCompositeType { */ export type GraphQLAbstractType = GraphQLInterfaceType | GraphQLUnionType; -export function isAbstractType(type: mixed): boolean %checks { +export function isAbstractType(type: unknown): boolean %checks { return isInterfaceType(type) || isUnionType(type); } -export function assertAbstractType(type: mixed): GraphQLAbstractType { +export function assertAbstractType(type: unknown): GraphQLAbstractType { if (!isAbstractType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL abstract type.`); } @@ -419,11 +419,11 @@ export class GraphQLNonNull<+T: GraphQLNullableType> { export type GraphQLWrappingType = GraphQLList | GraphQLNonNull; -export function isWrappingType(type: mixed): boolean %checks { +export function isWrappingType(type: unknown): boolean %checks { return isListType(type) || isNonNullType(type); } -export function assertWrappingType(type: mixed): GraphQLWrappingType { +export function assertWrappingType(type: unknown): GraphQLWrappingType { if (!isWrappingType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL wrapping type.`); } @@ -442,11 +442,11 @@ export type GraphQLNullableType = | GraphQLInputObjectType | GraphQLList; -export function isNullableType(type: mixed): boolean %checks { +export function isNullableType(type: unknown): boolean %checks { return isType(type) && !isNonNullType(type); } -export function assertNullableType(type: mixed): GraphQLNullableType { +export function assertNullableType(type: unknown): GraphQLNullableType { if (!isNullableType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL nullable type.`); } @@ -475,7 +475,7 @@ export type GraphQLNamedType = | GraphQLEnumType | GraphQLInputObjectType; -export function isNamedType(type: mixed): boolean %checks { +export function isNamedType(type: unknown): boolean %checks { return ( isScalarType(type) || isObjectType(type) || @@ -486,7 +486,7 @@ export function isNamedType(type: mixed): boolean %checks { ); } -export function assertNamedType(type: mixed): GraphQLNamedType { +export function assertNamedType(type: unknown): GraphQLNamedType { if (!isNamedType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL named type.`); } @@ -550,14 +550,14 @@ export class GraphQLScalarType { name: string; description: ?string; specifiedByUrl: ?string; - serialize: GraphQLScalarSerializer; - parseValue: GraphQLScalarValueParser; - parseLiteral: GraphQLScalarLiteralParser; - extensions: ?ReadOnlyObjMap; + serialize: GraphQLScalarSerializer; + parseValue: GraphQLScalarValueParser; + parseLiteral: GraphQLScalarLiteralParser; + extensions: ?ReadOnlyObjMap; astNode: ?ScalarTypeDefinitionNode; extensionASTNodes: ReadonlyArray; - constructor(config: $ReadOnly>) { + constructor(config: $ReadOnly>) { const parseValue = config.parseValue ?? identityFunc; this.name = config.name; this.description = config.description; @@ -623,16 +623,16 @@ export class GraphQLScalarType { } export type GraphQLScalarSerializer = ( - outputValue: mixed, + outputValue: unknown, ) => ?TExternal; export type GraphQLScalarValueParser = ( - inputValue: mixed, + inputValue: unknown, ) => ?TInternal; export type GraphQLScalarLiteralParser = ( valueNode: ValueNode, - variables: ?ObjMap, + variables: ?ObjMap, ) => ?TInternal; export type GraphQLScalarTypeConfig = { @@ -645,17 +645,17 @@ export type GraphQLScalarTypeConfig = { parseValue?: GraphQLScalarValueParser, // Parses an externally provided literal value to use as an input. parseLiteral?: GraphQLScalarLiteralParser, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?ScalarTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; type GraphQLScalarTypeNormalizedConfig = { - ...GraphQLScalarTypeConfig, - serialize: GraphQLScalarSerializer, - parseValue: GraphQLScalarValueParser, - parseLiteral: GraphQLScalarLiteralParser, - extensions: ?ReadOnlyObjMap, + ...GraphQLScalarTypeConfig, + serialize: GraphQLScalarSerializer, + parseValue: GraphQLScalarValueParser, + parseLiteral: GraphQLScalarLiteralParser, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; @@ -700,7 +700,7 @@ export class GraphQLObjectType { name: string; description: ?string; isTypeOf: ?GraphQLIsTypeOfFn; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?ObjectTypeDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -768,8 +768,8 @@ export class GraphQLObjectType { function defineInterfaces( config: $ReadOnly< - | GraphQLObjectTypeConfig - | GraphQLInterfaceTypeConfig, + | GraphQLObjectTypeConfig + | GraphQLInterfaceTypeConfig, >, ): Array { const interfaces = resolveArrayThunk(config.interfaces ?? []); @@ -833,13 +833,13 @@ function defineFieldMap( }); } -function isPlainObj(obj: mixed): boolean { +function isPlainObj(obj: unknown): boolean { return isObjectLike(obj) && !Array.isArray(obj); } function fieldsToFieldsConfig( - fields: GraphQLFieldMap, -): GraphQLFieldConfigMap { + fields: GraphQLFieldMap, +): GraphQLFieldConfigMap { return mapValue(fields, (field) => ({ description: field.description, type: field.type, @@ -878,7 +878,7 @@ export type GraphQLObjectTypeConfig = { interfaces?: ThunkArray, fields: ThunkObjMap>, isTypeOf?: ?GraphQLIsTypeOfFn, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?ObjectTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; @@ -887,7 +887,7 @@ type GraphQLObjectTypeNormalizedConfig = { ...GraphQLObjectTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; @@ -916,7 +916,7 @@ export type GraphQLFieldResolver< args: TArgs, context: TContext, info: GraphQLResolveInfo, -) => mixed; +) => unknown; export type GraphQLResolveInfo = { readonly fieldName: string, @@ -926,9 +926,9 @@ export type GraphQLResolveInfo = { readonly path: Path, readonly schema: GraphQLSchema, readonly fragments: ObjMap, - readonly rootValue: mixed, + readonly rootValue: unknown, readonly operation: OperationDefinitionNode, - readonly variableValues: { [variable: string]: mixed, ... }, + readonly variableValues: { [variable: string]: unknown, ... }, }; export type GraphQLFieldConfig< @@ -942,7 +942,7 @@ export type GraphQLFieldConfig< resolve?: GraphQLFieldResolver, subscribe?: GraphQLFieldResolver, deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?FieldDefinitionNode, }; @@ -951,8 +951,8 @@ export type GraphQLFieldConfigArgumentMap = ObjMap; export type GraphQLArgumentConfig = { description?: ?string, type: GraphQLInputType, - defaultValue?: mixed, - extensions?: ?ReadOnlyObjMapLike, + defaultValue?: unknown, + extensions?: ?ReadOnlyObjMapLike, deprecationReason?: ?string, astNode?: ?InputValueDefinitionNode, }; @@ -973,7 +973,7 @@ export type GraphQLField< resolve?: GraphQLFieldResolver, subscribe?: GraphQLFieldResolver, deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, astNode: ?FieldDefinitionNode, }; @@ -981,9 +981,9 @@ export type GraphQLArgument = { name: string, description: ?string, type: GraphQLInputType, - defaultValue: mixed, + defaultValue: unknown, deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, astNode: ?InputValueDefinitionNode, }; @@ -1017,7 +1017,7 @@ export class GraphQLInterfaceType { name: string; description: ?string; resolveType: ?GraphQLTypeResolver; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?InterfaceTypeDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -1094,7 +1094,7 @@ export type GraphQLInterfaceTypeConfig = { * Object type. */ resolveType?: ?GraphQLTypeResolver, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?InterfaceTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; @@ -1103,7 +1103,7 @@ export type GraphQLInterfaceTypeNormalizedConfig = { ...GraphQLInterfaceTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; @@ -1134,7 +1134,7 @@ export class GraphQLUnionType { name: string; description: ?string; resolveType: ?GraphQLTypeResolver; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?UnionTypeDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -1191,7 +1191,7 @@ export class GraphQLUnionType { } function defineTypes( - config: $ReadOnly>, + config: $ReadOnly>, ): Array { const types = resolveArrayThunk(config.types); devAssert( @@ -1211,7 +1211,7 @@ export type GraphQLUnionTypeConfig = { * Object type. */ resolveType?: ?GraphQLTypeResolver, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?UnionTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; @@ -1219,7 +1219,7 @@ export type GraphQLUnionTypeConfig = { type GraphQLUnionTypeNormalizedConfig = { ...GraphQLUnionTypeConfig, types: Array, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; @@ -1247,7 +1247,7 @@ type GraphQLUnionTypeNormalizedConfig = { export class GraphQLEnumType /* */ { name: string; description: ?string; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?EnumTypeDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -1279,7 +1279,7 @@ export class GraphQLEnumType /* */ { return this._nameLookup[name]; } - serialize(outputValue: mixed /* T */): ?string { + serialize(outputValue: unknown /* T */): ?string { const enumValue = this._valueLookup.get(outputValue); if (enumValue === undefined) { throw new GraphQLError( @@ -1289,7 +1289,7 @@ export class GraphQLEnumType /* */ { return enumValue.name; } - parseValue(inputValue: mixed): ?any /* T */ { + parseValue(inputValue: unknown): ?any /* T */ { if (typeof inputValue !== 'string') { const valueStr = inspect(inputValue); throw new GraphQLError( @@ -1308,7 +1308,7 @@ export class GraphQLEnumType /* */ { return enumValue.value; } - parseLiteral(valueNode: ValueNode, _variables: ?ObjMap): ?any /* T */ { + parseLiteral(valueNode: ValueNode, _variables: ?ObjMap): ?any /* T */ { // Note: variables will be resolved to a value before calling this function. if (valueNode.kind !== Kind.ENUM) { const valueStr = print(valueNode); @@ -1407,14 +1407,14 @@ export type GraphQLEnumTypeConfig /* */ = { name: string, description?: ?string, values: GraphQLEnumValueConfigMap /* */, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?EnumTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; type GraphQLEnumTypeNormalizedConfig = { ...GraphQLEnumTypeConfig, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; @@ -1424,7 +1424,7 @@ export type GraphQLEnumValueConfig /* */ = { description?: ?string, value?: any /* T */, deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?EnumValueDefinitionNode, }; @@ -1433,7 +1433,7 @@ export type GraphQLEnumValue /* */ = { description: ?string, value: any /* T */, deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, astNode: ?EnumValueDefinitionNode, }; @@ -1460,7 +1460,7 @@ export type GraphQLEnumValue /* */ = { export class GraphQLInputObjectType { name: string; description: ?string; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?InputObjectTypeDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -1547,7 +1547,7 @@ export type GraphQLInputObjectTypeConfig = { name: string, description?: ?string, fields: ThunkObjMap, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?InputObjectTypeDefinitionNode, extensionASTNodes?: ?ReadonlyArray, }; @@ -1555,16 +1555,16 @@ export type GraphQLInputObjectTypeConfig = { type GraphQLInputObjectTypeNormalizedConfig = { ...GraphQLInputObjectTypeConfig, fields: GraphQLInputFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, }; export type GraphQLInputFieldConfig = { description?: ?string, type: GraphQLInputType, - defaultValue?: mixed, + defaultValue?: unknown, deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?InputValueDefinitionNode, }; @@ -1574,9 +1574,9 @@ export type GraphQLInputField = { name: string, description: ?string, type: GraphQLInputType, - defaultValue: mixed, + defaultValue: unknown, deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, astNode: ?InputValueDefinitionNode, }; diff --git a/src/type/directives.ts b/src/type/directives.ts index 553b10cd83..234ae33658 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -20,14 +20,14 @@ import { argsToArgsConfig, GraphQLNonNull } from './definition'; * Test if the given value is a GraphQL directive. */ declare function isDirective( - directive: mixed, + directive: unknown, ): boolean %checks(directive instanceof GraphQLDirective); // eslint-disable-next-line no-redeclare export function isDirective(directive) { return instanceOf(directive, GraphQLDirective); } -export function assertDirective(directive: mixed): GraphQLDirective { +export function assertDirective(directive: unknown): GraphQLDirective { if (!isDirective(directive)) { throw new Error( `Expected ${inspect(directive)} to be a GraphQL directive.`, @@ -46,7 +46,7 @@ export class GraphQLDirective { locations: Array; args: Array; isRepeatable: boolean; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?DirectiveDefinitionNode; constructor(config: $ReadOnly) { @@ -112,7 +112,7 @@ export type GraphQLDirectiveConfig = { locations: Array, args?: ?GraphQLFieldConfigArgumentMap, isRepeatable?: ?boolean, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?DirectiveDefinitionNode, }; @@ -120,7 +120,7 @@ type GraphQLDirectiveNormalizedConfig = { ...GraphQLDirectiveConfig, args: GraphQLFieldConfigArgumentMap, isRepeatable: boolean, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, }; /** diff --git a/src/type/introspection.ts b/src/type/introspection.ts index a9132ee1c4..2ecdad8e3a 100644 --- a/src/type/introspection.ts +++ b/src/type/introspection.ts @@ -73,7 +73,7 @@ export const __Schema: GraphQLObjectType = new GraphQLObjectType({ ), resolve: (schema) => schema.getDirectives(), }, - }: GraphQLFieldConfigMap), + }: GraphQLFieldConfigMap), }); export const __Directive: GraphQLObjectType = new GraphQLObjectType({ @@ -106,7 +106,7 @@ export const __Directive: GraphQLObjectType = new GraphQLObjectType({ ), resolve: (directive) => directive.args, }, - }: GraphQLFieldConfigMap), + }: GraphQLFieldConfigMap), }); export const __DirectiveLocation: GraphQLEnumType = new GraphQLEnumType({ @@ -312,7 +312,7 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({ resolve: (type) => type.ofType !== undefined ? type.ofType : undefined, }, - }: GraphQLFieldConfigMap), + }: GraphQLFieldConfigMap), }); export const __Field: GraphQLObjectType = new GraphQLObjectType({ @@ -357,7 +357,7 @@ export const __Field: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (field) => field.deprecationReason, }, - }: GraphQLFieldConfigMap, mixed>), + }: GraphQLFieldConfigMap, unknown>), }); export const __InputValue: GraphQLObjectType = new GraphQLObjectType({ @@ -396,7 +396,7 @@ export const __InputValue: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (obj) => obj.deprecationReason, }, - }: GraphQLFieldConfigMap), + }: GraphQLFieldConfigMap), }); export const __EnumValue: GraphQLObjectType = new GraphQLObjectType({ @@ -421,7 +421,7 @@ export const __EnumValue: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (enumValue) => enumValue.deprecationReason, }, - }: GraphQLFieldConfigMap), + }: GraphQLFieldConfigMap), }); export const TypeKind = Object.freeze({ @@ -485,7 +485,7 @@ export const __TypeKind: GraphQLEnumType = new GraphQLEnumType({ * so the format for args is different. */ -export const SchemaMetaFieldDef: GraphQLField = { +export const SchemaMetaFieldDef: GraphQLField = { name: '__schema', type: new GraphQLNonNull(__Schema), description: 'Access the current type schema of this server.', @@ -496,7 +496,7 @@ export const SchemaMetaFieldDef: GraphQLField = { astNode: undefined, }; -export const TypeMetaFieldDef: GraphQLField = { +export const TypeMetaFieldDef: GraphQLField = { name: '__type', type: __Type, description: 'Request the type information of a single type.', @@ -517,7 +517,7 @@ export const TypeMetaFieldDef: GraphQLField = { astNode: undefined, }; -export const TypeNameMetaFieldDef: GraphQLField = { +export const TypeNameMetaFieldDef: GraphQLField = { name: '__typename', type: new GraphQLNonNull(GraphQLString), description: 'The name of the current Object type at runtime.', diff --git a/src/type/scalars.ts b/src/type/scalars.ts index 2c59a47708..4af928d443 100644 --- a/src/type/scalars.ts +++ b/src/type/scalars.ts @@ -17,7 +17,7 @@ import { GraphQLScalarType } from './definition'; const MAX_INT = 2147483647; const MIN_INT = -2147483648; -function serializeInt(outputValue: mixed): number { +function serializeInt(outputValue: unknown): number { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { @@ -43,7 +43,7 @@ function serializeInt(outputValue: mixed): number { return num; } -function coerceInt(inputValue: mixed): number { +function coerceInt(inputValue: unknown): number { if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) { throw new GraphQLError( `Int cannot represent non-integer value: ${inspect(inputValue)}`, @@ -81,7 +81,7 @@ export const GraphQLInt: GraphQLScalarType = new GraphQLScalarType({ }, }); -function serializeFloat(outputValue: mixed): number { +function serializeFloat(outputValue: unknown): number { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { @@ -101,7 +101,7 @@ function serializeFloat(outputValue: mixed): number { return num; } -function coerceFloat(inputValue: mixed): number { +function coerceFloat(inputValue: unknown): number { if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) { throw new GraphQLError( `Float cannot represent non numeric value: ${inspect(inputValue)}`, @@ -130,7 +130,7 @@ export const GraphQLFloat: GraphQLScalarType = new GraphQLScalarType({ // Support serializing objects with custom valueOf() or toJSON() functions - // a common way to represent a complex value which can be represented as // a string (ex: MongoDB id objects). -function serializeObject(outputValue: mixed): mixed { +function serializeObject(outputValue: unknown): unknown { if (isObjectLike(outputValue)) { if (typeof outputValue.valueOf === 'function') { const valueOfResult = outputValue.valueOf(); @@ -146,7 +146,7 @@ function serializeObject(outputValue: mixed): mixed { return outputValue; } -function serializeString(outputValue: mixed): string { +function serializeString(outputValue: unknown): string { const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not @@ -165,7 +165,7 @@ function serializeString(outputValue: mixed): string { ); } -function coerceString(inputValue: mixed): string { +function coerceString(inputValue: unknown): string { if (typeof inputValue !== 'string') { throw new GraphQLError( `String cannot represent a non string value: ${inspect(inputValue)}`, @@ -191,7 +191,7 @@ export const GraphQLString: GraphQLScalarType = new GraphQLScalarType({ }, }); -function serializeBoolean(outputValue: mixed): boolean { +function serializeBoolean(outputValue: unknown): boolean { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { @@ -205,7 +205,7 @@ function serializeBoolean(outputValue: mixed): boolean { ); } -function coerceBoolean(inputValue: mixed): boolean { +function coerceBoolean(inputValue: unknown): boolean { if (typeof inputValue !== 'boolean') { throw new GraphQLError( `Boolean cannot represent a non boolean value: ${inspect(inputValue)}`, @@ -230,7 +230,7 @@ export const GraphQLBoolean: GraphQLScalarType = new GraphQLScalarType({ }, }); -function serializeID(outputValue: mixed): string { +function serializeID(outputValue: unknown): string { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'string') { @@ -242,7 +242,7 @@ function serializeID(outputValue: mixed): string { throw new GraphQLError(`ID cannot represent value: ${inspect(outputValue)}`); } -function coerceID(inputValue: mixed): string { +function coerceID(inputValue: unknown): string { if (typeof inputValue === 'string') { return inputValue; } diff --git a/src/type/schema.ts b/src/type/schema.ts index 85b6fff87c..350ba6bcff 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -40,14 +40,14 @@ import { /** * Test if the given value is a GraphQL schema. */ -declare function isSchema(schema: mixed): boolean %checks(schema instanceof +declare function isSchema(schema: unknown): boolean %checks(schema instanceof GraphQLSchema); // eslint-disable-next-line no-redeclare export function isSchema(schema) { return instanceOf(schema, GraphQLSchema); } -export function assertSchema(schema: mixed): GraphQLSchema { +export function assertSchema(schema: unknown): GraphQLSchema { if (!isSchema(schema)) { throw new Error(`Expected ${inspect(schema)} to be a GraphQL schema.`); } @@ -119,7 +119,7 @@ export function assertSchema(schema: mixed): GraphQLSchema { */ export class GraphQLSchema { description: ?string; - extensions: ?ReadOnlyObjMap; + extensions: ?ReadOnlyObjMap; astNode: ?SchemaDefinitionNode; extensionASTNodes: ReadonlyArray; @@ -368,7 +368,7 @@ export type GraphQLSchemaConfig = { subscription?: ?GraphQLObjectType, types?: ?Array, directives?: ?Array, - extensions?: ?ReadOnlyObjMapLike, + extensions?: ?ReadOnlyObjMapLike, astNode?: ?SchemaDefinitionNode, extensionASTNodes?: ?ReadonlyArray, ...GraphQLSchemaValidationOptions, @@ -382,7 +382,7 @@ export type GraphQLSchemaNormalizedConfig = { description: ?string, types: Array, directives: Array, - extensions: ?ReadOnlyObjMap, + extensions: ?ReadOnlyObjMap, extensionASTNodes: ReadonlyArray, assumeValid: boolean, }; diff --git a/src/utilities/TypeInfo.ts b/src/utilities/TypeInfo.ts index 10225d1754..bfb39903f2 100644 --- a/src/utilities/TypeInfo.ts +++ b/src/utilities/TypeInfo.ts @@ -46,8 +46,8 @@ export class TypeInfo { _typeStack: Array; _parentTypeStack: Array; _inputTypeStack: Array; - _fieldDefStack: Array>; - _defaultValueStack: Array; + _fieldDefStack: Array>; + _defaultValueStack: Array; _directive: ?GraphQLDirective; _argument: ?GraphQLArgument; _enumValue: ?GraphQLEnumValue; @@ -109,13 +109,13 @@ export class TypeInfo { } } - getFieldDef(): ?GraphQLField { + getFieldDef(): ?GraphQLField { if (this._fieldDefStack.length > 0) { return this._fieldDefStack[this._fieldDefStack.length - 1]; } } - getDefaultValue(): ?mixed { + getDefaultValue(): ?unknown { if (this._defaultValueStack.length > 0) { return this._defaultValueStack[this._defaultValueStack.length - 1]; } @@ -135,13 +135,13 @@ export class TypeInfo { enter(node: ASTNode) { const schema = this._schema; - // Note: many of the types below are explicitly typed as "mixed" to drop + // Note: many of the types below are explicitly typed as "unknown" to drop // any assumptions of a valid schema to ensure runtime types are properly // checked before continuing since TypeInfo is used as part of validation // which occurs before guarantees of schema and document validity. switch (node.kind) { case Kind.SELECTION_SET: { - const namedType: mixed = getNamedType(this.getType()); + const namedType: unknown = getNamedType(this.getType()); this._parentTypeStack.push( isCompositeType(namedType) ? namedType : undefined, ); @@ -150,7 +150,7 @@ export class TypeInfo { case Kind.FIELD: { const parentType = this.getParentType(); let fieldDef; - let fieldType: mixed; + let fieldType: unknown; if (parentType) { fieldDef = this._getFieldDef(schema, parentType, node); if (fieldDef) { @@ -165,7 +165,7 @@ export class TypeInfo { this._directive = schema.getDirective(node.name.value); break; case Kind.OPERATION_DEFINITION: { - let type: mixed; + let type: unknown; switch (node.operation) { case 'query': type = schema.getQueryType(); @@ -183,14 +183,14 @@ export class TypeInfo { case Kind.INLINE_FRAGMENT: case Kind.FRAGMENT_DEFINITION: { const typeConditionAST = node.typeCondition; - const outputType: mixed = typeConditionAST + const outputType: unknown = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType()); this._typeStack.push(isOutputType(outputType) ? outputType : undefined); break; } case Kind.VARIABLE_DEFINITION: { - const inputType: mixed = typeFromAST(schema, node.type); + const inputType: unknown = typeFromAST(schema, node.type); this._inputTypeStack.push( isInputType(inputType) ? inputType : undefined, ); @@ -198,7 +198,7 @@ export class TypeInfo { } case Kind.ARGUMENT: { let argDef; - let argType: mixed; + let argType: unknown; const fieldOrDirective = this.getDirective() ?? this.getFieldDef(); if (fieldOrDirective) { argDef = fieldOrDirective.args.find( @@ -214,8 +214,8 @@ export class TypeInfo { break; } case Kind.LIST: { - const listType: mixed = getNullableType(this.getInputType()); - const itemType: mixed = isListType(listType) + const listType: unknown = getNullableType(this.getInputType()); + const itemType: unknown = isListType(listType) ? listType.ofType : listType; // List positions never have a default value. @@ -224,7 +224,7 @@ export class TypeInfo { break; } case Kind.OBJECT_FIELD: { - const objectType: mixed = getNamedType(this.getInputType()); + const objectType: unknown = getNamedType(this.getInputType()); let inputFieldType: GraphQLInputType | void; let inputField: GraphQLInputField | void; if (isInputObjectType(objectType)) { @@ -242,7 +242,7 @@ export class TypeInfo { break; } case Kind.ENUM: { - const enumType: mixed = getNamedType(this.getInputType()); + const enumType: unknown = getNamedType(this.getInputType()); let enumValue; if (isEnumType(enumType)) { enumValue = enumType.getValue(node.value); @@ -299,7 +299,7 @@ function getFieldDef( schema: GraphQLSchema, parentType: GraphQLType, fieldNode: FieldNode, -): ?GraphQLField { +): ?GraphQLField { const name = fieldNode.name.value; if ( name === SchemaMetaFieldDef.name && diff --git a/src/utilities/__tests__/coerceInputValue-test.ts b/src/utilities/__tests__/coerceInputValue-test.ts index 61046b82d9..df0e6b0c22 100644 --- a/src/utilities/__tests__/coerceInputValue-test.ts +++ b/src/utilities/__tests__/coerceInputValue-test.ts @@ -25,7 +25,7 @@ function expectErrors(result: any) { } describe('coerceInputValue', () => { - function coerceValue(inputValue: mixed, type: GraphQLInputType) { + function coerceValue(inputValue: unknown, type: GraphQLInputType) { const errors = []; const value = coerceInputValue( inputValue, diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index cdd4ca574c..fe173205e2 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -30,7 +30,9 @@ function expectPrintedSchema(schema: GraphQLSchema) { return expect(schemaText); } -function buildSingleFieldSchema(fieldConfig: GraphQLFieldConfig) { +function buildSingleFieldSchema( + fieldConfig: GraphQLFieldConfig, +) { const Query = new GraphQLObjectType({ name: 'Query', fields: { singleField: fieldConfig }, diff --git a/src/utilities/__tests__/typeComparators-test.ts b/src/utilities/__tests__/typeComparators-test.ts index 3f2a87ae78..adf830b461 100644 --- a/src/utilities/__tests__/typeComparators-test.ts +++ b/src/utilities/__tests__/typeComparators-test.ts @@ -53,7 +53,7 @@ describe('typeComparators', () => { }); describe('isTypeSubTypeOf', () => { - function testSchema(fields: GraphQLFieldConfigMap) { + function testSchema(fields: GraphQLFieldConfigMap) { return new GraphQLSchema({ query: new GraphQLObjectType({ name: 'Query', diff --git a/src/utilities/__tests__/valueFromAST-test.ts b/src/utilities/__tests__/valueFromAST-test.ts index a444392777..6c08ccf15c 100644 --- a/src/utilities/__tests__/valueFromAST-test.ts +++ b/src/utilities/__tests__/valueFromAST-test.ts @@ -29,7 +29,7 @@ describe('valueFromAST', () => { function expectValueFrom( valueText: string, type: GraphQLInputType, - variables?: ObjMap, + variables?: ObjMap, ) { const ast = parseValue(valueText); const value = valueFromAST(ast, type, variables); diff --git a/src/utilities/__tests__/valueFromASTUntyped-test.ts b/src/utilities/__tests__/valueFromASTUntyped-test.ts index 5e971a43f6..fb1babcdc1 100644 --- a/src/utilities/__tests__/valueFromASTUntyped-test.ts +++ b/src/utilities/__tests__/valueFromASTUntyped-test.ts @@ -8,7 +8,7 @@ import { parseValue } from '../../language/parser'; import { valueFromASTUntyped } from '../valueFromASTUntyped'; describe('valueFromASTUntyped', () => { - function expectValueFrom(valueText: string, variables?: ?ObjMap) { + function expectValueFrom(valueText: string, variables?: ?ObjMap) { const ast = parseValue(valueText); const value = valueFromASTUntyped(ast, variables); return expect(value); diff --git a/src/utilities/astFromValue.d.ts b/src/utilities/astFromValue.d.ts index 5750a50ef1..f68c9a21d3 100644 --- a/src/utilities/astFromValue.d.ts +++ b/src/utilities/astFromValue.d.ts @@ -16,7 +16,7 @@ import { GraphQLInputType } from '../type/definition'; * | Boolean | Boolean | * | String | String / Enum Value | * | Number | Int / Float | - * | Mixed | Enum Value | + * | unknown | Enum Value | * | null | NullValue | * */ diff --git a/src/utilities/astFromValue.ts b/src/utilities/astFromValue.ts index b1d06a7cbf..9d57e37f25 100644 --- a/src/utilities/astFromValue.ts +++ b/src/utilities/astFromValue.ts @@ -33,11 +33,11 @@ import { * | Boolean | Boolean | * | String | String / Enum Value | * | Number | Int / Float | - * | Mixed | Enum Value | + * | unknown | Enum Value | * | null | NullValue | * */ -export function astFromValue(value: mixed, type: GraphQLInputType): ?ValueNode { +export function astFromValue(value: unknown, type: GraphQLInputType): ?ValueNode { if (isNonNullType(type)) { const astValue = astFromValue(value, type.ofType); if (astValue?.kind === Kind.NULL) { diff --git a/src/utilities/buildClientSchema.ts b/src/utilities/buildClientSchema.ts index 6a76632c6c..4f363b7f29 100644 --- a/src/utilities/buildClientSchema.ts +++ b/src/utilities/buildClientSchema.ts @@ -308,7 +308,7 @@ export function buildClientSchema( function buildFieldDefMap( typeIntrospection: IntrospectionObjectType | IntrospectionInterfaceType, - ): GraphQLFieldConfigMap { + ): GraphQLFieldConfigMap { if (!typeIntrospection.fields) { throw new Error( `Introspection result missing fields: ${inspect(typeIntrospection)}.`, @@ -324,7 +324,7 @@ export function buildClientSchema( function buildField( fieldIntrospection: IntrospectionField, - ): GraphQLFieldConfig { + ): GraphQLFieldConfig { const type = getType(fieldIntrospection.type); if (!isOutputType(type)) { const typeStr = inspect(type); diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 64d7f913fb..146b2ae0c7 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -20,7 +20,7 @@ import { type OnErrorCB = ( path: ReadonlyArray, - invalidValue: mixed, + invalidValue: unknown, error: GraphQLError, ) => void; @@ -28,16 +28,16 @@ type OnErrorCB = ( * Coerces a JavaScript value given a GraphQL Input Type. */ export function coerceInputValue( - inputValue: mixed, + inputValue: unknown, type: GraphQLInputType, onError: OnErrorCB = defaultOnError, -): mixed { +): unknown { return coerceInputValueImpl(inputValue, type, onError); } function defaultOnError( path: ReadonlyArray, - invalidValue: mixed, + invalidValue: unknown, error: GraphQLError, ): void { let errorPrefix = 'Invalid value ' + inspect(invalidValue); @@ -49,11 +49,11 @@ function defaultOnError( } function coerceInputValueImpl( - inputValue: mixed, + inputValue: unknown, type: GraphQLInputType, onError: OnErrorCB, path: Path | void, -): mixed { +): unknown { if (isNonNullType(type)) { if (inputValue != null) { return coerceInputValueImpl(inputValue, type.ofType, onError, path); diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index a36302c106..35a87e3797 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -375,8 +375,8 @@ export function extendSchemaImpl( } function extendField( - field: GraphQLFieldConfig, - ): GraphQLFieldConfig { + field: GraphQLFieldConfig, + ): GraphQLFieldConfig { return { ...field, type: replaceType(field.type), @@ -458,7 +458,7 @@ export function extendSchemaImpl( | ObjectTypeDefinitionNode | ObjectTypeExtensionNode, >, - ): GraphQLFieldConfigMap { + ): GraphQLFieldConfigMap { const fieldConfigMap = Object.create(null); for (const node of nodes) { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index fc4ec37e4a..1ffdd26e39 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -378,8 +378,8 @@ function findFieldChanges( function findArgChanges( oldType: GraphQLObjectType | GraphQLInterfaceType, - oldField: GraphQLField, - newField: GraphQLField, + oldField: GraphQLField, + newField: GraphQLField, ): Array { const schemaChanges = []; const argsDiff = diff(oldField.args, newField.args); @@ -534,7 +534,7 @@ function typeKindName(type: GraphQLNamedType): string { invariant(false, 'Unexpected type: ' + inspect((type: empty))); } -function stringifyValue(value: mixed, type: GraphQLInputType): string { +function stringifyValue(value: unknown, type: GraphQLInputType): string { const ast = astFromValue(value, type); invariant(ast != null); diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index eb22bfd686..d9001229bb 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -89,7 +89,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { })); } - function sortFields(fieldsMap: GraphQLFieldConfigMap) { + function sortFields(fieldsMap: GraphQLFieldConfigMap) { return sortObjMap(fieldsMap, (field) => ({ ...field, type: replaceType(field.type), diff --git a/src/utilities/valueFromAST.d.ts b/src/utilities/valueFromAST.d.ts index 6ea38000e1..47b3fa6e7b 100644 --- a/src/utilities/valueFromAST.d.ts +++ b/src/utilities/valueFromAST.d.ts @@ -20,7 +20,7 @@ import { GraphQLInputType } from '../type/definition'; * | Boolean | Boolean | * | String | String | * | Int / Float | Number | - * | Enum Value | Mixed | + * | Enum Value | unknown | * | NullValue | null | * */ diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index 258976462b..915f82b2c8 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -30,15 +30,15 @@ import { * | Boolean | Boolean | * | String | String | * | Int / Float | Number | - * | Enum Value | Mixed | + * | Enum Value | unknown | * | NullValue | null | * */ export function valueFromAST( valueNode: ?ValueNode, type: GraphQLInputType, - variables?: ?ObjMap, -): mixed | void { + variables?: ?ObjMap, +): unknown | void { if (!valueNode) { // When there is no node, then there is also no value. // Importantly, this is different from returning the value null. @@ -152,7 +152,7 @@ export function valueFromAST( // in the set of variables. function isMissingVariable( valueNode: ValueNode, - variables: ?ObjMap, + variables: ?ObjMap, ): boolean { return ( valueNode.kind === Kind.VARIABLE && diff --git a/src/utilities/valueFromASTUntyped.ts b/src/utilities/valueFromASTUntyped.ts index 05f5db71b2..37c02d6f91 100644 --- a/src/utilities/valueFromASTUntyped.ts +++ b/src/utilities/valueFromASTUntyped.ts @@ -24,8 +24,8 @@ import type { ValueNode } from '../language/ast'; */ export function valueFromASTUntyped( valueNode: ValueNode, - variables?: ?ObjMap, -): mixed { + variables?: ?ObjMap, +): unknown { switch (valueNode.kind) { case Kind.NULL: return null; diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index 4e0d418d07..ca8fbe7b79 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -32,7 +32,7 @@ type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; type VariableUsage = { readonly node: VariableNode; readonly type: ?GraphQLInputType; - readonly defaultValue: ?mixed; + readonly defaultValue: ?unknown; }; /** @@ -229,7 +229,7 @@ export class ValidationContext extends ASTValidationContext { return this._typeInfo.getParentInputType(); } - getFieldDef(): ?GraphQLField { + getFieldDef(): ?GraphQLField { return this._typeInfo.getFieldDef(); } diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts index 6afeaec582..a70fbb39ec 100644 --- a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts +++ b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts @@ -97,7 +97,7 @@ type ConflictReasonMessage = string | Array; type NodeAndDef = [ GraphQLCompositeType, FieldNode, - ?GraphQLField, + ?GraphQLField, ]; // Map of array of those. type NodeAndDefCollection = ObjMap>; diff --git a/src/validation/rules/VariablesInAllowedPositionRule.ts b/src/validation/rules/VariablesInAllowedPositionRule.ts index 1070190876..7f6905a526 100644 --- a/src/validation/rules/VariablesInAllowedPositionRule.ts +++ b/src/validation/rules/VariablesInAllowedPositionRule.ts @@ -81,7 +81,7 @@ function allowedVariableUsage( varType: GraphQLType, varDefaultValue: ?ValueNode, locationType: GraphQLType, - locationDefaultValue: ?mixed, + locationDefaultValue: ?unknown, ): boolean { if (isNonNullType(locationType) && !isNonNullType(varType)) { const hasNonNullVariableDefaultValue = From 78c2be0a24034341afa7e7bf5a5cbab1ed02795c Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 16:05:53 -0500 Subject: [PATCH 06/65] convert `?` (flow) to `Maybe` (TS) --- src/__testUtils__/inspectStr.ts | 4 +- src/error/GraphQLError.ts | 13 +- src/error/locatedError.ts | 3 +- src/execution/execute.ts | 21 +- src/execution/values.ts | 9 +- src/graphql.ts | 9 +- src/jsutils/Path.ts | 6 +- src/language/parser.ts | 8 +- src/language/printer.ts | 14 +- src/language/visitor.ts | 3 +- src/subscription/subscribe.ts | 15 +- src/type/definition.ts | 193 +++++++++--------- src/type/directives.ts | 19 +- src/type/schema.ts | 47 ++--- src/type/validate.ts | 13 +- src/utilities/TypeInfo.ts | 40 ++-- .../__tests__/buildASTSchema-test.ts | 3 +- src/utilities/__tests__/extendSchema-test.ts | 3 +- .../__tests__/stripIgnoredCharacters-test.ts | 3 +- .../__tests__/valueFromASTUntyped-test.ts | 6 +- src/utilities/astFromValue.ts | 3 +- src/utilities/extendSchema.ts | 15 +- src/utilities/getIntrospectionQuery.ts | 37 ++-- src/utilities/getOperationAST.ts | 5 +- src/utilities/lexicographicSortSchema.ts | 3 +- src/utilities/printSchema.ts | 7 +- src/utilities/valueFromAST.ts | 7 +- src/utilities/valueFromASTUntyped.ts | 3 +- src/validation/ValidationContext.ts | 31 +-- src/validation/__tests__/harness.ts | 4 +- .../rules/OverlappingFieldsCanBeMergedRule.ts | 17 +- .../rules/PossibleFragmentSpreadsRule.ts | 3 +- .../rules/VariablesInAllowedPositionRule.ts | 5 +- src/validation/validate.ts | 3 +- 34 files changed, 312 insertions(+), 263 deletions(-) diff --git a/src/__testUtils__/inspectStr.ts b/src/__testUtils__/inspectStr.ts index 52e7d7f78c..721d6e673a 100644 --- a/src/__testUtils__/inspectStr.ts +++ b/src/__testUtils__/inspectStr.ts @@ -1,7 +1,9 @@ +import type { Maybe } from '../jsutils/Maybe'; + /** * Special inspect function to produce readable string literal for error messages in tests */ -export function inspectStr(str: ?string): string { +export function inspectStr(str: Maybe): string { if (str == null) { return 'null'; } diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index e6a62bbab1..9878181c0c 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -2,6 +2,7 @@ // flowlint uninitialized-instance-property:off import { isObjectLike } from '../jsutils/isObjectLike'; +import type { Maybe } from '../jsutils/Maybe'; import type { ASTNode } from '../language/ast'; import type { Source } from '../language/source'; @@ -67,7 +68,7 @@ export class GraphQLError extends Error { /** * The original error thrown from a field resolver during execution. */ - readonly originalError: ?Error; + readonly originalError: Maybe; /** * Extension fields to add to the formatted error. @@ -77,11 +78,11 @@ export class GraphQLError extends Error { constructor( message: string, nodes?: ReadonlyArray | ASTNode | void | null, - source?: ?Source, - positions?: ?ReadonlyArray, - path?: ?ReadonlyArray, - originalError?: ?(Error & { readonly extensions?: unknown, ... }), - extensions?: ?{ [key: string]: unknown, ... }, + source?: Maybe, + positions?: Maybe>, + path?: Maybe>, + originalError?: Maybe<(Error & { readonly extensions?: unknown, ... })>, + extensions?: Maybe<{ [key: string]: unknown, ... }>, ) { super(message); diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index d165fc30f2..cf6ebb8b9d 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -1,4 +1,5 @@ import { inspect } from '../jsutils/inspect'; +import type { Maybe } from '../jsutils/Maybe'; import type { ASTNode } from '../language/ast'; @@ -12,7 +13,7 @@ import { GraphQLError } from './GraphQLError'; export function locatedError( rawOriginalError: unknown, nodes: ASTNode | ReadonlyArray | void | null, - path?: ?ReadonlyArray, + path?: Maybe>, ): GraphQLError { // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. const originalError: Error | GraphQLError = diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 125aaeb165..aed56cf1e6 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -11,6 +11,7 @@ import { promiseReduce } from '../jsutils/promiseReduce'; import { promiseForObject } from '../jsutils/promiseForObject'; import { addPath, pathToArray } from '../jsutils/Path'; import { isIteratableObject } from '../jsutils/isIteratableObject'; +import type { Maybe } from '../jsutils/Maybe'; import type { GraphQLFormattedError } from '../error/formatError'; import { GraphQLError } from '../error/GraphQLError'; @@ -128,10 +129,10 @@ export type ExecutionArgs = { document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: ?{ readonly [variable: string]: unknown, ... }, - operationName?: ?string, - fieldResolver?: ?GraphQLFieldResolver, - typeResolver?: ?GraphQLTypeResolver, + variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + operationName?: Maybe, + fieldResolver?: Maybe>, + typeResolver?: Maybe>, }; /** @@ -229,7 +230,7 @@ function buildResponse( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: ?{ readonly [variable: string]: unknown, ... }, + rawVariableValues: Maybe<{ readonly [variable: string]: unknown, ... }>, ): void { devAssert(document, 'Must provide document.'); @@ -256,10 +257,10 @@ export function buildExecutionContext( document: DocumentNode, rootValue: unknown, contextValue: unknown, - rawVariableValues: ?{ readonly [variable: string]: unknown, ... }, - operationName: ?string, - fieldResolver: ?GraphQLFieldResolver, - typeResolver?: ?GraphQLTypeResolver, + rawVariableValues: Maybe<{ readonly [variable: string]: unknown, ... }>, + operationName: Maybe, + fieldResolver: Maybe>, + typeResolver?: Maybe>, ): ReadonlyArray | ExecutionContext { let operation: OperationDefinitionNode | void; const fragments: ObjMap = Object.create(null); @@ -1187,7 +1188,7 @@ export function getFieldDef( schema: GraphQLSchema, parentType: GraphQLObjectType, fieldName: string, -): ?GraphQLField { +): Maybe> { if ( fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === parentType diff --git a/src/execution/values.ts b/src/execution/values.ts index 2dcacf4ddf..7dfd0f3511 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -21,6 +21,7 @@ import { isInputType, isNonNullType } from '../type/definition'; import { typeFromAST } from '../utilities/typeFromAST'; import { valueFromAST } from '../utilities/valueFromAST'; import { coerceInputValue } from '../utilities/coerceInputValue'; +import type { Maybe } from '../jsutils/Maybe'; type CoercedVariableValues = | { errors: ReadonlyArray } @@ -40,7 +41,7 @@ type CoercedVariableValues = export function getVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { readonly [variable: string]: unknown, ... }, + inputs: { readonly [variable: string]: unknown }, options?: { maxErrors?: number }, ): CoercedVariableValues { const errors = []; @@ -159,7 +160,7 @@ function coerceVariableValues( export function getArgumentValues( def: GraphQLField | GraphQLDirective, node: FieldNode | DirectiveNode, - variableValues?: ?ObjMap, + variableValues?: Maybe>, ): { [argument: string]: unknown, ... } { const coercedValues = {}; @@ -244,8 +245,8 @@ export function getArgumentValues( */ export function getDirectiveValues( directiveDef: GraphQLDirective, - node: { +directives?: ReadonlyArray, ... }, - variableValues?: ?ObjMap, + node: { readonly directives?: ReadonlyArray, ... }, + variableValues?: Maybe>, ): void | { [argument: string]: unknown, ... } { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const directiveNode = node.directives?.find( diff --git a/src/graphql.ts b/src/graphql.ts index 23d799377d..e98a35d748 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -15,6 +15,7 @@ import { validateSchema } from './type/validate'; import type { ExecutionResult } from './execution/execute'; import { execute } from './execution/execute'; +import type { Maybe } from './jsutils/Maybe'; /** * This is the primary entry point function for fulfilling GraphQL operations @@ -60,10 +61,10 @@ export type GraphQLArgs = { source: string | Source, rootValue?: unknown, contextValue?: unknown, - variableValues?: ?{ readonly [variable: string]: unknown, ... }, - operationName?: ?string, - fieldResolver?: ?GraphQLFieldResolver, - typeResolver?: ?GraphQLTypeResolver, + variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + operationName?: Maybe, + fieldResolver?: Maybe>, + typeResolver?: Maybe>, }; export function graphql(args: GraphQLArgs): Promise { diff --git a/src/jsutils/Path.ts b/src/jsutils/Path.ts index d0a53fc67a..c727312bee 100644 --- a/src/jsutils/Path.ts +++ b/src/jsutils/Path.ts @@ -1,3 +1,5 @@ +import type { Maybe } from './Maybe'; + export type Path = { readonly prev: Path | void; readonly key: string | number; @@ -18,7 +20,9 @@ export function addPath( /** * Given a Path, return an Array of the path keys. */ -export function pathToArray(path: ?Readonly): Array { +export function pathToArray( + path: Maybe>, +): Array { const flattened = []; let curr = path; while (curr) { diff --git a/src/language/parser.ts b/src/language/parser.ts index 8914f75173..efc1cdaa5d 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -1,3 +1,5 @@ +import type { Maybe } from '../jsutils/Maybe'; + import type { GraphQLError } from '../error/GraphQLError'; import { syntaxError } from '../error/syntaxError'; @@ -149,7 +151,7 @@ export function parseType( * @internal */ export class Parser { - _options: ?ParseOptions; + _options: Maybe; _lexer: Lexer; constructor(source: string | Source, options?: ParseOptions) { @@ -1380,7 +1382,7 @@ export class Parser { * If the next token is of the given kind, return that token after advancing the lexer. * Otherwise, do not change the parser state and return undefined. */ - expectOptionalToken(kind: TokenKindEnum): ?Token { + expectOptionalToken(kind: TokenKindEnum): Maybe { const token = this._lexer.token; if (token.kind === kind) { this._lexer.advance(); @@ -1422,7 +1424,7 @@ export class Parser { /** * Helper function for creating an error when an unexpected lexed token is encountered. */ - unexpected(atToken?: ?Token): GraphQLError { + unexpected(atToken?: Maybe): GraphQLError { const token = atToken ?? this._lexer.token; return syntaxError( this._lexer.source, diff --git a/src/language/printer.ts b/src/language/printer.ts index 43bd627195..eae84d7fe3 100644 --- a/src/language/printer.ts +++ b/src/language/printer.ts @@ -1,3 +1,5 @@ +import type { Maybe } from '../jsutils/Maybe'; + import type { ASTNode } from './ast'; import { visit } from './visitor'; @@ -307,7 +309,7 @@ const printDocASTReducer: any = { * Given maybeArray, print an empty string if it is null or empty, otherwise * print all items together separated by separator if provided */ -function join(maybeArray: ?Array, separator = ''): string { +function join(maybeArray: Maybe>, separator = ''): string { return maybeArray?.filter((x) => x).join(separator) ?? ''; } @@ -315,14 +317,18 @@ function join(maybeArray: ?Array, separator = ''): string { * Given array, print each item on its own line, wrapped in an * indented "{ }" block. */ -function block(array: ?Array): string { +function block(array: Maybe>): string { return wrap('{\n', indent(join(array, '\n')), '\n}'); } /** * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string. */ -function wrap(start: string, maybeString: ?string, end: string = ''): string { +function wrap( + start: string, + maybeString: Maybe, + end: string = '', +): string { return maybeString != null && maybeString !== '' ? start + maybeString + end : ''; @@ -332,7 +338,7 @@ function indent(str: string): string { return wrap(' ', str.replace(/\n/g, '\n ')); } -function hasMultilineItems(maybeArray: ?Array): boolean { +function hasMultilineItems(maybeArray: Maybe>): boolean { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return maybeArray?.some((str) => str.includes('\n')) ?? false; } diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 25b2ff67c4..9d00cb1df5 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -1,4 +1,5 @@ import { inspect } from '../jsutils/inspect'; +import type { Maybe } from '../jsutils/Maybe'; import type { ASTNode, ASTKindToNode } from './ast'; import { isNode } from './ast'; @@ -377,7 +378,7 @@ export function getVisitFn( visitor: ASTVisitor, kind: string, isLeaving: boolean, -): ?ASTVisitFn { + ): Maybe> { const kindVisitor = visitor[kind]; if (kindVisitor) { if (!isLeaving && typeof kindVisitor === 'function') { diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 05bd0889e6..acc8af45c4 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -1,6 +1,7 @@ import { inspect } from '../jsutils/inspect'; import { isAsyncIterable } from '../jsutils/isAsyncIterable'; import { addPath, pathToArray } from '../jsutils/Path'; +import type { Maybe } from '../jsutils/Maybe'; import { GraphQLError } from '../error/GraphQLError'; import { locatedError } from '../error/locatedError'; @@ -30,10 +31,10 @@ export type SubscriptionArgs = { document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: ?{ readonly [variable: string]: unknown, ... }, - operationName?: ?string, - fieldResolver?: ?GraphQLFieldResolver, - subscribeFieldResolver?: ?GraphQLFieldResolver, + variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + operationName?: Maybe, + fieldResolver?: Maybe>, + subscribeFieldResolver?: Maybe>, }; /** @@ -140,9 +141,9 @@ export async function createSourceEventStream( document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: ?{ readonly [variable: string]: unknown, ... }, - operationName?: ?string, - fieldResolver?: ?GraphQLFieldResolver, + variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + operationName?: Maybe, + fieldResolver?: Maybe>, ): Promise | ExecutionResult> { // If arguments are missing or incorrectly typed, this is an internal // developer mistake which should throw an early error. diff --git a/src/type/definition.ts b/src/type/definition.ts index 315dca4158..d2fac61997 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -16,6 +16,7 @@ import { didYouMean } from '../jsutils/didYouMean'; import { isObjectLike } from '../jsutils/isObjectLike'; import { identityFunc } from '../jsutils/identityFunc'; import { suggestionList } from '../jsutils/suggestionList'; +import type { Maybe } from '../jsutils/Maybe'; import { GraphQLError } from '../error/GraphQLError'; @@ -548,13 +549,13 @@ function resolveObjMapThunk(thunk: ThunkObjMap): ObjMap { */ export class GraphQLScalarType { name: string; - description: ?string; - specifiedByUrl: ?string; + description: Maybe; + specifiedByUrl: Maybe; serialize: GraphQLScalarSerializer; parseValue: GraphQLScalarValueParser; parseLiteral: GraphQLScalarLiteralParser; - extensions: ?ReadOnlyObjMap; - astNode: ?ScalarTypeDefinitionNode; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; constructor(config: $ReadOnly>) { @@ -624,30 +625,30 @@ export class GraphQLScalarType { export type GraphQLScalarSerializer = ( outputValue: unknown, -) => ?TExternal; +) => Maybe; export type GraphQLScalarValueParser = ( inputValue: unknown, -) => ?TInternal; +) => Maybe; export type GraphQLScalarLiteralParser = ( valueNode: ValueNode, - variables: ?ObjMap, -) => ?TInternal; + variables: Maybe>, + ) => Maybe; export type GraphQLScalarTypeConfig = { name: string, - description?: ?string, - specifiedByUrl?: ?string, + description?: Maybe, + specifiedByUrl?: Maybe, // Serializes an internal value to include in a response. serialize?: GraphQLScalarSerializer, // Parses an externally provided value to use as an input. parseValue?: GraphQLScalarValueParser, // Parses an externally provided literal value to use as an input. parseLiteral?: GraphQLScalarLiteralParser, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?ScalarTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; type GraphQLScalarTypeNormalizedConfig = { @@ -655,7 +656,7 @@ type GraphQLScalarTypeNormalizedConfig = { serialize: GraphQLScalarSerializer, parseValue: GraphQLScalarValueParser, parseLiteral: GraphQLScalarLiteralParser, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; @@ -698,10 +699,10 @@ type GraphQLScalarTypeNormalizedConfig = { */ export class GraphQLObjectType { name: string; - description: ?string; - isTypeOf: ?GraphQLIsTypeOfFn; - extensions: ?ReadOnlyObjMap; - astNode: ?ObjectTypeDefinitionNode; + description: Maybe; + isTypeOf: Maybe>; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap>; @@ -874,20 +875,20 @@ export function argsToArgsConfig( export type GraphQLObjectTypeConfig = { name: string, - description?: ?string, + description?: Maybe, interfaces?: ThunkArray, fields: ThunkObjMap>, - isTypeOf?: ?GraphQLIsTypeOfFn, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?ObjectTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + isTypeOf?: Maybe>, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; type GraphQLObjectTypeNormalizedConfig = { ...GraphQLObjectTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; @@ -936,25 +937,25 @@ export type GraphQLFieldConfig< TContext, TArgs = { [argument: string]: any, ... }, > = { - description?: ?string, + description?: Maybe, type: GraphQLOutputType, args?: GraphQLFieldConfigArgumentMap, resolve?: GraphQLFieldResolver, subscribe?: GraphQLFieldResolver, - deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?FieldDefinitionNode, + deprecationReason?: Maybe, + extensions?: Maybe>, + astNode?: Maybe, }; export type GraphQLFieldConfigArgumentMap = ObjMap; export type GraphQLArgumentConfig = { - description?: ?string, + description?: Maybe, type: GraphQLInputType, defaultValue?: unknown, - extensions?: ?ReadOnlyObjMapLike, - deprecationReason?: ?string, - astNode?: ?InputValueDefinitionNode, + extensions?: Maybe>, + deprecationReason?: Maybe, + astNode?: Maybe, }; export type GraphQLFieldConfigMap = ObjMap< @@ -967,24 +968,24 @@ export type GraphQLField< TArgs = { [argument: string]: any, ... }, > = { name: string, - description: ?string, + description: Maybe, type: GraphQLOutputType, args: Array, resolve?: GraphQLFieldResolver, subscribe?: GraphQLFieldResolver, - deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, - astNode: ?FieldDefinitionNode, + deprecationReason: Maybe, + extensions: Maybe>, + astNode: Maybe, }; export type GraphQLArgument = { name: string, - description: ?string, + description: Maybe, type: GraphQLInputType, defaultValue: unknown, - deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, - astNode: ?InputValueDefinitionNode, + deprecationReason: Maybe, + extensions: Maybe>, + astNode: Maybe, }; export function isRequiredArgument(arg: GraphQLArgument): boolean %checks { @@ -1015,10 +1016,10 @@ export type GraphQLFieldMap = ObjMap< */ export class GraphQLInterfaceType { name: string; - description: ?string; - resolveType: ?GraphQLTypeResolver; - extensions: ?ReadOnlyObjMap; - astNode: ?InterfaceTypeDefinitionNode; + description: Maybe; + resolveType: Maybe>; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap>; @@ -1085,7 +1086,7 @@ export class GraphQLInterfaceType { export type GraphQLInterfaceTypeConfig = { name: string, - description?: ?string, + description?: Maybe, interfaces?: ThunkArray, fields: ThunkObjMap>, /** @@ -1093,17 +1094,17 @@ export type GraphQLInterfaceTypeConfig = { * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: ?GraphQLTypeResolver, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?InterfaceTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + resolveType?: Maybe>, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; export type GraphQLInterfaceTypeNormalizedConfig = { ...GraphQLInterfaceTypeConfig, interfaces: Array, fields: GraphQLFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; @@ -1132,10 +1133,10 @@ export type GraphQLInterfaceTypeNormalizedConfig = { */ export class GraphQLUnionType { name: string; - description: ?string; - resolveType: ?GraphQLTypeResolver; - extensions: ?ReadOnlyObjMap; - astNode: ?UnionTypeDefinitionNode; + description: Maybe; + resolveType: Maybe>; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; _types: ThunkArray; @@ -1203,23 +1204,23 @@ function defineTypes( export type GraphQLUnionTypeConfig = { name: string, - description?: ?string, + description?: Maybe, types: ThunkArray, /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: ?GraphQLTypeResolver, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?UnionTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + resolveType?: Maybe>, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; type GraphQLUnionTypeNormalizedConfig = { ...GraphQLUnionTypeConfig, types: Array, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; @@ -1246,9 +1247,9 @@ type GraphQLUnionTypeNormalizedConfig = { */ export class GraphQLEnumType /* */ { name: string; - description: ?string; - extensions: ?ReadOnlyObjMap; - astNode: ?EnumTypeDefinitionNode; + description: Maybe; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; _values: Array */>; @@ -1275,11 +1276,11 @@ export class GraphQLEnumType /* */ { return this._values; } - getValue(name: string): ?GraphQLEnumValue { + getValue(name: string): Maybe { return this._nameLookup[name]; } - serialize(outputValue: unknown /* T */): ?string { + serialize(outputValue: unknown /* T */): Maybe { const enumValue = this._valueLookup.get(outputValue); if (enumValue === undefined) { throw new GraphQLError( @@ -1289,7 +1290,7 @@ export class GraphQLEnumType /* */ { return enumValue.name; } - parseValue(inputValue: unknown): ?any /* T */ { + parseValue(inputValue: unknown): Maybe /* T */ { if (typeof inputValue !== 'string') { const valueStr = inspect(inputValue); throw new GraphQLError( @@ -1308,7 +1309,7 @@ export class GraphQLEnumType /* */ { return enumValue.value; } - parseLiteral(valueNode: ValueNode, _variables: ?ObjMap): ?any /* T */ { + parseLiteral(valueNode: ValueNode, _variables: Maybe>): Maybe /* T */ { // Note: variables will be resolved to a value before calling this function. if (valueNode.kind !== Kind.ENUM) { const valueStr = print(valueNode); @@ -1405,36 +1406,36 @@ function defineEnumValues( export type GraphQLEnumTypeConfig /* */ = { name: string, - description?: ?string, + description?: Maybe, values: GraphQLEnumValueConfigMap /* */, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?EnumTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; type GraphQLEnumTypeNormalizedConfig = { ...GraphQLEnumTypeConfig, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; export type GraphQLEnumValueConfigMap /* */ = ObjMap */>; export type GraphQLEnumValueConfig /* */ = { - description?: ?string, + description?: Maybe, value?: any /* T */, - deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?EnumValueDefinitionNode, + deprecationReason?: Maybe, + extensions?: Maybe>, + astNode?: Maybe, }; export type GraphQLEnumValue /* */ = { name: string, - description: ?string, + description: Maybe, value: any /* T */, - deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, - astNode: ?EnumValueDefinitionNode, + deprecationReason: Maybe, + extensions: Maybe>, + astNode: Maybe, }; /** @@ -1459,9 +1460,9 @@ export type GraphQLEnumValue /* */ = { */ export class GraphQLInputObjectType { name: string; - description: ?string; - extensions: ?ReadOnlyObjMap; - astNode: ?InputObjectTypeDefinitionNode; + description: Maybe; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; _fields: ThunkObjMap; @@ -1545,39 +1546,39 @@ function defineInputFieldMap( export type GraphQLInputObjectTypeConfig = { name: string, - description?: ?string, + description?: Maybe, fields: ThunkObjMap, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?InputObjectTypeDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; type GraphQLInputObjectTypeNormalizedConfig = { ...GraphQLInputObjectTypeConfig, fields: GraphQLInputFieldConfigMap, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; export type GraphQLInputFieldConfig = { - description?: ?string, + description?: Maybe, type: GraphQLInputType, defaultValue?: unknown, - deprecationReason?: ?string, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?InputValueDefinitionNode, + deprecationReason?: Maybe, + extensions?: Maybe>, + astNode?: Maybe, }; export type GraphQLInputFieldConfigMap = ObjMap; export type GraphQLInputField = { name: string, - description: ?string, + description: Maybe, type: GraphQLInputType, defaultValue: unknown, - deprecationReason: ?string, - extensions: ?ReadOnlyObjMap, - astNode: ?InputValueDefinitionNode, + deprecationReason: Maybe, + extensions: Maybe>, + astNode: Maybe, }; export function isRequiredInputField( diff --git a/src/type/directives.ts b/src/type/directives.ts index 234ae33658..34e3aacbb8 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -4,6 +4,7 @@ import { toObjMap } from '../jsutils/toObjMap'; import { devAssert } from '../jsutils/devAssert'; import { instanceOf } from '../jsutils/instanceOf'; import { isObjectLike } from '../jsutils/isObjectLike'; +import type { Maybe } from '../jsutils/Maybe'; import type { DirectiveDefinitionNode } from '../language/ast'; import type { DirectiveLocationEnum } from '../language/directiveLocation'; @@ -42,12 +43,12 @@ export function assertDirective(directive: unknown): GraphQLDirective { */ export class GraphQLDirective { name: string; - description: ?string; + description: Maybe; locations: Array; args: Array; isRepeatable: boolean; - extensions: ?ReadOnlyObjMap; - astNode: ?DirectiveDefinitionNode; + extensions: Maybe>; + astNode: Maybe; constructor(config: $ReadOnly) { this.name = config.name; @@ -108,19 +109,19 @@ export class GraphQLDirective { export type GraphQLDirectiveConfig = { name: string, - description?: ?string, + description?: Maybe, locations: Array, - args?: ?GraphQLFieldConfigArgumentMap, - isRepeatable?: ?boolean, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?DirectiveDefinitionNode, + args?: Maybe, + isRepeatable?: Maybe, + extensions?: Maybe>, + astNode?: Maybe, }; type GraphQLDirectiveNormalizedConfig = { ...GraphQLDirectiveConfig, args: GraphQLFieldConfigArgumentMap, isRepeatable: boolean, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, }; /** diff --git a/src/type/schema.ts b/src/type/schema.ts index 350ba6bcff..4eab1ca285 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -8,6 +8,7 @@ import { toObjMap } from '../jsutils/toObjMap'; import { devAssert } from '../jsutils/devAssert'; import { instanceOf } from '../jsutils/instanceOf'; import { isObjectLike } from '../jsutils/isObjectLike'; +import type { Maybe } from '../jsutils/Maybe'; import type { GraphQLError } from '../error/GraphQLError'; @@ -118,14 +119,14 @@ export function assertSchema(schema: unknown): GraphQLSchema { * */ export class GraphQLSchema { - description: ?string; - extensions: ?ReadOnlyObjMap; - astNode: ?SchemaDefinitionNode; + description: Maybe; + extensions: Maybe>; + astNode: Maybe; extensionASTNodes: ReadonlyArray; - _queryType: ?GraphQLObjectType; - _mutationType: ?GraphQLObjectType; - _subscriptionType: ?GraphQLObjectType; + _queryType: Maybe; + _mutationType: Maybe; + _subscriptionType: Maybe; _directives: ReadonlyArray; _typeMap: TypeMap; _subTypeMap: ObjMap>; @@ -135,7 +136,7 @@ export class GraphQLSchema { }>; // Used as a cache for validateSchema(). - __validationErrors: ?ReadonlyArray; + __validationErrors: Maybe>; constructor(config: $ReadOnly) { // If this schema was built from a source known to be valid, then it may be @@ -254,15 +255,15 @@ export class GraphQLSchema { } } - getQueryType(): ?GraphQLObjectType { + getQueryType(): Maybe { return this._queryType; } - getMutationType(): ?GraphQLObjectType { + getMutationType(): Maybe { return this._mutationType; } - getSubscriptionType(): ?GraphQLObjectType { + getSubscriptionType(): Maybe { return this._subscriptionType; } @@ -270,7 +271,7 @@ export class GraphQLSchema { return this._typeMap; } - getType(name: string): ?GraphQLNamedType { + getType(name: string): Maybe { return this.getTypeMap()[name]; } @@ -323,7 +324,7 @@ export class GraphQLSchema { return this._directives; } - getDirective(name: string): ?GraphQLDirective { + getDirective(name: string): Maybe { return this.getDirectives().find((directive) => directive.name === name); } @@ -362,15 +363,15 @@ export type GraphQLSchemaValidationOptions = { }; export type GraphQLSchemaConfig = { - description?: ?string, - query?: ?GraphQLObjectType, - mutation?: ?GraphQLObjectType, - subscription?: ?GraphQLObjectType, - types?: ?Array, - directives?: ?Array, - extensions?: ?ReadOnlyObjMapLike, - astNode?: ?SchemaDefinitionNode, - extensionASTNodes?: ?ReadonlyArray, + description?: Maybe, + query?: Maybe, + mutation?: Maybe, + subscription?: Maybe, + types?: Maybe>, + directives?: Maybe>, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, ...GraphQLSchemaValidationOptions, }; @@ -379,10 +380,10 @@ export type GraphQLSchemaConfig = { */ export type GraphQLSchemaNormalizedConfig = { ...GraphQLSchemaConfig, - description: ?string, + description: Maybe, types: Array, directives: Array, - extensions: ?ReadOnlyObjMap, + extensions: Maybe>, extensionASTNodes: ReadonlyArray, assumeValid: boolean, }; diff --git a/src/type/validate.ts b/src/type/validate.ts index 6285bf7bff..c89551af90 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -1,4 +1,5 @@ import { inspect } from '../jsutils/inspect'; +import type { Maybe } from '../jsutils/Maybe'; import { GraphQLError } from '../error/GraphQLError'; import { locatedError } from '../error/locatedError'; @@ -91,7 +92,7 @@ class SchemaValidationContext { reportError( message: string, - nodes?: ReadonlyArray | ?ASTNode, + nodes?: ReadonlyArray> | Maybe, ): void { const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; this.addError(new GraphQLError(message, _nodes)); @@ -142,7 +143,7 @@ function validateRootTypes(context: SchemaValidationContext): void { function getOperationTypeNode( schema: GraphQLSchema, operation: OperationTypeNode, -): ?ASTNode { +): Maybe { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return [schema.astNode] .concat(schema.extensionASTNodes) @@ -196,7 +197,7 @@ function validateDirectives(context: SchemaValidationContext): void { function validateName( context: SchemaValidationContext, - node: { readonly name: string, readonly astNode: ?ASTNode, ... }, + node: { readonly name: string; readonly astNode: Maybe, ... }, ): void { // Ensure names are valid, however introspection types opt out. const error = isValidNameError(node.name); @@ -624,7 +625,7 @@ function getAllImplementsInterfaceNodes( function getUnionMemberTypeNodes( union: GraphQLUnionType, typeName: string, -): ?ReadonlyArray { +): Maybe> { const { astNode, extensionASTNodes } = union; const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; @@ -636,8 +637,8 @@ function getUnionMemberTypeNodes( } function getDeprecatedDirectiveNode( - definitionNode: ?{ readonly directives?: ReadonlyArray, ... }, -): ?DirectiveNode { + definitionNode: Maybe<{ readonly directives?: ReadonlyArray, ... }>, +): Maybe { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return definitionNode?.directives?.find( (node) => node.name.value === GraphQLDeprecatedDirective.name, diff --git a/src/utilities/TypeInfo.ts b/src/utilities/TypeInfo.ts index bfb39903f2..1e75c8d8f3 100644 --- a/src/utilities/TypeInfo.ts +++ b/src/utilities/TypeInfo.ts @@ -4,6 +4,8 @@ import { Kind } from '../language/kinds'; import { isNode } from '../language/ast'; import { getVisitFn } from '../language/visitor'; +import type { Maybe } from '../jsutils/Maybe'; + import type { GraphQLSchema } from '../type/schema'; import type { GraphQLDirective } from '../type/directives'; import type { @@ -43,21 +45,21 @@ import { typeFromAST } from './typeFromAST'; */ export class TypeInfo { _schema: GraphQLSchema; - _typeStack: Array; - _parentTypeStack: Array; - _inputTypeStack: Array; - _fieldDefStack: Array>; - _defaultValueStack: Array; - _directive: ?GraphQLDirective; - _argument: ?GraphQLArgument; - _enumValue: ?GraphQLEnumValue; + _typeStack: Array>; + _parentTypeStack: Array>; + _inputTypeStack: Array>; + _fieldDefStack: Array>>; + _defaultValueStack: Array>; + _directive: Maybe; + _argument: Maybe; + _enumValue: Maybe; _getFieldDef: typeof getFieldDef; constructor( schema: GraphQLSchema, // Initial type may be provided in rare cases to facilitate traversals // beginning somewhere other than documents. - initialType?: ?GraphQLType, + initialType?: Maybe, // @deprecated will be removed in 17.0.0 getFieldDefFn?: typeof getFieldDef, @@ -85,51 +87,51 @@ export class TypeInfo { } } - getType(): ?GraphQLOutputType { + getType(): Maybe { if (this._typeStack.length > 0) { return this._typeStack[this._typeStack.length - 1]; } } - getParentType(): ?GraphQLCompositeType { + getParentType(): Maybe { if (this._parentTypeStack.length > 0) { return this._parentTypeStack[this._parentTypeStack.length - 1]; } } - getInputType(): ?GraphQLInputType { + getInputType(): Maybe { if (this._inputTypeStack.length > 0) { return this._inputTypeStack[this._inputTypeStack.length - 1]; } } - getParentInputType(): ?GraphQLInputType { + getParentInputType(): Maybe { if (this._inputTypeStack.length > 1) { return this._inputTypeStack[this._inputTypeStack.length - 2]; } } - getFieldDef(): ?GraphQLField { + getFieldDef(): Maybe> { if (this._fieldDefStack.length > 0) { return this._fieldDefStack[this._fieldDefStack.length - 1]; } } - getDefaultValue(): ?unknown { + getDefaultValue(): Maybe { if (this._defaultValueStack.length > 0) { return this._defaultValueStack[this._defaultValueStack.length - 1]; } } - getDirective(): ?GraphQLDirective { + getDirective(): Maybe { return this._directive; } - getArgument(): ?GraphQLArgument { + getArgument(): Maybe { return this._argument; } - getEnumValue(): ?GraphQLEnumValue { + getEnumValue(): Maybe { return this._enumValue; } @@ -299,7 +301,7 @@ function getFieldDef( schema: GraphQLSchema, parentType: GraphQLType, fieldNode: FieldNode, -): ?GraphQLField { +): Maybe> { const name = fieldNode.name.value; if ( name === SchemaMetaFieldDef.name && diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index 7545d510da..1e332e7d3d 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -40,6 +40,7 @@ import { graphqlSync } from '../../graphql'; import { printType, printSchema } from '../printSchema'; import { buildASTSchema, buildSchema } from '../buildASTSchema'; +import type { Maybe } from '../../jsutils/Maybe'; /** * This function does a full cycle of going from a string with the contents of @@ -50,7 +51,7 @@ function cycleSDL(sdl: string): string { return printSchema(buildSchema(sdl)); } -function expectASTNode(obj: ?{ readonly astNode: ?ASTNode, ... }) { +function expectASTNode(obj: Maybe<{ readonly astNode: Maybe, ... }>) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index bfdad85cf5..68bc7ee526 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -34,6 +34,7 @@ import { concatAST } from '../concatAST'; import { printSchema } from '../printSchema'; import { extendSchema } from '../extendSchema'; import { buildSchema } from '../buildASTSchema'; +import type { Maybe } from '../../jsutils/Maybe'; function expectExtensionASTNodes(obj: { readonly extensionASTNodes: ReadonlyArray, @@ -42,7 +43,7 @@ function expectExtensionASTNodes(obj: { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } -function expectASTNode(obj: ?{ readonly astNode: ?ASTNode, ... }) { +function expectASTNode(obj: Maybe<{ readonly astNode: Maybe, ... }>) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); diff --git a/src/utilities/__tests__/stripIgnoredCharacters-test.ts b/src/utilities/__tests__/stripIgnoredCharacters-test.ts index 594b3ffea0..2e8204be12 100644 --- a/src/utilities/__tests__/stripIgnoredCharacters-test.ts +++ b/src/utilities/__tests__/stripIgnoredCharacters-test.ts @@ -13,6 +13,7 @@ import { parse } from '../../language/parser'; import { Source } from '../../language/source'; import { stripIgnoredCharacters } from '../stripIgnoredCharacters'; +import type { Maybe } from '../../jsutils/Maybe'; const ignoredTokens = [ // UnicodeBOM :: @@ -58,7 +59,7 @@ const nonPunctuatorTokens = [ '"""block\nstring\nvalue"""', // StringValue(BlockString) ]; -function lexValue(str: string): ?string { +function lexValue(str: string): Maybe { const lexer = new Lexer(new Source(str)); const value = lexer.advance().value; diff --git a/src/utilities/__tests__/valueFromASTUntyped-test.ts b/src/utilities/__tests__/valueFromASTUntyped-test.ts index fb1babcdc1..68af85aa05 100644 --- a/src/utilities/__tests__/valueFromASTUntyped-test.ts +++ b/src/utilities/__tests__/valueFromASTUntyped-test.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; +import type { Maybe } from '../../jsutils/Maybe'; import type { ObjMap } from '../../jsutils/ObjMap'; @@ -8,7 +9,10 @@ import { parseValue } from '../../language/parser'; import { valueFromASTUntyped } from '../valueFromASTUntyped'; describe('valueFromASTUntyped', () => { - function expectValueFrom(valueText: string, variables?: ?ObjMap) { + function expectValueFrom( + valueText: string, + variables?: Maybe>, + ) { const ast = parseValue(valueText); const value = valueFromASTUntyped(ast, variables); return expect(value); diff --git a/src/utilities/astFromValue.ts b/src/utilities/astFromValue.ts index 9d57e37f25..c7f9d70842 100644 --- a/src/utilities/astFromValue.ts +++ b/src/utilities/astFromValue.ts @@ -15,6 +15,7 @@ import { isListType, isNonNullType, } from '../type/definition'; +import type { Maybe } from '../jsutils/Maybe'; /** * Produces a GraphQL Value AST given a JavaScript object. @@ -37,7 +38,7 @@ import { * | null | NullValue | * */ -export function astFromValue(value: unknown, type: GraphQLInputType): ?ValueNode { +export function astFromValue(value: unknown, type: GraphQLInputType): Maybe { if (isNonNullType(type)) { const astValue = astFromValue(value, type.ofType); if (astValue?.kind === Kind.NULL) { diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 35a87e3797..c94dd10382 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -3,6 +3,7 @@ import { inspect } from '../jsutils/inspect'; import { mapValue } from '../jsutils/mapValue'; import { invariant } from '../jsutils/invariant'; import { devAssert } from '../jsutils/devAssert'; +import type { Maybe } from '../jsutils/Maybe'; import type { DirectiveLocationEnum } from '../language/directiveLocation'; import type { @@ -144,7 +145,7 @@ export function extendSchemaImpl( // have the same name. For example, a type named "skip". const directiveDefs: Array = []; - let schemaDef: ?SchemaDefinitionNode; + let schemaDef: Maybe; // Schema extensions are collected which may add additional operation types. const schemaExtensions: Array = []; @@ -395,9 +396,9 @@ export function extendSchemaImpl( function getOperationTypes( nodes: ReadonlyArray, ): { - query: ?GraphQLObjectType, - mutation: ?GraphQLObjectType, - subscription: ?GraphQLObjectType, + query: Maybe, + mutation: Maybe, + subscription: Maybe, } { const opTypes = {}; for (const node of nodes) { @@ -481,7 +482,7 @@ export function extendSchemaImpl( } function buildArgumentMap( - args: ?ReadonlyArray, + args: Maybe>, ): GraphQLFieldConfigArgumentMap { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const argsNodes = args ?? []; @@ -696,7 +697,7 @@ function getDeprecationReason( | EnumValueDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode, -): ?string { +): Maybe { const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); return (deprecated?.reason: any); } @@ -706,7 +707,7 @@ function getDeprecationReason( */ function getSpecifiedByUrl( node: ScalarTypeDefinitionNode | ScalarTypeExtensionNode, -): ?string { +): Maybe { const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); return (specifiedBy?.url: any); } diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index ffcf4172f9..764c2087e0 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -1,3 +1,4 @@ +import type { Maybe } from '../jsutils/Maybe'; import type { DirectiveLocationEnum } from '../language/directiveLocation'; export type IntrospectionOptions = { @@ -152,10 +153,10 @@ export type IntrospectionQuery = { }; export type IntrospectionSchema = { - readonly description?: ?string, + readonly description?: Maybe, readonly queryType: IntrospectionNamedTypeRef, - readonly mutationType: ?IntrospectionNamedTypeRef, - readonly subscriptionType: ?IntrospectionNamedTypeRef, + readonly mutationType: Maybe>, + readonly subscriptionType: Maybe>, readonly types: ReadonlyArray, readonly directives: ReadonlyArray, }; @@ -183,14 +184,14 @@ export type IntrospectionInputType = export type IntrospectionScalarType = { readonly kind: 'SCALAR', readonly name: string, - readonly description?: ?string, - readonly specifiedByUrl?: ?string, + readonly description?: Maybe, + readonly specifiedByUrl?: Maybe, }; export type IntrospectionObjectType = { readonly kind: 'OBJECT', readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly fields: ReadonlyArray, readonly interfaces: ReadonlyArray< IntrospectionNamedTypeRef, @@ -200,7 +201,7 @@ export type IntrospectionObjectType = { export type IntrospectionInterfaceType = { readonly kind: 'INTERFACE', readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly fields: ReadonlyArray, readonly interfaces: ReadonlyArray< IntrospectionNamedTypeRef, @@ -213,7 +214,7 @@ export type IntrospectionInterfaceType = { export type IntrospectionUnionType = { readonly kind: 'UNION', readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef, >, @@ -222,14 +223,14 @@ export type IntrospectionUnionType = { export type IntrospectionEnumType = { readonly kind: 'ENUM', readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly enumValues: ReadonlyArray, }; export type IntrospectionInputObjectType = { readonly kind: 'INPUT_OBJECT', readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly inputFields: ReadonlyArray, }; @@ -279,32 +280,32 @@ export type IntrospectionNamedTypeRef< export type IntrospectionField = { readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly args: ReadonlyArray, readonly type: IntrospectionOutputTypeRef, readonly isDeprecated: boolean, - readonly deprecationReason: ?string, + readonly deprecationReason: Maybe, }; export type IntrospectionInputValue = { readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly type: IntrospectionInputTypeRef, - readonly defaultValue: ?string, + readonly defaultValue: Maybe, readonly isDeprecated?: boolean, - readonly deprecationReason?: ?string, + readonly deprecationReason?: Maybe, }; export type IntrospectionEnumValue = { readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly isDeprecated: boolean, - readonly deprecationReason: ?string, + readonly deprecationReason: Maybe, }; export type IntrospectionDirective = { readonly name: string, - readonly description?: ?string, + readonly description?: Maybe, readonly isRepeatable?: boolean, readonly locations: ReadonlyArray, readonly args: ReadonlyArray, diff --git a/src/utilities/getOperationAST.ts b/src/utilities/getOperationAST.ts index 259d2f05c5..9e6d85dd9f 100644 --- a/src/utilities/getOperationAST.ts +++ b/src/utilities/getOperationAST.ts @@ -1,3 +1,4 @@ +import type { Maybe } from '../jsutils/Maybe'; import type { DocumentNode, OperationDefinitionNode } from '../language/ast'; import { Kind } from '../language/kinds'; @@ -8,8 +9,8 @@ import { Kind } from '../language/kinds'; */ export function getOperationAST( documentAST: DocumentNode, - operationName?: ?string, -): ?OperationDefinitionNode { + operationName?: Maybe, +): Maybe { let operation = null; for (const definition of documentAST.definitions) { if (definition.kind === Kind.OPERATION_DEFINITION) { diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index d9001229bb..8b2057e0fe 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -31,6 +31,7 @@ import { isEnumType, isInputObjectType, } from '../type/definition'; +import type { Maybe } from '../jsutils/Maybe'; /** * Sort GraphQLSchema. @@ -69,7 +70,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { return ((typeMap[type.name]: any): T); } - function replaceMaybeType(maybeType: T): T { + function replaceMaybeType>(maybeType: T): T { return maybeType && replaceNamedType(maybeType); } diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index 218c8f9883..fc7564e6a6 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -1,5 +1,6 @@ import { inspect } from '../jsutils/inspect'; import { invariant } from '../jsutils/invariant'; +import type { Maybe } from '../jsutils/Maybe'; import { print } from '../language/printer'; import { printBlockString } from '../language/blockString'; @@ -67,7 +68,7 @@ function printFilteredSchema( .join('\n\n'); } -function printSchemaDefinition(schema: GraphQLSchema): ?string { +function printSchemaDefinition(schema: GraphQLSchema): Maybe { if (schema.description == null && isSchemaOfCommonNames(schema)) { return; } @@ -278,7 +279,7 @@ function printDirective(directive: GraphQLDirective): string { ); } -function printDeprecated(reason: ?string): string { +function printDeprecated(reason: Maybe): string { if (reason == null) { return ''; } @@ -303,7 +304,7 @@ function printSpecifiedByUrl(scalar: GraphQLScalarType): string { } function printDescription( - def: { readonly description: ?string, ... }, + def: { readonly description: Maybe, ... }, indentation: string = '', firstInBlock: boolean = true, ): string { diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index 915f82b2c8..d1b5164840 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -13,6 +13,7 @@ import { isListType, isNonNullType, } from '../type/definition'; +import type { Maybe } from '../jsutils/Maybe'; /** * Produces a JavaScript value given a GraphQL Value AST. @@ -35,9 +36,9 @@ import { * */ export function valueFromAST( - valueNode: ?ValueNode, + valueNode: Maybe, type: GraphQLInputType, - variables?: ?ObjMap, + variables?: Maybe>, ): unknown | void { if (!valueNode) { // When there is no node, then there is also no value. @@ -152,7 +153,7 @@ export function valueFromAST( // in the set of variables. function isMissingVariable( valueNode: ValueNode, - variables: ?ObjMap, + variables: Maybe>, ): boolean { return ( valueNode.kind === Kind.VARIABLE && diff --git a/src/utilities/valueFromASTUntyped.ts b/src/utilities/valueFromASTUntyped.ts index 37c02d6f91..579702f875 100644 --- a/src/utilities/valueFromASTUntyped.ts +++ b/src/utilities/valueFromASTUntyped.ts @@ -5,6 +5,7 @@ import { keyValMap } from '../jsutils/keyValMap'; import { Kind } from '../language/kinds'; import type { ValueNode } from '../language/ast'; +import type { Maybe } from '../jsutils/Maybe'; /** * Produces a JavaScript value given a GraphQL Value AST. @@ -24,7 +25,7 @@ import type { ValueNode } from '../language/ast'; */ export function valueFromASTUntyped( valueNode: ValueNode, - variables?: ?ObjMap, + variables?: Maybe>, ): unknown { switch (valueNode.kind) { case Kind.NULL: diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index ca8fbe7b79..4ef0b9702f 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -27,12 +27,13 @@ import type { } from '../type/definition'; import { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo'; +import type { Maybe } from '../jsutils/Maybe'; type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; type VariableUsage = { readonly node: VariableNode; - readonly type: ?GraphQLInputType; - readonly defaultValue: ?unknown; + readonly type: Maybe; + readonly defaultValue: Maybe; }; /** @@ -43,7 +44,7 @@ type VariableUsage = { export class ASTValidationContext { _ast: DocumentNode; _onError: (err: GraphQLError) => void; - _fragments: ?ObjMap; + _fragments: Maybe>; _fragmentSpreads: Map>; _recursivelyReferencedFragments: Map< OperationDefinitionNode, @@ -66,7 +67,7 @@ export class ASTValidationContext { return this._ast; } - getFragment(name: string): ?FragmentDefinitionNode { + getFragment(name: string): Maybe { if (!this._fragments) { const fragments = (this._fragments = Object.create(null)); for (const defNode of this.getDocument().definitions) { @@ -131,18 +132,18 @@ export class ASTValidationContext { export type ASTValidationRule = (ASTValidationContext) => ASTVisitor; export class SDLValidationContext extends ASTValidationContext { - _schema: ?GraphQLSchema; + _schema: Maybe; constructor( ast: DocumentNode, - schema: ?GraphQLSchema, + schema: Maybe, onError: (err: GraphQLError) => void, ) { super(ast, onError); this._schema = schema; } - getSchema(): ?GraphQLSchema { + getSchema(): Maybe { return this._schema; } } @@ -213,35 +214,35 @@ export class ValidationContext extends ASTValidationContext { return usages; } - getType(): ?GraphQLOutputType { + getType(): Maybe { return this._typeInfo.getType(); } - getParentType(): ?GraphQLCompositeType { + getParentType(): Maybe { return this._typeInfo.getParentType(); } - getInputType(): ?GraphQLInputType { + getInputType(): Maybe { return this._typeInfo.getInputType(); } - getParentInputType(): ?GraphQLInputType { + getParentInputType(): Maybe { return this._typeInfo.getParentInputType(); } - getFieldDef(): ?GraphQLField { + getFieldDef(): Maybe> { return this._typeInfo.getFieldDef(); } - getDirective(): ?GraphQLDirective { + getDirective(): Maybe { return this._typeInfo.getDirective(); } - getArgument(): ?GraphQLArgument { + getArgument(): Maybe { return this._typeInfo.getArgument(); } - getEnumValue(): ?GraphQLEnumValue { + getEnumValue(): Maybe { return this._typeInfo.getEnumValue(); } } diff --git a/src/validation/__tests__/harness.ts b/src/validation/__tests__/harness.ts index 6599f308de..102f5049d9 100644 --- a/src/validation/__tests__/harness.ts +++ b/src/validation/__tests__/harness.ts @@ -1,5 +1,7 @@ import { expect } from 'chai'; +import type { Maybe } from '../../jsutils/Maybe'; + import { parse } from '../../language/parser'; import { GraphQLSchema } from '../../type/schema'; @@ -160,7 +162,7 @@ export function expectValidationErrors( } export function expectSDLValidationErrors( - schema: ?GraphQLSchema, + schema: Maybe, rule: SDLValidationRule, sdlStr: string, ): any { diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts index a70fbb39ec..e790d94619 100644 --- a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts +++ b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts @@ -32,6 +32,7 @@ import { import { typeFromAST } from '../../utilities/typeFromAST'; import type { ValidationContext } from '../ValidationContext'; +import type { Maybe } from '../../jsutils/Maybe'; function reasonMessage(reason: ConflictReasonMessage): string { if (Array.isArray(reason)) { @@ -97,7 +98,7 @@ type ConflictReasonMessage = string | Array; type NodeAndDef = [ GraphQLCompositeType, FieldNode, - ?GraphQLField, + Maybe>, ]; // Map of array of those. type NodeAndDefCollection = ObjMap>; @@ -164,7 +165,7 @@ function findConflictsWithinSelectionSet( context: ValidationContext, cachedFieldsAndFragmentNames, comparedFragmentPairs: PairSet, - parentType: ?GraphQLNamedType, + parentType: Maybe, selectionSet: SelectionSetNode, ): Array { const conflicts = []; @@ -367,9 +368,9 @@ function findConflictsBetweenSubSelectionSets( cachedFieldsAndFragmentNames, comparedFragmentPairs: PairSet, areMutuallyExclusive: boolean, - parentType1: ?GraphQLNamedType, + parentType1: Maybe, selectionSet1: SelectionSetNode, - parentType2: ?GraphQLNamedType, + parentType2: Maybe, selectionSet2: SelectionSetNode, ): Array { const conflicts = []; @@ -538,7 +539,7 @@ function findConflict( responseName: string, field1: NodeAndDef, field2: NodeAndDef, -): ?Conflict { +): Maybe { const [parentType1, node1, def1] = field1; const [parentType2, node2, def2] = field2; @@ -676,7 +677,7 @@ function doTypesConflict( function getFieldsAndFragmentNames( context: ValidationContext, cachedFieldsAndFragmentNames, - parentType: ?GraphQLNamedType, + parentType: Maybe, selectionSet: SelectionSetNode, ): [NodeAndDefCollection, Array] { let cached = cachedFieldsAndFragmentNames.get(selectionSet); @@ -720,7 +721,7 @@ function getReferencedFieldsAndFragmentNames( function _collectFieldsAndFragmentNames( context: ValidationContext, - parentType: ?GraphQLNamedType, + parentType: Maybe, selectionSet: SelectionSetNode, nodeAndDefs, fragmentNames, @@ -770,7 +771,7 @@ function subfieldConflicts( responseName: string, node1: FieldNode, node2: FieldNode, -): ?Conflict { +): Maybe { if (conflicts.length > 0) { return [ [responseName, conflicts.map(([reason]) => reason)], diff --git a/src/validation/rules/PossibleFragmentSpreadsRule.ts b/src/validation/rules/PossibleFragmentSpreadsRule.ts index caf8575f22..2a870b1a69 100644 --- a/src/validation/rules/PossibleFragmentSpreadsRule.ts +++ b/src/validation/rules/PossibleFragmentSpreadsRule.ts @@ -11,6 +11,7 @@ import { typeFromAST } from '../../utilities/typeFromAST'; import { doTypesOverlap } from '../../utilities/typeComparators'; import type { ValidationContext } from '../ValidationContext'; +import type { Maybe } from '../../jsutils/Maybe'; /** * Possible fragment spread @@ -66,7 +67,7 @@ export function PossibleFragmentSpreadsRule( function getFragmentType( context: ValidationContext, name: string, -): ?GraphQLCompositeType { +): Maybe { const frag = context.getFragment(name); if (frag) { const type = typeFromAST(context.getSchema(), frag.typeCondition); diff --git a/src/validation/rules/VariablesInAllowedPositionRule.ts b/src/validation/rules/VariablesInAllowedPositionRule.ts index 7f6905a526..afdba3645e 100644 --- a/src/validation/rules/VariablesInAllowedPositionRule.ts +++ b/src/validation/rules/VariablesInAllowedPositionRule.ts @@ -14,6 +14,7 @@ import { typeFromAST } from '../../utilities/typeFromAST'; import { isTypeSubTypeOf } from '../../utilities/typeComparators'; import type { ValidationContext } from '../ValidationContext'; +import type { Maybe } from '../../jsutils/Maybe'; /** * Variables passed to field arguments conform to type @@ -79,9 +80,9 @@ export function VariablesInAllowedPositionRule( function allowedVariableUsage( schema: GraphQLSchema, varType: GraphQLType, - varDefaultValue: ?ValueNode, + varDefaultValue: Maybe, locationType: GraphQLType, - locationDefaultValue: ?unknown, + locationDefaultValue: Maybe, ): boolean { if (isNonNullType(locationType) && !isNonNullType(varType)) { const hasNonNullVariableDefaultValue = diff --git a/src/validation/validate.ts b/src/validation/validate.ts index 4ff1464768..1e2f44b6a2 100644 --- a/src/validation/validate.ts +++ b/src/validation/validate.ts @@ -1,4 +1,5 @@ import { devAssert } from '../jsutils/devAssert'; +import type { Maybe } from '../jsutils/Maybe'; import { GraphQLError } from '../error/GraphQLError'; @@ -82,7 +83,7 @@ export function validate( */ export function validateSDL( documentAST: DocumentNode, - schemaToExtend?: ?GraphQLSchema, + schemaToExtend?: Maybe, rules: ReadonlyArray = specifiedSDLRules, ): ReadonlyArray { const errors = []; From 65c225792f7f127689e84ece1dc25e9c8eed6102 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 16:13:04 -0500 Subject: [PATCH 07/65] remove `...` (flow) --- src/__tests__/starWarsData.ts | 1 - src/error/GraphQLError.ts | 6 +++--- src/error/formatError.ts | 2 +- src/execution/__tests__/variables-test.ts | 2 +- src/execution/execute.ts | 8 ++++---- src/execution/values.ts | 12 ++++++------ src/graphql.ts | 2 +- src/jsutils/ObjMap.ts | 8 ++++---- src/jsutils/instanceOf.ts | 1 - src/subscription/subscribe.ts | 4 ++-- src/type/__tests__/enumType-test.ts | 2 +- src/type/definition.ts | 8 ++++---- src/type/validate.ts | 4 ++-- src/utilities/__tests__/buildASTSchema-test.ts | 3 +-- src/utilities/__tests__/extendSchema-test.ts | 3 +-- src/utilities/findBreakingChanges.ts | 2 +- src/utilities/lexicographicSortSchema.ts | 2 +- src/utilities/printSchema.ts | 2 +- .../rules/UniqueFieldDefinitionNamesRule.ts | 1 - 19 files changed, 34 insertions(+), 39 deletions(-) diff --git a/src/__tests__/starWarsData.ts b/src/__tests__/starWarsData.ts index 45fed55edd..8c277583cf 100644 --- a/src/__tests__/starWarsData.ts +++ b/src/__tests__/starWarsData.ts @@ -7,7 +7,6 @@ export type Character = { name: string, friends: Array, appearsIn: Array, - ... }; export type Human = { diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 9878181c0c..dbf00ba236 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -73,7 +73,7 @@ export class GraphQLError extends Error { /** * Extension fields to add to the formatted error. */ - readonly extensions: { [key: string]: unknown, ... } | void; + readonly extensions: { [key: string]: unknown } | void; constructor( message: string, @@ -81,8 +81,8 @@ export class GraphQLError extends Error { source?: Maybe, positions?: Maybe>, path?: Maybe>, - originalError?: Maybe<(Error & { readonly extensions?: unknown, ... })>, - extensions?: Maybe<{ [key: string]: unknown, ... }>, + originalError?: Maybe<(Error & { readonly extensions?: unknown })>, + extensions?: Maybe<{ [key: string]: unknown }>, ) { super(message); diff --git a/src/error/formatError.ts b/src/error/formatError.ts index a48d725d26..25f0b11a28 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -46,5 +46,5 @@ export type GraphQLFormattedError = { * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - readonly extensions?: { [key: string]: unknown, ... }, + readonly extensions?: { [key: string]: unknown }, }; diff --git a/src/execution/__tests__/variables-test.ts b/src/execution/__tests__/variables-test.ts index 25e1d4aa37..ad71465568 100644 --- a/src/execution/__tests__/variables-test.ts +++ b/src/execution/__tests__/variables-test.ts @@ -119,7 +119,7 @@ const schema = new GraphQLSchema({ query: TestType }); function executeQuery( query: string, - variableValues?: { [variable: string]: unknown, ... }, + variableValues?: { [variable: string]: unknown }, ) { const document = parse(query); return executeSync({ schema, document, variableValues }); diff --git a/src/execution/execute.ts b/src/execution/execute.ts index aed56cf1e6..459101e044 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -99,7 +99,7 @@ export type ExecutionContext = { rootValue: unknown, contextValue: unknown, operation: OperationDefinitionNode, - variableValues: { [variable: string]: unknown, ... }, + variableValues: { [variable: string]: unknown }, fieldResolver: GraphQLFieldResolver, typeResolver: GraphQLTypeResolver, errors: Array, @@ -129,7 +129,7 @@ export type ExecutionArgs = { document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + variableValues?: Maybe<{ readonly [variable: string]: unknown }>, operationName?: Maybe, fieldResolver?: Maybe>, typeResolver?: Maybe>, @@ -230,7 +230,7 @@ function buildResponse( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: Maybe<{ readonly [variable: string]: unknown, ... }>, + rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, ): void { devAssert(document, 'Must provide document.'); @@ -257,7 +257,7 @@ export function buildExecutionContext( document: DocumentNode, rootValue: unknown, contextValue: unknown, - rawVariableValues: Maybe<{ readonly [variable: string]: unknown, ... }>, + rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, operationName: Maybe, fieldResolver: Maybe>, typeResolver?: Maybe>, diff --git a/src/execution/values.ts b/src/execution/values.ts index 7dfd0f3511..7051d8c547 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -25,7 +25,7 @@ import type { Maybe } from '../jsutils/Maybe'; type CoercedVariableValues = | { errors: ReadonlyArray } - | { coerced: { [variable: string]: unknown, ... } }; + | { coerced: { [variable: string]: unknown } }; /** * Prepares an object map of variableValues of the correct type based on the @@ -74,9 +74,9 @@ export function getVariableValues( function coerceVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { readonly [variable: string]: unknown, ... }, + inputs: { readonly [variable: string]: unknown }, onError: (GraphQLError) => void, -): { [variable: string]: unknown, ... } { +): { [variable: string]: unknown } { const coercedValues = {}; for (const varDefNode of varDefNodes) { const varName = varDefNode.variable.name.value; @@ -161,7 +161,7 @@ export function getArgumentValues( def: GraphQLField | GraphQLDirective, node: FieldNode | DirectiveNode, variableValues?: Maybe>, -): { [argument: string]: unknown, ... } { +): { [argument: string]: unknown } { const coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') @@ -245,9 +245,9 @@ export function getArgumentValues( */ export function getDirectiveValues( directiveDef: GraphQLDirective, - node: { readonly directives?: ReadonlyArray, ... }, + node: { readonly directives?: ReadonlyArray }, variableValues?: Maybe>, -): void | { [argument: string]: unknown, ... } { +): void | { [argument: string]: unknown } { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const directiveNode = node.directives?.find( (directive) => directive.name.value === directiveDef.name, diff --git a/src/graphql.ts b/src/graphql.ts index e98a35d748..7aa3fa8017 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -61,7 +61,7 @@ export type GraphQLArgs = { source: string | Source, rootValue?: unknown, contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + variableValues?: Maybe<{ readonly [variable: string]: unknown }>, operationName?: Maybe, fieldResolver?: Maybe>, typeResolver?: Maybe>, diff --git a/src/jsutils/ObjMap.ts b/src/jsutils/ObjMap.ts index d3c1ef89e4..dd943c0844 100644 --- a/src/jsutils/ObjMap.ts +++ b/src/jsutils/ObjMap.ts @@ -1,7 +1,7 @@ -export type ObjMap = { [key: string]: T, __proto__: null, ... }; -export type ObjMapLike = ObjMap | { [key: string]: T, ... }; +export type ObjMap = { [key: string]: T, __proto__: null }; +export type ObjMapLike = ObjMap | { [key: string]: T }; -export type ReadOnlyObjMap = { readonly [key: string]: T, __proto__: null, ... }; +export type ReadOnlyObjMap = { readonly [key: string]: T, __proto__: null }; export type ReadOnlyObjMapLike = | ReadOnlyObjMap - | { readonly [key: string]: T, ... }; + | { readonly [key: string]: T }; diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index c07565f24f..8704945a17 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -39,5 +39,4 @@ spurious results.`, type Constructor = { name: string, - ... }; diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index acc8af45c4..d173055177 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -31,7 +31,7 @@ export type SubscriptionArgs = { document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + variableValues?: Maybe<{ readonly [variable: string]: unknown }>, operationName?: Maybe, fieldResolver?: Maybe>, subscribeFieldResolver?: Maybe>, @@ -141,7 +141,7 @@ export async function createSourceEventStream( document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown, ... }>, + variableValues?: Maybe<{ readonly [variable: string]: unknown }>, operationName?: Maybe, fieldResolver?: Maybe>, ): Promise | ExecutionResult> { diff --git a/src/type/__tests__/enumType-test.ts b/src/type/__tests__/enumType-test.ts index d4a5cc2753..1dd3451e82 100644 --- a/src/type/__tests__/enumType-test.ts +++ b/src/type/__tests__/enumType-test.ts @@ -114,7 +114,7 @@ const schema = new GraphQLSchema({ function executeQuery( source: string, - variableValues?: { readonly [variable: string]: unknown, ... }, + variableValues?: { readonly [variable: string]: unknown }, ) { return graphqlSync({ schema, source, variableValues }); } diff --git a/src/type/definition.ts b/src/type/definition.ts index d2fac61997..f9b6975a36 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -911,7 +911,7 @@ export type GraphQLIsTypeOfFn = ( export type GraphQLFieldResolver< TSource, TContext, - TArgs = { [argument: string]: any, ... }, + TArgs = { [argument: string]: any }, > = ( source: TSource, args: TArgs, @@ -929,13 +929,13 @@ export type GraphQLResolveInfo = { readonly fragments: ObjMap, readonly rootValue: unknown, readonly operation: OperationDefinitionNode, - readonly variableValues: { [variable: string]: unknown, ... }, + readonly variableValues: { [variable: string]: unknown }, }; export type GraphQLFieldConfig< TSource, TContext, - TArgs = { [argument: string]: any, ... }, + TArgs = { [argument: string]: any }, > = { description?: Maybe, type: GraphQLOutputType, @@ -965,7 +965,7 @@ export type GraphQLFieldConfigMap = ObjMap< export type GraphQLField< TSource, TContext, - TArgs = { [argument: string]: any, ... }, + TArgs = { [argument: string]: any }, > = { name: string, description: Maybe, diff --git a/src/type/validate.ts b/src/type/validate.ts index c89551af90..e51173af5d 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -197,7 +197,7 @@ function validateDirectives(context: SchemaValidationContext): void { function validateName( context: SchemaValidationContext, - node: { readonly name: string; readonly astNode: Maybe, ... }, + node: { readonly name: string; readonly astNode: Maybe }, ): void { // Ensure names are valid, however introspection types opt out. const error = isValidNameError(node.name); @@ -637,7 +637,7 @@ function getUnionMemberTypeNodes( } function getDeprecatedDirectiveNode( - definitionNode: Maybe<{ readonly directives?: ReadonlyArray, ... }>, + definitionNode: Maybe<{ readonly directives?: ReadonlyArray }>, ): Maybe { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') return definitionNode?.directives?.find( diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index 1e332e7d3d..adcdce17de 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -51,7 +51,7 @@ function cycleSDL(sdl: string): string { return printSchema(buildSchema(sdl)); } -function expectASTNode(obj: Maybe<{ readonly astNode: Maybe, ... }>) { +function expectASTNode(obj: Maybe<{ readonly astNode: Maybe }>) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); @@ -59,7 +59,6 @@ function expectASTNode(obj: Maybe<{ readonly astNode: Maybe, ... }>) { function expectExtensionASTNodes(obj: { readonly extensionASTNodes: ReadonlyArray, - ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index 68bc7ee526..7e30c1d9c3 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -38,12 +38,11 @@ import type { Maybe } from '../../jsutils/Maybe'; function expectExtensionASTNodes(obj: { readonly extensionASTNodes: ReadonlyArray, - ... }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } -function expectASTNode(obj: Maybe<{ readonly astNode: Maybe, ... }>) { +function expectASTNode(obj: Maybe<{ readonly astNode: Maybe }>) { // istanbul ignore next (FIXME) invariant(obj?.astNode != null); return expect(print(obj.astNode)); diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 1ffdd26e39..9890a38a75 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -553,7 +553,7 @@ function stringifyValue(value: unknown, type: GraphQLInputType): string { return print(sortedAST); } -function diff( +function diff( oldArray: ReadonlyArray, newArray: ReadonlyArray, ): { diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 8b2057e0fe..7e886c7123 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -166,7 +166,7 @@ function sortObjMap(map: ObjMap, sortValueFn: (T) => R): ObjMap { return sortedMap; } -function sortByName( +function sortByName( array: ReadonlyArray, ): Array { return sortBy(array, (obj) => obj.name); diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index fc7564e6a6..b840541be8 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -304,7 +304,7 @@ function printSpecifiedByUrl(scalar: GraphQLScalarType): string { } function printDescription( - def: { readonly description: Maybe, ... }, + def: { readonly description: Maybe }, indentation: string = '', firstInBlock: boolean = true, ): string { diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts index c45fb781f2..d50e197171 100644 --- a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts +++ b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts @@ -40,7 +40,6 @@ export function UniqueFieldDefinitionNamesRule( function checkFieldUniqueness(node: { readonly name: NameNode, readonly fields?: ReadonlyArray, - ... }) { const typeName = node.name.value; From ea8237f6209f4fe697d571f949f9b437329597d6 Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:23:09 -0500 Subject: [PATCH 08/65] convert `:` (flow) with `extends` (TS) --- src/language/visitor.ts | 4 +-- src/subscription/__tests__/subscribe-test.ts | 2 +- src/type/__tests__/validation-test.ts | 2 +- src/type/definition.ts | 6 ++-- src/utilities/extendSchema.ts | 4 +-- src/utilities/findBreakingChanges.ts | 2 +- src/utilities/getIntrospectionQuery.ts | 36 ++++++++------------ src/utilities/lexicographicSortSchema.ts | 10 +++--- 8 files changed, 29 insertions(+), 37 deletions(-) diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 9d00cb1df5..b509abbf58 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -15,7 +15,7 @@ type KindVisitor = $ObjMap< (Node) => ASTVisitFn | EnterLeaveVisitor, >; -type EnterLeaveVisitor = { +type EnterLeaveVisitor = { readonly enter?: ASTVisitFn, readonly leave?: ASTVisitFn, }; @@ -24,7 +24,7 @@ type EnterLeaveVisitor = { * A visitor is comprised of visit functions, which are called on each node * during the visitor's traversal. */ -export type ASTVisitFn = ( +export type ASTVisitFn = ( // The current node being visiting. node: TVisitedNode, // The index or key to this node from the parent node or Array. diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 39d141cc19..3d7370f428 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -66,7 +66,7 @@ const EmailEventType = new GraphQLObjectType({ const emailSchema = emailSchemaWithResolvers(); -function emailSchemaWithResolvers( +function emailSchemaWithResolvers( subscribeFn?: (T) => unknown, resolveFn?: (T) => unknown, ) { diff --git a/src/type/__tests__/validation-test.ts b/src/type/__tests__/validation-test.ts index 4fe503bd3e..83710027c0 100644 --- a/src/type/__tests__/validation-test.ts +++ b/src/type/__tests__/validation-test.ts @@ -68,7 +68,7 @@ const SomeInputObjectType = assertInputObjectType( const SomeDirective = assertDirective(SomeSchema.getDirective('SomeDirective')); -function withModifiers( +function withModifiers( type: T, ): Array | GraphQLNonNull>> { return [ diff --git a/src/type/definition.ts b/src/type/definition.ts index f9b6975a36..fa3caa7979 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -342,7 +342,7 @@ export function assertAbstractType(type: unknown): GraphQLAbstractType { * }) * */ -export class GraphQLList<+T: GraphQLType> { +export class GraphQLList { readonly ofType: T; constructor(ofType: T) { @@ -388,7 +388,7 @@ export class GraphQLList<+T: GraphQLType> { * * Note: the enforcement of non-nullability occurs within the executor. */ -export class GraphQLNonNull<+T: GraphQLNullableType> { +export class GraphQLNonNull { readonly ofType: T; constructor(ofType: T) { @@ -456,7 +456,7 @@ export function assertNullableType(type: unknown): GraphQLNullableType { /* eslint-disable no-redeclare */ declare function getNullableType(type: void | null): void; -declare function getNullableType(type: T): T; +declare function getNullableType(type: T): T; declare function getNullableType(type: GraphQLNonNull): T; export function getNullableType(type) { /* eslint-enable no-redeclare */ diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index c94dd10382..9466903c1f 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -218,7 +218,7 @@ export function extendSchemaImpl( // Below are functions used for producing this schema that have closed over // this scope and have access to the schema, cache, and newly defined types. - function replaceType(type: T): T { + function replaceType(type: T): T { if (isListType(type)) { // $FlowFixMe[incompatible-return] return new GraphQLList(replaceType(type.ofType)); @@ -230,7 +230,7 @@ export function extendSchemaImpl( return replaceNamedType(type); } - function replaceNamedType(type: T): T { + function replaceNamedType(type: T): T { // Note: While this could make early assertions to get the correctly // typed values, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 9890a38a75..540277224e 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -553,7 +553,7 @@ function stringifyValue(value: unknown, type: GraphQLInputType): string { return print(sortedAST); } -function diff( +function diff( oldArray: ReadonlyArray, newArray: ReadonlyArray, ): { diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 764c2087e0..b9738dcd1a 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -193,9 +193,7 @@ export type IntrospectionObjectType = { readonly name: string, readonly description?: Maybe, readonly fields: ReadonlyArray, - readonly interfaces: ReadonlyArray< - IntrospectionNamedTypeRef, - >, + readonly interfaces: ReadonlyArray>, }; export type IntrospectionInterfaceType = { @@ -203,21 +201,15 @@ export type IntrospectionInterfaceType = { readonly name: string, readonly description?: Maybe, readonly fields: ReadonlyArray, - readonly interfaces: ReadonlyArray< - IntrospectionNamedTypeRef, - >, - readonly possibleTypes: ReadonlyArray< - IntrospectionNamedTypeRef, - >, + readonly interfaces: ReadonlyArray>, + readonly possibleTypes: ReadonlyArray>, }; export type IntrospectionUnionType = { readonly kind: 'UNION', readonly name: string, readonly description?: Maybe, - readonly possibleTypes: ReadonlyArray< - IntrospectionNamedTypeRef, - >, + readonly possibleTypes: ReadonlyArray>, }; export type IntrospectionEnumType = { @@ -235,17 +227,17 @@ export type IntrospectionInputObjectType = { }; export type IntrospectionListTypeRef< - T: IntrospectionTypeRef = IntrospectionTypeRef, + T extends IntrospectionTypeRef = IntrospectionTypeRef > = { - readonly kind: 'LIST', - readonly ofType: T, + readonly kind: 'LIST'; + readonly ofType: T; }; export type IntrospectionNonNullTypeRef< - T: IntrospectionTypeRef = IntrospectionTypeRef, + T extends IntrospectionTypeRef = IntrospectionTypeRef > = { - readonly kind: 'NON_NULL', - readonly ofType: T, + readonly kind: 'NON_NULL'; + readonly ofType: T; }; export type IntrospectionTypeRef = @@ -260,7 +252,7 @@ export type IntrospectionOutputTypeRef = | IntrospectionListTypeRef | IntrospectionNonNullTypeRef< | IntrospectionNamedTypeRef - | IntrospectionListTypeRef, + | IntrospectionListTypeRef >; export type IntrospectionInputTypeRef = @@ -272,10 +264,10 @@ export type IntrospectionInputTypeRef = >; export type IntrospectionNamedTypeRef< - T: IntrospectionType = IntrospectionType, + T extends IntrospectionType = IntrospectionType > = { - readonly kind: $PropertyType, - readonly name: string, + readonly kind: $PropertyType; + readonly name: string; }; export type IntrospectionField = { diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 7e886c7123..e09d8960a9 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -55,7 +55,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { subscription: replaceMaybeType(schemaConfig.subscription), }); - function replaceType(type: T): T { + function replaceType(type: T): T { if (isListType(type)) { // $FlowFixMe[incompatible-return] return new GraphQLList(replaceType(type.ofType)); @@ -66,11 +66,11 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { return replaceNamedType(type); } - function replaceNamedType(type: T): T { + function replaceNamedType(type: T): T { return ((typeMap[type.name]: any): T); } - function replaceMaybeType>(maybeType: T): T { + function replaceMaybeType>(maybeType: T): T { return maybeType && replaceNamedType(maybeType); } @@ -105,7 +105,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { })); } - function sortTypes(arr: ReadonlyArray): Array { + function sortTypes(arr: ReadonlyArray): Array { return sortByName(arr).map(replaceNamedType); } @@ -166,7 +166,7 @@ function sortObjMap(map: ObjMap, sortValueFn: (T) => R): ObjMap { return sortedMap; } -function sortByName( +function sortByName( array: ReadonlyArray, ): Array { return sortBy(array, (obj) => obj.name); From 0ae46e08c2a604dabe8325534031a779f114b698 Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:27:54 -0500 Subject: [PATCH 09/65] strip `%checks` annotations (flow) --- src/jsutils/isAsyncIterable.ts | 2 +- src/jsutils/isIteratableObject.ts | 2 +- src/jsutils/isObjectLike.ts | 2 +- src/jsutils/isPromise.ts | 6 +-- src/language/ast.ts | 2 +- src/language/lexer.ts | 4 +- src/language/predicates.ts | 39 ++++++++++---- src/language/source.ts | 5 +- src/type/definition.ts | 88 +++++++++++-------------------- src/type/directives.ts | 6 +-- src/type/schema.ts | 5 +- 11 files changed, 71 insertions(+), 90 deletions(-) diff --git a/src/jsutils/isAsyncIterable.ts b/src/jsutils/isAsyncIterable.ts index ea63afaf07..1db528bb14 100644 --- a/src/jsutils/isAsyncIterable.ts +++ b/src/jsutils/isAsyncIterable.ts @@ -5,7 +5,7 @@ declare function isAsyncIterable( value: unknown, // $FlowFixMe[invalid-in-rhs] -): boolean %checks(value instanceof AsyncIterable); +): value is AsyncIterable; // eslint-disable-next-line no-redeclare export function isAsyncIterable(maybeAsyncIterable) { diff --git a/src/jsutils/isIteratableObject.ts b/src/jsutils/isIteratableObject.ts index 3af1235a52..cf4158df32 100644 --- a/src/jsutils/isIteratableObject.ts +++ b/src/jsutils/isIteratableObject.ts @@ -17,7 +17,7 @@ declare function isIteratableObject( value: unknown, // $FlowFixMe[invalid-in-rhs] -): boolean %checks(value instanceof Iterable); +): value is Iterable; // eslint-disable-next-line no-redeclare export function isIteratableObject(maybeIteratable: unknown): boolean { diff --git a/src/jsutils/isObjectLike.ts b/src/jsutils/isObjectLike.ts index 5960e6d9eb..d217187562 100644 --- a/src/jsutils/isObjectLike.ts +++ b/src/jsutils/isObjectLike.ts @@ -2,6 +2,6 @@ * Return true if `value` is object-like. A value is object-like if it's not * `null` and has a `typeof` result of "object". */ -export function isObjectLike(value: unknown): boolean %checks { +export function isObjectLike(value: unknown): value is object { return typeof value == 'object' && value !== null; } diff --git a/src/jsutils/isPromise.ts b/src/jsutils/isPromise.ts index cf747607ed..94e93e24ec 100644 --- a/src/jsutils/isPromise.ts +++ b/src/jsutils/isPromise.ts @@ -2,10 +2,6 @@ * Returns true if the value acts like a Promise, i.e. has a "then" function, * otherwise returns false. */ -declare function isPromise(value: unknown): boolean %checks(value instanceof - Promise); - -// eslint-disable-next-line no-redeclare -export function isPromise(value) { +export function isPromise(value: unknown): value is Promise { return typeof value?.then === 'function'; } diff --git a/src/language/ast.ts b/src/language/ast.ts index 2e4f9dfaaf..8d14c70d9f 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -124,7 +124,7 @@ export class Token { /** * @internal */ -export function isNode(maybeNode: unknown): boolean %checks { +export function isNode(maybeNode: unknown): maybeNode is ASTNode { return maybeNode != null && typeof maybeNode.kind === 'string'; } diff --git a/src/language/lexer.ts b/src/language/lexer.ts index ad42ce9897..f2cf95f6ec 100644 --- a/src/language/lexer.ts +++ b/src/language/lexer.ts @@ -75,7 +75,9 @@ export class Lexer { /** * @internal */ -export function isPunctuatorTokenKind(kind: TokenKindEnum): boolean %checks { +export function isPunctuatorTokenKind( + kind: TokenKindEnum, +): boolean { return ( kind === TokenKind.BANG || kind === TokenKind.DOLLAR || diff --git a/src/language/predicates.ts b/src/language/predicates.ts index b9108f87ad..ec98b3fcdb 100644 --- a/src/language/predicates.ts +++ b/src/language/predicates.ts @@ -1,7 +1,18 @@ -import type { ASTNode } from './ast'; +import type { + ASTNode, + DefinitionNode, + ExecutableDefinitionNode, + SelectionNode, + ValueNode, + TypeNode, + TypeSystemDefinitionNode, + TypeDefinitionNode, + TypeSystemExtensionNode, + TypeExtensionNode, +} from './ast'; import { Kind } from './kinds'; -export function isDefinitionNode(node: ASTNode): boolean %checks { +export function isDefinitionNode(node: ASTNode): node is DefinitionNode { return ( isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || @@ -9,14 +20,16 @@ export function isDefinitionNode(node: ASTNode): boolean %checks { ); } -export function isExecutableDefinitionNode(node: ASTNode): boolean %checks { +export function isExecutableDefinitionNode( + node: ASTNode, +): node is ExecutableDefinitionNode { return ( node.kind === Kind.OPERATION_DEFINITION || node.kind === Kind.FRAGMENT_DEFINITION ); } -export function isSelectionNode(node: ASTNode): boolean %checks { +export function isSelectionNode(node: ASTNode): node is SelectionNode { return ( node.kind === Kind.FIELD || node.kind === Kind.FRAGMENT_SPREAD || @@ -24,7 +37,7 @@ export function isSelectionNode(node: ASTNode): boolean %checks { ); } -export function isValueNode(node: ASTNode): boolean %checks { +export function isValueNode(node: ASTNode): node is ValueNode { return ( node.kind === Kind.VARIABLE || node.kind === Kind.INT || @@ -38,7 +51,7 @@ export function isValueNode(node: ASTNode): boolean %checks { ); } -export function isTypeNode(node: ASTNode): boolean %checks { +export function isTypeNode(node: ASTNode): node is TypeNode { return ( node.kind === Kind.NAMED_TYPE || node.kind === Kind.LIST_TYPE || @@ -46,7 +59,9 @@ export function isTypeNode(node: ASTNode): boolean %checks { ); } -export function isTypeSystemDefinitionNode(node: ASTNode): boolean %checks { +export function isTypeSystemDefinitionNode( + node: ASTNode, +): node is TypeSystemDefinitionNode { return ( node.kind === Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || @@ -54,7 +69,9 @@ export function isTypeSystemDefinitionNode(node: ASTNode): boolean %checks { ); } -export function isTypeDefinitionNode(node: ASTNode): boolean %checks { +export function isTypeDefinitionNode( + node: ASTNode, +): node is TypeDefinitionNode { return ( node.kind === Kind.SCALAR_TYPE_DEFINITION || node.kind === Kind.OBJECT_TYPE_DEFINITION || @@ -65,11 +82,13 @@ export function isTypeDefinitionNode(node: ASTNode): boolean %checks { ); } -export function isTypeSystemExtensionNode(node: ASTNode): boolean %checks { +export function isTypeSystemExtensionNode( + node: ASTNode, +): node is TypeSystemExtensionNode { return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); } -export function isTypeExtensionNode(node: ASTNode): boolean %checks { +export function isTypeExtensionNode(node: ASTNode): node is TypeExtensionNode { return ( node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || diff --git a/src/language/source.ts b/src/language/source.ts index 9a28468e65..19fb906f37 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -53,9 +53,6 @@ export class Source { * * @internal */ -declare function isSource(source: unknown): boolean %checks(source instanceof - Source); -// eslint-disable-next-line no-redeclare -export function isSource(source) { +export function isSource(source: unknown): source is Source { return instanceOf(source, Source); } diff --git a/src/type/definition.ts b/src/type/definition.ts index fa3caa7979..d36b29cf32 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -63,7 +63,7 @@ export type GraphQLType = | GraphQLList | GraphQLNonNull; -export function isType(type: unknown): boolean %checks { +export function isType(type: unknown): type is GraphQLType { return ( isScalarType(type) || isObjectType(type) || @@ -86,11 +86,7 @@ export function assertType(type: unknown): GraphQLType { /** * There are predicates for each kind of GraphQL type. */ - -declare function isScalarType(type: unknown): boolean %checks(type instanceof - GraphQLScalarType); -// eslint-disable-next-line no-redeclare -export function isScalarType(type) { +export function isScalarType(type: unknown): type is GraphQLScalarType { return instanceOf(type, GraphQLScalarType); } @@ -101,10 +97,7 @@ export function assertScalarType(type: unknown): GraphQLScalarType { return type; } -declare function isObjectType(type: unknown): boolean %checks(type instanceof - GraphQLObjectType); -// eslint-disable-next-line no-redeclare -export function isObjectType(type) { +export function isObjectType(type: unknown): type is GraphQLObjectType { return instanceOf(type, GraphQLObjectType); } @@ -115,10 +108,7 @@ export function assertObjectType(type: unknown): GraphQLObjectType { return type; } -declare function isInterfaceType(type: unknown): boolean %checks(type instanceof - GraphQLInterfaceType); -// eslint-disable-next-line no-redeclare -export function isInterfaceType(type) { +export function isInterfaceType(type: unknown): type is GraphQLInterfaceType { return instanceOf(type, GraphQLInterfaceType); } @@ -131,10 +121,7 @@ export function assertInterfaceType(type: unknown): GraphQLInterfaceType { return type; } -declare function isUnionType(type: unknown): boolean %checks(type instanceof - GraphQLUnionType); -// eslint-disable-next-line no-redeclare -export function isUnionType(type) { +export function isUnionType(type: unknown): type is GraphQLUnionType { return instanceOf(type, GraphQLUnionType); } @@ -145,10 +132,7 @@ export function assertUnionType(type: unknown): GraphQLUnionType { return type; } -declare function isEnumType(type: unknown): boolean %checks(type instanceof - GraphQLEnumType); -// eslint-disable-next-line no-redeclare -export function isEnumType(type) { +export function isEnumType(type: unknown): type is GraphQLEnumType { return instanceOf(type, GraphQLEnumType); } @@ -159,10 +143,9 @@ export function assertEnumType(type: unknown): GraphQLEnumType { return type; } -declare function isInputObjectType(type: unknown): boolean %checks(type instanceof - GraphQLInputObjectType); -// eslint-disable-next-line no-redeclare -export function isInputObjectType(type) { +export function isInputObjectType( + type: unknown, +): type is GraphQLInputObjectType { return instanceOf(type, GraphQLInputObjectType); } @@ -175,28 +158,24 @@ export function assertInputObjectType(type: unknown): GraphQLInputObjectType { return type; } -declare function isListType(type: unknown): boolean %checks(type instanceof - GraphQLList); -// eslint-disable-next-line no-redeclare -export function isListType(type) { +export function isListType(type: unknown): type is GraphQLList { return instanceOf(type, GraphQLList); } -export function assertListType(type: unknown): GraphQLList { +export function assertListType(type: unknown): GraphQLList { if (!isListType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL List type.`); } return type; } -declare function isNonNullType(type: unknown): boolean %checks(type instanceof - GraphQLNonNull); -// eslint-disable-next-line no-redeclare -export function isNonNullType(type) { +export function isNonNullType( + type: unknown, +): type is GraphQLNonNull { return instanceOf(type, GraphQLNonNull); } -export function assertNonNullType(type: unknown): GraphQLNonNull { +export function assertNonNullType(type: unknown): GraphQLNonNull { if (!isNonNullType(type)) { throw new Error(`Expected ${inspect(type)} to be a GraphQL Non-Null type.`); } @@ -218,7 +197,7 @@ export type GraphQLInputType = | GraphQLList, >; -export function isInputType(type: unknown): boolean %checks { +export function isInputType(type: unknown): type is GraphQLInputType { return ( isScalarType(type) || isEnumType(type) || @@ -253,7 +232,7 @@ export type GraphQLOutputType = | GraphQLList, >; -export function isOutputType(type: unknown): boolean %checks { +export function isOutputType(type: unknown): type is GraphQLOutputType { return ( isScalarType(type) || isObjectType(type) || @@ -276,7 +255,7 @@ export function assertOutputType(type: unknown): GraphQLOutputType { */ export type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType; -export function isLeafType(type: unknown): boolean %checks { +export function isLeafType(type: unknown): type is GraphQLLeafType { return isScalarType(type) || isEnumType(type); } @@ -295,7 +274,7 @@ export type GraphQLCompositeType = | GraphQLInterfaceType | GraphQLUnionType; -export function isCompositeType(type: unknown): boolean %checks { +export function isCompositeType(type: unknown): type is GraphQLCompositeType { return isObjectType(type) || isInterfaceType(type) || isUnionType(type); } @@ -313,7 +292,7 @@ export function assertCompositeType(type: unknown): GraphQLCompositeType { */ export type GraphQLAbstractType = GraphQLInterfaceType | GraphQLUnionType; -export function isAbstractType(type: unknown): boolean %checks { +export function isAbstractType(type: unknown): type is GraphQLAbstractType { return isInterfaceType(type) || isUnionType(type); } @@ -420,7 +399,7 @@ export class GraphQLNonNull { export type GraphQLWrappingType = GraphQLList | GraphQLNonNull; -export function isWrappingType(type: unknown): boolean %checks { +export function isWrappingType(type: unknown): type is GraphQLWrappingType { return isListType(type) || isNonNullType(type); } @@ -443,7 +422,7 @@ export type GraphQLNullableType = | GraphQLInputObjectType | GraphQLList; -export function isNullableType(type: unknown): boolean %checks { +export function isNullableType(type: unknown): type is GraphQLNullableType { return isType(type) && !isNonNullType(type); } @@ -454,12 +433,11 @@ export function assertNullableType(type: unknown): GraphQLNullableType { return type; } -/* eslint-disable no-redeclare */ -declare function getNullableType(type: void | null): void; -declare function getNullableType(type: T): T; -declare function getNullableType(type: GraphQLNonNull): T; + +export function getNullableType(type: void | null): void; +export function getNullableType(type: T): T; +export function getNullableType(type: GraphQLNonNull): T; export function getNullableType(type) { - /* eslint-enable no-redeclare */ if (type) { return isNonNullType(type) ? type.ofType : type; } @@ -476,7 +454,7 @@ export type GraphQLNamedType = | GraphQLEnumType | GraphQLInputObjectType; -export function isNamedType(type: unknown): boolean %checks { +export function isNamedType(type: unknown): type is GraphQLNamedType { return ( isScalarType(type) || isObjectType(type) || @@ -494,11 +472,9 @@ export function assertNamedType(type: unknown): GraphQLNamedType { return type; } -/* eslint-disable no-redeclare */ -declare function getNamedType(type: void | null): void; -declare function getNamedType(type: GraphQLType): GraphQLNamedType; +export function getNamedType(type: void | null): void; +export function getNamedType(type: GraphQLType): GraphQLNamedType; export function getNamedType(type) { - /* eslint-enable no-redeclare */ if (type) { let unwrappedType = type; while (isWrappingType(unwrappedType)) { @@ -988,7 +964,7 @@ export type GraphQLArgument = { astNode: Maybe, }; -export function isRequiredArgument(arg: GraphQLArgument): boolean %checks { +export function isRequiredArgument(arg: GraphQLArgument): boolean { return isNonNullType(arg.type) && arg.defaultValue === undefined; } @@ -1581,9 +1557,7 @@ export type GraphQLInputField = { astNode: Maybe, }; -export function isRequiredInputField( - field: GraphQLInputField, -): boolean %checks { +export function isRequiredInputField(field: GraphQLInputField): boolean { return isNonNullType(field.type) && field.defaultValue === undefined; } diff --git a/src/type/directives.ts b/src/type/directives.ts index 34e3aacbb8..eaae1d053f 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -20,11 +20,7 @@ import { argsToArgsConfig, GraphQLNonNull } from './definition'; /** * Test if the given value is a GraphQL directive. */ -declare function isDirective( - directive: unknown, -): boolean %checks(directive instanceof GraphQLDirective); -// eslint-disable-next-line no-redeclare -export function isDirective(directive) { +export function isDirective(directive: unknown): directive is GraphQLDirective { return instanceOf(directive, GraphQLDirective); } diff --git a/src/type/schema.ts b/src/type/schema.ts index 4eab1ca285..b8480de1de 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -41,10 +41,7 @@ import { /** * Test if the given value is a GraphQL schema. */ -declare function isSchema(schema: unknown): boolean %checks(schema instanceof - GraphQLSchema); -// eslint-disable-next-line no-redeclare -export function isSchema(schema) { +export function isSchema(schema: unknown): schema is GraphQLSchema { return instanceOf(schema, GraphQLSchema); } From b979e236c548954766c5935c79d387f75cc5cedc Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:28:20 -0500 Subject: [PATCH 10/65] convert flow type spread to `&` (TS) --- src/type/definition.ts | 20 +++++++------------- src/type/directives.ts | 11 +++++------ src/type/schema.ts | 10 ++++------ src/utilities/buildASTSchema.ts | 6 ++---- src/utilities/extendSchema.ts | 4 +--- 5 files changed, 19 insertions(+), 32 deletions(-) diff --git a/src/type/definition.ts b/src/type/definition.ts index d36b29cf32..0815350143 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -627,8 +627,7 @@ export type GraphQLScalarTypeConfig = { extensionASTNodes?: Maybe>, }; -type GraphQLScalarTypeNormalizedConfig = { - ...GraphQLScalarTypeConfig, +interface GraphQLScalarTypeNormalizedConfig extends GraphQLScalarTypeConfig { serialize: GraphQLScalarSerializer, parseValue: GraphQLScalarValueParser, parseLiteral: GraphQLScalarLiteralParser, @@ -860,8 +859,7 @@ export type GraphQLObjectTypeConfig = { extensionASTNodes?: Maybe>, }; -type GraphQLObjectTypeNormalizedConfig = { - ...GraphQLObjectTypeConfig, +interface GraphQLObjectTypeNormalizedConfig extends GraphQLObjectTypeConfig { interfaces: Array, fields: GraphQLFieldConfigMap, extensions: Maybe>, @@ -1076,8 +1074,7 @@ export type GraphQLInterfaceTypeConfig = { extensionASTNodes?: Maybe>, }; -export type GraphQLInterfaceTypeNormalizedConfig = { - ...GraphQLInterfaceTypeConfig, +export interface GraphQLInterfaceTypeNormalizedConfig extends GraphQLInterfaceTypeConfig { interfaces: Array, fields: GraphQLFieldConfigMap, extensions: Maybe>, @@ -1193,8 +1190,7 @@ export type GraphQLUnionTypeConfig = { extensionASTNodes?: Maybe>, }; -type GraphQLUnionTypeNormalizedConfig = { - ...GraphQLUnionTypeConfig, +interface GraphQLUnionTypeNormalizedConfig extends GraphQLUnionTypeConfig { types: Array, extensions: Maybe>, extensionASTNodes: ReadonlyArray, @@ -1389,8 +1385,7 @@ export type GraphQLEnumTypeConfig /* */ = { extensionASTNodes?: Maybe>, }; -type GraphQLEnumTypeNormalizedConfig = { - ...GraphQLEnumTypeConfig, +interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig { extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; @@ -1529,9 +1524,8 @@ export type GraphQLInputObjectTypeConfig = { extensionASTNodes?: Maybe>, }; -type GraphQLInputObjectTypeNormalizedConfig = { - ...GraphQLInputObjectTypeConfig, - fields: GraphQLInputFieldConfigMap, +interface GraphQLInputObjectTypeNormalizedConfig extends GraphQLInputObjectTypeConfig{ +fields: GraphQLInputFieldConfigMap, extensions: Maybe>, extensionASTNodes: ReadonlyArray, }; diff --git a/src/type/directives.ts b/src/type/directives.ts index eaae1d053f..0e81c7d4ff 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -113,12 +113,11 @@ export type GraphQLDirectiveConfig = { astNode?: Maybe, }; -type GraphQLDirectiveNormalizedConfig = { - ...GraphQLDirectiveConfig, - args: GraphQLFieldConfigArgumentMap, - isRepeatable: boolean, - extensions: Maybe>, -}; +interface GraphQLDirectiveNormalizedConfig extends GraphQLDirectiveConfig { + args: GraphQLFieldConfigArgumentMap; + isRepeatable: boolean; + extensions: Maybe>; +} /** * Used to conditionally include fields or fragments. diff --git a/src/type/schema.ts b/src/type/schema.ts index b8480de1de..d1cf0ee4a7 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -359,7 +359,7 @@ export type GraphQLSchemaValidationOptions = { assumeValid?: boolean, }; -export type GraphQLSchemaConfig = { +export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { description?: Maybe, query?: Maybe, mutation?: Maybe, @@ -369,21 +369,19 @@ export type GraphQLSchemaConfig = { extensions?: Maybe>, astNode?: Maybe, extensionASTNodes?: Maybe>, - ...GraphQLSchemaValidationOptions, -}; +} /** * @internal */ -export type GraphQLSchemaNormalizedConfig = { - ...GraphQLSchemaConfig, +export interface GraphQLSchemaNormalizedConfig extends GraphQLSchemaConfig { description: Maybe, types: Array, directives: Array, extensions: Maybe>, extensionASTNodes: ReadonlyArray, assumeValid: boolean, -}; +} function collectReferencedTypes( type: GraphQLType, diff --git a/src/utilities/buildASTSchema.ts b/src/utilities/buildASTSchema.ts index 4ab5333537..c94c3e77f9 100644 --- a/src/utilities/buildASTSchema.ts +++ b/src/utilities/buildASTSchema.ts @@ -14,9 +14,7 @@ import { specifiedDirectives } from '../type/directives'; import { extendSchemaImpl } from './extendSchema'; -export type BuildSchemaOptions = { - ...GraphQLSchemaValidationOptions, - +export interface BuildSchemaOptions extends GraphQLSchemaValidationOptions { /** * Set to true to assume the SDL is valid. * @@ -94,7 +92,7 @@ export function buildASTSchema( */ export function buildSchema( source: string | Source, - options?: { ...BuildSchemaOptions, ...ParseOptions }, + options?: BuildSchemaOptions & ParseOptions , ): GraphQLSchema { const document = parse(source, { noLocation: options?.noLocation, diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 9466903c1f..203ae25b81 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -83,9 +83,7 @@ import { import { valueFromAST } from './valueFromAST'; -type Options = { - ...GraphQLSchemaValidationOptions, - +interface Options extends GraphQLSchemaValidationOptions { /** * Set to true to assume the SDL is valid. * From 554570da0cbc0a0a028efe5624b320c9bcd93479 Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:28:33 -0500 Subject: [PATCH 11/65] remove `+` (flow) annotations --- src/jsutils/PromiseOrValue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsutils/PromiseOrValue.ts b/src/jsutils/PromiseOrValue.ts index e493c87e06..6b2517ee62 100644 --- a/src/jsutils/PromiseOrValue.ts +++ b/src/jsutils/PromiseOrValue.ts @@ -1 +1 @@ -export type PromiseOrValue<+T> = Promise | T; +export type PromiseOrValue = Promise | T; From bd020971d4b588c386539d906ba9d52622d4f552 Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:38:43 -0500 Subject: [PATCH 12/65] replace `$PropertyType` (flow) --- src/utilities/getIntrospectionQuery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index b9738dcd1a..c5e938d13d 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -266,7 +266,7 @@ export type IntrospectionInputTypeRef = export type IntrospectionNamedTypeRef< T extends IntrospectionType = IntrospectionType > = { - readonly kind: $PropertyType; + readonly kind: T['kind']; readonly name: string; }; From 20d18f4349711f2481f0f467bf132ada6135a97a Mon Sep 17 00:00:00 2001 From: saihaj Date: Wed, 21 Oct 2020 13:40:05 -0500 Subject: [PATCH 13/65] remove `<>` (flow) from unions --- src/utilities/getIntrospectionQuery.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index c5e938d13d..72d75e654e 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -241,10 +241,10 @@ export type IntrospectionNonNullTypeRef< }; export type IntrospectionTypeRef = - | IntrospectionNamedTypeRef<> - | IntrospectionListTypeRef<> + | IntrospectionNamedTypeRef + | IntrospectionListTypeRef | IntrospectionNonNullTypeRef< - IntrospectionNamedTypeRef<> | IntrospectionListTypeRef<>, + IntrospectionNamedTypeRef | IntrospectionListTypeRef >; export type IntrospectionOutputTypeRef = From 3c5aca93464db84659c1c5b470a68fd7a85dcbee Mon Sep 17 00:00:00 2001 From: saihaj Date: Mon, 26 Oct 2020 11:12:06 -0500 Subject: [PATCH 14/65] refactor: TS function overloading --- src/jsutils/didYouMean.ts | 12 ++++++------ src/jsutils/isAsyncIterable.ts | 10 +++------- src/jsutils/isIteratableObject.ts | 10 +++------- src/jsutils/toObjMap.ts | 9 +++------ src/utilities/typeFromAST.ts | 8 +++----- 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/src/jsutils/didYouMean.ts b/src/jsutils/didYouMean.ts index 1efe2c80ce..4b24417530 100644 --- a/src/jsutils/didYouMean.ts +++ b/src/jsutils/didYouMean.ts @@ -3,15 +3,15 @@ const MAX_SUGGESTIONS = 5; /** * Given [ A, B, C ] return ' Did you mean A, B, or C?'. */ -declare function didYouMean(suggestions: ReadonlyArray): string; -// eslint-disable-next-line no-redeclare -declare function didYouMean( +export function didYouMean(suggestions: ReadonlyArray): string; +export function didYouMean( subMessage: string, suggestions: ReadonlyArray, ): string; - -// eslint-disable-next-line no-redeclare -export function didYouMean(firstArg, secondArg) { +export function didYouMean( + firstArg: string | ReadonlyArray, + secondArg?: ReadonlyArray, +): string { const [subMessage, suggestionsArg] = typeof firstArg === 'string' ? [firstArg, secondArg] diff --git a/src/jsutils/isAsyncIterable.ts b/src/jsutils/isAsyncIterable.ts index 1db528bb14..f4608a7f28 100644 --- a/src/jsutils/isAsyncIterable.ts +++ b/src/jsutils/isAsyncIterable.ts @@ -2,12 +2,8 @@ * Returns true if the provided object implements the AsyncIterator protocol via * either implementing a `Symbol.asyncIterator` or `"@@asyncIterator"` method. */ -declare function isAsyncIterable( - value: unknown, - // $FlowFixMe[invalid-in-rhs] -): value is AsyncIterable; - -// eslint-disable-next-line no-redeclare -export function isAsyncIterable(maybeAsyncIterable) { +export function isAsyncIterable( + maybeAsyncIterable: unknown, +): maybeAsyncIterable is AsyncIterable { return typeof maybeAsyncIterable?.[Symbol.asyncIterator] === 'function'; } diff --git a/src/jsutils/isIteratableObject.ts b/src/jsutils/isIteratableObject.ts index cf4158df32..2983e0dde1 100644 --- a/src/jsutils/isIteratableObject.ts +++ b/src/jsutils/isIteratableObject.ts @@ -14,13 +14,9 @@ * isIteratableObject({ key: 'value' }) // false * isIteratableObject({ length: 1, 0: 'Alpha' }) // false */ -declare function isIteratableObject( - value: unknown, - // $FlowFixMe[invalid-in-rhs] -): value is Iterable; - -// eslint-disable-next-line no-redeclare -export function isIteratableObject(maybeIteratable: unknown): boolean { +export function isIteratableObject( + maybeIteratable: unknown, +): maybeIteratable is Iterable { return ( typeof maybeIteratable === 'object' && typeof maybeIteratable?.[Symbol.iterator] === 'function' diff --git a/src/jsutils/toObjMap.ts b/src/jsutils/toObjMap.ts index 69ac0d06ad..63d6c27eed 100644 --- a/src/jsutils/toObjMap.ts +++ b/src/jsutils/toObjMap.ts @@ -5,12 +5,9 @@ import type { ReadOnlyObjMapLike, } from './ObjMap'; -/* eslint-disable no-redeclare */ -declare function toObjMap(obj: ObjMapLike): ObjMap; -declare function toObjMap(obj: ReadOnlyObjMapLike): ReadOnlyObjMap; - -export function toObjMap(obj) { - /* eslint-enable no-redeclare */ +export function toObjMap(obj: ObjMapLike): ObjMap; +export function toObjMap(obj: ReadOnlyObjMapLike): ReadOnlyObjMap; +export function toObjMap(obj: ObjMapLike | ReadOnlyObjMapLike) { if (Object.getPrototypeOf(obj) === null) { return obj; } diff --git a/src/utilities/typeFromAST.ts b/src/utilities/typeFromAST.ts index 0337e98420..c2a19194f2 100644 --- a/src/utilities/typeFromAST.ts +++ b/src/utilities/typeFromAST.ts @@ -20,21 +20,19 @@ import { GraphQLList, GraphQLNonNull } from '../type/definition'; * the type called "User" found in the schema. If a type called "User" is not * found in the schema, then undefined will be returned. */ -/* eslint-disable no-redeclare */ -declare function typeFromAST( +export function typeFromAST( schema: GraphQLSchema, typeNode: NamedTypeNode, ): GraphQLNamedType | void; -declare function typeFromAST( +export function typeFromAST( schema: GraphQLSchema, typeNode: ListTypeNode, ): GraphQLList | void; -declare function typeFromAST( +export function typeFromAST( schema: GraphQLSchema, typeNode: NonNullTypeNode, ): GraphQLNonNull | void; export function typeFromAST(schema, typeNode) { - /* eslint-enable no-redeclare */ let innerType; if (typeNode.kind === Kind.LIST_TYPE) { innerType = typeFromAST(schema, typeNode.type); From 64781a94a8860cb74eb8ab84bdfea2e70f560c2b Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 27 Oct 2020 08:23:29 -0500 Subject: [PATCH 15/65] Type convertion `:` (flow) to `as` in TS --- src/error/GraphQLError.ts | 4 +-- src/error/__tests__/locatedError-test.ts | 14 ++++---- src/error/locatedError.ts | 8 ++--- src/execution/__tests__/abstract-test.ts | 4 +-- src/execution/__tests__/executor-test.ts | 2 +- src/execution/execute.ts | 2 +- src/jsutils/__tests__/inspect-test.ts | 2 +- src/jsutils/inspect.ts | 2 +- src/language/__tests__/predicates-test.ts | 2 +- src/language/lexer.ts | 2 +- src/language/parser.ts | 12 +++---- src/subscription/__tests__/simplePubSub.ts | 4 +-- src/subscription/mapAsyncIterator.ts | 4 +-- src/type/introspection.ts | 14 ++++---- .../__tests__/buildClientSchema-test.ts | 34 +++++++++---------- src/utilities/astFromValue.ts | 7 ++-- src/utilities/buildASTSchema.ts | 8 ++--- src/utilities/coerceInputValue.ts | 2 +- src/utilities/extendSchema.ts | 32 ++++++++--------- src/utilities/findBreakingChanges.ts | 6 ++-- src/utilities/introspectionFromSchema.ts | 2 +- src/utilities/lexicographicSortSchema.ts | 4 +-- src/utilities/printSchema.ts | 2 +- src/utilities/typeFromAST.ts | 2 +- src/utilities/valueFromAST.ts | 2 +- src/utilities/valueFromASTUntyped.ts | 2 +- src/validation/rules/KnownDirectivesRule.ts | 2 +- .../rules/PossibleTypeExtensionsRule.ts | 2 +- 28 files changed, 93 insertions(+), 90 deletions(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index dbf00ba236..8eb81057ab 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -81,7 +81,7 @@ export class GraphQLError extends Error { source?: Maybe, positions?: Maybe>, path?: Maybe>, - originalError?: Maybe<(Error & { readonly extensions?: unknown })>, + originalError?: Maybe, extensions?: Maybe<{ [key: string]: unknown }>, ) { super(message); @@ -134,7 +134,7 @@ export class GraphQLError extends Error { } } - Object.defineProperties((this: any), { + Object.defineProperties(this as any, { name: { value: 'GraphQLError' }, message: { value: message, diff --git a/src/error/__tests__/locatedError-test.ts b/src/error/__tests__/locatedError-test.ts index 3de473b4c9..a8cf8318d6 100644 --- a/src/error/__tests__/locatedError-test.ts +++ b/src/error/__tests__/locatedError-test.ts @@ -18,19 +18,19 @@ describe('locatedError', () => { it('passes GraphQLError-ish through', () => { const e = new Error('I have a different prototype chain'); - (e: any).locations = []; - (e: any).path = []; - (e: any).nodes = []; - (e: any).source = null; - (e: any).positions = []; - (e: any).name = 'GraphQLError'; + (e as any).locations = []; + (e as any).path = []; + (e as any).nodes = []; + (e as any).source = null; + (e as any).positions = []; + (e as any).name = 'GraphQLError'; expect(locatedError(e, [], [])).to.deep.equal(e); }); it('does not pass through elasticsearch-like errors', () => { const e = new Error('I am from elasticsearch'); - (e: any).path = '/something/feed/_search'; + (e as any).path = '/something/feed/_search'; expect(locatedError(e, [], [])).to.not.deep.equal(e); }); diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index cf6ebb8b9d..279e783265 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -23,14 +23,14 @@ export function locatedError( // Note: this uses a brand-check to support GraphQL errors originating from other contexts. if (Array.isArray(originalError.path)) { - return (originalError: any); + return originalError as any; } return new GraphQLError( originalError.message, - (originalError: any).nodes ?? nodes, - (originalError: any).source, - (originalError: any).positions, + (originalError as any).nodes ?? nodes, + (originalError as any).source, + (originalError as any).positions, path, originalError, ); diff --git a/src/execution/__tests__/abstract-test.ts b/src/execution/__tests__/abstract-test.ts index 7efe2efed9..b82e36c2e7 100644 --- a/src/execution/__tests__/abstract-test.ts +++ b/src/execution/__tests__/abstract-test.ts @@ -569,13 +569,13 @@ describe('Execute: Handles execution of abstract types', () => { ); // FIXME: workaround since we can't inject resolveType into SDL - (schema.getType('Pet'): any).resolveType = () => []; + (schema.getType('Pet') as any).resolveType = () => []; expectError({ forTypeName: undefined }).toEqual( 'Abstract type "Pet" must resolve to an Object type at runtime for field "Query.pet" with value { __typename: undefined }, received "[]".', ); // FIXME: workaround since we can't inject resolveType into SDL - (schema.getType('Pet'): any).resolveType = () => schema.getType('Cat'); + (schema.getType('Pet') as any).resolveType = () => schema.getType('Cat'); expectError({ forTypeName: undefined }).toEqual( 'Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.', ); diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index 32464aed92..05037f41ea 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -489,7 +489,7 @@ describe('Execute: Handles basic execution tasks', () => { }, asyncReturnErrorWithExtensions() { const error = new Error('Error getting asyncReturnErrorWithExtensions'); - (error: any).extensions = { foo: 'bar' }; + (error as any).extensions = { foo: 'bar' }; return Promise.resolve(error); }, diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 459101e044..9a426ecc03 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -807,7 +807,7 @@ function completeValue( invariant( false, 'Cannot complete value of unexpected output type: ' + - inspect((returnType: empty)), + inspect(returnType as never), ); } diff --git a/src/jsutils/__tests__/inspect-test.ts b/src/jsutils/__tests__/inspect-test.ts index 8edb14123f..190caa619e 100644 --- a/src/jsutils/__tests__/inspect-test.ts +++ b/src/jsutils/__tests__/inspect-test.ts @@ -165,7 +165,7 @@ describe('inspect', () => { expect(inspect([[new Foo()]])).to.equal('[[[Foo]]]'); - (Foo.prototype: any)[Symbol.toStringTag] = 'Bar'; + (Foo.prototype as any)[Symbol.toStringTag] = 'Bar'; expect(inspect([[new Foo()]])).to.equal('[[[Bar]]]'); // eslint-disable-next-line func-names diff --git a/src/jsutils/inspect.ts b/src/jsutils/inspect.ts index 3bc29b4614..faaca25c5f 100644 --- a/src/jsutils/inspect.ts +++ b/src/jsutils/inspect.ts @@ -38,7 +38,7 @@ function formatObjectValue( const seenValues = [...previouslySeenValues, value]; if (typeof value.toJSON === 'function') { - const jsonValue = (value.toJSON: () => unknown)(); + const jsonValue = (value.toJSON as () => unknown)(); // check for infinite recursion if (jsonValue !== value) { diff --git a/src/language/__tests__/predicates-test.ts b/src/language/__tests__/predicates-test.ts index eb620abd61..1d0cdb27f0 100644 --- a/src/language/__tests__/predicates-test.ts +++ b/src/language/__tests__/predicates-test.ts @@ -16,7 +16,7 @@ import { } from '../predicates'; const allASTNodes: Array = Object.values(Kind).map( - (kind) => ({ kind }: any), + (kind) => ({ kind } as any), ); function filterNodes(predicate: (ASTNode) => boolean): Array { diff --git a/src/language/lexer.ts b/src/language/lexer.ts index f2cf95f6ec..8339083132 100644 --- a/src/language/lexer.ts +++ b/src/language/lexer.ts @@ -65,7 +65,7 @@ export class Lexer { if (token.kind !== TokenKind.EOF) { do { // Note: next is only mutable during parsing, so we cast to allow this. - token = token.next ?? ((token: any).next = readToken(this, token)); + token = token.next ?? ((token as any).next = readToken(this, token)); } while (token.kind === TokenKind.COMMENT); } return token; diff --git a/src/language/parser.ts b/src/language/parser.ts index efc1cdaa5d..5b6f218939 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -66,7 +66,7 @@ export type ParseOptions = { * in the source that they correspond to. This configuration flag * disables that behavior for performance or testing. */ - noLocation?: boolean, + noLocation?: boolean; /** * @deprecated will be removed in the v17.0.0 @@ -168,7 +168,7 @@ export class Parser { const token = this.expectToken(TokenKind.NAME); return { kind: Kind.NAME, - value: ((token.value: any): string), + value: token.value as string, loc: this.loc(token), }; } @@ -523,14 +523,14 @@ export class Parser { this._lexer.advance(); return { kind: Kind.INT, - value: ((token.value: any): string), + value: token.value as string, loc: this.loc(token), }; case TokenKind.FLOAT: this._lexer.advance(); return { kind: Kind.FLOAT, - value: ((token.value: any): string), + value: token.value as string, loc: this.loc(token), }; case TokenKind.STRING: @@ -548,7 +548,7 @@ export class Parser { default: return { kind: Kind.ENUM, - value: ((token.value: any): string), + value: token.value as string, loc: this.loc(token), }; } @@ -566,7 +566,7 @@ export class Parser { this._lexer.advance(); return { kind: Kind.STRING, - value: ((token.value: any): string), + value: token.value as string, block: token.kind === TokenKind.BLOCK_STRING, loc: this.loc(token), }; diff --git a/src/subscription/__tests__/simplePubSub.ts b/src/subscription/__tests__/simplePubSub.ts index a3b7972749..4725e796cc 100644 --- a/src/subscription/__tests__/simplePubSub.ts +++ b/src/subscription/__tests__/simplePubSub.ts @@ -34,7 +34,7 @@ export class SimplePubSub { /* TODO: Flow doesn't support symbols as keys: https://github.com/facebook/flow/issues/3258 */ - return ({ + return { next() { if (!listening) { return Promise.resolve({ value: undefined, done: true }); @@ -56,7 +56,7 @@ export class SimplePubSub { [Symbol.asyncIterator]() { return this; }, - }: any); + } as any; function pushValue(event: T): void { const value = transform != null ? transform(event) : event; diff --git a/src/subscription/mapAsyncIterator.ts b/src/subscription/mapAsyncIterator.ts index d3f1c16418..5e775872f2 100644 --- a/src/subscription/mapAsyncIterator.ts +++ b/src/subscription/mapAsyncIterator.ts @@ -39,7 +39,7 @@ export function mapAsyncIterator( /* TODO: Flow doesn't support symbols as keys: https://github.com/facebook/flow/issues/3258 */ - return ({ + return { next(): Promise> { return mapResult(iterator.next()); }, @@ -57,5 +57,5 @@ export function mapAsyncIterator( [Symbol.asyncIterator]() { return this; }, - }: $FlowFixMe); + } as any; // FIXME: removed $FlowFixMe in TS conversion } diff --git a/src/type/introspection.ts b/src/type/introspection.ts index 2ecdad8e3a..85d2555b83 100644 --- a/src/type/introspection.ts +++ b/src/type/introspection.ts @@ -73,7 +73,7 @@ export const __Schema: GraphQLObjectType = new GraphQLObjectType({ ), resolve: (schema) => schema.getDirectives(), }, - }: GraphQLFieldConfigMap), + } as GraphQLFieldConfigMap), }); export const __Directive: GraphQLObjectType = new GraphQLObjectType({ @@ -106,7 +106,7 @@ export const __Directive: GraphQLObjectType = new GraphQLObjectType({ ), resolve: (directive) => directive.args, }, - }: GraphQLFieldConfigMap), + } as GraphQLFieldConfigMap), }); export const __DirectiveLocation: GraphQLEnumType = new GraphQLEnumType({ @@ -229,7 +229,7 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({ } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, `Unexpected type: "${inspect((type: empty))}".`); + invariant(false, `Unexpected type: "${inspect(type as never)}".`); }, }, name: { @@ -312,7 +312,7 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({ resolve: (type) => type.ofType !== undefined ? type.ofType : undefined, }, - }: GraphQLFieldConfigMap), + } as GraphQLFieldConfigMap), }); export const __Field: GraphQLObjectType = new GraphQLObjectType({ @@ -357,7 +357,7 @@ export const __Field: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (field) => field.deprecationReason, }, - }: GraphQLFieldConfigMap, unknown>), + } as GraphQLFieldConfigMap, unknown>), }); export const __InputValue: GraphQLObjectType = new GraphQLObjectType({ @@ -396,7 +396,7 @@ export const __InputValue: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (obj) => obj.deprecationReason, }, - }: GraphQLFieldConfigMap), + } as GraphQLFieldConfigMap), }); export const __EnumValue: GraphQLObjectType = new GraphQLObjectType({ @@ -421,7 +421,7 @@ export const __EnumValue: GraphQLObjectType = new GraphQLObjectType({ type: GraphQLString, resolve: (enumValue) => enumValue.deprecationReason, }, - }: GraphQLFieldConfigMap), + } as GraphQLFieldConfigMap), }); export const TypeKind = Object.freeze({ diff --git a/src/utilities/__tests__/buildClientSchema-test.ts b/src/utilities/__tests__/buildClientSchema-test.ts index bc03e3245b..04848cf24a 100644 --- a/src/utilities/__tests__/buildClientSchema-test.ts +++ b/src/utilities/__tests__/buildClientSchema-test.ts @@ -72,7 +72,7 @@ describe('Type System: build schema from introspection', () => { const schema = buildSchema(sdl); const introspection = introspectionFromSchema(schema); - delete (introspection: any).__schema.queryType; + delete (introspection as any).__schema.queryType; const clientSchema = buildClientSchema(introspection); expect(clientSchema.getQueryType()).to.equal(null); @@ -472,7 +472,7 @@ describe('Type System: build schema from introspection', () => { const schema = buildSchema(sdl); const introspection = introspectionFromSchema(schema); - delete (introspection: any).__schema.directives; + delete (introspection as any).__schema.directives; const clientSchema = buildClientSchema(introspection); @@ -639,7 +639,7 @@ describe('Type System: build schema from introspection', () => { it('throws when referenced unknown type', () => { const introspection = introspectionFromSchema(dummySchema); - (introspection: any).__schema.types = introspection.__schema.types.filter( + (introspection as any).__schema.types = introspection.__schema.types.filter( ({ name }) => name !== 'Query', ); @@ -656,7 +656,7 @@ describe('Type System: build schema from introspection', () => { `); const introspection = introspectionFromSchema(schema); - (introspection: any).__schema.types = introspection.__schema.types.filter( + (introspection as any).__schema.types = introspection.__schema.types.filter( ({ name }) => name !== 'Float', ); @@ -670,7 +670,7 @@ describe('Type System: build schema from introspection', () => { expect(introspection).to.have.nested.property('__schema.queryType.name'); - delete (introspection: any).__schema.queryType.name; + delete (introspection as any).__schema.queryType.name; expect(() => buildClientSchema(introspection)).to.throw( 'Unknown type reference: {}.', @@ -685,7 +685,7 @@ describe('Type System: build schema from introspection', () => { expect(queryTypeIntrospection).to.have.property('kind'); - delete (queryTypeIntrospection: any).kind; + delete (queryTypeIntrospection as any).kind; expect(() => buildClientSchema(introspection)).to.throw( /Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: { name: "Query", .* }\./, @@ -700,7 +700,7 @@ describe('Type System: build schema from introspection', () => { expect(queryTypeIntrospection).to.have.property('interfaces'); - delete (queryTypeIntrospection: any).interfaces; + delete (queryTypeIntrospection as any).interfaces; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing interfaces: { kind: "OBJECT", name: "Query", .* }\./, @@ -714,7 +714,7 @@ describe('Type System: build schema from introspection', () => { ); expect(someInterfaceIntrospection).to.have.property('interfaces'); - (someInterfaceIntrospection: any).interfaces = null; + (someInterfaceIntrospection as any).interfaces = null; const clientSchema = buildClientSchema(introspection); expect(printSchema(clientSchema)).to.equal(printSchema(dummySchema)); @@ -727,7 +727,7 @@ describe('Type System: build schema from introspection', () => { ); expect(queryTypeIntrospection).to.have.property('fields'); - delete (queryTypeIntrospection: any).fields; + delete (queryTypeIntrospection as any).fields; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing fields: { kind: "OBJECT", name: "Query", .* }\./, @@ -741,7 +741,7 @@ describe('Type System: build schema from introspection', () => { ); expect(queryTypeIntrospection).to.have.nested.property('fields[0].args'); - delete (queryTypeIntrospection: any).fields[0].args; + delete (queryTypeIntrospection as any).fields[0].args; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing field args: { name: "foo", .* }\./, @@ -758,7 +758,7 @@ describe('Type System: build schema from introspection', () => { 'fields[0].args[0].type.name', 'String', ); - (queryTypeIntrospection: any).fields[0].args[0].type.name = 'SomeUnion'; + (queryTypeIntrospection as any).fields[0].args[0].type.name = 'SomeUnion'; expect(() => buildClientSchema(introspection)).to.throw( 'Introspection must provide input type for arguments, but received: SomeUnion.', @@ -775,7 +775,7 @@ describe('Type System: build schema from introspection', () => { 'fields[0].type.name', 'String', ); - (queryTypeIntrospection: any).fields[0].type.name = 'SomeInputObject'; + (queryTypeIntrospection as any).fields[0].type.name = 'SomeInputObject'; expect(() => buildClientSchema(introspection)).to.throw( 'Introspection must provide output type for fields, but received: SomeInputObject.', @@ -789,7 +789,7 @@ describe('Type System: build schema from introspection', () => { ); expect(someUnionIntrospection).to.have.property('possibleTypes'); - delete (someUnionIntrospection: any).possibleTypes; + delete (someUnionIntrospection as any).possibleTypes; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing possibleTypes: { kind: "UNION", name: "SomeUnion",.* }\./, @@ -803,7 +803,7 @@ describe('Type System: build schema from introspection', () => { ); expect(someEnumIntrospection).to.have.property('enumValues'); - delete (someEnumIntrospection: any).enumValues; + delete (someEnumIntrospection as any).enumValues; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing enumValues: { kind: "ENUM", name: "SomeEnum", .* }\./, @@ -817,7 +817,7 @@ describe('Type System: build schema from introspection', () => { ); expect(someInputObjectIntrospection).to.have.property('inputFields'); - delete (someInputObjectIntrospection: any).inputFields; + delete (someInputObjectIntrospection as any).inputFields; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing inputFields: { kind: "INPUT_OBJECT", name: "SomeInputObject", .* }\./, @@ -832,7 +832,7 @@ describe('Type System: build schema from introspection', () => { name: 'SomeDirective', locations: ['QUERY'], }); - delete (someDirectiveIntrospection: any).locations; + delete (someDirectiveIntrospection as any).locations; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing directive locations: { name: "SomeDirective", .* }\./, @@ -847,7 +847,7 @@ describe('Type System: build schema from introspection', () => { name: 'SomeDirective', args: [], }); - delete (someDirectiveIntrospection: any).args; + delete (someDirectiveIntrospection as any).args; expect(() => buildClientSchema(introspection)).to.throw( /Introspection result missing directive args: { name: "SomeDirective", .* }\./, diff --git a/src/utilities/astFromValue.ts b/src/utilities/astFromValue.ts index c7f9d70842..2ec80e06b7 100644 --- a/src/utilities/astFromValue.ts +++ b/src/utilities/astFromValue.ts @@ -38,7 +38,10 @@ import type { Maybe } from '../jsutils/Maybe'; * | null | NullValue | * */ -export function astFromValue(value: unknown, type: GraphQLInputType): Maybe { +export function astFromValue( + value: unknown, + type: GraphQLInputType, +): Maybe { if (isNonNullType(type)) { const astValue = astFromValue(value, type.ofType); if (astValue?.kind === Kind.NULL) { @@ -139,7 +142,7 @@ export function astFromValue(value: unknown, type: GraphQLInputType): Maybe ((value: any): DirectiveLocationEnum), + ({ value }) => value as DirectiveLocationEnum, ); return new GraphQLDirective({ @@ -468,7 +468,7 @@ export function extendSchemaImpl( // Note: While this could make assertions to get the correctly typed // value, that would throw immediately while type system validation // with validateSchema() will produce more actionable results. - type: (getWrappedType(field.type): any), + type: getWrappedType(field.type) as any, description: field.description?.value, args: buildArgumentMap(field.arguments), deprecationReason: getDeprecationReason(field), @@ -568,7 +568,7 @@ export function extendSchemaImpl( // values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable // results. - interfaces.push((getNamedType(type): any)); + interfaces.push(getNamedType(type) as any); } } return interfaces; @@ -587,7 +587,7 @@ export function extendSchemaImpl( // values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable // results. - types.push((getNamedType(type): any)); + types.push(getNamedType(type) as any); } } return types; @@ -599,7 +599,7 @@ export function extendSchemaImpl( switch (astNode.kind) { case Kind.OBJECT_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLObjectType({ @@ -612,7 +612,7 @@ export function extendSchemaImpl( }); } case Kind.INTERFACE_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInterfaceType({ @@ -625,7 +625,7 @@ export function extendSchemaImpl( }); } case Kind.ENUM_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLEnumType({ @@ -637,7 +637,7 @@ export function extendSchemaImpl( }); } case Kind.UNION_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLUnionType({ @@ -649,7 +649,7 @@ export function extendSchemaImpl( }); } case Kind.SCALAR_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; return new GraphQLScalarType({ name, @@ -660,7 +660,7 @@ export function extendSchemaImpl( }); } case Kind.INPUT_OBJECT_TYPE_DEFINITION: { - const extensionASTNodes = (extensionNodes: any); + const extensionASTNodes = extensionNodes as any; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInputObjectType({ @@ -676,7 +676,7 @@ export function extendSchemaImpl( // istanbul ignore next (Not reachable. All possible type definition nodes have been considered) invariant( false, - 'Unexpected type definition node: ' + inspect((astNode: empty)), + 'Unexpected type definition node: ' + inspect(astNode as never), ); } } @@ -697,7 +697,7 @@ function getDeprecationReason( | InputValueDefinitionNode, ): Maybe { const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); - return (deprecated?.reason: any); + return deprecated?.reason as any; } /** @@ -707,5 +707,5 @@ function getSpecifiedByUrl( node: ScalarTypeDefinitionNode | ScalarTypeExtensionNode, ): Maybe { const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); - return (specifiedBy?.url: any); + return specifiedBy?.url as any; } diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 540277224e..4b6bab41d5 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -84,7 +84,7 @@ export function findBreakingChanges( const breakingChanges = findSchemaChanges(oldSchema, newSchema).filter( (change) => change.type in BreakingChangeType, ); - return ((breakingChanges: any): Array); + return breakingChanges as Array; } /** @@ -98,7 +98,7 @@ export function findDangerousChanges( const dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter( (change) => change.type in DangerousChangeType, ); - return ((dangerousChanges: any): Array); + return dangerousChanges as Array; } function findSchemaChanges( @@ -531,7 +531,7 @@ function typeKindName(type: GraphQLNamedType): string { } // istanbul ignore next (Not reachable. All possible named types have been considered) - invariant(false, 'Unexpected type: ' + inspect((type: empty))); + invariant(false, 'Unexpected type: ' + inspect(type as never)); } function stringifyValue(value: unknown, type: GraphQLInputType): string { diff --git a/src/utilities/introspectionFromSchema.ts b/src/utilities/introspectionFromSchema.ts index 782faca0a0..22dfc8a944 100644 --- a/src/utilities/introspectionFromSchema.ts +++ b/src/utilities/introspectionFromSchema.ts @@ -36,5 +36,5 @@ export function introspectionFromSchema( const document = parse(getIntrospectionQuery(optionsWithDefaults)); const result = executeSync({ schema, document }); invariant(!result.errors && result.data); - return (result.data: any); + return result.data as any; } diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index e09d8960a9..917bb5526e 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -67,7 +67,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { } function replaceNamedType(type: T): T { - return ((typeMap[type.name]: any): T); + return typeMap[type.name] as T; } function replaceMaybeType>(maybeType: T): T { @@ -153,7 +153,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect((type: empty))); + invariant(false, 'Unexpected type: ' + inspect(type as never)); } } diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index b840541be8..c63f660a08 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -147,7 +147,7 @@ export function printType(type: GraphQLNamedType): string { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect((type: empty))); + invariant(false, 'Unexpected type: ' + inspect(type as never)); } function printScalar(type: GraphQLScalarType): string { diff --git a/src/utilities/typeFromAST.ts b/src/utilities/typeFromAST.ts index c2a19194f2..2188156ffe 100644 --- a/src/utilities/typeFromAST.ts +++ b/src/utilities/typeFromAST.ts @@ -48,5 +48,5 @@ export function typeFromAST(schema, typeNode) { } // istanbul ignore next (Not reachable. All possible type nodes have been considered) - invariant(false, 'Unexpected type node: ' + inspect((typeNode: empty))); + invariant(false, 'Unexpected type node: ' + inspect(typeNode as never)); } diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index d1b5164840..3c1c00c520 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -146,7 +146,7 @@ export function valueFromAST( } // istanbul ignore next (Not reachable. All possible input types have been considered) - invariant(false, 'Unexpected input type: ' + inspect((type: empty))); + invariant(false, 'Unexpected input type: ' + inspect(type as never)); } // Returns true if the provided valueNode is a variable which is not defined diff --git a/src/utilities/valueFromASTUntyped.ts b/src/utilities/valueFromASTUntyped.ts index 579702f875..75461215c1 100644 --- a/src/utilities/valueFromASTUntyped.ts +++ b/src/utilities/valueFromASTUntyped.ts @@ -53,5 +53,5 @@ export function valueFromASTUntyped( } // istanbul ignore next (Not reachable. All possible value nodes have been considered) - invariant(false, 'Unexpected value node: ' + inspect((valueNode: empty))); + invariant(false, 'Unexpected value node: ' + inspect(valueNode as never)); } diff --git a/src/validation/rules/KnownDirectivesRule.ts b/src/validation/rules/KnownDirectivesRule.ts index 575db896e9..08044aaa47 100644 --- a/src/validation/rules/KnownDirectivesRule.ts +++ b/src/validation/rules/KnownDirectivesRule.ts @@ -133,5 +133,5 @@ function getDirectiveLocationForOperation( } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected operation: ' + inspect((operation: empty))); + invariant(false, 'Unexpected operation: ' + inspect(operation as never)); } diff --git a/src/validation/rules/PossibleTypeExtensionsRule.ts b/src/validation/rules/PossibleTypeExtensionsRule.ts index c342e20e87..d9177b61a0 100644 --- a/src/validation/rules/PossibleTypeExtensionsRule.ts +++ b/src/validation/rules/PossibleTypeExtensionsRule.ts @@ -120,7 +120,7 @@ function typeToExtKind(type: GraphQLNamedType): KindEnum { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect((type: empty))); + invariant(false, 'Unexpected type: ' + inspect(type as never)); } function extensionKindToTypeName(kind: KindEnum): string { From e4e9b0c9c15d0c33c532cabedfb9cae2424e772e Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 27 Oct 2020 09:15:30 -0500 Subject: [PATCH 16/65] convert `{...}` (flow) to `{ }` (TS) --- src/jsutils/memoize3.ts | 10 +++++----- src/language/visitor.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jsutils/memoize3.ts b/src/jsutils/memoize3.ts index db73c56fa6..185b7dc1f2 100644 --- a/src/jsutils/memoize3.ts +++ b/src/jsutils/memoize3.ts @@ -2,11 +2,11 @@ * Memoizes the provided three-argument function. */ export function memoize3< - A1: { ... } | ReadonlyArray, - A2: { ... } | ReadonlyArray, - A3: { ... } | ReadonlyArray, - R, ->(fn: (A1, A2, A3) => R): (A1, A2, A3) => R { + A1 extends {} | ReadonlyArray, + A2 extends {} | ReadonlyArray, + A3 extends {} | ReadonlyArray, + R, +>(fn: (a1: A1, a2: A2, a3: A3) => R): (a1: A1, a2: A2, a3: A3) => R { let cache0; return function memoized(a1, a2, a3) { diff --git a/src/language/visitor.ts b/src/language/visitor.ts index b509abbf58..289b9b86f8 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -125,7 +125,7 @@ const QueryDocumentKeys = { InputObjectTypeExtension: ['name', 'directives', 'fields'], }; -export const BREAK: { ... } = Object.freeze({}); +export const BREAK: {} = Object.freeze({}); /** * visit() will walk through an AST using a depth-first traversal, calling From a6376bc25db9b00592edb900b1352924ce47c9de Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 27 Oct 2020 10:11:59 -0500 Subject: [PATCH 17/65] build: relax tsconfig --- tsconfig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index b53dda5d67..036a113fdc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,10 +4,10 @@ "module": "commonjs", "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], "target": "es2019", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, + "noImplicitAny": false, + "noImplicitThis": false, + "strictNullChecks": false, + "strictFunctionTypes": false, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true From b62fe3d94e9404875b32ad24f5af18408a06d041 Mon Sep 17 00:00:00 2001 From: saihaj Date: Fri, 30 Oct 2020 16:54:09 -0500 Subject: [PATCH 18/65] make memoize arguments type weakmap --- src/jsutils/memoize3.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jsutils/memoize3.ts b/src/jsutils/memoize3.ts index 185b7dc1f2..da673395bf 100644 --- a/src/jsutils/memoize3.ts +++ b/src/jsutils/memoize3.ts @@ -2,10 +2,10 @@ * Memoizes the provided three-argument function. */ export function memoize3< - A1 extends {} | ReadonlyArray, - A2 extends {} | ReadonlyArray, - A3 extends {} | ReadonlyArray, - R, + A1 extends object, + A2 extends object, + A3 extends object, + R >(fn: (a1: A1, a2: A2, a3: A3) => R): (a1: A1, a2: A2, a3: A3) => R { let cache0; From c063d56f6217fb8c873329b1528e23bc3c7ae167 Mon Sep 17 00:00:00 2001 From: saihaj Date: Thu, 5 Nov 2020 21:19:06 -0600 Subject: [PATCH 19/65] convert`$ReadOnly` (flow) to `Readonly` (TS) --- src/type/definition.ts | 20 ++++++++++---------- src/type/directives.ts | 2 +- src/type/schema.ts | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/type/definition.ts b/src/type/definition.ts index 0815350143..6983060933 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -534,7 +534,7 @@ export class GraphQLScalarType { astNode: Maybe; extensionASTNodes: ReadonlyArray; - constructor(config: $ReadOnly>) { + constructor(config: Readonly>) { const parseValue = config.parseValue ?? identityFunc; this.name = config.name; this.description = config.description; @@ -683,7 +683,7 @@ export class GraphQLObjectType { _fields: ThunkObjMap>; _interfaces: ThunkArray; - constructor(config: $ReadOnly>) { + constructor(config: Readonly>) { this.name = config.name; this.description = config.description; this.isTypeOf = config.isTypeOf; @@ -743,7 +743,7 @@ export class GraphQLObjectType { } function defineInterfaces( - config: $ReadOnly< + config: Readonly< | GraphQLObjectTypeConfig | GraphQLInterfaceTypeConfig, >, @@ -757,7 +757,7 @@ function defineInterfaces( } function defineFieldMap( - config: $ReadOnly< + config: Readonly< | GraphQLObjectTypeConfig | GraphQLInterfaceTypeConfig, >, @@ -999,7 +999,7 @@ export class GraphQLInterfaceType { _fields: ThunkObjMap>; _interfaces: ThunkArray; - constructor(config: $ReadOnly>) { + constructor(config: Readonly>) { this.name = config.name; this.description = config.description; this.resolveType = config.resolveType; @@ -1114,7 +1114,7 @@ export class GraphQLUnionType { _types: ThunkArray; - constructor(config: $ReadOnly>) { + constructor(config: Readonly>) { this.name = config.name; this.description = config.description; this.resolveType = config.resolveType; @@ -1165,7 +1165,7 @@ export class GraphQLUnionType { } function defineTypes( - config: $ReadOnly>, + config: Readonly>, ): Array { const types = resolveArrayThunk(config.types); devAssert( @@ -1228,7 +1228,7 @@ export class GraphQLEnumType /* */ { _valueLookup: Map; _nameLookup: ObjMap; - constructor(config: $ReadOnly */>) { + constructor(config: Readonly */>) { this.name = config.name; this.description = config.description; this.extensions = config.extensions && toObjMap(config.extensions); @@ -1438,7 +1438,7 @@ export class GraphQLInputObjectType { _fields: ThunkObjMap; - constructor(config: $ReadOnly) { + constructor(config: Readonly) { this.name = config.name; this.description = config.description; this.extensions = config.extensions && toObjMap(config.extensions); @@ -1490,7 +1490,7 @@ export class GraphQLInputObjectType { } function defineInputFieldMap( - config: $ReadOnly, + config: Readonly, ): GraphQLInputFieldMap { const fieldMap = resolveObjMapThunk(config.fields); devAssert( diff --git a/src/type/directives.ts b/src/type/directives.ts index 0e81c7d4ff..6bdfb7e2a6 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -46,7 +46,7 @@ export class GraphQLDirective { extensions: Maybe>; astNode: Maybe; - constructor(config: $ReadOnly) { + constructor(config: Readonly) { this.name = config.name; this.description = config.description; this.locations = config.locations; diff --git a/src/type/schema.ts b/src/type/schema.ts index d1cf0ee4a7..32d5c0d1b4 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -135,7 +135,7 @@ export class GraphQLSchema { // Used as a cache for validateSchema(). __validationErrors: Maybe>; - constructor(config: $ReadOnly) { + constructor(config: Readonly) { // If this schema was built from a source known to be valid, then it may be // marked with assumeValid to avoid an additional type system validation. this.__validationErrors = config.assumeValid === true ? [] : undefined; From f4910167f3c77ebe1809c1bb0e316fe22de86413 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 19 Nov 2020 16:01:30 -0600 Subject: [PATCH 20/65] convert `$Values` (flow) to `keyof` (TS) --- src/language/directiveLocation.ts | 2 +- src/language/kinds.ts | 2 +- src/language/tokenKind.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/language/directiveLocation.ts b/src/language/directiveLocation.ts index 9fa1348cf8..c7d3d87b1d 100644 --- a/src/language/directiveLocation.ts +++ b/src/language/directiveLocation.ts @@ -28,4 +28,4 @@ export const DirectiveLocation = Object.freeze({ /** * The enum type representing the directive location values. */ -export type DirectiveLocationEnum = $Values; +export type DirectiveLocationEnum = typeof DirectiveLocation[keyof typeof DirectiveLocation]; diff --git a/src/language/kinds.ts b/src/language/kinds.ts index 99e3e4a9ea..7e181c7e7b 100644 --- a/src/language/kinds.ts +++ b/src/language/kinds.ts @@ -71,4 +71,4 @@ export const Kind = Object.freeze({ /** * The enum type representing the possible kind values of AST nodes. */ -export type KindEnum = $Values; +export type KindEnum = typeof Kind[keyof typeof Kind]; diff --git a/src/language/tokenKind.ts b/src/language/tokenKind.ts index b4f5248c13..18efb8561c 100644 --- a/src/language/tokenKind.ts +++ b/src/language/tokenKind.ts @@ -30,4 +30,4 @@ export const TokenKind = Object.freeze({ /** * The enum type representing the token kinds values. */ -export type TokenKindEnum = $Values; +export type TokenKindEnum = typeof TokenKind[keyof typeof TokenKind]; From fdc57c815626c18a4fa1036cd8169b0879a12131 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 2 Dec 2020 11:56:12 -0600 Subject: [PATCH 21/65] remove `<>` (flow) --- src/utilities/buildClientSchema.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utilities/buildClientSchema.ts b/src/utilities/buildClientSchema.ts index 4f363b7f29..ff2afd46c4 100644 --- a/src/utilities/buildClientSchema.ts +++ b/src/utilities/buildClientSchema.ts @@ -140,9 +140,7 @@ export function buildClientSchema( return getNamedType(typeRef); } - function getNamedType( - typeRef: IntrospectionNamedTypeRef<>, - ): GraphQLNamedType { + function getNamedType(typeRef: IntrospectionNamedTypeRef): GraphQLNamedType { const typeName = typeRef.name; if (!typeName) { throw new Error(`Unknown type reference: ${inspect(typeRef)}.`); From 21d05dacdef0248b8551bdb31fd4905855fd6c0b Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 12 Jan 2021 10:18:26 -0600 Subject: [PATCH 22/65] convert `$Shape` (flow) to `Partial` (TS) --- src/language/visitor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 289b9b86f8..d284eb604b 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -8,7 +8,7 @@ import { isNode } from './ast'; * A visitor is provided to visit, it contains the collection of * relevant functions to be called during the visitor's traversal. */ -export type ASTVisitor = $Shape & KindVisitor>; +export type ASTVisitor = Partial & KindVisitor>; type KindVisitor = $ObjMap< ASTKindToNode, From 257a3c7e26bfe23f4d5585ea49d4399d144c3637 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 13 Jan 2021 08:35:17 -0600 Subject: [PATCH 23/65] convert `$Keys` (flow) to `keyof` (TS) --- src/utilities/findBreakingChanges.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 4b6bab41d5..8e0b2a68e0 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -64,13 +64,13 @@ export const DangerousChangeType = Object.freeze({ }); export type BreakingChange = { - type: $Keys, - description: string, + type: keyof typeof BreakingChangeType; + description: string; }; export type DangerousChange = { - type: $Keys, - description: string, + type: keyof typeof DangerousChangeType; + description: string; }; /** From 0212283240d11d2915d707f8b0ad79983aa3956d Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 13 Jan 2021 11:58:34 -0600 Subject: [PATCH 24/65] enable tests by adding babel ts tranform plugin remove flow plugin --- .babelrc-deno.json | 4 +- .babelrc-npm.json | 2 +- .babelrc.json | 2 +- .mocharc.yml | 2 +- package-lock.json | 3028 +++++++++++--------------------------- package.json | 4 +- resources/build-deno.js | 2 +- resources/build-npm.js | 10 +- resources/ts-register.js | 3 + 9 files changed, 845 insertions(+), 2212 deletions(-) create mode 100644 resources/ts-register.js diff --git a/.babelrc-deno.json b/.babelrc-deno.json index 7363f79d12..fb3d313292 100644 --- a/.babelrc-deno.json +++ b/.babelrc-deno.json @@ -1,7 +1,7 @@ { "plugins": [ - "@babel/plugin-transform-flow-strip-types", - ["./resources/add-extension-to-import-paths", { "extension": "js" }], + "@babel/plugin-transform-typescript", + ["./resources/add-extension-to-import-paths", { "extension": "ts" }], "./resources/inline-invariant" ] } diff --git a/.babelrc-npm.json b/.babelrc-npm.json index 16b40d26a9..357c91dbc0 100644 --- a/.babelrc-npm.json +++ b/.babelrc-npm.json @@ -1,6 +1,6 @@ { "plugins": [ - "@babel/plugin-transform-flow-strip-types", + "@babel/plugin-transform-typescript", "./resources/inline-invariant" ], "env": { diff --git a/.babelrc.json b/.babelrc.json index e7e59a32a2..1adecfab4c 100644 --- a/.babelrc.json +++ b/.babelrc.json @@ -1,4 +1,4 @@ { - "plugins": ["@babel/plugin-transform-flow-strip-types"], + "plugins": ["@babel/plugin-transform-typescript"], "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] } diff --git a/.mocharc.yml b/.mocharc.yml index 5e75d26389..51cae89f42 100644 --- a/.mocharc.yml +++ b/.mocharc.yml @@ -1,4 +1,4 @@ throw-deprecation: true check-leaks: true require: - - '@babel/register' + - 'resources/ts-register.js' diff --git a/package-lock.json b/package-lock.json index 31e9b0b958..c3c8b32014 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,9 +36,8 @@ }, "node_modules/@babel/code-frame": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/highlight": "^7.12.13" } @@ -79,6 +78,14 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/eslint-parser": { "version": "7.13.14", "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.13.14.tgz", @@ -97,11 +104,18 @@ "eslint": ">=7.5.0" } }, + "node_modules/@babel/eslint-parser/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.13.0", "jsesc": "^2.5.1", @@ -110,18 +124,16 @@ }, "node_modules/@babel/helper-annotate-as-pure": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", - "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.12.13" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz", - "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-explode-assignable-expression": "^7.12.13", "@babel/types": "^7.12.13" @@ -142,11 +154,18 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", - "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-function-name": "^7.12.13", "@babel/helper-member-expression-to-functions": "^7.13.0", @@ -159,10 +178,9 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", - "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", + "version": "7.12.16", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.12.13", "regexpu-core": "^4.7.1" @@ -190,20 +208,27 @@ "@babel/core": "^7.4.0-0" } }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz", - "integrity": "sha512-qS0peLTDP8kOisG1blKbaoBg/o9OSa1qoumMjTK5pM+KDTtpxpsiubnCGP34vK8BXGcb2M9eigwgvoJryrzwWA==", + "version": "7.12.13", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.13.0" + "@babel/types": "^7.12.13" } }, "node_modules/@babel/helper-function-name": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-get-function-arity": "^7.12.13", "@babel/template": "^7.12.13", @@ -212,18 +237,16 @@ }, "node_modules/@babel/helper-get-function-arity": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.12.13" } }, "node_modules/@babel/helper-hoist-variables": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/traverse": "^7.13.0", "@babel/types": "^7.13.0" @@ -265,24 +288,21 @@ }, "node_modules/@babel/helper-optimise-call-expression": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.12.13" } }, "node_modules/@babel/helper-plugin-utils": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/helper-remap-async-to-generator": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz", - "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.12.13", "@babel/helper-wrap-function": "^7.13.0", @@ -312,39 +332,34 @@ }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.12.1" } }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/types": "^7.12.13" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/helper-validator-option": { "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@babel/helper-wrap-function": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz", - "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-function-name": "^7.12.13", "@babel/template": "^7.12.13", @@ -354,9 +369,8 @@ }, "node_modules/@babel/helpers": { "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.12.13", "@babel/traverse": "^7.13.0", @@ -364,10 +378,9 @@ } }, "node_modules/@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.12.13", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", @@ -416,9 +429,8 @@ }, "node_modules/@babel/plugin-proposal-class-properties": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz", - "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.13.0", "@babel/helper-plugin-utils": "^7.13.0" @@ -429,9 +441,8 @@ }, "node_modules/@babel/plugin-proposal-dynamic-import": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", - "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3" @@ -442,9 +453,8 @@ }, "node_modules/@babel/plugin-proposal-export-namespace-from": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", - "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" @@ -455,9 +465,8 @@ }, "node_modules/@babel/plugin-proposal-json-strings": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", - "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-json-strings": "^7.8.3" @@ -468,9 +477,8 @@ }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", - "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" @@ -481,9 +489,8 @@ }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" @@ -494,9 +501,8 @@ }, "node_modules/@babel/plugin-proposal-numeric-separator": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", - "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-numeric-separator": "^7.10.4" @@ -507,9 +513,8 @@ }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/compat-data": "^7.13.8", "@babel/helper-compilation-targets": "^7.13.8", @@ -523,9 +528,8 @@ }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", - "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" @@ -550,9 +554,8 @@ }, "node_modules/@babel/plugin-proposal-private-methods": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz", - "integrity": "sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.13.0", "@babel/helper-plugin-utils": "^7.13.0" @@ -563,9 +566,8 @@ }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", - "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13" @@ -591,9 +593,8 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -603,9 +604,8 @@ }, "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -615,9 +615,8 @@ }, "node_modules/@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.3" }, @@ -639,9 +638,8 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -651,9 +649,8 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -663,9 +660,8 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -675,9 +671,8 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -687,9 +682,8 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -699,9 +693,8 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -723,9 +716,8 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -735,9 +727,8 @@ }, "node_modules/@babel/plugin-transform-arrow-functions": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", - "integrity": "sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -747,9 +738,8 @@ }, "node_modules/@babel/plugin-transform-async-to-generator": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz", - "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.12.13", "@babel/helper-plugin-utils": "^7.13.0", @@ -761,9 +751,8 @@ }, "node_modules/@babel/plugin-transform-block-scoped-functions": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz", - "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -773,9 +762,8 @@ }, "node_modules/@babel/plugin-transform-block-scoping": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -785,9 +773,8 @@ }, "node_modules/@babel/plugin-transform-classes": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", - "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.12.13", "@babel/helper-function-name": "^7.12.13", @@ -803,9 +790,8 @@ }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz", - "integrity": "sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -815,9 +801,8 @@ }, "node_modules/@babel/plugin-transform-destructuring": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -827,9 +812,8 @@ }, "node_modules/@babel/plugin-transform-dotall-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz", - "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13" @@ -840,9 +824,8 @@ }, "node_modules/@babel/plugin-transform-duplicate-keys": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz", - "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -852,9 +835,8 @@ }, "node_modules/@babel/plugin-transform-exponentiation-operator": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz", - "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13" @@ -878,9 +860,8 @@ }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz", - "integrity": "sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -890,9 +871,8 @@ }, "node_modules/@babel/plugin-transform-function-name": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz", - "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-function-name": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13" @@ -903,9 +883,8 @@ }, "node_modules/@babel/plugin-transform-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz", - "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -915,9 +894,8 @@ }, "node_modules/@babel/plugin-transform-member-expression-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz", - "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -927,9 +905,8 @@ }, "node_modules/@babel/plugin-transform-modules-amd": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.13.0", "@babel/helper-plugin-utils": "^7.13.0", @@ -941,9 +918,8 @@ }, "node_modules/@babel/plugin-transform-modules-commonjs": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.13.0", "@babel/helper-plugin-utils": "^7.13.0", @@ -956,9 +932,8 @@ }, "node_modules/@babel/plugin-transform-modules-systemjs": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.13.8.tgz", - "integrity": "sha512-hwqctPYjhM6cWvVIlOIe27jCIBgHCsdH2xCJVAYQm7V5yTMoilbVMi9f6wKg0rpQAOn6ZG4AOyvCqFF/hUh6+A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-hoist-variables": "^7.13.0", "@babel/helper-module-transforms": "^7.13.0", @@ -972,9 +947,8 @@ }, "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.13.0", "@babel/helper-plugin-utils": "^7.13.0" @@ -985,9 +959,8 @@ }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz", - "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.12.13" }, @@ -997,9 +970,8 @@ }, "node_modules/@babel/plugin-transform-new-target": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz", - "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1009,9 +981,8 @@ }, "node_modules/@babel/plugin-transform-object-super": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz", - "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13", "@babel/helper-replace-supers": "^7.12.13" @@ -1022,9 +993,8 @@ }, "node_modules/@babel/plugin-transform-parameters": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -1034,9 +1004,8 @@ }, "node_modules/@babel/plugin-transform-property-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz", - "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1058,9 +1027,8 @@ }, "node_modules/@babel/plugin-transform-reserved-words": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz", - "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1070,9 +1038,8 @@ }, "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz", - "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1082,9 +1049,8 @@ }, "node_modules/@babel/plugin-transform-spread": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz", - "integrity": "sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" @@ -1095,9 +1061,8 @@ }, "node_modules/@babel/plugin-transform-sticky-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz", - "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1107,9 +1072,8 @@ }, "node_modules/@babel/plugin-transform-template-literals": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz", - "integrity": "sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -1119,9 +1083,8 @@ }, "node_modules/@babel/plugin-transform-typeof-symbol": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz", - "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1131,9 +1094,8 @@ }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", - "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -1143,9 +1105,8 @@ }, "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz", - "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", "@babel/helper-plugin-utils": "^7.12.13" @@ -1234,11 +1195,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/preset-modules": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -1277,9 +1245,8 @@ }, "node_modules/@babel/template": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", "@babel/parser": "^7.12.13", @@ -1570,9 +1537,8 @@ }, "node_modules/@eslint/eslintrc": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.1.1", @@ -1590,9 +1556,8 @@ }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.8.1" }, @@ -1605,9 +1570,8 @@ }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -1621,9 +1585,8 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -1634,9 +1597,8 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -1646,9 +1608,8 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -1661,9 +1622,8 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -1673,9 +1633,8 @@ }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1723,9 +1682,8 @@ }, "node_modules/@types/json5": { "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -1766,10 +1724,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.4", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1931,15 +1888,13 @@ }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/acorn": { "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1949,18 +1904,16 @@ }, "node_modules/acorn-jsx": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/aggregate-error": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, + "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -1971,9 +1924,8 @@ }, "node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1987,27 +1939,24 @@ }, "node_modules/ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -2016,10 +1965,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.1", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2030,9 +1978,8 @@ }, "node_modules/append-transform": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, + "license": "MIT", "dependencies": { "default-require-extensions": "^3.0.0" }, @@ -2042,29 +1989,26 @@ }, "node_modules/archy": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.2", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" }, "engines": { @@ -2091,9 +2035,8 @@ }, "node_modules/array.prototype.flat": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", @@ -2108,18 +2051,16 @@ }, "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2135,9 +2076,8 @@ }, "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, + "license": "MIT", "dependencies": { "object.assign": "^4.1.0" } @@ -2156,6 +2096,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/babel-plugin-polyfill-corejs3": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.0.tgz", @@ -2182,25 +2131,22 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "version": "1.0.0", + "dev": true, + "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2208,9 +2154,8 @@ }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -2220,15 +2165,13 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/browserslist": { "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", "dev": true, + "license": "MIT", "dependencies": { "caniuse-lite": "^1.0.30001181", "colorette": "^1.2.1", @@ -2249,15 +2192,13 @@ }, "node_modules/buffer-from": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/caching-transform": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, + "license": "MIT", "dependencies": { "hasha": "^5.0.0", "make-dir": "^3.0.0", @@ -2270,9 +2211,8 @@ }, "node_modules/caching-transform/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -2283,11 +2223,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/caching-transform/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -2298,33 +2245,29 @@ }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001208", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", - "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==", - "dev": true + "version": "1.0.30001202", + "dev": true, + "license": "CC-BY-4.0" }, "node_modules/chai": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -2339,9 +2282,8 @@ }, "node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -2353,18 +2295,16 @@ }, "node_modules/check-error": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/chokidar": { "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "dev": true, + "license": "MIT", "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", @@ -2383,18 +2323,16 @@ }, "node_modules/clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -2403,24 +2341,21 @@ }, "node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/colorette": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "7.2.0", @@ -2449,15 +2384,13 @@ }, "node_modules/commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/configstore": { "version": "5.0.1", @@ -2491,20 +2424,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/configstore/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/contains-path": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/convert-source-map": { "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.1" } @@ -2556,9 +2496,8 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2668,9 +2607,8 @@ }, "node_modules/cspell/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2683,9 +2621,8 @@ }, "node_modules/cspell/node_modules/chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2699,9 +2636,8 @@ }, "node_modules/cspell/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2711,24 +2647,21 @@ }, "node_modules/cspell/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cspell/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/cspell/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2738,9 +2671,8 @@ }, "node_modules/debug": { "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -2755,18 +2687,16 @@ }, "node_modules/decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/deep-eql": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -2776,15 +2706,13 @@ }, "node_modules/deep-is": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/default-require-extensions": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", "dev": true, + "license": "MIT", "dependencies": { "strip-bom": "^4.0.0" }, @@ -2794,9 +2722,8 @@ }, "node_modules/define-properties": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, + "license": "MIT", "dependencies": { "object-keys": "^1.0.12" }, @@ -2806,9 +2733,8 @@ }, "node_modules/diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -2827,9 +2753,8 @@ }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -2850,22 +2775,19 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.3.712", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.712.tgz", - "integrity": "sha512-3kRVibBeCM4vsgoHHGKHmPocLqtFAGTrebXxxtgKs87hNUzXrX2NuS3jnBys7IozCnw7viQlozxKkmty2KNfrw==", - "dev": true + "version": "1.3.690", + "dev": true, + "license": "ISC" }, "node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -2875,35 +2797,31 @@ }, "node_modules/error-ex": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, + "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", - "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "version": "1.18.0-next.2", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.0.2", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.2", - "is-string": "^1.0.5", + "is-regex": "^1.1.1", "object-inspect": "^1.9.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.0" + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -2914,9 +2832,8 @@ }, "node_modules/es-to-primitive": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, + "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -2931,24 +2848,21 @@ }, "node_modules/es6-error": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -3009,9 +2923,8 @@ }, "node_modules/eslint-import-resolver-node": { "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^2.6.9", "resolve": "^1.13.1" @@ -3019,24 +2932,21 @@ }, "node_modules/eslint-import-resolver-node/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/eslint-import-resolver-node/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint-module-utils": { "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^2.6.9", "pkg-dir": "^2.0.0" @@ -3047,24 +2957,21 @@ }, "node_modules/eslint-module-utils/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/eslint-module-utils/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint-plugin-es": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, + "license": "MIT", "dependencies": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" @@ -3097,9 +3004,8 @@ }, "node_modules/eslint-plugin-import": { "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, + "license": "MIT", "dependencies": { "array-includes": "^3.1.1", "array.prototype.flat": "^1.2.3", @@ -3124,17 +3030,14 @@ }, "node_modules/eslint-plugin-import/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "dependencies": { "esutils": "^2.0.2", @@ -3146,9 +3049,8 @@ }, "node_modules/eslint-plugin-import/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/eslint-plugin-internal-rules": { "resolved": "resources/eslint-internal-rules", @@ -3156,9 +3058,8 @@ }, "node_modules/eslint-plugin-istanbul": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-istanbul/-/eslint-plugin-istanbul-0.1.2.tgz", - "integrity": "sha512-lkH0DnPxdPUZ9HMG8wpcJcl481IXRHJX1Jj1SqTWtiNgeuz/s2OOJLbCEyrIoz4HJxC4OOS4tbbGOlqeovqHaw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3168,9 +3069,8 @@ }, "node_modules/eslint-plugin-node": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, + "license": "MIT", "dependencies": { "eslint-plugin-es": "^3.0.0", "eslint-utils": "^2.0.0", @@ -3188,20 +3088,26 @@ }, "node_modules/eslint-plugin-node/node_modules/ignore": { "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "5.1.0", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "esrecurse": "^4.3.0", + "esrecurse": "^4.1.0", "estraverse": "^4.1.1" }, "engines": { @@ -3210,9 +3116,8 @@ }, "node_modules/eslint-utils": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^1.1.0" }, @@ -3225,27 +3130,24 @@ }, "node_modules/eslint-visitor-keys": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=4" } }, "node_modules/eslint/node_modules/@babel/code-frame": { "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, + "license": "MIT", "dependencies": { "@babel/highlight": "^7.10.4" } }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -3258,9 +3160,8 @@ }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3274,9 +3175,8 @@ }, "node_modules/eslint/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -3286,24 +3186,33 @@ }, "node_modules/eslint/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } }, "node_modules/eslint/node_modules/globals": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", - "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "version": "13.6.0", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -3316,18 +3225,16 @@ }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/eslint/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.4", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -3340,9 +3247,8 @@ }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3352,9 +3258,8 @@ }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -3364,9 +3269,8 @@ }, "node_modules/espree": { "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", @@ -3378,9 +3282,8 @@ }, "node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3391,9 +3294,8 @@ }, "node_modules/esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3403,18 +3305,16 @@ }, "node_modules/esquery/node_modules/estraverse": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3424,36 +3324,32 @@ }, "node_modules/esrecurse/node_modules/estraverse": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.2.5", @@ -3474,15 +3370,13 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { "version": "1.11.0", @@ -3495,9 +3389,8 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -3507,9 +3400,8 @@ }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3519,9 +3411,8 @@ }, "node_modules/find-cache-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, + "license": "MIT", "dependencies": { "commondir": "^1.0.1", "make-dir": "^2.0.0", @@ -3533,9 +3424,8 @@ }, "node_modules/find-cache-dir/node_modules/find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^3.0.0" }, @@ -3545,9 +3435,8 @@ }, "node_modules/find-cache-dir/node_modules/locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -3558,9 +3447,8 @@ }, "node_modules/find-cache-dir/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -3573,9 +3461,8 @@ }, "node_modules/find-cache-dir/node_modules/p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.0.0" }, @@ -3585,18 +3472,16 @@ }, "node_modules/find-cache-dir/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/find-cache-dir/node_modules/pkg-dir": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^3.0.0" }, @@ -3606,9 +3491,8 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -3622,18 +3506,16 @@ }, "node_modules/flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -3644,9 +3526,8 @@ }, "node_modules/flatted": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/flow-bin": { "version": "0.148.0", @@ -3662,9 +3543,8 @@ }, "node_modules/foreground-child": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" @@ -3675,8 +3555,6 @@ }, "node_modules/fromentries": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true, "funding": [ { @@ -3691,7 +3569,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/fs-extra": { "version": "9.1.0", @@ -3710,16 +3589,13 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3730,15 +3606,13 @@ }, "node_modules/function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/gensequence": { "version": "3.1.1", @@ -3751,36 +3625,32 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-func-name": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-intrinsic": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -3792,18 +3662,16 @@ }, "node_modules/get-package-type": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/get-stdin": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3813,9 +3681,8 @@ }, "node_modules/glob": { "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3832,10 +3699,9 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "5.1.1", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -3857,9 +3723,8 @@ }, "node_modules/globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -3895,24 +3760,21 @@ }, "node_modules/graceful-fs": { "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/growl": { "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.x" } }, "node_modules/has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -3920,20 +3782,10 @@ "node": ">= 0.4.0" } }, - "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -3948,10 +3800,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.1", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3961,9 +3812,8 @@ }, "node_modules/hasha": { "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, + "license": "MIT", "dependencies": { "is-stream": "^2.0.0", "type-fest": "^0.8.0" @@ -3977,24 +3827,21 @@ }, "node_modules/he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "version": "2.8.8", + "dev": true, + "license": "ISC" }, "node_modules/html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/iconv-lite": { "version": "0.6.2", @@ -4010,18 +3857,16 @@ }, "node_modules/ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -4035,36 +3880,32 @@ }, "node_modules/import-fresh/node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4072,9 +3913,8 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/ini": { "version": "1.3.8", @@ -4084,24 +3924,13 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -4109,26 +3938,10 @@ "node": ">=8" } }, - "node_modules/is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-callable": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4138,9 +3951,8 @@ }, "node_modules/is-core-module": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, + "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -4150,9 +3962,8 @@ }, "node_modules/is-date-object": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4162,27 +3973,24 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -4192,9 +4000,8 @@ }, "node_modules/is-negative-zero": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4204,25 +4011,12 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -4234,18 +4028,16 @@ }, "node_modules/is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-regex": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-symbols": "^1.0.1" @@ -4259,18 +4051,16 @@ }, "node_modules/is-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-string": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4280,9 +4070,8 @@ }, "node_modules/is-symbol": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.1" }, @@ -4295,45 +4084,39 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/istanbul-lib-coverage": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-hook": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "append-transform": "^2.0.0" }, @@ -4343,9 +4126,8 @@ }, "node_modules/istanbul-lib-instrument": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", @@ -4356,11 +4138,18 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-processinfo": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", "dev": true, + "license": "ISC", "dependencies": { "archy": "^1.0.0", "cross-spawn": "^7.0.0", @@ -4376,9 +4165,8 @@ }, "node_modules/istanbul-lib-processinfo/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -4389,11 +4177,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/istanbul-lib-processinfo/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", @@ -4405,18 +4200,16 @@ }, "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -4427,11 +4220,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4441,9 +4241,8 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -4455,18 +4254,16 @@ }, "node_modules/istanbul-lib-source-maps/node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/istanbul-reports": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -4486,15 +4283,13 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -4505,9 +4300,8 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -4523,21 +4317,18 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.5" }, @@ -4562,9 +4353,8 @@ }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -4581,9 +4371,8 @@ }, "node_modules/load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -4596,9 +4385,8 @@ }, "node_modules/load-json-file/node_modules/parse-json": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, + "license": "MIT", "dependencies": { "error-ex": "^1.2.0" }, @@ -4608,27 +4396,24 @@ }, "node_modules/load-json-file/node_modules/pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/load-json-file/node_modules/strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -4641,15 +4426,8 @@ }, "node_modules/lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -4657,29 +4435,15 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, "node_modules/lodash.flattendeep": { "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.0.0" }, @@ -4689,9 +4453,8 @@ }, "node_modules/log-symbols/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4704,9 +4467,8 @@ }, "node_modules/log-symbols/node_modules/chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4720,9 +4482,8 @@ }, "node_modules/log-symbols/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -4732,24 +4493,21 @@ }, "node_modules/log-symbols/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/log-symbols/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4759,9 +4517,8 @@ }, "node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -4771,9 +4528,8 @@ }, "node_modules/make-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, + "license": "MIT", "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -4782,15 +4538,6 @@ "node": ">=6" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4815,9 +4562,8 @@ }, "node_modules/minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4827,15 +4573,13 @@ }, "node_modules/minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mocha": { "version": "8.3.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.3.2.tgz", - "integrity": "sha512-UdmISwr/5w+uXLPKspgoV7/RXZwKRTiTjJ2/AC5ZiEztIoOYdfKb19+9jNmEInzx5pBsCyJQzarAxqIGBNYJhg==", "dev": true, + "license": "MIT", "dependencies": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", @@ -4877,15 +4621,13 @@ }, "node_modules/mocha/node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -4895,18 +4637,16 @@ }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/mocha/node_modules/js-yaml": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4916,15 +4656,13 @@ }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4937,15 +4675,13 @@ }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nanoid": { "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "dev": true, + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4955,24 +4691,21 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-modules-regexp": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/node-preload": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, + "license": "MIT", "dependencies": { "process-on-spawn": "^1.0.0" }, @@ -4982,15 +4715,13 @@ }, "node_modules/node-releases": { "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/normalize-package-data": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -4998,29 +4729,18 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/nyc": { "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", @@ -5059,9 +4779,8 @@ }, "node_modules/nyc/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5074,9 +4793,8 @@ }, "node_modules/nyc/node_modules/cliui": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -5085,9 +4803,8 @@ }, "node_modules/nyc/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5097,15 +4814,13 @@ }, "node_modules/nyc/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/nyc/node_modules/find-cache-dir": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, + "license": "MIT", "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -5120,9 +4835,8 @@ }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5133,9 +4847,8 @@ }, "node_modules/nyc/node_modules/locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -5145,9 +4858,8 @@ }, "node_modules/nyc/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -5160,9 +4872,8 @@ }, "node_modules/nyc/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -5175,9 +4886,8 @@ }, "node_modules/nyc/node_modules/p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -5187,9 +4897,8 @@ }, "node_modules/nyc/node_modules/pkg-dir": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -5197,11 +4906,18 @@ "node": ">=8" } }, + "node_modules/nyc/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/nyc/node_modules/wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5212,16 +4928,14 @@ } }, "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true + "version": "4.0.1", + "dev": true, + "license": "ISC" }, "node_modules/nyc/node_modules/yargs": { "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", @@ -5241,9 +4955,8 @@ }, "node_modules/nyc/node_modules/yargs-parser": { "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, + "license": "ISC", "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -5254,27 +4967,24 @@ }, "node_modules/object-inspect": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", @@ -5289,14 +4999,13 @@ } }, "node_modules/object.values": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz", - "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==", + "version": "1.1.2", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" }, "engines": { @@ -5308,18 +5017,16 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -5334,9 +5041,8 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -5349,9 +5055,8 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -5364,9 +5069,8 @@ }, "node_modules/p-map": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -5376,18 +5080,16 @@ }, "node_modules/p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/package-hash": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, + "license": "ISC", "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^5.0.0", @@ -5400,9 +5102,8 @@ }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -5430,36 +5131,32 @@ }, "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -5472,9 +5169,8 @@ }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -5493,18 +5189,16 @@ }, "node_modules/pify": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pirates": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", "dev": true, + "license": "MIT", "dependencies": { "node-modules-regexp": "^1.0.0" }, @@ -5514,9 +5208,8 @@ }, "node_modules/pkg-dir": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^2.1.0" }, @@ -5526,9 +5219,8 @@ }, "node_modules/pkg-dir/node_modules/find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^2.0.0" }, @@ -5538,9 +5230,8 @@ }, "node_modules/pkg-dir/node_modules/locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -5551,9 +5242,8 @@ }, "node_modules/pkg-dir/node_modules/p-limit": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^1.0.0" }, @@ -5563,9 +5253,8 @@ }, "node_modules/pkg-dir/node_modules/p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^1.1.0" }, @@ -5575,36 +5264,32 @@ }, "node_modules/pkg-dir/node_modules/p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/pkg-dir/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -5614,9 +5299,8 @@ }, "node_modules/process-on-spawn": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, + "license": "MIT", "dependencies": { "fromentries": "^1.2.0" }, @@ -5626,18 +5310,16 @@ }, "node_modules/progress": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -5664,18 +5346,16 @@ }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/read-pkg": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, + "license": "MIT", "dependencies": { "load-json-file": "^2.0.0", "normalize-package-data": "^2.3.2", @@ -5687,9 +5367,8 @@ }, "node_modules/read-pkg-up": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^2.0.0", "read-pkg": "^2.0.0" @@ -5700,9 +5379,8 @@ }, "node_modules/read-pkg-up/node_modules/find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^2.0.0" }, @@ -5712,9 +5390,8 @@ }, "node_modules/read-pkg-up/node_modules/locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -5725,9 +5402,8 @@ }, "node_modules/read-pkg-up/node_modules/p-limit": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^1.0.0" }, @@ -5737,9 +5413,8 @@ }, "node_modules/read-pkg-up/node_modules/p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^1.1.0" }, @@ -5749,27 +5424,24 @@ }, "node_modules/read-pkg-up/node_modules/p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read-pkg-up/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/read-pkg/node_modules/path-type": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, + "license": "MIT", "dependencies": { "pify": "^2.0.0" }, @@ -5779,18 +5451,16 @@ }, "node_modules/read-pkg/node_modules/pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/readdirp": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -5800,15 +5470,13 @@ }, "node_modules/regenerate": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regenerate-unicode-properties": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.0" }, @@ -5833,9 +5501,8 @@ }, "node_modules/regexpp": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5845,9 +5512,8 @@ }, "node_modules/regexpu-core": { "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.0", "regenerate-unicode-properties": "^8.2.0", @@ -5862,15 +5528,13 @@ }, "node_modules/regjsgen": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.6.7", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "jsesc": "~0.5.0" }, @@ -5880,8 +5544,6 @@ }, "node_modules/regjsparser/node_modules/jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true, "bin": { "jsesc": "bin/jsesc" @@ -5889,9 +5551,8 @@ }, "node_modules/release-zalgo": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, + "license": "ISC", "dependencies": { "es6-error": "^4.0.1" }, @@ -5910,33 +5571,29 @@ }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/resolve": { "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, + "license": "MIT", "dependencies": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" @@ -5947,9 +5604,8 @@ }, "node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -5978,9 +5634,8 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -6016,9 +5671,8 @@ }, "node_modules/safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -6027,34 +5681,30 @@ "dev": true }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "5.7.1", "dev": true, + "license": "ISC", "bin": { - "semver": "bin/semver.js" + "semver": "bin/semver" } }, "node_modules/serialize-javascript": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -6064,18 +5714,16 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/signal-exit": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/slash": { "version": "3.0.0", @@ -6088,9 +5736,8 @@ }, "node_modules/slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -6105,9 +5752,8 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6120,9 +5766,8 @@ }, "node_modules/slice-ansi/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6132,24 +5777,21 @@ }, "node_modules/slice-ansi/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -6157,18 +5799,16 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/spawn-wrap": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^2.0.0", "is-windows": "^1.0.2", @@ -6183,9 +5823,8 @@ }, "node_modules/spawn-wrap/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -6196,11 +5835,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/spawn-wrap/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/spdx-correct": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -6208,15 +5854,13 @@ }, "node_modules/spdx-exceptions": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true + "dev": true, + "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, + "license": "MIT", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -6224,27 +5868,23 @@ }, "node_modules/spdx-license-ids": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", - "dev": true + "dev": true, + "license": "CC0-1.0" }, "node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/string-natural-compare": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", - "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.0", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -6255,12 +5895,11 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.3", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3" }, "funding": { @@ -6268,12 +5907,11 @@ } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.3", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3" }, "funding": { @@ -6282,9 +5920,8 @@ }, "node_modules/strip-ansi": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.0" }, @@ -6294,18 +5931,16 @@ }, "node_modules/strip-bom": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -6315,9 +5950,8 @@ }, "node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -6326,18 +5960,12 @@ } }, "node_modules/table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.truncate": "^4.4.2", + "version": "6.0.7", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, @@ -6346,10 +5974,9 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", - "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "version": "7.1.0", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -6363,15 +5990,13 @@ }, "node_modules/table/node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/test-exclude": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -6383,24 +6008,21 @@ }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -6410,9 +6032,8 @@ }, "node_modules/tsconfig-paths": { "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", "dev": true, + "license": "MIT", "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.1", @@ -6422,9 +6043,8 @@ }, "node_modules/tsconfig-paths/node_modules/json5": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.0" }, @@ -6434,24 +6054,21 @@ }, "node_modules/tsconfig-paths/node_modules/strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "version": "3.20.0", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -6464,9 +6081,8 @@ }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -6476,27 +6092,24 @@ }, "node_modules/type-detect": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=8" } }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, + "license": "MIT", "dependencies": { "is-typedarray": "^1.0.0" } @@ -6514,35 +6127,18 @@ "node": ">=4.2.0" } }, - "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/unicode-match-property-ecmascript": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", "dev": true, + "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^1.0.4", "unicode-property-aliases-ecmascript": "^1.0.4" @@ -6553,18 +6149,16 @@ }, "node_modules/unicode-match-property-value-ecmascript": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -6592,33 +6186,29 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uuid": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true, + "license": "MIT", "bin": { "uuid": "bin/uuid" } }, "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "version": "2.2.0", + "dev": true, + "license": "MIT" }, "node_modules/validate-npm-package-license": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, + "license": "Apache-2.0", "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -6632,9 +6222,8 @@ }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -6645,60 +6234,39 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2" } }, "node_modules/wide-align/node_modules/ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/wide-align/node_modules/is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/wide-align/node_modules/string-width": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, + "license": "MIT", "dependencies": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -6709,9 +6277,8 @@ }, "node_modules/wide-align/node_modules/strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^3.0.0" }, @@ -6721,24 +6288,21 @@ }, "node_modules/word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/workerpool": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -6753,9 +6317,8 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6768,9 +6331,8 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6780,21 +6342,18 @@ }, "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/write-file-atomic": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, + "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", @@ -6812,19 +6371,17 @@ } }, "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "version": "5.0.5", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { "version": "1.10.2", @@ -6837,9 +6394,8 @@ }, "node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -6855,18 +6411,16 @@ }, "node_modules/yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -6879,9 +6433,8 @@ }, "node_modules/yargs-unparser/node_modules/camelcase": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6891,9 +6444,8 @@ }, "node_modules/yargs-unparser/node_modules/decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6903,9 +6455,8 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -6922,8 +6473,6 @@ "dependencies": { "@babel/code-frame": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, "requires": { "@babel/highlight": "^7.12.13" @@ -6956,6 +6505,12 @@ "json5": "^2.1.2", "semver": "^6.3.0", "source-map": "^0.5.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "dev": true + } } }, "@babel/eslint-parser": { @@ -6967,12 +6522,16 @@ "eslint-scope": "^5.1.0", "eslint-visitor-keys": "^1.3.0", "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "dev": true + } } }, "@babel/generator": { "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", "dev": true, "requires": { "@babel/types": "^7.13.0", @@ -6982,8 +6541,6 @@ }, "@babel/helper-annotate-as-pure": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", - "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", "dev": true, "requires": { "@babel/types": "^7.12.13" @@ -6991,8 +6548,6 @@ }, "@babel/helper-builder-binary-assignment-operator-visitor": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz", - "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==", "dev": true, "requires": { "@babel/helper-explode-assignable-expression": "^7.12.13", @@ -7009,12 +6564,16 @@ "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "dev": true + } } }, "@babel/helper-create-class-features-plugin": { "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", - "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", "dev": true, "requires": { "@babel/helper-function-name": "^7.12.13", @@ -7025,9 +6584,7 @@ } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", - "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", + "version": "7.12.16", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", @@ -7048,21 +6605,25 @@ "lodash.debounce": "^4.0.8", "resolve": "^1.14.2", "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@babel/helper-explode-assignable-expression": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz", - "integrity": "sha512-qS0peLTDP8kOisG1blKbaoBg/o9OSa1qoumMjTK5pM+KDTtpxpsiubnCGP34vK8BXGcb2M9eigwgvoJryrzwWA==", + "version": "7.12.13", "dev": true, "requires": { - "@babel/types": "^7.13.0" + "@babel/types": "^7.12.13" } }, "@babel/helper-function-name": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.12.13", @@ -7072,8 +6633,6 @@ }, "@babel/helper-get-function-arity": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { "@babel/types": "^7.12.13" @@ -7081,8 +6640,6 @@ }, "@babel/helper-hoist-variables": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", "dev": true, "requires": { "@babel/traverse": "^7.13.0", @@ -7125,8 +6682,6 @@ }, "@babel/helper-optimise-call-expression": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", "dev": true, "requires": { "@babel/types": "^7.12.13" @@ -7134,14 +6689,10 @@ }, "@babel/helper-plugin-utils": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", "dev": true }, "@babel/helper-remap-async-to-generator": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz", - "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", @@ -7172,8 +6723,6 @@ }, "@babel/helper-skip-transparent-expression-wrappers": { "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", "dev": true, "requires": { "@babel/types": "^7.12.1" @@ -7181,8 +6730,6 @@ }, "@babel/helper-split-export-declaration": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", "dev": true, "requires": { "@babel/types": "^7.12.13" @@ -7190,20 +6737,14 @@ }, "@babel/helper-validator-identifier": { "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, "@babel/helper-validator-option": { "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", "dev": true }, "@babel/helper-wrap-function": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz", - "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==", "dev": true, "requires": { "@babel/helper-function-name": "^7.12.13", @@ -7214,8 +6755,6 @@ }, "@babel/helpers": { "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", "dev": true, "requires": { "@babel/template": "^7.12.13", @@ -7224,9 +6763,7 @@ } }, "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.12.13", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", @@ -7264,8 +6801,6 @@ }, "@babel/plugin-proposal-class-properties": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz", - "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.13.0", @@ -7274,8 +6809,6 @@ }, "@babel/plugin-proposal-dynamic-import": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", - "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7284,8 +6817,6 @@ }, "@babel/plugin-proposal-export-namespace-from": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", - "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13", @@ -7294,8 +6825,6 @@ }, "@babel/plugin-proposal-json-strings": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", - "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7304,8 +6833,6 @@ }, "@babel/plugin-proposal-logical-assignment-operators": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", - "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7314,8 +6841,6 @@ }, "@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7324,8 +6849,6 @@ }, "@babel/plugin-proposal-numeric-separator": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", - "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13", @@ -7334,8 +6857,6 @@ }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", "dev": true, "requires": { "@babel/compat-data": "^7.13.8", @@ -7347,8 +6868,6 @@ }, "@babel/plugin-proposal-optional-catch-binding": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", - "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7368,8 +6887,6 @@ }, "@babel/plugin-proposal-private-methods": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz", - "integrity": "sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==", "dev": true, "requires": { "@babel/helper-create-class-features-plugin": "^7.13.0", @@ -7378,8 +6895,6 @@ }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", - "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", @@ -7397,8 +6912,6 @@ }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7406,8 +6919,6 @@ }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -7415,8 +6926,6 @@ }, "@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -7433,8 +6942,6 @@ }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -7442,8 +6949,6 @@ }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -7451,8 +6956,6 @@ }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -7460,8 +6963,6 @@ }, "@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -7469,8 +6970,6 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -7478,8 +6977,6 @@ }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -7496,8 +6993,6 @@ }, "@babel/plugin-syntax-top-level-await": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7505,8 +7000,6 @@ }, "@babel/plugin-transform-arrow-functions": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", - "integrity": "sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7514,8 +7007,6 @@ }, "@babel/plugin-transform-async-to-generator": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz", - "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.12.13", @@ -7525,8 +7016,6 @@ }, "@babel/plugin-transform-block-scoped-functions": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz", - "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7534,8 +7023,6 @@ }, "@babel/plugin-transform-block-scoping": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7543,8 +7030,6 @@ }, "@babel/plugin-transform-classes": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", - "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", @@ -7558,8 +7043,6 @@ }, "@babel/plugin-transform-computed-properties": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz", - "integrity": "sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7567,8 +7050,6 @@ }, "@babel/plugin-transform-destructuring": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7576,8 +7057,6 @@ }, "@babel/plugin-transform-dotall-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz", - "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", @@ -7586,8 +7065,6 @@ }, "@babel/plugin-transform-duplicate-keys": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz", - "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7595,8 +7072,6 @@ }, "@babel/plugin-transform-exponentiation-operator": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz", - "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==", "dev": true, "requires": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", @@ -7615,8 +7090,6 @@ }, "@babel/plugin-transform-for-of": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz", - "integrity": "sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7624,8 +7097,6 @@ }, "@babel/plugin-transform-function-name": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz", - "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==", "dev": true, "requires": { "@babel/helper-function-name": "^7.12.13", @@ -7634,8 +7105,6 @@ }, "@babel/plugin-transform-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz", - "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7643,8 +7112,6 @@ }, "@babel/plugin-transform-member-expression-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz", - "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7652,8 +7119,6 @@ }, "@babel/plugin-transform-modules-amd": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.13.0", @@ -7663,8 +7128,6 @@ }, "@babel/plugin-transform-modules-commonjs": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.13.0", @@ -7675,8 +7138,6 @@ }, "@babel/plugin-transform-modules-systemjs": { "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.13.8.tgz", - "integrity": "sha512-hwqctPYjhM6cWvVIlOIe27jCIBgHCsdH2xCJVAYQm7V5yTMoilbVMi9f6wKg0rpQAOn6ZG4AOyvCqFF/hUh6+A==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.13.0", @@ -7688,8 +7149,6 @@ }, "@babel/plugin-transform-modules-umd": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.13.0", @@ -7698,8 +7157,6 @@ }, "@babel/plugin-transform-named-capturing-groups-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz", - "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.12.13" @@ -7707,8 +7164,6 @@ }, "@babel/plugin-transform-new-target": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz", - "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7716,8 +7171,6 @@ }, "@babel/plugin-transform-object-super": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz", - "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13", @@ -7726,8 +7179,6 @@ }, "@babel/plugin-transform-parameters": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7735,8 +7186,6 @@ }, "@babel/plugin-transform-property-literals": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz", - "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7753,8 +7202,6 @@ }, "@babel/plugin-transform-reserved-words": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz", - "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7762,8 +7209,6 @@ }, "@babel/plugin-transform-shorthand-properties": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz", - "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7771,8 +7216,6 @@ }, "@babel/plugin-transform-spread": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz", - "integrity": "sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0", @@ -7781,8 +7224,6 @@ }, "@babel/plugin-transform-sticky-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz", - "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7790,8 +7231,6 @@ }, "@babel/plugin-transform-template-literals": { "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz", - "integrity": "sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.13.0" @@ -7799,8 +7238,6 @@ }, "@babel/plugin-transform-typeof-symbol": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz", - "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7808,8 +7245,6 @@ }, "@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", - "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -7817,8 +7252,6 @@ }, "@babel/plugin-transform-unicode-regex": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz", - "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.12.13", @@ -7900,12 +7333,16 @@ "babel-plugin-polyfill-regenerator": "^0.2.0", "core-js-compat": "^3.9.0", "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "dev": true + } } }, "@babel/preset-modules": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -7939,8 +7376,6 @@ }, "@babel/template": { "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", @@ -8229,8 +7664,6 @@ }, "@eslint/eslintrc": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -8246,8 +7679,6 @@ "dependencies": { "globals": { "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" @@ -8257,8 +7688,6 @@ }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "requires": { "camelcase": "^5.3.1", @@ -8270,8 +7699,6 @@ "dependencies": { "find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { "locate-path": "^5.0.0", @@ -8280,8 +7707,6 @@ }, "locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { "p-locate": "^4.1.0" @@ -8289,8 +7714,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -8298,8 +7721,6 @@ }, "p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { "p-limit": "^2.2.0" @@ -8309,8 +7730,6 @@ }, "@istanbuljs/schema": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, "@nodelib/fs.scandir": { @@ -8347,8 +7766,6 @@ }, "@types/json5": { "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, "@types/parse-json": { @@ -8374,9 +7791,7 @@ }, "dependencies": { "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.4", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -8472,27 +7887,19 @@ }, "@ungap/promise-all-settled": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, "acorn": { "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, "acorn-jsx": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true, "requires": {} }, "aggregate-error": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -8501,8 +7908,6 @@ }, "ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -8513,29 +7918,21 @@ }, "ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.1", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -8544,8 +7941,6 @@ }, "append-transform": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, "requires": { "default-require-extensions": "^3.0.0" @@ -8553,29 +7948,23 @@ }, "archy": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, "argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" } }, "array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.2", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" } }, @@ -8593,8 +7982,6 @@ }, "array.prototype.flat": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { "call-bind": "^1.0.0", @@ -8604,14 +7991,10 @@ }, "assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, "astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "at-least-node": { @@ -8622,8 +8005,6 @@ }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "requires": { "object.assign": "^4.1.0" @@ -8638,6 +8019,14 @@ "@babel/compat-data": "^7.13.11", "@babel/helper-define-polyfill-provider": "^0.2.0", "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "babel-plugin-polyfill-corejs3": { @@ -8660,21 +8049,15 @@ } }, "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "version": "1.0.0", "dev": true }, "binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -8683,8 +8066,6 @@ }, "braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -8692,14 +8073,10 @@ }, "browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "browserslist": { "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", "dev": true, "requires": { "caniuse-lite": "^1.0.30001181", @@ -8711,14 +8088,10 @@ }, "buffer-from": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "caching-transform": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, "requires": { "hasha": "^5.0.0", @@ -8729,19 +8102,19 @@ "dependencies": { "make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" } + }, + "semver": { + "version": "6.3.0", + "dev": true } } }, "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -8750,26 +8123,18 @@ }, "callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "caniuse-lite": { - "version": "1.0.30001208", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", - "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==", + "version": "1.0.30001202", "dev": true }, "chai": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -8782,8 +8147,6 @@ }, "chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -8793,14 +8156,10 @@ }, "check-error": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, "chokidar": { "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -8815,14 +8174,10 @@ }, "clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, "cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", @@ -8832,8 +8187,6 @@ }, "color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" @@ -8841,14 +8194,10 @@ }, "color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "colorette": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true }, "commander": { @@ -8872,14 +8221,10 @@ }, "commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "configstore": { @@ -8904,19 +8249,21 @@ "requires": { "semver": "^6.0.0" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, "contains-path": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, "convert-source-map": { "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -8961,8 +8308,6 @@ }, "cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -8996,8 +8341,6 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9005,8 +8348,6 @@ }, "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9015,8 +8356,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9024,20 +8363,14 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9097,8 +8430,6 @@ }, "debug": { "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -9106,14 +8437,10 @@ }, "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "deep-eql": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -9121,14 +8448,10 @@ }, "deep-is": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, "default-require-extensions": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", "dev": true, "requires": { "strip-bom": "^4.0.0" @@ -9136,8 +8459,6 @@ }, "define-properties": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { "object-keys": "^1.0.12" @@ -9145,8 +8466,6 @@ }, "diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "dir-glob": { @@ -9160,8 +8479,6 @@ }, "doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -9177,21 +8494,15 @@ } }, "electron-to-chromium": { - "version": "1.3.712", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.712.tgz", - "integrity": "sha512-3kRVibBeCM4vsgoHHGKHmPocLqtFAGTrebXxxtgKs87hNUzXrX2NuS3jnBys7IozCnw7viQlozxKkmty2KNfrw==", + "version": "1.3.690", "dev": true }, "emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { "ansi-colors": "^4.1.1" @@ -9199,41 +8510,33 @@ }, "error-ex": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "es-abstract": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", - "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "version": "1.18.0-next.2", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.0.2", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.2", - "is-string": "^1.0.5", + "is-regex": "^1.1.1", "object-inspect": "^1.9.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.0" + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" } }, "es-to-primitive": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -9243,20 +8546,14 @@ }, "es6-error": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, "escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "eslint": { @@ -9306,8 +8603,6 @@ "dependencies": { "@babel/code-frame": { "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" @@ -9315,8 +8610,6 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9324,8 +8617,6 @@ }, "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9334,8 +8625,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9343,20 +8632,22 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "eslint-scope": { + "version": "5.1.1", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, "eslint-visitor-keys": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "globals": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", - "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "version": "13.6.0", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -9364,14 +8655,10 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.4", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -9379,8 +8666,6 @@ }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9388,16 +8673,12 @@ }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } }, "eslint-import-resolver-node": { "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -9406,8 +8687,6 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -9415,16 +8694,12 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } }, "eslint-module-utils": { "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, "requires": { "debug": "^2.6.9", @@ -9433,8 +8708,6 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -9442,16 +8715,12 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } }, "eslint-plugin-es": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, "requires": { "eslint-utils": "^2.0.0", @@ -9470,8 +8739,6 @@ }, "eslint-plugin-import": { "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "requires": { "array-includes": "^3.1.1", @@ -9491,8 +8758,6 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -9500,8 +8765,6 @@ }, "doctrine": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { "esutils": "^2.0.2", @@ -9510,8 +8773,6 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } @@ -9521,15 +8782,11 @@ }, "eslint-plugin-istanbul": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-istanbul/-/eslint-plugin-istanbul-0.1.2.tgz", - "integrity": "sha512-lkH0DnPxdPUZ9HMG8wpcJcl481IXRHJX1Jj1SqTWtiNgeuz/s2OOJLbCEyrIoz4HJxC4OOS4tbbGOlqeovqHaw==", "dev": true, "requires": {} }, "eslint-plugin-node": { "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "requires": { "eslint-plugin-es": "^3.0.0", @@ -9542,26 +8799,24 @@ "dependencies": { "ignore": { "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "semver": { + "version": "6.3.0", "dev": true } } }, "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "5.1.0", "dev": true, "requires": { - "esrecurse": "^4.3.0", + "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, "eslint-utils": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -9569,14 +8824,10 @@ }, "eslint-visitor-keys": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true }, "espree": { "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { "acorn": "^7.4.0", @@ -9586,14 +8837,10 @@ }, "esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -9601,16 +8848,12 @@ "dependencies": { "estraverse": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } }, "esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -9618,28 +8861,20 @@ "dependencies": { "estraverse": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } }, "estraverse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-glob": { @@ -9658,14 +8893,10 @@ }, "fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, "fastq": { @@ -9679,8 +8910,6 @@ }, "file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -9688,8 +8917,6 @@ }, "fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -9697,8 +8924,6 @@ }, "find-cache-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -9708,8 +8933,6 @@ "dependencies": { "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -9717,8 +8940,6 @@ }, "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -9727,8 +8948,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -9736,8 +8955,6 @@ }, "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -9745,14 +8962,10 @@ }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "pkg-dir": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { "find-up": "^3.0.0" @@ -9762,8 +8975,6 @@ }, "find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", @@ -9772,14 +8983,10 @@ }, "flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -9788,8 +8995,6 @@ }, "flatted": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, "flow-bin": { @@ -9800,8 +9005,6 @@ }, "foreground-child": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -9810,8 +9013,6 @@ }, "fromentries": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true }, "fs-extra": { @@ -9828,27 +9029,19 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fsevents": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "functional-red-black-tree": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "gensequence": { @@ -9859,26 +9052,18 @@ }, "gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, "get-intrinsic": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -9888,20 +9073,14 @@ }, "get-package-type": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, "get-stdin": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true }, "glob": { "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9913,9 +9092,7 @@ } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "5.1.1", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -9932,8 +9109,6 @@ }, "globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, "globby": { @@ -9960,35 +9135,21 @@ }, "graceful-fs": { "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "growl": { "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" } }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, "has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "has-own-prop": { @@ -9998,15 +9159,11 @@ "dev": true }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.1", "dev": true }, "hasha": { "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "requires": { "is-stream": "^2.0.0", @@ -10015,20 +9172,14 @@ }, "he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "version": "2.8.8", "dev": true }, "html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "iconv-lite": { @@ -10042,14 +9193,10 @@ }, "ignore": { "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -10058,28 +9205,20 @@ "dependencies": { "resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true } } }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -10088,8 +9227,6 @@ }, "inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { @@ -10100,44 +9237,21 @@ }, "is-arrayish": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", "dev": true }, "is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, "is-callable": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, "is-core-module": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -10145,26 +9259,18 @@ }, "is-date-object": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -10172,20 +9278,10 @@ }, "is-negative-zero": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, "is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", "dev": true }, "is-obj": { @@ -10196,14 +9292,10 @@ }, "is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-regex": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -10212,20 +9304,14 @@ }, "is-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, "is-string": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", "dev": true }, "is-symbol": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { "has-symbols": "^1.0.1" @@ -10233,38 +9319,26 @@ }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "istanbul-lib-coverage": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "istanbul-lib-hook": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, "requires": { "append-transform": "^2.0.0" @@ -10272,20 +9346,22 @@ }, "istanbul-lib-instrument": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, "requires": { "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "dev": true + } } }, "istanbul-lib-processinfo": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", "dev": true, "requires": { "archy": "^1.0.0", @@ -10299,19 +9375,19 @@ "dependencies": { "make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" } + }, + "semver": { + "version": "6.3.0", + "dev": true } } }, "istanbul-lib-report": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", @@ -10321,23 +9397,21 @@ "dependencies": { "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" } }, + "semver": { + "version": "6.3.0", + "dev": true + }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -10347,8 +9421,6 @@ }, "istanbul-lib-source-maps": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { "debug": "^4.1.1", @@ -10358,16 +9430,12 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "istanbul-reports": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -10382,14 +9450,10 @@ }, "js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -10398,8 +9462,6 @@ }, "jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "json-parse-even-better-errors": { @@ -10410,20 +9472,14 @@ }, "json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, "json5": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -10441,8 +9497,6 @@ }, "levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -10457,8 +9511,6 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -10469,8 +9521,6 @@ "dependencies": { "parse-json": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { "error-ex": "^1.2.0" @@ -10478,22 +9528,16 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true } } }, "locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -10501,14 +9545,6 @@ }, "lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, "lodash.debounce": { @@ -10517,28 +9553,12 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, "lodash.flattendeep": { "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, "log-symbols": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { "chalk": "^4.0.0" @@ -10546,8 +9566,6 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -10555,8 +9573,6 @@ }, "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -10565,8 +9581,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -10574,20 +9588,14 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -10597,8 +9605,6 @@ }, "lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -10606,20 +9612,10 @@ }, "make-dir": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { "pify": "^4.0.1", "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "merge2": { @@ -10640,8 +9636,6 @@ }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -10649,14 +9643,10 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mocha": { "version": "8.3.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.3.2.tgz", - "integrity": "sha512-UdmISwr/5w+uXLPKspgoV7/RXZwKRTiTjJ2/AC5ZiEztIoOYdfKb19+9jNmEInzx5pBsCyJQzarAxqIGBNYJhg==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", @@ -10688,26 +9678,18 @@ "dependencies": { "argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "js-yaml": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -10715,14 +9697,10 @@ }, "ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -10732,32 +9710,22 @@ }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "nanoid": { "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "dev": true }, "natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "node-modules-regexp": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", "dev": true }, "node-preload": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, "requires": { "process-on-spawn": "^1.0.0" @@ -10765,40 +9733,24 @@ }, "node-releases": { "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", "dev": true }, "normalize-package-data": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "nyc": { "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, "requires": { "@istanbuljs/load-nyc-config": "^1.0.0", @@ -10832,8 +9784,6 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -10841,8 +9791,6 @@ }, "cliui": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { "string-width": "^4.2.0", @@ -10852,8 +9800,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -10861,14 +9807,10 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "find-cache-dir": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -10878,8 +9820,6 @@ }, "find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { "locate-path": "^5.0.0", @@ -10888,8 +9828,6 @@ }, "locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { "p-locate": "^4.1.0" @@ -10897,8 +9835,6 @@ }, "make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" @@ -10906,8 +9842,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -10915,8 +9849,6 @@ }, "p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { "p-limit": "^2.2.0" @@ -10924,17 +9856,17 @@ }, "pkg-dir": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { "find-up": "^4.0.0" } }, + "semver": { + "version": "6.3.0", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -10943,15 +9875,11 @@ } }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "4.0.1", "dev": true }, "yargs": { "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -10969,8 +9897,6 @@ }, "yargs-parser": { "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -10981,20 +9907,14 @@ }, "object-inspect": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, "object.assign": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { "call-bind": "^1.0.0", @@ -11004,21 +9924,17 @@ } }, "object.values": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz", - "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==", + "version": "1.1.2", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -11026,8 +9942,6 @@ }, "optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -11040,8 +9954,6 @@ }, "p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -11049,8 +9961,6 @@ }, "p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -11058,8 +9968,6 @@ }, "p-map": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, "requires": { "aggregate-error": "^3.0.0" @@ -11067,14 +9975,10 @@ }, "p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "package-hash": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "requires": { "graceful-fs": "^4.1.15", @@ -11085,8 +9989,6 @@ }, "parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -11106,26 +10008,18 @@ }, "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-type": { @@ -11136,8 +10030,6 @@ }, "pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "picomatch": { @@ -11148,14 +10040,10 @@ }, "pify": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pirates": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", "dev": true, "requires": { "node-modules-regexp": "^1.0.0" @@ -11163,8 +10051,6 @@ }, "pkg-dir": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { "find-up": "^2.1.0" @@ -11172,8 +10058,6 @@ "dependencies": { "find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" @@ -11181,8 +10065,6 @@ }, "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { "p-locate": "^2.0.0", @@ -11191,8 +10073,6 @@ }, "p-limit": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { "p-try": "^1.0.0" @@ -11200,8 +10080,6 @@ }, "p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" @@ -11209,34 +10087,24 @@ }, "p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, "prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "process-on-spawn": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, "requires": { "fromentries": "^1.2.0" @@ -11244,14 +10112,10 @@ }, "progress": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "queue-microtask": { @@ -11262,8 +10126,6 @@ }, "randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -11271,8 +10133,6 @@ }, "read-pkg": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { "load-json-file": "^2.0.0", @@ -11282,8 +10142,6 @@ "dependencies": { "path-type": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { "pify": "^2.0.0" @@ -11291,16 +10149,12 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } } }, "read-pkg-up": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { "find-up": "^2.0.0", @@ -11309,8 +10163,6 @@ "dependencies": { "find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" @@ -11318,8 +10170,6 @@ }, "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { "p-locate": "^2.0.0", @@ -11328,8 +10178,6 @@ }, "p-limit": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { "p-try": "^1.0.0" @@ -11337,8 +10185,6 @@ }, "p-locate": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" @@ -11346,22 +10192,16 @@ }, "p-try": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, "readdirp": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -11369,14 +10209,10 @@ }, "regenerate": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" @@ -11399,14 +10235,10 @@ }, "regexpp": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "regexpu-core": { "version": "4.7.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", - "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, "requires": { "regenerate": "^1.4.0", @@ -11419,14 +10251,10 @@ }, "regjsgen": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, "regjsparser": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", - "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "version": "0.6.7", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -11434,16 +10262,12 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } } }, "release-zalgo": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { "es6-error": "^4.0.1" @@ -11457,26 +10281,18 @@ }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "resolve": { "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { "is-core-module": "^2.2.0", @@ -11485,8 +10301,6 @@ }, "resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, "resolve-global": { @@ -11506,8 +10320,6 @@ }, "rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -11524,8 +10336,6 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "safer-buffer": { @@ -11535,15 +10345,11 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "5.7.1", "dev": true }, "serialize-javascript": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -11551,14 +10357,10 @@ }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -11566,14 +10368,10 @@ }, "shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "slash": { @@ -11584,8 +10382,6 @@ }, "slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -11595,8 +10391,6 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -11604,8 +10398,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -11613,22 +10405,16 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, "source-map-support": { "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -11637,16 +10423,12 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "spawn-wrap": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "requires": { "foreground-child": "^2.0.0", @@ -11659,19 +10441,19 @@ "dependencies": { "make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" } + }, + "semver": { + "version": "6.3.0", + "dev": true } } }, "spdx-correct": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -11680,14 +10462,10 @@ }, "spdx-exceptions": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -11696,26 +10474,18 @@ }, "spdx-license-ids": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "string-natural-compare": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", - "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==", "dev": true }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.0", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -11724,29 +10494,23 @@ } }, "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.3", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.3", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.0", "define-properties": "^1.1.3" } }, "strip-ansi": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { "ansi-regex": "^5.0.0" @@ -11754,46 +10518,31 @@ }, "strip-bom": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, "strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" } }, "table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.truncate": "^4.4.2", + "version": "6.0.7", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, "dependencies": { "ajv": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", - "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "version": "7.1.0", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -11804,16 +10553,12 @@ }, "json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true } } }, "test-exclude": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { "@istanbuljs/schema": "^0.1.2", @@ -11823,20 +10568,14 @@ }, "text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -11844,8 +10583,6 @@ }, "tsconfig-paths": { "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", "dev": true, "requires": { "@types/json5": "^0.0.29", @@ -11856,8 +10593,6 @@ "dependencies": { "json5": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -11865,22 +10600,16 @@ }, "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true } } }, "tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "version": "3.20.0", "dev": true, "requires": { "tslib": "^1.8.1" @@ -11888,8 +10617,6 @@ }, "type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -11897,20 +10624,14 @@ }, "type-detect": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "type-fest": { "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "typedarray-to-buffer": { "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { "is-typedarray": "^1.0.0" @@ -11922,28 +10643,12 @@ "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", "dev": true }, "unicode-match-property-ecmascript": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", "dev": true, "requires": { "unicode-canonical-property-names-ecmascript": "^1.0.4", @@ -11952,14 +10657,10 @@ }, "unicode-match-property-value-ecmascript": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, "unique-string": { @@ -11979,8 +10680,6 @@ }, "uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -11988,20 +10687,14 @@ }, "uuid": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "version": "2.2.0", "dev": true }, "validate-npm-package-license": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -12016,36 +10709,17 @@ }, "which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, "which-module": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { "string-width": "^1.0.2 || 2" @@ -12053,20 +10727,14 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "string-width": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -12075,8 +10743,6 @@ }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -12086,20 +10752,14 @@ }, "word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "workerpool": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", "dev": true }, "wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -12109,8 +10769,6 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12118,8 +10776,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12127,22 +10783,16 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { "imurmurhash": "^0.1.4", @@ -12158,15 +10808,11 @@ "dev": true }, "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "version": "5.0.5", "dev": true }, "yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yaml": { @@ -12177,8 +10823,6 @@ }, "yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -12192,14 +10836,10 @@ }, "yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { "camelcase": "^6.0.0", @@ -12210,22 +10850,16 @@ "dependencies": { "camelcase": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, "decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true } } }, "yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } diff --git a/package.json b/package.json index 3f5815bc2d..a80c88d1ff 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,13 @@ "scripts": { "preversion": ". ./resources/checkgit.sh && npm ci", "version": "node resources/gen-version.js && npm test && git add src/version.js", - "fuzzonly": "mocha --full-trace src/**/__tests__/**/*-fuzz.js", + "fuzzonly": "mocha --full-trace src/**/__tests__/**/*-fuzz.ts", "changelog": "node resources/gen-changelog.js", "benchmark": "node benchmark/benchmark.js", "test": "npm run lint && npm run check && npm run testonly && npm run prettier:check && npm run check:spelling && npm run check:integrations", "lint": "eslint --cache .", "check": "flow check", - "testonly": "mocha --full-trace src/**/__tests__/**/*-test.js", + "testonly": "mocha --full-trace src/**/__tests__/**/*-test.ts", "testonly:cover": "nyc npm run testonly", "prettier": "prettier --write --list-different .", "prettier:check": "prettier --check .", diff --git a/resources/build-deno.js b/resources/build-deno.js index 357879e2f0..14aef45193 100644 --- a/resources/build-deno.js +++ b/resources/build-deno.js @@ -22,7 +22,7 @@ if (require.main === module) { const destPath = path.join('./denoDist', filepath); fs.mkdirSync(path.dirname(destPath), { recursive: true }); - if (filepath.endsWith('.js')) { + if (filepath.endsWith('.ts') && !filepath.endsWith('.d.ts')) { const options = { babelrc: false, configFile: './.babelrc-deno.json' }; const output = babel.transformFileSync(srcPath, options).code + '\n'; writeGeneratedFile(destPath, output); diff --git a/resources/build-npm.js b/resources/build-npm.js index cc168fed9d..6c15bc72c8 100644 --- a/resources/build-npm.js +++ b/resources/build-npm.js @@ -23,16 +23,12 @@ if (require.main === module) { const destPath = path.join('./npmDist', filepath); fs.mkdirSync(path.dirname(destPath), { recursive: true }); - if (filepath.endsWith('.js')) { - const flowBody = - '// @flow strict\n\n' + fs.readFileSync(srcPath, 'utf-8'); - fs.writeFileSync(destPath + '.flow', flowBody); - + if (filepath.endsWith('.ts') && !filepath.endsWith('.d.ts')) { const cjs = babelBuild(srcPath, { envName: 'cjs' }); - writeGeneratedFile(destPath, cjs); + writeGeneratedFile(destPath.replace(/\.ts$/, '.js'), cjs); const mjs = babelBuild(srcPath, { envName: 'mjs' }); - writeGeneratedFile(destPath.replace(/\.js$/, '.mjs'), mjs); + writeGeneratedFile(destPath.replace(/\.ts$/, '.mjs'), mjs); } else if (filepath.endsWith('.d.ts')) { fs.copyFileSync(srcPath, destPath); } diff --git a/resources/ts-register.js b/resources/ts-register.js new file mode 100644 index 0000000000..649eb5fdd2 --- /dev/null +++ b/resources/ts-register.js @@ -0,0 +1,3 @@ +'use strict'; + +require('@babel/register')({ extensions: ['.ts'] }); From 1599a69f8cd988ec66a552a4c5c5a19465fa7e90 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 13 Jan 2021 12:12:31 -0600 Subject: [PATCH 25/65] test: disable flow integration test --- integrationTests/integration-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integrationTests/integration-test.js b/integrationTests/integration-test.js index 9c6ca461be..7d57e9077d 100644 --- a/integrationTests/integration-test.js +++ b/integrationTests/integration-test.js @@ -39,9 +39,9 @@ describe('Integration Tests', () => { testOnNodeProject('ts'); }).timeout(40000); - it('Should compile with Flow', () => { - testOnNodeProject('flow'); - }).timeout(10000); + // it('Should compile with Flow', () => { + // testOnNodeProject('flow'); + // }).timeout(10000); it('Should work on all supported node versions', () => { testOnNodeProject('node'); From e05758acc58dde9298713f9def5d75c12fb24cc9 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 14 Jan 2021 21:06:51 -0600 Subject: [PATCH 26/65] build: ignore .d.ts files linting --- .eslintignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintignore b/.eslintignore index 258461b7bf..f62c7383f6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -11,3 +11,5 @@ /flow-typed # Ignore TS files inside integration test /integrationTests/ts/*.ts + +src/**/*.d.ts From ec59c6e2b1501c4d620b2750d1fb6f67a9dbf794 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 14 Jan 2021 21:07:15 -0600 Subject: [PATCH 27/65] style: run eslint fix and prettier --- src/__tests__/starWarsData.ts | 32 +- src/error/formatError.ts | 8 +- src/execution/__tests__/abstract-test.ts | 6 +- src/execution/execute.ts | 63 +-- src/graphql.ts | 16 +- src/jsutils/ObjMap.ts | 4 +- src/jsutils/instanceOf.ts | 2 +- src/language/ast.ts | 496 +++++++++--------- src/language/lexer.ts | 4 +- src/language/source.ts | 4 +- src/language/visitor.ts | 8 +- src/subscription/__tests__/subscribe-test.ts | 8 +- src/subscription/subscribe.ts | 16 +- src/type/__tests__/predicate-test.ts | 8 +- src/type/definition.ts | 315 +++++------ src/type/directives.ts | 14 +- src/type/schema.ts | 40 +- .../__tests__/buildASTSchema-test.ts | 2 +- src/utilities/__tests__/extendSchema-test.ts | 2 +- .../__tests__/valueFromASTUntyped-test.ts | 2 +- src/utilities/buildASTSchema.ts | 4 +- src/utilities/extendSchema.ts | 16 +- src/utilities/findBreakingChanges.ts | 6 +- src/utilities/getIntrospectionQuery.ts | 134 ++--- src/utilities/lexicographicSortSchema.ts | 13 +- .../rules/UniqueFieldDefinitionNamesRule.ts | 6 +- 26 files changed, 626 insertions(+), 603 deletions(-) diff --git a/src/__tests__/starWarsData.ts b/src/__tests__/starWarsData.ts index 8c277583cf..7708554d4c 100644 --- a/src/__tests__/starWarsData.ts +++ b/src/__tests__/starWarsData.ts @@ -3,28 +3,28 @@ * They represent the shape of the data visited during field resolution. */ export type Character = { - id: string, - name: string, - friends: Array, - appearsIn: Array, + id: string; + name: string; + friends: Array; + appearsIn: Array; }; export type Human = { - type: 'Human', - id: string, - name: string, - friends: Array, - appearsIn: Array, - homePlanet?: string, + type: 'Human'; + id: string; + name: string; + friends: Array; + appearsIn: Array; + homePlanet?: string; }; export type Droid = { - type: 'Droid', - id: string, - name: string, - friends: Array, - appearsIn: Array, - primaryFunction: string, + type: 'Droid'; + id: string; + name: string; + friends: Array; + appearsIn: Array; + primaryFunction: string; }; /** diff --git a/src/error/formatError.ts b/src/error/formatError.ts index 25f0b11a28..dfb3de7f0f 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -29,22 +29,22 @@ export type GraphQLFormattedError = { * from occurrence to occurrence of the problem, except for purposes of * localization. */ - readonly message: string, + readonly message: string; /** * If an error can be associated to a particular point in the requested * GraphQL document, it should contain a list of locations. */ - readonly locations: ReadonlyArray | void, + readonly locations: ReadonlyArray | void; /** * If an error can be associated to a particular field in the GraphQL result, * it _must_ contain an entry with the key `path` that details the path of * the response field which experienced the error. This allows clients to * identify whether a null result is intentional or caused by a runtime error. */ - readonly path: ReadonlyArray | void, + readonly path: ReadonlyArray | void; /** * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - readonly extensions?: { [key: string]: unknown }, + readonly extensions?: { [key: string]: unknown }; }; diff --git a/src/execution/__tests__/abstract-test.ts b/src/execution/__tests__/abstract-test.ts index b82e36c2e7..dbb57c3f89 100644 --- a/src/execution/__tests__/abstract-test.ts +++ b/src/execution/__tests__/abstract-test.ts @@ -17,9 +17,9 @@ import { buildSchema } from '../../utilities/buildASTSchema'; import { executeSync, execute } from '../execute'; async function executeQuery(args: { - schema: GraphQLSchema, - query: string, - rootValue?: unknown, + schema: GraphQLSchema; + query: string; + rootValue?: unknown; }) { const { schema, query, rootValue } = args; const document = parse(query); diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 9a426ecc03..670a11d3a4 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -94,15 +94,15 @@ import { * and the fragments defined in the query document */ export type ExecutionContext = { - schema: GraphQLSchema, - fragments: ObjMap, - rootValue: unknown, - contextValue: unknown, - operation: OperationDefinitionNode, - variableValues: { [variable: string]: unknown }, - fieldResolver: GraphQLFieldResolver, - typeResolver: GraphQLTypeResolver, - errors: Array, + schema: GraphQLSchema; + fragments: ObjMap; + rootValue: unknown; + contextValue: unknown; + operation: OperationDefinitionNode; + variableValues: { [variable: string]: unknown }; + fieldResolver: GraphQLFieldResolver; + typeResolver: GraphQLTypeResolver; + errors: Array; }; /** @@ -113,26 +113,26 @@ export type ExecutionContext = { * - `extensions` is reserved for adding non-standard properties. */ export type ExecutionResult = { - errors?: ReadonlyArray, - data?: ObjMap | null, - extensions?: ObjMap, + errors?: ReadonlyArray; + data?: ObjMap | null; + extensions?: ObjMap; }; export type FormattedExecutionResult = { - errors?: ReadonlyArray, - data?: ObjMap | null, - extensions?: ObjMap, + errors?: ReadonlyArray; + data?: ObjMap | null; + extensions?: ObjMap; }; export type ExecutionArgs = { - schema: GraphQLSchema, - document: DocumentNode, - rootValue?: unknown, - contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown }>, - operationName?: Maybe, - fieldResolver?: Maybe>, - typeResolver?: Maybe>, + schema: GraphQLSchema; + document: DocumentNode; + rootValue?: unknown; + contextValue?: unknown; + variableValues?: Maybe<{ readonly [variable: string]: unknown }>; + operationName?: Maybe; + fieldResolver?: Maybe>; + typeResolver?: Maybe>; }; /** @@ -888,7 +888,10 @@ function completeListValue( * Complete a Scalar or Enum by serializing to a valid value, returning * null if serialization is not possible. */ -function completeLeafValue(returnType: GraphQLLeafType, result: unknown): unknown { +function completeLeafValue( + returnType: GraphQLLeafType, + result: unknown, +): unknown { const serializedResult = returnType.serialize(result); if (serializedResult === undefined) { throw new Error( @@ -1113,12 +1116,10 @@ function _collectSubfields( * Otherwise, test each possible type for the abstract type by calling * isTypeOf for the object being coerced, returning the first type that matches. */ -export const defaultTypeResolver: GraphQLTypeResolver = function ( - value, - contextValue, - info, - abstractType, -) { +export const defaultTypeResolver: GraphQLTypeResolver< + unknown, + unknown +> = function (value, contextValue, info, abstractType) { // First, look for `__typename`. if (isObjectLike(value) && typeof value.__typename === 'string') { return value.__typename; @@ -1161,7 +1162,7 @@ export const defaultTypeResolver: GraphQLTypeResolver = functi */ export const defaultFieldResolver: GraphQLFieldResolver< unknown, - unknown, + unknown > = function (source: any, args, contextValue, info) { // ensure source is a value for which property access is acceptable. if (isObjectLike(source) || typeof source === 'function') { diff --git a/src/graphql.ts b/src/graphql.ts index 7aa3fa8017..dd8b58fe34 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -57,14 +57,14 @@ import type { Maybe } from './jsutils/Maybe'; * `__typename` field or alternatively calls the `isTypeOf` method). */ export type GraphQLArgs = { - schema: GraphQLSchema, - source: string | Source, - rootValue?: unknown, - contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown }>, - operationName?: Maybe, - fieldResolver?: Maybe>, - typeResolver?: Maybe>, + schema: GraphQLSchema; + source: string | Source; + rootValue?: unknown; + contextValue?: unknown; + variableValues?: Maybe<{ readonly [variable: string]: unknown }>; + operationName?: Maybe; + fieldResolver?: Maybe>; + typeResolver?: Maybe>; }; export function graphql(args: GraphQLArgs): Promise { diff --git a/src/jsutils/ObjMap.ts b/src/jsutils/ObjMap.ts index dd943c0844..f465745bb1 100644 --- a/src/jsutils/ObjMap.ts +++ b/src/jsutils/ObjMap.ts @@ -1,7 +1,7 @@ -export type ObjMap = { [key: string]: T, __proto__: null }; +export type ObjMap = { [key: string]: T; __proto__: null }; export type ObjMapLike = ObjMap | { [key: string]: T }; -export type ReadOnlyObjMap = { readonly [key: string]: T, __proto__: null }; +export type ReadOnlyObjMap = { readonly [key: string]: T; __proto__: null }; export type ReadOnlyObjMapLike = | ReadOnlyObjMap | { readonly [key: string]: T }; diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index 8704945a17..7af2fdd86d 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -38,5 +38,5 @@ spurious results.`, }; type Constructor = { - name: string, + name: string; }; diff --git a/src/language/ast.ts b/src/language/ast.ts index 8d14c70d9f..9c42ec7542 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -39,7 +39,7 @@ export class Location { this.source = source; } - toJSON(): { start: number, end: number } { + toJSON(): { start: number; end: number } { return { start: this.start, end: this.end }; } } @@ -107,10 +107,10 @@ export class Token { } toJSON(): { - kind: TokenKindEnum, - value: string | void, - line: number, - column: number, + kind: TokenKindEnum; + value: string | void; + line: number; + column: number; } { return { kind: this.kind, @@ -180,65 +180,65 @@ export type ASTNode = * Utility type listing all nodes indexed by their kind. */ export type ASTKindToNode = { - Name: NameNode, - Document: DocumentNode, - OperationDefinition: OperationDefinitionNode, - VariableDefinition: VariableDefinitionNode, - Variable: VariableNode, - SelectionSet: SelectionSetNode, - Field: FieldNode, - Argument: ArgumentNode, - FragmentSpread: FragmentSpreadNode, - InlineFragment: InlineFragmentNode, - FragmentDefinition: FragmentDefinitionNode, - IntValue: IntValueNode, - FloatValue: FloatValueNode, - StringValue: StringValueNode, - BooleanValue: BooleanValueNode, - NullValue: NullValueNode, - EnumValue: EnumValueNode, - ListValue: ListValueNode, - ObjectValue: ObjectValueNode, - ObjectField: ObjectFieldNode, - Directive: DirectiveNode, - NamedType: NamedTypeNode, - ListType: ListTypeNode, - NonNullType: NonNullTypeNode, - SchemaDefinition: SchemaDefinitionNode, - OperationTypeDefinition: OperationTypeDefinitionNode, - ScalarTypeDefinition: ScalarTypeDefinitionNode, - ObjectTypeDefinition: ObjectTypeDefinitionNode, - FieldDefinition: FieldDefinitionNode, - InputValueDefinition: InputValueDefinitionNode, - InterfaceTypeDefinition: InterfaceTypeDefinitionNode, - UnionTypeDefinition: UnionTypeDefinitionNode, - EnumTypeDefinition: EnumTypeDefinitionNode, - EnumValueDefinition: EnumValueDefinitionNode, - InputObjectTypeDefinition: InputObjectTypeDefinitionNode, - DirectiveDefinition: DirectiveDefinitionNode, - SchemaExtension: SchemaExtensionNode, - ScalarTypeExtension: ScalarTypeExtensionNode, - ObjectTypeExtension: ObjectTypeExtensionNode, - InterfaceTypeExtension: InterfaceTypeExtensionNode, - UnionTypeExtension: UnionTypeExtensionNode, - EnumTypeExtension: EnumTypeExtensionNode, - InputObjectTypeExtension: InputObjectTypeExtensionNode, + Name: NameNode; + Document: DocumentNode; + OperationDefinition: OperationDefinitionNode; + VariableDefinition: VariableDefinitionNode; + Variable: VariableNode; + SelectionSet: SelectionSetNode; + Field: FieldNode; + Argument: ArgumentNode; + FragmentSpread: FragmentSpreadNode; + InlineFragment: InlineFragmentNode; + FragmentDefinition: FragmentDefinitionNode; + IntValue: IntValueNode; + FloatValue: FloatValueNode; + StringValue: StringValueNode; + BooleanValue: BooleanValueNode; + NullValue: NullValueNode; + EnumValue: EnumValueNode; + ListValue: ListValueNode; + ObjectValue: ObjectValueNode; + ObjectField: ObjectFieldNode; + Directive: DirectiveNode; + NamedType: NamedTypeNode; + ListType: ListTypeNode; + NonNullType: NonNullTypeNode; + SchemaDefinition: SchemaDefinitionNode; + OperationTypeDefinition: OperationTypeDefinitionNode; + ScalarTypeDefinition: ScalarTypeDefinitionNode; + ObjectTypeDefinition: ObjectTypeDefinitionNode; + FieldDefinition: FieldDefinitionNode; + InputValueDefinition: InputValueDefinitionNode; + InterfaceTypeDefinition: InterfaceTypeDefinitionNode; + UnionTypeDefinition: UnionTypeDefinitionNode; + EnumTypeDefinition: EnumTypeDefinitionNode; + EnumValueDefinition: EnumValueDefinitionNode; + InputObjectTypeDefinition: InputObjectTypeDefinitionNode; + DirectiveDefinition: DirectiveDefinitionNode; + SchemaExtension: SchemaExtensionNode; + ScalarTypeExtension: ScalarTypeExtensionNode; + ObjectTypeExtension: ObjectTypeExtensionNode; + InterfaceTypeExtension: InterfaceTypeExtensionNode; + UnionTypeExtension: UnionTypeExtensionNode; + EnumTypeExtension: EnumTypeExtensionNode; + InputObjectTypeExtension: InputObjectTypeExtensionNode; }; // Name export type NameNode = { - readonly kind: 'Name', - readonly loc?: Location, - readonly value: string, + readonly kind: 'Name'; + readonly loc?: Location; + readonly value: string; }; // Document export type DocumentNode = { - readonly kind: 'Document', - readonly loc?: Location, - readonly definitions: ReadonlyArray, + readonly kind: 'Document'; + readonly loc?: Location; + readonly definitions: ReadonlyArray; }; export type DefinitionNode = @@ -251,83 +251,83 @@ export type ExecutableDefinitionNode = | FragmentDefinitionNode; export type OperationDefinitionNode = { - readonly kind: 'OperationDefinition', - readonly loc?: Location, - readonly operation: OperationTypeNode, - readonly name?: NameNode, - readonly variableDefinitions?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly selectionSet: SelectionSetNode, + readonly kind: 'OperationDefinition'; + readonly loc?: Location; + readonly operation: OperationTypeNode; + readonly name?: NameNode; + readonly variableDefinitions?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; }; export type OperationTypeNode = 'query' | 'mutation' | 'subscription'; export type VariableDefinitionNode = { - readonly kind: 'VariableDefinition', - readonly loc?: Location, - readonly variable: VariableNode, - readonly type: TypeNode, - readonly defaultValue?: ValueNode, - readonly directives?: ReadonlyArray, + readonly kind: 'VariableDefinition'; + readonly loc?: Location; + readonly variable: VariableNode; + readonly type: TypeNode; + readonly defaultValue?: ValueNode; + readonly directives?: ReadonlyArray; }; export type VariableNode = { - readonly kind: 'Variable', - readonly loc?: Location, - readonly name: NameNode, + readonly kind: 'Variable'; + readonly loc?: Location; + readonly name: NameNode; }; export type SelectionSetNode = { - kind: 'SelectionSet', - loc?: Location, - selections: ReadonlyArray, + kind: 'SelectionSet'; + loc?: Location; + selections: ReadonlyArray; }; export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; export type FieldNode = { - readonly kind: 'Field', - readonly loc?: Location, - readonly alias?: NameNode, - readonly name: NameNode, - readonly arguments?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly selectionSet?: SelectionSetNode, + readonly kind: 'Field'; + readonly loc?: Location; + readonly alias?: NameNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly selectionSet?: SelectionSetNode; }; export type ArgumentNode = { - readonly kind: 'Argument', - readonly loc?: Location, - readonly name: NameNode, - readonly value: ValueNode, + readonly kind: 'Argument'; + readonly loc?: Location; + readonly name: NameNode; + readonly value: ValueNode; }; // Fragments export type FragmentSpreadNode = { - readonly kind: 'FragmentSpread', - readonly loc?: Location, - readonly name: NameNode, - readonly directives?: ReadonlyArray, + readonly kind: 'FragmentSpread'; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; }; export type InlineFragmentNode = { - readonly kind: 'InlineFragment', - readonly loc?: Location, - readonly typeCondition?: NamedTypeNode, - readonly directives?: ReadonlyArray, - readonly selectionSet: SelectionSetNode, + readonly kind: 'InlineFragment'; + readonly loc?: Location; + readonly typeCondition?: NamedTypeNode; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; }; export type FragmentDefinitionNode = { - readonly kind: 'FragmentDefinition', - readonly loc?: Location, - readonly name: NameNode, + readonly kind: 'FragmentDefinition'; + readonly loc?: Location; + readonly name: NameNode; // Note: fragment variable definitions are deprecated and will removed in v17.0.0 - readonly variableDefinitions?: ReadonlyArray, - readonly typeCondition: NamedTypeNode, - readonly directives?: ReadonlyArray, - readonly selectionSet: SelectionSetNode, + readonly variableDefinitions?: ReadonlyArray; + readonly typeCondition: NamedTypeNode; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; }; // Values @@ -344,67 +344,67 @@ export type ValueNode = | ObjectValueNode; export type IntValueNode = { - readonly kind: 'IntValue', - readonly loc?: Location, - readonly value: string, + readonly kind: 'IntValue'; + readonly loc?: Location; + readonly value: string; }; export type FloatValueNode = { - readonly kind: 'FloatValue', - readonly loc?: Location, - readonly value: string, + readonly kind: 'FloatValue'; + readonly loc?: Location; + readonly value: string; }; export type StringValueNode = { - readonly kind: 'StringValue', - readonly loc?: Location, - readonly value: string, - readonly block?: boolean, + readonly kind: 'StringValue'; + readonly loc?: Location; + readonly value: string; + readonly block?: boolean; }; export type BooleanValueNode = { - readonly kind: 'BooleanValue', - readonly loc?: Location, - readonly value: boolean, + readonly kind: 'BooleanValue'; + readonly loc?: Location; + readonly value: boolean; }; export type NullValueNode = { - readonly kind: 'NullValue', - readonly loc?: Location, + readonly kind: 'NullValue'; + readonly loc?: Location; }; export type EnumValueNode = { - readonly kind: 'EnumValue', - readonly loc?: Location, - readonly value: string, + readonly kind: 'EnumValue'; + readonly loc?: Location; + readonly value: string; }; export type ListValueNode = { - readonly kind: 'ListValue', - readonly loc?: Location, - readonly values: ReadonlyArray, + readonly kind: 'ListValue'; + readonly loc?: Location; + readonly values: ReadonlyArray; }; export type ObjectValueNode = { - readonly kind: 'ObjectValue', - readonly loc?: Location, - readonly fields: ReadonlyArray, + readonly kind: 'ObjectValue'; + readonly loc?: Location; + readonly fields: ReadonlyArray; }; export type ObjectFieldNode = { - readonly kind: 'ObjectField', - readonly loc?: Location, - readonly name: NameNode, - readonly value: ValueNode, + readonly kind: 'ObjectField'; + readonly loc?: Location; + readonly name: NameNode; + readonly value: ValueNode; }; // Directives export type DirectiveNode = { - readonly kind: 'Directive', - readonly loc?: Location, - readonly name: NameNode, - readonly arguments?: ReadonlyArray, + readonly kind: 'Directive'; + readonly loc?: Location; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; }; // Type Reference @@ -412,21 +412,21 @@ export type DirectiveNode = { export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; export type NamedTypeNode = { - readonly kind: 'NamedType', - readonly loc?: Location, - readonly name: NameNode, + readonly kind: 'NamedType'; + readonly loc?: Location; + readonly name: NameNode; }; export type ListTypeNode = { - readonly kind: 'ListType', - readonly loc?: Location, - readonly type: TypeNode, + readonly kind: 'ListType'; + readonly loc?: Location; + readonly type: TypeNode; }; export type NonNullTypeNode = { - readonly kind: 'NonNullType', - readonly loc?: Location, - readonly type: NamedTypeNode | ListTypeNode, + readonly kind: 'NonNullType'; + readonly loc?: Location; + readonly type: NamedTypeNode | ListTypeNode; }; // Type System Definition @@ -437,18 +437,18 @@ export type TypeSystemDefinitionNode = | DirectiveDefinitionNode; export type SchemaDefinitionNode = { - readonly kind: 'SchemaDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly directives?: ReadonlyArray, - readonly operationTypes: ReadonlyArray, + readonly kind: 'SchemaDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly directives?: ReadonlyArray; + readonly operationTypes: ReadonlyArray; }; export type OperationTypeDefinitionNode = { - readonly kind: 'OperationTypeDefinition', - readonly loc?: Location, - readonly operation: OperationTypeNode, - readonly type: NamedTypeNode, + readonly kind: 'OperationTypeDefinition'; + readonly loc?: Location; + readonly operation: OperationTypeNode; + readonly type: NamedTypeNode; }; // Type Definition @@ -462,98 +462,98 @@ export type TypeDefinitionNode = | InputObjectTypeDefinitionNode; export type ScalarTypeDefinitionNode = { - readonly kind: 'ScalarTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly directives?: ReadonlyArray, + readonly kind: 'ScalarTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; }; export type ObjectTypeDefinitionNode = { - readonly kind: 'ObjectTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly interfaces?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'ObjectTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; export type FieldDefinitionNode = { - readonly kind: 'FieldDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly arguments?: ReadonlyArray, - readonly type: TypeNode, - readonly directives?: ReadonlyArray, + readonly kind: 'FieldDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly type: TypeNode; + readonly directives?: ReadonlyArray; }; export type InputValueDefinitionNode = { - readonly kind: 'InputValueDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly type: TypeNode, - readonly defaultValue?: ValueNode, - readonly directives?: ReadonlyArray, + readonly kind: 'InputValueDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly type: TypeNode; + readonly defaultValue?: ValueNode; + readonly directives?: ReadonlyArray; }; export type InterfaceTypeDefinitionNode = { - readonly kind: 'InterfaceTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly interfaces?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'InterfaceTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; export type UnionTypeDefinitionNode = { - readonly kind: 'UnionTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly types?: ReadonlyArray, + readonly kind: 'UnionTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly types?: ReadonlyArray; }; export type EnumTypeDefinitionNode = { - readonly kind: 'EnumTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly values?: ReadonlyArray, + readonly kind: 'EnumTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly values?: ReadonlyArray; }; export type EnumValueDefinitionNode = { - readonly kind: 'EnumValueDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly directives?: ReadonlyArray, + readonly kind: 'EnumValueDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; }; export type InputObjectTypeDefinitionNode = { - readonly kind: 'InputObjectTypeDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'InputObjectTypeDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; // Directive Definitions export type DirectiveDefinitionNode = { - readonly kind: 'DirectiveDefinition', - readonly loc?: Location, - readonly description?: StringValueNode, - readonly name: NameNode, - readonly arguments?: ReadonlyArray, - readonly repeatable: boolean, - readonly locations: ReadonlyArray, + readonly kind: 'DirectiveDefinition'; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly repeatable: boolean; + readonly locations: ReadonlyArray; }; // Type System Extensions @@ -561,10 +561,10 @@ export type DirectiveDefinitionNode = { export type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; export type SchemaExtensionNode = { - readonly kind: 'SchemaExtension', - readonly loc?: Location, - readonly directives?: ReadonlyArray, - readonly operationTypes?: ReadonlyArray, + readonly kind: 'SchemaExtension'; + readonly loc?: Location; + readonly directives?: ReadonlyArray; + readonly operationTypes?: ReadonlyArray; }; // Type Extensions @@ -578,50 +578,50 @@ export type TypeExtensionNode = | InputObjectTypeExtensionNode; export type ScalarTypeExtensionNode = { - readonly kind: 'ScalarTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly directives?: ReadonlyArray, + readonly kind: 'ScalarTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; }; export type ObjectTypeExtensionNode = { - readonly kind: 'ObjectTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly interfaces?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'ObjectTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; export type InterfaceTypeExtensionNode = { - readonly kind: 'InterfaceTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly interfaces?: ReadonlyArray, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'InterfaceTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; export type UnionTypeExtensionNode = { - readonly kind: 'UnionTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly types?: ReadonlyArray, + readonly kind: 'UnionTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly types?: ReadonlyArray; }; export type EnumTypeExtensionNode = { - readonly kind: 'EnumTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly values?: ReadonlyArray, + readonly kind: 'EnumTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly values?: ReadonlyArray; }; export type InputObjectTypeExtensionNode = { - readonly kind: 'InputObjectTypeExtension', - readonly loc?: Location, - readonly name: NameNode, - readonly directives?: ReadonlyArray, - readonly fields?: ReadonlyArray, + readonly kind: 'InputObjectTypeExtension'; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; }; diff --git a/src/language/lexer.ts b/src/language/lexer.ts index 8339083132..b39818d3f2 100644 --- a/src/language/lexer.ts +++ b/src/language/lexer.ts @@ -75,9 +75,7 @@ export class Lexer { /** * @internal */ -export function isPunctuatorTokenKind( - kind: TokenKindEnum, -): boolean { +export function isPunctuatorTokenKind(kind: TokenKindEnum): boolean { return ( kind === TokenKind.BANG || kind === TokenKind.DOLLAR || diff --git a/src/language/source.ts b/src/language/source.ts index 19fb906f37..63f387ac53 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -3,8 +3,8 @@ import { devAssert } from '../jsutils/devAssert'; import { instanceOf } from '../jsutils/instanceOf'; type Location = { - line: number, - column: number, + line: number; + column: number; }; /** diff --git a/src/language/visitor.ts b/src/language/visitor.ts index d284eb604b..2d8e631b30 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -12,12 +12,12 @@ export type ASTVisitor = Partial & KindVisitor>; type KindVisitor = $ObjMap< ASTKindToNode, - (Node) => ASTVisitFn | EnterLeaveVisitor, + (Node) => ASTVisitFn | EnterLeaveVisitor >; type EnterLeaveVisitor = { - readonly enter?: ASTVisitFn, - readonly leave?: ASTVisitFn, + readonly enter?: ASTVisitFn; + readonly leave?: ASTVisitFn; }; /** @@ -378,7 +378,7 @@ export function getVisitFn( visitor: ASTVisitor, kind: string, isLeaving: boolean, - ): Maybe> { +): Maybe> { const kindVisitor = visitor[kind]; if (kindVisitor) { if (!isLeaving && typeof kindVisitor === 'function') { diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 3d7370f428..390ce2a04e 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -18,10 +18,10 @@ import { createSourceEventStream, subscribe } from '../subscribe'; import { SimplePubSub } from './simplePubSub'; type Email = { - from: string, - subject: string, - message: string, - unread: boolean, + from: string; + subject: string; + message: string; + unread: boolean; }; const EmailType = new GraphQLObjectType({ diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index d173055177..0b66af5ca5 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -27,14 +27,14 @@ import { getOperationRootType } from '../utilities/getOperationRootType'; import { mapAsyncIterator } from './mapAsyncIterator'; export type SubscriptionArgs = { - schema: GraphQLSchema, - document: DocumentNode, - rootValue?: unknown, - contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown }>, - operationName?: Maybe, - fieldResolver?: Maybe>, - subscribeFieldResolver?: Maybe>, + schema: GraphQLSchema; + document: DocumentNode; + rootValue?: unknown; + contextValue?: unknown; + variableValues?: Maybe<{ readonly [variable: string]: unknown }>; + operationName?: Maybe; + fieldResolver?: Maybe>; + subscribeFieldResolver?: Maybe>; }; /** diff --git a/src/type/__tests__/predicate-test.ts b/src/type/__tests__/predicate-test.ts index 1c1a5831bb..94e152e1aa 100644 --- a/src/type/__tests__/predicate-test.ts +++ b/src/type/__tests__/predicate-test.ts @@ -564,8 +564,8 @@ describe('Type predicates', () => { describe('isRequiredArgument', () => { function buildArg(config: { - type: GraphQLInputType, - defaultValue?: unknown, + type: GraphQLInputType; + defaultValue?: unknown; }): GraphQLArgument { return { name: 'someArg', @@ -612,8 +612,8 @@ describe('Type predicates', () => { describe('isRequiredInputField', () => { function buildInputField(config: { - type: GraphQLInputType, - defaultValue?: unknown, + type: GraphQLInputType; + defaultValue?: unknown; }): GraphQLInputField { return { name: 'someInputField', diff --git a/src/type/definition.ts b/src/type/definition.ts index 6983060933..362b626881 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -194,7 +194,7 @@ export type GraphQLInputType = | GraphQLScalarType | GraphQLEnumType | GraphQLInputObjectType - | GraphQLList, + | GraphQLList >; export function isInputType(type: unknown): type is GraphQLInputType { @@ -229,7 +229,7 @@ export type GraphQLOutputType = | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType - | GraphQLList, + | GraphQLList >; export function isOutputType(type: unknown): type is GraphQLOutputType { @@ -433,10 +433,11 @@ export function assertNullableType(type: unknown): GraphQLNullableType { return type; } - export function getNullableType(type: void | null): void; export function getNullableType(type: T): T; -export function getNullableType(type: GraphQLNonNull): T; +export function getNullableType( + type: GraphQLNonNull, +): T; export function getNullableType(type) { if (type) { return isNonNullType(type) ? type.ofType : type; @@ -610,30 +611,31 @@ export type GraphQLScalarValueParser = ( export type GraphQLScalarLiteralParser = ( valueNode: ValueNode, variables: Maybe>, - ) => Maybe; +) => Maybe; export type GraphQLScalarTypeConfig = { - name: string, - description?: Maybe, - specifiedByUrl?: Maybe, + name: string; + description?: Maybe; + specifiedByUrl?: Maybe; // Serializes an internal value to include in a response. - serialize?: GraphQLScalarSerializer, + serialize?: GraphQLScalarSerializer; // Parses an externally provided value to use as an input. - parseValue?: GraphQLScalarValueParser, + parseValue?: GraphQLScalarValueParser; // Parses an externally provided literal value to use as an input. - parseLiteral?: GraphQLScalarLiteralParser, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + parseLiteral?: GraphQLScalarLiteralParser; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; -interface GraphQLScalarTypeNormalizedConfig extends GraphQLScalarTypeConfig { - serialize: GraphQLScalarSerializer, - parseValue: GraphQLScalarValueParser, - parseLiteral: GraphQLScalarLiteralParser, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; +interface GraphQLScalarTypeNormalizedConfig + extends GraphQLScalarTypeConfig { + serialize: GraphQLScalarSerializer; + parseValue: GraphQLScalarValueParser; + parseLiteral: GraphQLScalarLiteralParser; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} /** * Object Type Definition @@ -745,7 +747,7 @@ export class GraphQLObjectType { function defineInterfaces( config: Readonly< | GraphQLObjectTypeConfig - | GraphQLInterfaceTypeConfig, + | GraphQLInterfaceTypeConfig >, ): Array { const interfaces = resolveArrayThunk(config.interfaces ?? []); @@ -759,7 +761,7 @@ function defineInterfaces( function defineFieldMap( config: Readonly< | GraphQLObjectTypeConfig - | GraphQLInterfaceTypeConfig, + | GraphQLInterfaceTypeConfig >, ): GraphQLFieldMap { const fieldMap = resolveObjMapThunk(config.fields); @@ -849,22 +851,23 @@ export function argsToArgsConfig( } export type GraphQLObjectTypeConfig = { - name: string, - description?: Maybe, - interfaces?: ThunkArray, - fields: ThunkObjMap>, - isTypeOf?: Maybe>, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + name: string; + description?: Maybe; + interfaces?: ThunkArray; + fields: ThunkObjMap>; + isTypeOf?: Maybe>; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; -interface GraphQLObjectTypeNormalizedConfig extends GraphQLObjectTypeConfig { - interfaces: Array, - fields: GraphQLFieldConfigMap, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; +interface GraphQLObjectTypeNormalizedConfig + extends GraphQLObjectTypeConfig { + interfaces: Array; + fields: GraphQLFieldConfigMap; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} /** * Note: returning GraphQLObjectType is deprecated and will be removed in v16.0.0 @@ -885,7 +888,7 @@ export type GraphQLIsTypeOfFn = ( export type GraphQLFieldResolver< TSource, TContext, - TArgs = { [argument: string]: any }, + TArgs = { [argument: string]: any } > = ( source: TSource, args: TArgs, @@ -894,72 +897,72 @@ export type GraphQLFieldResolver< ) => unknown; export type GraphQLResolveInfo = { - readonly fieldName: string, - readonly fieldNodes: ReadonlyArray, - readonly returnType: GraphQLOutputType, - readonly parentType: GraphQLObjectType, - readonly path: Path, - readonly schema: GraphQLSchema, - readonly fragments: ObjMap, - readonly rootValue: unknown, - readonly operation: OperationDefinitionNode, - readonly variableValues: { [variable: string]: unknown }, + readonly fieldName: string; + readonly fieldNodes: ReadonlyArray; + readonly returnType: GraphQLOutputType; + readonly parentType: GraphQLObjectType; + readonly path: Path; + readonly schema: GraphQLSchema; + readonly fragments: ObjMap; + readonly rootValue: unknown; + readonly operation: OperationDefinitionNode; + readonly variableValues: { [variable: string]: unknown }; }; export type GraphQLFieldConfig< TSource, TContext, - TArgs = { [argument: string]: any }, + TArgs = { [argument: string]: any } > = { - description?: Maybe, - type: GraphQLOutputType, - args?: GraphQLFieldConfigArgumentMap, - resolve?: GraphQLFieldResolver, - subscribe?: GraphQLFieldResolver, - deprecationReason?: Maybe, - extensions?: Maybe>, - astNode?: Maybe, + description?: Maybe; + type: GraphQLOutputType; + args?: GraphQLFieldConfigArgumentMap; + resolve?: GraphQLFieldResolver; + subscribe?: GraphQLFieldResolver; + deprecationReason?: Maybe; + extensions?: Maybe>; + astNode?: Maybe; }; export type GraphQLFieldConfigArgumentMap = ObjMap; export type GraphQLArgumentConfig = { - description?: Maybe, - type: GraphQLInputType, - defaultValue?: unknown, - extensions?: Maybe>, - deprecationReason?: Maybe, - astNode?: Maybe, + description?: Maybe; + type: GraphQLInputType; + defaultValue?: unknown; + extensions?: Maybe>; + deprecationReason?: Maybe; + astNode?: Maybe; }; export type GraphQLFieldConfigMap = ObjMap< - GraphQLFieldConfig, + GraphQLFieldConfig >; export type GraphQLField< TSource, TContext, - TArgs = { [argument: string]: any }, + TArgs = { [argument: string]: any } > = { - name: string, - description: Maybe, - type: GraphQLOutputType, - args: Array, - resolve?: GraphQLFieldResolver, - subscribe?: GraphQLFieldResolver, - deprecationReason: Maybe, - extensions: Maybe>, - astNode: Maybe, + name: string; + description: Maybe; + type: GraphQLOutputType; + args: Array; + resolve?: GraphQLFieldResolver; + subscribe?: GraphQLFieldResolver; + deprecationReason: Maybe; + extensions: Maybe>; + astNode: Maybe; }; export type GraphQLArgument = { - name: string, - description: Maybe, - type: GraphQLInputType, - defaultValue: unknown, - deprecationReason: Maybe, - extensions: Maybe>, - astNode: Maybe, + name: string; + description: Maybe; + type: GraphQLInputType; + defaultValue: unknown; + deprecationReason: Maybe; + extensions: Maybe>; + astNode: Maybe; }; export function isRequiredArgument(arg: GraphQLArgument): boolean { @@ -967,7 +970,7 @@ export function isRequiredArgument(arg: GraphQLArgument): boolean { } export type GraphQLFieldMap = ObjMap< - GraphQLField, + GraphQLField >; /** @@ -1059,27 +1062,28 @@ export class GraphQLInterfaceType { } export type GraphQLInterfaceTypeConfig = { - name: string, - description?: Maybe, - interfaces?: ThunkArray, - fields: ThunkObjMap>, + name: string; + description?: Maybe; + interfaces?: ThunkArray; + fields: ThunkObjMap>; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: Maybe>, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + resolveType?: Maybe>; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; -export interface GraphQLInterfaceTypeNormalizedConfig extends GraphQLInterfaceTypeConfig { - interfaces: Array, - fields: GraphQLFieldConfigMap, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; +export interface GraphQLInterfaceTypeNormalizedConfig + extends GraphQLInterfaceTypeConfig { + interfaces: Array; + fields: GraphQLFieldConfigMap; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} /** * Union Type Definition @@ -1176,25 +1180,26 @@ function defineTypes( } export type GraphQLUnionTypeConfig = { - name: string, - description?: Maybe, - types: ThunkArray, + name: string; + description?: Maybe; + types: ThunkArray; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing * Object type. */ - resolveType?: Maybe>, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + resolveType?: Maybe>; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; -interface GraphQLUnionTypeNormalizedConfig extends GraphQLUnionTypeConfig { - types: Array, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; +interface GraphQLUnionTypeNormalizedConfig + extends GraphQLUnionTypeConfig { + types: Array; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} /** * Enum Type Definition @@ -1281,7 +1286,10 @@ export class GraphQLEnumType /* */ { return enumValue.value; } - parseLiteral(valueNode: ValueNode, _variables: Maybe>): Maybe /* T */ { + parseLiteral( + valueNode: ValueNode, + _variables: Maybe>, + ): Maybe /* T */ { // Note: variables will be resolved to a value before calling this function. if (valueNode.kind !== Kind.ENUM) { const valueStr = print(valueNode); @@ -1377,36 +1385,36 @@ function defineEnumValues( } export type GraphQLEnumTypeConfig /* */ = { - name: string, - description?: Maybe, - values: GraphQLEnumValueConfigMap /* */, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + name: string; + description?: Maybe; + values: GraphQLEnumValueConfigMap /* */; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig { - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} export type GraphQLEnumValueConfigMap /* */ = ObjMap */>; export type GraphQLEnumValueConfig /* */ = { - description?: Maybe, - value?: any /* T */, - deprecationReason?: Maybe, - extensions?: Maybe>, - astNode?: Maybe, + description?: Maybe; + value?: any /* T */; + deprecationReason?: Maybe; + extensions?: Maybe>; + astNode?: Maybe; }; export type GraphQLEnumValue /* */ = { - name: string, - description: Maybe, - value: any /* T */, - deprecationReason: Maybe, - extensions: Maybe>, - astNode: Maybe, + name: string; + description: Maybe; + value: any /* T */; + deprecationReason: Maybe; + extensions: Maybe>; + astNode: Maybe; }; /** @@ -1516,39 +1524,40 @@ function defineInputFieldMap( } export type GraphQLInputObjectTypeConfig = { - name: string, - description?: Maybe, - fields: ThunkObjMap, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + name: string; + description?: Maybe; + fields: ThunkObjMap; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; }; -interface GraphQLInputObjectTypeNormalizedConfig extends GraphQLInputObjectTypeConfig{ -fields: GraphQLInputFieldConfigMap, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, -}; +interface GraphQLInputObjectTypeNormalizedConfig + extends GraphQLInputObjectTypeConfig { + fields: GraphQLInputFieldConfigMap; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; +} export type GraphQLInputFieldConfig = { - description?: Maybe, - type: GraphQLInputType, - defaultValue?: unknown, - deprecationReason?: Maybe, - extensions?: Maybe>, - astNode?: Maybe, + description?: Maybe; + type: GraphQLInputType; + defaultValue?: unknown; + deprecationReason?: Maybe; + extensions?: Maybe>; + astNode?: Maybe; }; export type GraphQLInputFieldConfigMap = ObjMap; export type GraphQLInputField = { - name: string, - description: Maybe, - type: GraphQLInputType, - defaultValue: unknown, - deprecationReason: Maybe, - extensions: Maybe>, - astNode: Maybe, + name: string; + description: Maybe; + type: GraphQLInputType; + defaultValue: unknown; + deprecationReason: Maybe; + extensions: Maybe>; + astNode: Maybe; }; export function isRequiredInputField(field: GraphQLInputField): boolean { diff --git a/src/type/directives.ts b/src/type/directives.ts index 6bdfb7e2a6..a03e5d4a41 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -104,13 +104,13 @@ export class GraphQLDirective { } export type GraphQLDirectiveConfig = { - name: string, - description?: Maybe, - locations: Array, - args?: Maybe, - isRepeatable?: Maybe, - extensions?: Maybe>, - astNode?: Maybe, + name: string; + description?: Maybe; + locations: Array; + args?: Maybe; + isRepeatable?: Maybe; + extensions?: Maybe>; + astNode?: Maybe; }; interface GraphQLDirectiveNormalizedConfig extends GraphQLDirectiveConfig { diff --git a/src/type/schema.ts b/src/type/schema.ts index 32d5c0d1b4..1767e5bb5a 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -128,8 +128,8 @@ export class GraphQLSchema { _typeMap: TypeMap; _subTypeMap: ObjMap>; _implementationsMap: ObjMap<{ - objects: Array, - interfaces: Array, + objects: Array; + interfaces: Array; }>; // Used as a cache for validateSchema(). @@ -283,8 +283,8 @@ export class GraphQLSchema { getImplementations( interfaceType: GraphQLInterfaceType, ): { - objects: /* $ReadOnly */ Array, - interfaces: /* $ReadOnly */ Array, + objects: /* $ReadOnly */ Array; + interfaces: /* $ReadOnly */ Array; } { const implementations = this._implementationsMap[interfaceType.name]; return implementations ?? { objects: [], interfaces: [] }; @@ -356,31 +356,31 @@ export type GraphQLSchemaValidationOptions = { * * Default: false */ - assumeValid?: boolean, + assumeValid?: boolean; }; export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { - description?: Maybe, - query?: Maybe, - mutation?: Maybe, - subscription?: Maybe, - types?: Maybe>, - directives?: Maybe>, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + description?: Maybe; + query?: Maybe; + mutation?: Maybe; + subscription?: Maybe; + types?: Maybe>; + directives?: Maybe>; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; } /** * @internal */ export interface GraphQLSchemaNormalizedConfig extends GraphQLSchemaConfig { - description: Maybe, - types: Array, - directives: Array, - extensions: Maybe>, - extensionASTNodes: ReadonlyArray, - assumeValid: boolean, + description: Maybe; + types: Array; + directives: Array; + extensions: Maybe>; + extensionASTNodes: ReadonlyArray; + assumeValid: boolean; } function collectReferencedTypes( diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index adcdce17de..8e0356c505 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -58,7 +58,7 @@ function expectASTNode(obj: Maybe<{ readonly astNode: Maybe }>) { } function expectExtensionASTNodes(obj: { - readonly extensionASTNodes: ReadonlyArray, + readonly extensionASTNodes: ReadonlyArray; }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index 7e30c1d9c3..bb3fac85ff 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -37,7 +37,7 @@ import { buildSchema } from '../buildASTSchema'; import type { Maybe } from '../../jsutils/Maybe'; function expectExtensionASTNodes(obj: { - readonly extensionASTNodes: ReadonlyArray, + readonly extensionASTNodes: ReadonlyArray; }) { return expect(obj.extensionASTNodes.map(print).join('\n\n')); } diff --git a/src/utilities/__tests__/valueFromASTUntyped-test.ts b/src/utilities/__tests__/valueFromASTUntyped-test.ts index 68af85aa05..9ad004c42e 100644 --- a/src/utilities/__tests__/valueFromASTUntyped-test.ts +++ b/src/utilities/__tests__/valueFromASTUntyped-test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; -import type { Maybe } from '../../jsutils/Maybe'; +import type { Maybe } from '../../jsutils/Maybe'; import type { ObjMap } from '../../jsutils/ObjMap'; import { parseValue } from '../../language/parser'; diff --git a/src/utilities/buildASTSchema.ts b/src/utilities/buildASTSchema.ts index 407858730a..fda132d859 100644 --- a/src/utilities/buildASTSchema.ts +++ b/src/utilities/buildASTSchema.ts @@ -20,8 +20,8 @@ export interface BuildSchemaOptions extends GraphQLSchemaValidationOptions { * * Default: false */ - assumeValidSDL?: boolean, -}; + assumeValidSDL?: boolean; +} /** * This takes the ast of a schema document produced by the parse function in diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index f3dbf2537f..8010212429 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -89,8 +89,8 @@ interface Options extends GraphQLSchemaValidationOptions { * * Default: false */ - assumeValidSDL?: boolean, -}; + assumeValidSDL?: boolean; +} /** * Produces a new schema given an existing schema and a document which may @@ -394,9 +394,9 @@ export function extendSchemaImpl( function getOperationTypes( nodes: ReadonlyArray, ): { - query: Maybe, - mutation: Maybe, - subscription: Maybe, + query: Maybe; + mutation: Maybe; + subscription: Maybe; } { const opTypes = {}; for (const node of nodes) { @@ -455,7 +455,7 @@ export function extendSchemaImpl( | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode - | ObjectTypeExtensionNode, + | ObjectTypeExtensionNode >, ): GraphQLFieldConfigMap { const fieldConfigMap = Object.create(null); @@ -505,7 +505,7 @@ export function extendSchemaImpl( function buildInputFieldMap( nodes: ReadonlyArray< - InputObjectTypeDefinitionNode | InputObjectTypeExtensionNode, + InputObjectTypeDefinitionNode | InputObjectTypeExtensionNode >, ): GraphQLInputFieldConfigMap { const inputFieldMap = Object.create(null); @@ -555,7 +555,7 @@ export function extendSchemaImpl( | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode - | ObjectTypeExtensionNode, + | ObjectTypeExtensionNode >, ): Array { const interfaces = []; diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 8e0b2a68e0..621d4b0d82 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -557,9 +557,9 @@ function diff( oldArray: ReadonlyArray, newArray: ReadonlyArray, ): { - added: Array, - removed: Array, - persisted: Array<[T, T]>, + added: Array; + removed: Array; + persisted: Array<[T, T]>; } { const added = []; const removed = []; diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 72d75e654e..56720cc567 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -4,23 +4,23 @@ import type { DirectiveLocationEnum } from '../language/directiveLocation'; export type IntrospectionOptions = { // Whether to include descriptions in the introspection result. // Default: true - descriptions?: boolean, + descriptions?: boolean; // Whether to include `specifiedByUrl` in the introspection result. // Default: false - specifiedByUrl?: boolean, + specifiedByUrl?: boolean; // Whether to include `isRepeatable` field on directives. // Default: false - directiveIsRepeatable?: boolean, + directiveIsRepeatable?: boolean; // Whether to include `description` field on schema. // Default: false - schemaDescription?: boolean, + schemaDescription?: boolean; // Whether target GraphQL server support deprecation of input values. // Default: false - inputValueDeprecation?: boolean, + inputValueDeprecation?: boolean; }; export function getIntrospectionQuery(options?: IntrospectionOptions): string { @@ -149,16 +149,20 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string { } export type IntrospectionQuery = { - readonly __schema: IntrospectionSchema, + readonly __schema: IntrospectionSchema; }; export type IntrospectionSchema = { - readonly description?: Maybe, - readonly queryType: IntrospectionNamedTypeRef, - readonly mutationType: Maybe>, - readonly subscriptionType: Maybe>, - readonly types: ReadonlyArray, - readonly directives: ReadonlyArray, + readonly description?: Maybe; + readonly queryType: IntrospectionNamedTypeRef; + readonly mutationType: Maybe< + IntrospectionNamedTypeRef + >; + readonly subscriptionType: Maybe< + IntrospectionNamedTypeRef + >; + readonly types: ReadonlyArray; + readonly directives: ReadonlyArray; }; export type IntrospectionType = @@ -182,48 +186,56 @@ export type IntrospectionInputType = | IntrospectionInputObjectType; export type IntrospectionScalarType = { - readonly kind: 'SCALAR', - readonly name: string, - readonly description?: Maybe, - readonly specifiedByUrl?: Maybe, + readonly kind: 'SCALAR'; + readonly name: string; + readonly description?: Maybe; + readonly specifiedByUrl?: Maybe; }; export type IntrospectionObjectType = { - readonly kind: 'OBJECT', - readonly name: string, - readonly description?: Maybe, - readonly fields: ReadonlyArray, - readonly interfaces: ReadonlyArray>, + readonly kind: 'OBJECT'; + readonly name: string; + readonly description?: Maybe; + readonly fields: ReadonlyArray; + readonly interfaces: ReadonlyArray< + IntrospectionNamedTypeRef + >; }; export type IntrospectionInterfaceType = { - readonly kind: 'INTERFACE', - readonly name: string, - readonly description?: Maybe, - readonly fields: ReadonlyArray, - readonly interfaces: ReadonlyArray>, - readonly possibleTypes: ReadonlyArray>, + readonly kind: 'INTERFACE'; + readonly name: string; + readonly description?: Maybe; + readonly fields: ReadonlyArray; + readonly interfaces: ReadonlyArray< + IntrospectionNamedTypeRef + >; + readonly possibleTypes: ReadonlyArray< + IntrospectionNamedTypeRef + >; }; export type IntrospectionUnionType = { - readonly kind: 'UNION', - readonly name: string, - readonly description?: Maybe, - readonly possibleTypes: ReadonlyArray>, + readonly kind: 'UNION'; + readonly name: string; + readonly description?: Maybe; + readonly possibleTypes: ReadonlyArray< + IntrospectionNamedTypeRef + >; }; export type IntrospectionEnumType = { - readonly kind: 'ENUM', - readonly name: string, - readonly description?: Maybe, - readonly enumValues: ReadonlyArray, + readonly kind: 'ENUM'; + readonly name: string; + readonly description?: Maybe; + readonly enumValues: ReadonlyArray; }; export type IntrospectionInputObjectType = { - readonly kind: 'INPUT_OBJECT', - readonly name: string, - readonly description?: Maybe, - readonly inputFields: ReadonlyArray, + readonly kind: 'INPUT_OBJECT'; + readonly name: string; + readonly description?: Maybe; + readonly inputFields: ReadonlyArray; }; export type IntrospectionListTypeRef< @@ -260,7 +272,7 @@ export type IntrospectionInputTypeRef = | IntrospectionListTypeRef | IntrospectionNonNullTypeRef< | IntrospectionNamedTypeRef - | IntrospectionListTypeRef, + | IntrospectionListTypeRef >; export type IntrospectionNamedTypeRef< @@ -271,34 +283,34 @@ export type IntrospectionNamedTypeRef< }; export type IntrospectionField = { - readonly name: string, - readonly description?: Maybe, - readonly args: ReadonlyArray, - readonly type: IntrospectionOutputTypeRef, - readonly isDeprecated: boolean, - readonly deprecationReason: Maybe, + readonly name: string; + readonly description?: Maybe; + readonly args: ReadonlyArray; + readonly type: IntrospectionOutputTypeRef; + readonly isDeprecated: boolean; + readonly deprecationReason: Maybe; }; export type IntrospectionInputValue = { - readonly name: string, - readonly description?: Maybe, - readonly type: IntrospectionInputTypeRef, - readonly defaultValue: Maybe, - readonly isDeprecated?: boolean, - readonly deprecationReason?: Maybe, + readonly name: string; + readonly description?: Maybe; + readonly type: IntrospectionInputTypeRef; + readonly defaultValue: Maybe; + readonly isDeprecated?: boolean; + readonly deprecationReason?: Maybe; }; export type IntrospectionEnumValue = { - readonly name: string, - readonly description?: Maybe, - readonly isDeprecated: boolean, - readonly deprecationReason: Maybe, + readonly name: string; + readonly description?: Maybe; + readonly isDeprecated: boolean; + readonly deprecationReason: Maybe; }; export type IntrospectionDirective = { - readonly name: string, - readonly description?: Maybe, - readonly isRepeatable?: boolean, - readonly locations: ReadonlyArray, - readonly args: ReadonlyArray, + readonly name: string; + readonly description?: Maybe; + readonly isRepeatable?: boolean; + readonly locations: ReadonlyArray; + readonly args: ReadonlyArray; }; diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 917bb5526e..fcacb503f0 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -70,7 +70,9 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { return typeMap[type.name] as T; } - function replaceMaybeType>(maybeType: T): T { + function replaceMaybeType>( + maybeType: T, + ): T { return maybeType && replaceNamedType(maybeType); } @@ -105,7 +107,9 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { })); } - function sortTypes(arr: ReadonlyArray): Array { + function sortTypes( + arr: ReadonlyArray, + ): Array { return sortByName(arr).map(replaceNamedType); } @@ -172,10 +176,7 @@ function sortByName( return sortBy(array, (obj) => obj.name); } -function sortBy( - array: ReadonlyArray, - mapToKey: (T) => string, -): Array { +function sortBy(array: ReadonlyArray, mapToKey: (T) => string): Array { return array.slice().sort((obj1, obj2) => { const key1 = mapToKey(obj1); const key2 = mapToKey(obj2); diff --git a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts index d50e197171..9ef1d50f5c 100644 --- a/src/validation/rules/UniqueFieldDefinitionNamesRule.ts +++ b/src/validation/rules/UniqueFieldDefinitionNamesRule.ts @@ -38,8 +38,10 @@ export function UniqueFieldDefinitionNamesRule( }; function checkFieldUniqueness(node: { - readonly name: NameNode, - readonly fields?: ReadonlyArray, + readonly name: NameNode; + readonly fields?: ReadonlyArray< + InputValueDefinitionNode | FieldDefinitionNode + >; }) { const typeName = node.name.value; From ba4c76e25cea195a1f5eb43f068692877f2233f6 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Fri, 15 Jan 2021 12:06:36 -0600 Subject: [PATCH 28/65] remove `$ObjMap` (flow) to fix visitor types --- src/language/visitor.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/language/visitor.ts b/src/language/visitor.ts index 2d8e631b30..cb002a29ef 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -10,10 +10,11 @@ import { isNode } from './ast'; */ export type ASTVisitor = Partial & KindVisitor>; -type KindVisitor = $ObjMap< - ASTKindToNode, - (Node) => ASTVisitFn | EnterLeaveVisitor ->; +type KindVisitor = { + readonly [K in keyof ASTKindToNode]?: + | ASTVisitFn + | EnterLeaveVisitor; +}; type EnterLeaveVisitor = { readonly enter?: ASTVisitFn; From 8de679b69c900f5fff55638e8981b647a2861341 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Fri, 15 Jan 2021 12:09:28 -0600 Subject: [PATCH 29/65] build: remove eslint flow plugin --- .eslintrc.yml | 59 +----------------------------------------- package-lock.json | 36 -------------------------- package.json | 1 - src/jsutils/inspect.ts | 2 -- 4 files changed, 1 insertion(+), 97 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index deb7da11d2..19aaba217c 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -435,63 +435,6 @@ rules: yield-star-spacing: off overrides: - - files: 'src/**/*.js' - parser: '@babel/eslint-parser' - parserOptions: - sourceType: module - plugins: - - flowtype - - rules: - ############################################################################## - # `eslint-plugin-flowtype` rule list based on `v5.6.x` - # https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype - ############################################################################## - - flowtype/array-style-complex-type: error - flowtype/array-style-simple-type: error - flowtype/define-flow-type: error - flowtype/newline-after-flow-annotation: error - flowtype/no-dupe-keys: error - flowtype/no-existential-type: off # checked by Flow - flowtype/no-flow-fix-me-comments: off - flowtype/no-internal-flow-type: error - flowtype/no-mixed: off - flowtype/no-mutable-array: off - flowtype/no-primitive-constructor-types: error - flowtype/no-types-missing-file-annotation: off - flowtype/no-unused-expressions: off - flowtype/no-weak-types: [error, { any: false }] - flowtype/require-compound-type-alias: off - flowtype/require-exact-type: off - flowtype/require-indexer-name: error - flowtype/require-inexact-type: off # checked by Flow - flowtype/require-parameter-type: off - flowtype/require-readonly-react-props: off - flowtype/require-return-type: off - flowtype/require-types-at-top: off - flowtype/require-valid-file-annotation: off - flowtype/require-variable-type: off - flowtype/sort-keys: off - flowtype/spread-exact-type: off - flowtype/type-id-match: [error, '^[A-Z]'] - flowtype/type-import-style: [error, declaration] - flowtype/use-read-only-spread: error - flowtype/use-flow-type: error - - # Bellow rules are disabled because coflicts with Prettier, see: - # https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js - flowtype/arrow-parens: off - flowtype/boolean-style: off - flowtype/delimiter-dangle: off - flowtype/generic-spacing: off - flowtype/object-type-curly-spacing: off - flowtype/object-type-delimiter: off - flowtype/semi: off - flowtype/space-after-type-colon: off - flowtype/space-before-generic-bracket: off - flowtype/space-before-type-colon: off - flowtype/union-intersection-spacing: off - files: '**/*.ts' parser: '@typescript-eslint/parser' parserOptions: @@ -639,7 +582,7 @@ overrides: '@typescript-eslint/require-await': error '@typescript-eslint/return-await': error - # Disable for JS, Flow and TS + # Disable for JS and TS '@typescript-eslint/init-declarations': off '@typescript-eslint/no-magic-numbers': off '@typescript-eslint/no-use-before-define': off diff --git a/package-lock.json b/package-lock.json index c3c8b32014..762ca369ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,6 @@ "chai": "4.3.4", "cspell": "5.3.12", "eslint": "7.24.0", - "eslint-plugin-flowtype": "5.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-internal-rules": "file:./resources/eslint-internal-rules", "eslint-plugin-istanbul": "0.1.2", @@ -2986,22 +2985,6 @@ "eslint": ">=4.19.1" } }, - "node_modules/eslint-plugin-flowtype": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.6.0.tgz", - "integrity": "sha512-XbeDejiL+SecDInj9On/9D4EM31kUp6B3uWYsBH6Vsb2CfaFWiUHvosAZx1TafVjp6izLC7D3kpix1DIpDF4Qw==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15", - "string-natural-compare": "^3.0.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.1.0" - } - }, "node_modules/eslint-plugin-import": { "version": "2.22.1", "dev": true, @@ -5876,11 +5859,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/string-natural-compare": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { "version": "4.2.0", "dev": true, @@ -8727,16 +8705,6 @@ "regexpp": "^3.0.0" } }, - "eslint-plugin-flowtype": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.6.0.tgz", - "integrity": "sha512-XbeDejiL+SecDInj9On/9D4EM31kUp6B3uWYsBH6Vsb2CfaFWiUHvosAZx1TafVjp6izLC7D3kpix1DIpDF4Qw==", - "dev": true, - "requires": { - "lodash": "^4.17.15", - "string-natural-compare": "^3.0.1" - } - }, "eslint-plugin-import": { "version": "2.22.1", "dev": true, @@ -10480,10 +10448,6 @@ "version": "1.0.3", "dev": true }, - "string-natural-compare": { - "version": "3.0.1", - "dev": true - }, "string-width": { "version": "4.2.0", "dev": true, diff --git a/package.json b/package.json index a80c88d1ff..4150b28d78 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "chai": "4.3.4", "cspell": "5.3.12", "eslint": "7.24.0", - "eslint-plugin-flowtype": "5.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-internal-rules": "file:./resources/eslint-internal-rules", "eslint-plugin-istanbul": "0.1.2", diff --git a/src/jsutils/inspect.ts b/src/jsutils/inspect.ts index faaca25c5f..f204bbeaf5 100644 --- a/src/jsutils/inspect.ts +++ b/src/jsutils/inspect.ts @@ -1,5 +1,3 @@ -/* eslint-disable flowtype/no-weak-types */ - const MAX_ARRAY_LENGTH = 10; const MAX_RECURSIVE_DEPTH = 2; From cb08f35ec3cc83039d64efc38987f8398e4a7db3 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Fri, 15 Jan 2021 12:10:47 -0600 Subject: [PATCH 30/65] refactor: remove unused eslint-disable directives --- src/jsutils/__tests__/inspect-test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/jsutils/__tests__/inspect-test.ts b/src/jsutils/__tests__/inspect-test.ts index 190caa619e..c3912993c0 100644 --- a/src/jsutils/__tests__/inspect-test.ts +++ b/src/jsutils/__tests__/inspect-test.ts @@ -170,7 +170,6 @@ describe('inspect', () => { // eslint-disable-next-line func-names const objectWithoutClassName = new (function () { - // eslint-disable-next-line no-invalid-this this.foo = 1; })(); expect(inspect([[objectWithoutClassName]])).to.equal('[[[Object]]]'); From 8f2ab1718420eab31c1323da888e9ebb50b8fc6d Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 21 Jan 2021 10:17:22 -0600 Subject: [PATCH 31/65] refactor: remove Flow Fix me comments --- src/__testUtils__/kitchenSinkQuery.ts | 1 - src/error/GraphQLError.ts | 4 -- src/error/__tests__/formatError-test.ts | 3 -- src/execution/__tests__/executor-test.ts | 3 -- src/language/__tests__/printer-test.ts | 2 - src/language/__tests__/schema-printer-test.ts | 1 - src/language/__tests__/source-test.ts | 2 - src/language/__tests__/toJSONDeep.ts | 1 - src/language/source.ts | 1 - .../__tests__/mapAsyncIterator-test.ts | 1 - src/subscription/__tests__/simplePubSub.ts | 2 - src/subscription/__tests__/subscribe-test.ts | 5 --- src/subscription/mapAsyncIterator.ts | 3 -- src/type/__tests__/definition-test.ts | 40 ------------------- src/type/__tests__/directive-test.ts | 4 -- src/type/__tests__/enumType-test.ts | 1 - src/type/__tests__/schema-test.ts | 4 -- src/type/__tests__/validation-test.ts | 16 -------- src/type/definition.ts | 8 ---- src/type/directives.ts | 1 - src/type/scalars.ts | 1 - src/type/schema.ts | 1 - .../__tests__/assertValidName-test.ts | 1 - .../__tests__/buildASTSchema-test.ts | 2 - .../__tests__/buildClientSchema-test.ts | 2 - src/utilities/__tests__/extendSchema-test.ts | 2 - .../__tests__/getOperationRootType-test.ts | 1 - src/utilities/__tests__/printSchema-test.ts | 1 - src/utilities/extendSchema.ts | 4 -- src/utilities/lexicographicSortSchema.ts | 2 - src/validation/__tests__/validation-test.ts | 1 - .../rules/custom/NoDeprecatedCustomRule.ts | 1 - 32 files changed, 122 deletions(-) diff --git a/src/__testUtils__/kitchenSinkQuery.ts b/src/__testUtils__/kitchenSinkQuery.ts index 8d176686ea..ba23543a18 100644 --- a/src/__testUtils__/kitchenSinkQuery.ts +++ b/src/__testUtils__/kitchenSinkQuery.ts @@ -1,4 +1,3 @@ -// $FlowFixMe[incompatible-call] export const kitchenSinkQuery: string = String.raw` query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery { whoever123is: node(id: [123, 456]) { diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 8eb81057ab..0c60a7a7b9 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -1,6 +1,3 @@ -// FIXME: -// flowlint uninitialized-instance-property:off - import { isObjectLike } from '../jsutils/isObjectLike'; import type { Maybe } from '../jsutils/Maybe'; @@ -212,7 +209,6 @@ export class GraphQLError extends Error { } // FIXME: workaround to not break chai comparisons, should be remove in v16 - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag](): string { return 'Object'; } diff --git a/src/error/__tests__/formatError-test.ts b/src/error/__tests__/formatError-test.ts index d6c8e17e8d..0a6dc012a6 100644 --- a/src/error/__tests__/formatError-test.ts +++ b/src/error/__tests__/formatError-test.ts @@ -6,7 +6,6 @@ import { GraphQLError } from '../GraphQLError'; describe('formatError: default error formatter', () => { it('uses default message', () => { - // $FlowExpectedError[incompatible-call] const e = new GraphQLError(); expect(formatError(e)).to.deep.equal({ @@ -45,12 +44,10 @@ describe('formatError: default error formatter', () => { }); it('rejects null and undefined errors', () => { - // $FlowExpectedError[incompatible-call] expect(() => formatError(undefined)).to.throw( 'Received null or undefined error.', ); - // $FlowExpectedError[incompatible-call] expect(() => formatError(null)).to.throw( 'Received null or undefined error.', ); diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index 05037f41ea..1ba08cdd42 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -31,14 +31,12 @@ describe('Execute: Handles basic execution tasks', () => { }), }); - // $FlowExpectedError[prop-missing] expect(() => executeSync({ schema })).to.throw('Must provide document.'); }); it('throws if no schema is provided', () => { const document = parse('{ field }'); - // $FlowExpectedError[prop-missing] expect(() => executeSync({ document })).to.throw( 'Expected undefined to be a GraphQL schema.', ); @@ -63,7 +61,6 @@ describe('Execute: Handles basic execution tasks', () => { `); const variableValues = '{ "a": 1 }'; - // $FlowExpectedError[incompatible-call] expect(() => executeSync({ schema, document, variableValues })).to.throw( 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.', ); diff --git a/src/language/__tests__/printer-test.ts b/src/language/__tests__/printer-test.ts index ff5a3b2669..c72e78e8c7 100644 --- a/src/language/__tests__/printer-test.ts +++ b/src/language/__tests__/printer-test.ts @@ -16,7 +16,6 @@ describe('Printer: Query document', () => { it('produces helpful error messages', () => { const badAST = { random: 'Data' }; - // $FlowExpectedError[incompatible-call] expect(() => print(badAST)).to.throw( 'Invalid AST Node: { random: "Data" }.', ); @@ -149,7 +148,6 @@ describe('Printer: Query document', () => { expect(JSON.stringify(ast)).to.equal(astBeforePrintCall); expect(printed).to.equal( - // $FlowFixMe[incompatible-call] dedentString(String.raw` query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery { whoever123is: node(id: [123, 456]) { diff --git a/src/language/__tests__/schema-printer-test.ts b/src/language/__tests__/schema-printer-test.ts index 26311144cb..0250e57be7 100644 --- a/src/language/__tests__/schema-printer-test.ts +++ b/src/language/__tests__/schema-printer-test.ts @@ -19,7 +19,6 @@ describe('Printer: SDL document', () => { it('produces helpful error messages', () => { const badAST = { random: 'Data' }; - // $FlowExpectedError[incompatible-call] expect(() => print(badAST)).to.throw( 'Invalid AST Node: { random: "Data" }.', ); diff --git a/src/language/__tests__/source-test.ts b/src/language/__tests__/source-test.ts index 5510bf1fc6..9e1b69dc81 100644 --- a/src/language/__tests__/source-test.ts +++ b/src/language/__tests__/source-test.ts @@ -5,14 +5,12 @@ import { Source } from '../source'; describe('Source', () => { it('asserts that a body was provided', () => { - // $FlowExpectedError[incompatible-call] expect(() => new Source()).to.throw( 'Body must be a string. Received: undefined.', ); }); it('asserts that a valid body was provided', () => { - // $FlowExpectedError[incompatible-call] expect(() => new Source({})).to.throw( 'Body must be a string. Received: {}.', ); diff --git a/src/language/__tests__/toJSONDeep.ts b/src/language/__tests__/toJSONDeep.ts index 9d7221f13b..a82606252a 100644 --- a/src/language/__tests__/toJSONDeep.ts +++ b/src/language/__tests__/toJSONDeep.ts @@ -11,7 +11,6 @@ export function toJSONDeep(value: unknown): unknown { } if (typeof value.toJSON === 'function') { - // $FlowFixMe[incompatible-use] return value.toJSON(); } diff --git a/src/language/source.ts b/src/language/source.ts index 63f387ac53..b13739262c 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -42,7 +42,6 @@ export class Source { ); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'Source'; } diff --git a/src/subscription/__tests__/mapAsyncIterator-test.ts b/src/subscription/__tests__/mapAsyncIterator-test.ts index 1f7a6b60a5..94b600ee6f 100644 --- a/src/subscription/__tests__/mapAsyncIterator-test.ts +++ b/src/subscription/__tests__/mapAsyncIterator-test.ts @@ -73,7 +73,6 @@ describe('mapAsyncIterator', () => { yield 3; } - // Flow test: this is *not* AsyncIterator> const doubles: AsyncIterator = mapAsyncIterator( source(), async (x) => (await x) + x, diff --git a/src/subscription/__tests__/simplePubSub.ts b/src/subscription/__tests__/simplePubSub.ts index 4725e796cc..756568555d 100644 --- a/src/subscription/__tests__/simplePubSub.ts +++ b/src/subscription/__tests__/simplePubSub.ts @@ -32,8 +32,6 @@ export class SimplePubSub { pushQueue.length = 0; }; - /* TODO: Flow doesn't support symbols as keys: - https://github.com/facebook/flow/issues/3258 */ return { next() { if (!listening) { diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 390ce2a04e..9309570022 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -300,13 +300,11 @@ describe('Subscription Initialization Phase', () => { `); await expectPromiseToThrow( - // $FlowExpectedError[incompatible-call] () => subscribe({ schema: null, document }), 'Expected null to be a GraphQL schema.', ); await expectPromiseToThrow( - // $FlowExpectedError[prop-missing] () => subscribe({ document }), 'Expected undefined to be a GraphQL schema.', ); @@ -314,13 +312,11 @@ describe('Subscription Initialization Phase', () => { it('throws an error if document is missing', async () => { await expectPromiseToThrow( - // $FlowExpectedError[incompatible-call] () => subscribe({ schema: emailSchema, document: null }), 'Must provide document.', ); await expectPromiseToThrow( - // $FlowExpectedError[prop-missing] () => subscribe({ schema: emailSchema }), 'Must provide document.', ); @@ -349,7 +345,6 @@ describe('Subscription Initialization Phase', () => { it('should pass through unexpected errors thrown in subscribe', async () => { let expectedError; try { - // $FlowExpectedError[prop-missing] await subscribe({ schema: emailSchema, document: {} }); } catch (error) { expectedError = error; diff --git a/src/subscription/mapAsyncIterator.ts b/src/subscription/mapAsyncIterator.ts index 5e775872f2..fa261f1b0b 100644 --- a/src/subscription/mapAsyncIterator.ts +++ b/src/subscription/mapAsyncIterator.ts @@ -8,7 +8,6 @@ export function mapAsyncIterator( iterable: AsyncIterable | AsyncGenerator, callback: (T) => PromiseOrValue, ): AsyncGenerator { - // $FlowFixMe[prop-missing] const iteratorMethod = iterable[Symbol.asyncIterator]; const iterator: any = iteratorMethod.call(iterable); @@ -37,8 +36,6 @@ export function mapAsyncIterator( } } - /* TODO: Flow doesn't support symbols as keys: - https://github.com/facebook/flow/issues/3258 */ return { next(): Promise> { return mapResult(iterator.next()); diff --git a/src/type/__tests__/definition-test.ts b/src/type/__tests__/definition-test.ts index faac24f21a..c345a853ea 100644 --- a/src/type/__tests__/definition-test.ts +++ b/src/type/__tests__/definition-test.ts @@ -95,7 +95,6 @@ describe('Type System: Scalars', () => { }); it('rejects a Scalar type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLScalarType({})).to.throw('Must provide name.'); }); @@ -104,7 +103,6 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', - // $FlowExpectedError[prop-missing] serialize: {}, }), ).to.throw( @@ -129,9 +127,7 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', - // $FlowExpectedError[prop-missing] parseValue: {}, - // $FlowExpectedError[prop-missing] parseLiteral: {}, }), ).to.throw( @@ -144,7 +140,6 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', - // $FlowExpectedError[incompatible-call] specifiedByUrl: {}, }), ).to.throw( @@ -325,7 +320,6 @@ describe('Type System: Objects', () => { }); it('rejects an Object type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLObjectType({})).to.throw('Must provide name.'); }); @@ -333,7 +327,6 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: { - // $FlowExpectedError[incompatible-call] f: undefined, }, }); @@ -345,7 +338,6 @@ describe('Type System: Objects', () => { it('rejects an Object type with incorrectly typed fields', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', - // $FlowExpectedError[incompatible-call] fields: [{ field: ScalarType }], }); expect(() => objType.getFields()).to.throw( @@ -357,7 +349,6 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields() { - // $FlowExpectedError[incompatible-call] return [{ field: ScalarType }]; }, }); @@ -370,7 +361,6 @@ describe('Type System: Objects', () => { fields: { badField: { type: ScalarType, - // $FlowExpectedError[incompatible-call] args: [{ badArg: ScalarType }], }, }, @@ -384,7 +374,6 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: {}, - // $FlowExpectedError[incompatible-call] interfaces: {}, }); expect(() => objType.getInterfaces()).to.throw( @@ -397,7 +386,6 @@ describe('Type System: Objects', () => { name: 'SomeObject', fields: {}, interfaces() { - // $FlowExpectedError[incompatible-call] return {}; }, }); @@ -409,7 +397,6 @@ describe('Type System: Objects', () => { it('rejects an empty Object field resolver', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', - // $FlowExpectedError[incompatible-call] fields: { field: { type: ScalarType, resolve: {} }, }, @@ -423,7 +410,6 @@ describe('Type System: Objects', () => { it('rejects a constant scalar value resolver', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', - // $FlowExpectedError[incompatible-call] fields: { field: { type: ScalarType, resolve: 0 }, }, @@ -440,7 +426,6 @@ describe('Type System: Objects', () => { new GraphQLObjectType({ name: 'AnotherObject', fields: {}, - // $FlowExpectedError[prop-missing] isTypeOf: {}, }), ).to.throw( @@ -479,7 +464,6 @@ describe('Type System: Interfaces', () => { }); it('rejects an Interface type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLInterfaceType({})).to.throw('Must provide name.'); }); @@ -487,7 +471,6 @@ describe('Type System: Interfaces', () => { const objType = new GraphQLInterfaceType({ name: 'AnotherInterface', fields: {}, - // $FlowExpectedError[incompatible-call] interfaces: {}, }); expect(() => objType.getInterfaces()).to.throw( @@ -500,7 +483,6 @@ describe('Type System: Interfaces', () => { name: 'AnotherInterface', fields: {}, interfaces() { - // $FlowExpectedError[incompatible-call] return {}; }, }); @@ -515,7 +497,6 @@ describe('Type System: Interfaces', () => { new GraphQLInterfaceType({ name: 'AnotherInterface', fields: {}, - // $FlowExpectedError[prop-missing] resolveType: {}, }), ).to.throw( @@ -560,7 +541,6 @@ describe('Type System: Unions', () => { }); it('rejects an Union type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLUnionType({})).to.throw('Must provide name.'); }); @@ -570,7 +550,6 @@ describe('Type System: Unions', () => { new GraphQLUnionType({ name: 'SomeUnion', types: [], - // $FlowExpectedError[prop-missing] resolveType: {}, }), ).to.throw( @@ -581,7 +560,6 @@ describe('Type System: Unions', () => { it('rejects a Union type with incorrectly typed types', () => { const unionType = new GraphQLUnionType({ name: 'SomeUnion', - // $FlowExpectedError[incompatible-call] types: { ObjectType }, }); @@ -675,7 +653,6 @@ describe('Type System: Enums', () => { }); it('rejects an Enum type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLEnumType({ values: {} })).to.throw( 'Must provide name.', ); @@ -686,7 +663,6 @@ describe('Type System: Enums', () => { () => new GraphQLEnumType({ name: 'SomeEnum', - // $FlowExpectedError[incompatible-call] values: [{ FOO: 10 }], }), ).to.throw('SomeEnum values must be an object with value names as keys.'); @@ -697,7 +673,6 @@ describe('Type System: Enums', () => { () => new GraphQLEnumType({ name: 'SomeEnum', - // $FlowExpectedError[incompatible-call] values: { FOO: null }, }), ).to.throw( @@ -710,7 +685,6 @@ describe('Type System: Enums', () => { () => new GraphQLEnumType({ name: 'SomeEnum', - // $FlowExpectedError[incompatible-call] values: { FOO: 10 }, }), ).to.throw( @@ -762,7 +736,6 @@ describe('Type System: Input Objects', () => { }); it('rejects an Input Object type without name', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLInputObjectType({})).to.throw( 'Must provide name.', ); @@ -771,7 +744,6 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with incorrect fields', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', - // $FlowExpectedError[incompatible-call] fields: [], }); expect(() => inputObjType.getFields()).to.throw( @@ -782,7 +754,6 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with fields function that returns incorrect type', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', - // $FlowExpectedError[incompatible-call] fields: () => [], }); expect(() => inputObjType.getFields()).to.throw( @@ -795,7 +766,6 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with resolvers', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', - // $FlowExpectedError[incompatible-call] fields: { f: { type: ScalarType, resolve: dummyFunc }, }, @@ -808,7 +778,6 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with resolver constant', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', - // $FlowExpectedError[incompatible-call] fields: { f: { type: ScalarType, resolve: {} }, }, @@ -837,15 +806,11 @@ describe('Type System: List', () => { }); it('rejects a non-type as item type of list', () => { - // $FlowExpectedError[incompatible-call] expectList({}).to.throw('Expected {} to be a GraphQL type.'); - // $FlowExpectedError[incompatible-call] expectList(String).to.throw( 'Expected [function String] to be a GraphQL type.', ); - // $FlowExpectedError[incompatible-call] expectList(null).to.throw('Expected null to be a GraphQL type.'); - // $FlowExpectedError[incompatible-call] expectList(undefined).to.throw('Expected undefined to be a GraphQL type.'); }); }); @@ -867,21 +832,16 @@ describe('Type System: Non-Null', () => { }); it('rejects a non-type as nullable type of non-null', () => { - // $FlowExpectedError[incompatible-call] expectNonNull(NonNullScalarType).to.throw( 'Expected Scalar! to be a GraphQL nullable type.', ); - // $FlowExpectedError[incompatible-call] expectNonNull({}).to.throw('Expected {} to be a GraphQL nullable type.'); - // $FlowExpectedError[incompatible-call] expectNonNull(String).to.throw( 'Expected [function String] to be a GraphQL nullable type.', ); - // $FlowExpectedError[incompatible-call] expectNonNull(null).to.throw( 'Expected null to be a GraphQL nullable type.', ); - // $FlowExpectedError[incompatible-call] expectNonNull(undefined).to.throw( 'Expected undefined to be a GraphQL nullable type.', ); diff --git a/src/type/__tests__/directive-test.ts b/src/type/__tests__/directive-test.ts index 0dc7de5132..fbd22de601 100644 --- a/src/type/__tests__/directive-test.ts +++ b/src/type/__tests__/directive-test.ts @@ -85,7 +85,6 @@ describe('Type System: Directive', () => { }); it('rejects an unnamed directive', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLDirective({ locations: ['QUERY'] })).to.throw( 'Directive must be named.', ); @@ -97,21 +96,18 @@ describe('Type System: Directive', () => { new GraphQLDirective({ name: 'Foo', locations: ['QUERY'], - // $FlowExpectedError[incompatible-call] args: [], }), ).to.throw('@Foo args must be an object with argument names as keys.'); }); it('rejects a directive with undefined locations', () => { - // $FlowExpectedError[prop-missing] expect(() => new GraphQLDirective({ name: 'Foo' })).to.throw( '@Foo locations must be an Array.', ); }); it('rejects a directive with incorrectly typed locations', () => { - // $FlowExpectedError[incompatible-call] expect(() => new GraphQLDirective({ name: 'Foo', locations: {} })).to.throw( '@Foo locations must be an Array.', ); diff --git a/src/type/__tests__/enumType-test.ts b/src/type/__tests__/enumType-test.ts index 1dd3451e82..3e2771c140 100644 --- a/src/type/__tests__/enumType-test.ts +++ b/src/type/__tests__/enumType-test.ts @@ -364,7 +364,6 @@ describe('Type System: Enum Values', () => { const oneValue = ComplexEnum.getValue('ONE'); expect(oneValue).to.include({ name: 'ONE', value: Complex1 }); - // $FlowExpectedError[incompatible-call] const badUsage = ComplexEnum.getValue(Complex1); expect(badUsage).to.equal(undefined); }); diff --git a/src/type/__tests__/schema-test.ts b/src/type/__tests__/schema-test.ts index 958614cf0a..04ed0f2519 100644 --- a/src/type/__tests__/schema-test.ts +++ b/src/type/__tests__/schema-test.ts @@ -328,11 +328,8 @@ describe('Type System: Schema', () => { }); it('checks the configuration for mistakes', () => { - // $FlowExpectedError[incompatible-exact] expect(() => new GraphQLSchema(JSON.parse)).to.throw(); - // $FlowExpectedError[incompatible-call] expect(() => new GraphQLSchema({ types: {} })).to.throw(); - // $FlowExpectedError[incompatible-call] expect(() => new GraphQLSchema({ directives: {} })).to.throw(); }); }); @@ -361,7 +358,6 @@ describe('Type System: Schema', () => { }); const types = [{}, query, {}]; - // $FlowExpectedError[incompatible-call] expect(() => new GraphQLSchema({ query, types })).to.throw( 'One of the provided types for building the Schema is missing a name.', ); diff --git a/src/type/__tests__/validation-test.ts b/src/type/__tests__/validation-test.ts index 83710027c0..58791c6cc8 100644 --- a/src/type/__tests__/validation-test.ts +++ b/src/type/__tests__/validation-test.ts @@ -391,7 +391,6 @@ describe('Type System: A Schema must have Object root types', () => { it('rejects a Schema whose types are incorrectly typed', () => { const schema = new GraphQLSchema({ query: SomeObjectType, - // $FlowExpectedError[incompatible-call] types: [{ name: 'SomeType' }, SomeDirective], }); expect(validateSchema(schema)).to.deep.equal([ @@ -408,7 +407,6 @@ describe('Type System: A Schema must have Object root types', () => { it('rejects a Schema whose directives are incorrectly typed', () => { const schema = new GraphQLSchema({ query: SomeObjectType, - // $FlowExpectedError[incompatible-call] directives: [null, 'SomeDirective', SomeScalarType], }); expect(validateSchema(schema)).to.deep.equal([ @@ -688,7 +686,6 @@ describe('Type System: Union types must be valid', () => { for (const memberType of badUnionMemberTypes) { const badUnion = new GraphQLUnionType({ name: 'BadUnion', - // $FlowExpectedError[incompatible-call] types: [memberType], }); const badSchema = schemaWithFieldType(badUnion); @@ -1036,7 +1033,6 @@ describe('Type System: Object fields must have output types', () => { } it('rejects an empty Object field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithObjectField({ type: undefined }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1049,7 +1045,6 @@ describe('Type System: Object fields must have output types', () => { for (const type of notOutputTypes) { const typeStr = inspect(type); it(`rejects a non-output type as an Object field type: ${typeStr}`, () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithObjectField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1060,7 +1055,6 @@ describe('Type System: Object fields must have output types', () => { } it('rejects a non-type value as an Object field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithObjectField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1098,7 +1092,6 @@ describe('Type System: Objects can only implement unique interfaces', () => { const schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: 'BadObject', - // $FlowExpectedError[incompatible-call] interfaces: [undefined], fields: { f: { type: GraphQLString } }, }), @@ -1357,7 +1350,6 @@ describe('Type System: Interface fields must have output types', () => { } it('rejects an empty Interface field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInterfaceField({ type: undefined }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1374,7 +1366,6 @@ describe('Type System: Interface fields must have output types', () => { for (const type of notOutputTypes) { const typeStr = inspect(type); it(`rejects a non-output type as an Interface field type: ${typeStr}`, () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInterfaceField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1388,7 +1379,6 @@ describe('Type System: Interface fields must have output types', () => { } it('rejects a non-type value as an Interface field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInterfaceField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1493,7 +1483,6 @@ describe('Type System: Arguments must have input types', () => { } it('rejects an empty field arg type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithArg({ type: undefined }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1510,7 +1499,6 @@ describe('Type System: Arguments must have input types', () => { for (const type of notInputTypes) { const typeStr = inspect(type); it(`rejects a non-input type as a field arg type: ${typeStr}`, () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithArg({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1524,7 +1512,6 @@ describe('Type System: Arguments must have input types', () => { } it('rejects a non-type value as a field arg type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithArg({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1631,7 +1618,6 @@ describe('Type System: Input Object fields must have input types', () => { } it('rejects an empty input field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInputField({ type: undefined }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1644,7 +1630,6 @@ describe('Type System: Input Object fields must have input types', () => { for (const type of notInputTypes) { const typeStr = inspect(type); it(`rejects a non-input type as an input field type: ${typeStr}`, () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInputField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1655,7 +1640,6 @@ describe('Type System: Input Object fields must have input types', () => { } it('rejects a non-type value as an input field type', () => { - // $FlowExpectedError[incompatible-call] const schema = schemaWithInputField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { diff --git a/src/type/definition.ts b/src/type/definition.ts index 362b626881..2299c264e7 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -341,7 +341,6 @@ export class GraphQLList { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLList'; } @@ -387,7 +386,6 @@ export class GraphQLNonNull { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLNonNull'; } @@ -594,7 +592,6 @@ export class GraphQLScalarType { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLScalarType'; } @@ -738,7 +735,6 @@ export class GraphQLObjectType { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLObjectType'; } @@ -1055,7 +1051,6 @@ export class GraphQLInterfaceType { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLInterfaceType'; } @@ -1162,7 +1157,6 @@ export class GraphQLUnionType { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLUnionType'; } @@ -1343,7 +1337,6 @@ export class GraphQLEnumType /* */ { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLEnumType'; } @@ -1491,7 +1484,6 @@ export class GraphQLInputObjectType { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLInputObjectType'; } diff --git a/src/type/directives.ts b/src/type/directives.ts index a03e5d4a41..de4b3fedc8 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -97,7 +97,6 @@ export class GraphQLDirective { return this.toString(); } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLDirective'; } diff --git a/src/type/scalars.ts b/src/type/scalars.ts index 4af928d443..a0a6660e0f 100644 --- a/src/type/scalars.ts +++ b/src/type/scalars.ts @@ -139,7 +139,6 @@ function serializeObject(outputValue: unknown): unknown { } } if (typeof outputValue.toJSON === 'function') { - // $FlowFixMe[incompatible-use] return outputValue.toJSON(); } } diff --git a/src/type/schema.ts b/src/type/schema.ts index 1767e5bb5a..1be4e852fe 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -340,7 +340,6 @@ export class GraphQLSchema { }; } - // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet get [Symbol.toStringTag]() { return 'GraphQLSchema'; } diff --git a/src/utilities/__tests__/assertValidName-test.ts b/src/utilities/__tests__/assertValidName-test.ts index 40f9d2e398..56c87de274 100644 --- a/src/utilities/__tests__/assertValidName-test.ts +++ b/src/utilities/__tests__/assertValidName-test.ts @@ -15,7 +15,6 @@ describe('assertValidName()', () => { }); it('throws for non-strings', () => { - // $FlowExpectedError[incompatible-call] expect(() => assertValidName({})).to.throw('Expected name to be a string.'); }); diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index 8e0356c505..b2df91b22b 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -1096,12 +1096,10 @@ describe('Schema Builder', () => { }); it('Rejects invalid AST', () => { - // $FlowExpectedError[incompatible-call] expect(() => buildASTSchema(null)).to.throw( 'Must provide valid Document AST', ); - // $FlowExpectedError[prop-missing] expect(() => buildASTSchema({})).to.throw( 'Must provide valid Document AST', ); diff --git a/src/utilities/__tests__/buildClientSchema-test.ts b/src/utilities/__tests__/buildClientSchema-test.ts index 04848cf24a..6ce0509e3e 100644 --- a/src/utilities/__tests__/buildClientSchema-test.ts +++ b/src/utilities/__tests__/buildClientSchema-test.ts @@ -625,12 +625,10 @@ describe('Type System: build schema from introspection', () => { `); it('throws when introspection is missing __schema property', () => { - // $FlowExpectedError[incompatible-call] expect(() => buildClientSchema(null)).to.throw( 'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: null.', ); - // $FlowExpectedError[prop-missing] expect(() => buildClientSchema({})).to.throw( 'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: {}.', ); diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index bb3fac85ff..c697523852 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -1144,12 +1144,10 @@ describe('extendSchema', () => { it('Rejects invalid AST', () => { const schema = new GraphQLSchema({}); - // $FlowExpectedError[incompatible-call] expect(() => extendSchema(schema, null)).to.throw( 'Must provide valid Document AST', ); - // $FlowExpectedError[prop-missing] expect(() => extendSchema(schema, {})).to.throw( 'Must provide valid Document AST', ); diff --git a/src/utilities/__tests__/getOperationRootType-test.ts b/src/utilities/__tests__/getOperationRootType-test.ts index 627b0efb86..606836efc8 100644 --- a/src/utilities/__tests__/getOperationRootType-test.ts +++ b/src/utilities/__tests__/getOperationRootType-test.ts @@ -154,7 +154,6 @@ describe('getOperationRootType', () => { operation: 'non_existent_operation', }; - // $FlowExpectedError[incompatible-call] expect(() => getOperationRootType(testSchema, operationNode)).to.throw( 'Can only have query, mutation and subscription operations.', ); diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index fe173205e2..c7e5c8eff3 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -159,7 +159,6 @@ describe('Type System Printer', () => { }); expectPrintedSchema(schema).to.equal( - // $FlowFixMe[incompatible-call] dedent(String.raw` type Query { singleField(argOne: String = "tes\t de\fault"): String diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 8010212429..b51e3f3a46 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -218,11 +218,9 @@ export function extendSchemaImpl( function replaceType(type: T): T { if (isListType(type)) { - // $FlowFixMe[incompatible-return] return new GraphQLList(replaceType(type.ofType)); } if (isNonNullType(type)) { - // $FlowFixMe[incompatible-return] return new GraphQLNonNull(replaceType(type.ofType)); } return replaceNamedType(type); @@ -379,7 +377,6 @@ export function extendSchemaImpl( return { ...field, type: replaceType(field.type), - // $FlowFixMe[incompatible-call] args: mapValue(field.args, extendArg), }; } @@ -429,7 +426,6 @@ export function extendSchemaImpl( return new GraphQLList(getWrappedType(node.type)); } if (node.kind === Kind.NON_NULL_TYPE) { - // $FlowFixMe[incompatible-call] return new GraphQLNonNull(getWrappedType(node.type)); } return getNamedType(node); diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index fcacb503f0..12c96fa337 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -57,10 +57,8 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { function replaceType(type: T): T { if (isListType(type)) { - // $FlowFixMe[incompatible-return] return new GraphQLList(replaceType(type.ofType)); } else if (isNonNullType(type)) { - // $FlowFixMe[incompatible-return] return new GraphQLNonNull(replaceType(type.ofType)); } return replaceNamedType(type); diff --git a/src/validation/__tests__/validation-test.ts b/src/validation/__tests__/validation-test.ts index 3a6895aa82..9e0594d38c 100644 --- a/src/validation/__tests__/validation-test.ts +++ b/src/validation/__tests__/validation-test.ts @@ -15,7 +15,6 @@ import { testSchema } from './harness'; describe('Validate: Supports full validation', () => { it('rejects invalid documents', () => { - // $FlowExpectedError[incompatible-call] expect(() => validate(testSchema, null)).to.throw('Must provide document.'); }); diff --git a/src/validation/rules/custom/NoDeprecatedCustomRule.ts b/src/validation/rules/custom/NoDeprecatedCustomRule.ts index fd86ff0975..38b688a203 100644 --- a/src/validation/rules/custom/NoDeprecatedCustomRule.ts +++ b/src/validation/rules/custom/NoDeprecatedCustomRule.ts @@ -63,7 +63,6 @@ export function NoDeprecatedCustomRule(context: ValidationContext): ASTVisitor { const inputObjectDef = getNamedType(context.getParentInputType()); if (isInputObjectType(inputObjectDef)) { const inputFieldDef = inputObjectDef.getFields()[node.name.value]; - // flowlint-next-line unnecessary-optional-chain:off const deprecationReason = inputFieldDef?.deprecationReason; if (deprecationReason != null) { context.reportError( From b07f73a21d19fa81ddc4257a3f71164b7f9dc8bd Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 21 Jan 2021 11:06:48 -0600 Subject: [PATCH 32/65] feat: remove flow infrastructure --- .eslintignore | 2 - .flowconfig | 42 - .github/CONTRIBUTING.md | 1 - .github/workflows/ci.yml | 3 - cspell.yml | 1 - flow-typed/core.js | 2564 ------------------------ flow-typed/intl.js | 196 -- flow-typed/node.js | 5 - flow-typed/npm/chai_vx.x.x.js | 331 --- flow-typed/npm/mocha_vx.x.x.js | 316 --- integrationTests/flow/.flowconfig | 8 - integrationTests/flow/index.mjs | 54 - integrationTests/flow/package.json | 10 - integrationTests/integration-test.js | 4 - package-lock.json | 64 - package.json | 5 +- resources/check-cycles.js | 61 - src/jsutils/__tests__/toObjMap-test.ts | 2 +- 18 files changed, 2 insertions(+), 3667 deletions(-) delete mode 100644 .flowconfig delete mode 100644 flow-typed/core.js delete mode 100644 flow-typed/intl.js delete mode 100644 flow-typed/node.js delete mode 100644 flow-typed/npm/chai_vx.x.x.js delete mode 100644 flow-typed/npm/mocha_vx.x.x.js delete mode 100644 integrationTests/flow/.flowconfig delete mode 100644 integrationTests/flow/index.mjs delete mode 100644 integrationTests/flow/package.json delete mode 100644 resources/check-cycles.js diff --git a/.eslintignore b/.eslintignore index f62c7383f6..6150154d0e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,8 +7,6 @@ /npm /deno -# Ignore Flow typings for 3rd-party libraries -/flow-typed # Ignore TS files inside integration test /integrationTests/ts/*.ts diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index d12756c5b0..0000000000 --- a/.flowconfig +++ /dev/null @@ -1,42 +0,0 @@ -[ignore] -.* -!/src - -[include] - -[lints] -sketchy-null-bool=error -sketchy-null-string=error -sketchy-null-number=error -sketchy-null-mixed=error -sketchy-number=error -untyped-type-import=error -nonstrict-import=off -untyped-import=error -unclear-type=off -deprecated-type=error -deprecated-utility=error -unsafe-getters-setters=error -unnecessary-optional-chain=error -unnecessary-invariant=error -signature-verification-failure=error -implicit-inexact-object=error -ambiguous-object-type=error -uninitialized-instance-property=error -default-import-access=error -invalid-import-star-use=error -non-const-var-export=error -this-in-exported-function=error -mixed-import-and-require=error -export-renamed-default=error - -[options] -all=true -module.use_strict=true -babel_loose_array_spread=true -experimental.const_params=true -include_warnings=true -no_flowlib=true - -[version] -^0.148.0 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d3e9f32397..861604f74a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -73,7 +73,6 @@ ensure your pull request matches the style guides, run `npm run prettier`. - 80 character line length strongly preferred. - Prefer `'` over `"` - ES6 syntax when possible. However do not rely on ES6-specific functions to be available. -- Use [Flow types](https://flowtype.org/). - Use semicolons; - Trailing commas, - Avd abbr wrds. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cdee4cacf..b1f1e7f3d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,9 +29,6 @@ jobs: - name: Lint ESLint run: npm run lint - - name: Lint Flow - run: npm run check - - name: Lint Prettier run: npm run prettier:check diff --git a/cspell.yml b/cspell.yml index 8ba853e25e..36a6cf6e0c 100644 --- a/cspell.yml +++ b/cspell.yml @@ -24,7 +24,6 @@ words: - graphiql - sublinks - instanceof - - flowtype # Different names used inside tests - Skywalker diff --git a/flow-typed/core.js b/flow-typed/core.js deleted file mode 100644 index 38e3f8f679..0000000000 --- a/flow-typed/core.js +++ /dev/null @@ -1,2564 +0,0 @@ -// Various hacks applied to Flow core definitions -// All hacks are marked with '// graphql-js HACK' comment - -/* cSpell:disable */ - -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * Copyright (c) Microsoft Corporation. All rights reserved. - * Modifications copyright (C) Facebook, Inc. and its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use - * this file except in compliance with the License. You may obtain a copy of the - * License at http://www.apache.org/licenses/LICENSE-2.0 - * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED - * WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, - * MERCHANTABLITY OR NON-INFRINGEMENT. - * See the Apache Version 2.0 License for specific language governing permissions - * and limitations under the License. - */ -// @lint-ignore-every LICENSELINT - -declare var NaN: number; -declare var Infinity: number; -declare var undefined: void; - -/** - * Converts a string to an integer. - * @param string A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ -declare function parseInt(string: mixed, radix?: number): number; -/** - * Converts a string to a floating-point number. - * @param string A string that contains a floating-point number. - */ -declare function parseFloat(string: mixed): number; - -/** - * Returns a boolean value that indicates whether a value is the reserved value NaN (not a number). - * @param number A numeric value. - */ -declare function isNaN(number: mixed): boolean; -/** - * Determines whether a supplied number is finite. - * @param number Any numeric value. - */ -declare function isFinite(number: mixed): boolean; -/** - * Gets the unencoded version of an encoded Uniform Resource Identifier (URI). - * @param encodedURI A value representing an encoded URI. - */ -declare function decodeURI(encodedURI: string): string; -/** - * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI). - * @param encodedURIComponent A value representing an encoded URI component. - */ -declare function decodeURIComponent(encodedURIComponent: string): string; -/** - * Encodes a text string as a valid Uniform Resource Identifier (URI) - * @param uri A value representing an encoded URI. - */ -declare function encodeURI(uri: string): string; -/** - * Encodes a text string as a valid component of a Uniform Resource Identifier (URI). - * @param uriComponent A value representing an encoded URI component. - */ -declare function encodeURIComponent(uriComponent: string): string; - -type PropertyDescriptor = { - enumerable?: boolean, - configurable?: boolean, - writable?: boolean, - value?: T, - get?: () => T, - set?: (value: T) => void, - ... -}; - -type PropertyDescriptorMap = { [s: string]: PropertyDescriptor, ... } - -type $NotNullOrVoid = -| number -| string -| boolean -| {...} -| $ReadOnlyArray; - -declare class Object { - static (o: ?void): { [key: any]: any, ... }; - static (o: boolean): Boolean; - static (o: number): Number; - static (o: string): String; - static (o: T): T; - /** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * @param target The target object to copy to. - * @param sources The source object from which to copy properties. - */ - static assign: Object$Assign; - /** - * Creates an object that has the specified prototype, and that optionally contains specified properties. - * @param o Object to use as a prototype. May be null - * @param properties JavaScript object that contains one or more property descriptors. - */ - static create(o: any, properties?: PropertyDescriptorMap): any; // compiler magic - /** - * Adds one or more properties to an object, and/or modifies attributes of existing properties. - * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. - * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. - */ - static defineProperties(o: any, properties: PropertyDescriptorMap): any; - /** - * Adds a property to an object, or modifies attributes of an existing property. - * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. - * @param p The property name. - * @param attributes Descriptor for the property. It can be for a data property or an accessor property. - */ - static defineProperty(o: any, p: any, attributes: PropertyDescriptor): any; - /** - * Returns an array of key/values of the enumerable properties of an object - * @param object Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - static entries(obj: { +[key: string]: T, __proto__: null }): Array<[string, T]>; // graphql-js HACK - static entries(object: $NotNullOrVoid): Array<[string, mixed]>; - /** - * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - static freeze(o: T): T; - /** - * Returns an object created by key-value entries for properties and methods - * @param entries An iterable object that contains key-value entries for properties and methods. - */ - static fromEntries(entries: Iterable<[K, V] | { - '0': K, - '1': V, - ... - }>): { [K]: V, ... }; - - /** - * Gets the own property descriptor of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the property. - * @param p Name of the property. - */ - static getOwnPropertyDescriptor(o: $NotNullOrVoid, p: any): PropertyDescriptor | void; - /** - * Gets the own property descriptors of the specified object. - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. - * @param o Object that contains the properties. - */ - static getOwnPropertyDescriptors(o: {...}): PropertyDescriptorMap; - // This is documentation only. Object.getOwnPropertyNames is implemented in OCaml code - // https://github.com/facebook/flow/blob/8ac01bc604a6827e6ee9a71b197bb974f8080049/src/typing/statement.ml#L6308 - /** - * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly - * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. - * @param o Object that contains the own properties. - */ - static getOwnPropertyNames(o: $NotNullOrVoid): Array; - /** - * Returns an array of all symbol properties found directly on object o. - * @param o Object to retrieve the symbols from. - */ - static getOwnPropertySymbols(o: $NotNullOrVoid): Array; - /** - * Returns the prototype of an object. - * @param o The object that references the prototype. - */ - static getPrototypeOf: Object$GetPrototypeOf; - /** - * Returns true if the values are the same value, false otherwise. - * @param a The first value. - * @param b The second value. - */ - static is(a: T, b: T): boolean; - /** - * Returns a value that indicates whether new properties can be added to an object. - * @param o Object to test. - */ - static isExtensible(o: $NotNullOrVoid): boolean; - /** - * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. - * @param o Object to test. - */ - static isFrozen(o: $NotNullOrVoid): boolean; - static isSealed(o: $NotNullOrVoid): boolean; - // This is documentation only. Object.keys is implemented in OCaml code. - // https://github.com/facebook/flow/blob/8ac01bc604a6827e6ee9a71b197bb974f8080049/src/typing/statement.ml#L6308 - /** - * Returns the names of the enumerable string properties and methods of an object. - * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - static keys(o: $NotNullOrVoid): Array; - /** - * Prevents the addition of new properties to an object. - * @param o Object to make non-extensible. - */ - static preventExtensions(o: T): T; - /** - * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. - * @param o Object on which to lock the attributes. - */ - static seal(o: T): T; - /** - * Sets the prototype of a specified object o to object proto or null. Returns the object o. - * @param o The object to change its prototype. - * @param proto The value of the new prototype or null. - */ - static setPrototypeOf(o: T, proto: ?{...}): T; - /** - * Returns an array of values of the enumerable properties of an object - * @param object Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. - */ - static values(obj: { +[key: string]: T, __proto__: null }): Array; // graphql-js HACK - static values(object: $NotNullOrVoid): Array; - /** - * Determines whether an object has a property with the specified name. - * @param prop A property name. - */ - hasOwnProperty(prop: mixed): boolean; - /** - * Determines whether an object exists in another object's prototype chain. - * @param o Another object whose prototype chain is to be checked. - */ - isPrototypeOf(o: mixed): boolean; - /** - * Determines whether a specified property is enumerable. - * @param prop A property name. - */ - propertyIsEnumerable(prop: mixed): boolean; - /** Returns a date converted to a string using the current locale. */ - toLocaleString(): string; - /** Returns a string representation of an object. */ - toString(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): mixed; -} - -// Well known Symbols. -declare opaque type $SymbolHasInstance: symbol; -declare opaque type $SymboIsConcatSpreadable: symbol; -declare opaque type $SymbolIterator: symbol; -declare opaque type $SymbolMatch: symbol; -declare opaque type $SymbolMatchAll: symbol; -declare opaque type $SymbolReplace: symbol; -declare opaque type $SymbolSearch: symbol; -declare opaque type $SymbolSpecies: symbol; -declare opaque type $SymbolSplit: symbol; -declare opaque type $SymbolToPrimitive: symbol; -declare opaque type $SymbolToStringTag: symbol; -declare opaque type $SymbolUnscopables: symbol; - -declare class Symbol { - static asyncIterator: string; // graphql-js HACK - - /** - * Returns a new unique Symbol value. - * @param value Description of the new Symbol object. - */ - static (value?:any): symbol; - /** - * Returns a Symbol object from the global symbol registry matching the given key if found. - * Otherwise, returns a new symbol with this key. - * @param key key to search for. - */ - static for(key: string): symbol; - /** - * Expose the [[Description]] internal slot of a symbol directly. - */ - +description: string | void; - /** - * A method that determines if a constructor object recognizes an object as one of the - * constructor's instances. Called by the semantics of the instanceof operator. - */ - static hasInstance: $SymbolHasInstance; - /** - * A Boolean value that if true indicates that an object should flatten to its array elements - * by Array.prototype.concat. - */ - static isConcatSpreadable: $SymboIsConcatSpreadable; - static iterator: string; // polyfill '@@iterator' - /** - * Returns a key from the global symbol registry matching the given Symbol if found. - * Otherwise, returns a undefined. - * @param sym Symbol to find the key for. - */ - static keyFor(sym: symbol): ?string; - static length: 0; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.match method. - */ - static match: $SymbolMatch; - /** - * A regular expression method that matches the regular expression against a string. Called - * by the String.prototype.matchAll method. - */ - static matchAll: $SymbolMatchAll; - /** - * A regular expression method that replaces matched substrings of a string. Called by the - * String.prototype.replace method. - */ - static replace: $SymbolReplace; - /** - * A regular expression method that returns the index within a string that matches the - * regular expression. Called by the String.prototype.search method. - */ - static search: $SymbolSearch; - /** - * A function valued property that is the constructor function that is used to create - * derived objects. - */ - static species: $SymbolSpecies; - /** - * A regular expression method that splits a string at the indices that match the regular - * expression. Called by the String.prototype.split method. - */ - static split: $SymbolSplit; - /** - * A method that converts an object to a corresponding primitive value. - * Called by the ToPrimitive abstract operation. - */ - static toPrimitive: $SymbolToPrimitive; - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - static toStringTag: $SymbolToStringTag; - /** - * An Object whose own property names are property names that are excluded from the 'with' - * environment bindings of the associated objects. - */ - static unscopables: $SymbolUnscopables; - toString(): string; - valueOf(): ?symbol; -} - -// TODO: instance, static -declare class Function { - proto apply: Function$Prototype$Apply; // (thisArg: any, argArray?: any) => any - proto bind: Function$Prototype$Bind; // (thisArg: any, ...argArray: Array) => any; - proto call: Function$Prototype$Call; // (thisArg: any, ...argArray: Array) => any - /** Returns a string representation of a function. */ - toString(): string; - arguments: any; - caller: any | null; - length: number; - /** - * Returns the name of the function. Function names are read-only and can not be changed. - */ - name: string; -} - -declare class Boolean { - constructor(value?: mixed): void; - static (value:mixed):boolean; - /** Returns the primitive value of the specified object. */ - valueOf(): boolean; - toString(): string; -} - -/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */ -declare class Number { - /** - * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 - * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10^-16. - */ - static EPSILON: number; - /** - * The value of the largest integer n such that n and n + 1 are both exactly representable as - * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 - 1. - */ - static MAX_SAFE_INTEGER: number; - /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */ - static MAX_VALUE: number; - /** - * The value of the smallest integer n such that n and n - 1 are both exactly representable as - * a Number value. - * The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (-(2^53 - 1)). - */ - static MIN_SAFE_INTEGER: number; - /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */ - static MIN_VALUE: number; - /** - * A value that is not a number. - * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function. - */ - static NaN: number; - /** - * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. - */ - static NEGATIVE_INFINITY: number; - /** - * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. - */ - static POSITIVE_INFINITY: number; - static (value:mixed):number; - /** - * Returns true if passed value is finite. - * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a - * number. Only finite values of the type number, result in true. - * @param value A numeric value. - */ - static isFinite(value: mixed): boolean; - /** - * Returns true if the value passed is an integer, false otherwise. - * @param value A numeric value. - */ - static isInteger(value: mixed): boolean; - /** - * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a - * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter - * to a number. Only values of the type number, that are also NaN, result in true. - * @param value A numeric value. - */ - static isNaN(value: mixed): boolean; - /** - * Returns true if the value passed is a safe integer. - * @param value A numeric value. - */ - static isSafeInteger(value: mixed): boolean; - /** - * Converts a string to a floating-point number. - * @param value A string that contains a floating-point number. - */ - static parseFloat(value: string): number; - /** - * Converts A string to an integer. - * @param value A string to convert into a number. - * @param radix A value between 2 and 36 that specifies the base of the number in numString. - * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. - * All other strings are considered decimal. - */ - static parseInt(value: string, radix?: number): number; - constructor(value?: mixed): void; - /** - * Returns a string containing a number represented in exponential notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. - */ - toExponential(fractionDigits?: number): string; - /** - * Returns a string representing a number in fixed-point notation. - * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive. - */ - toFixed(fractionDigits?: number): string; - /** - * Converts a number to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | Array, options?: Intl$NumberFormatOptions): string; - /** - * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits. - * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive. - */ - toPrecision(precision?: number): string; - /** - * Returns a string representation of an object. - * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers. - */ - toString(radix?: number): string; - /** Returns the primitive value of the specified object. */ - valueOf(): number; -} - -/** An intrinsic object that provides basic mathematics functionality and constants. */ -declare var Math: { - /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ - E: number, - /** The natural logarithm of 10. */ - LN10: number, - /** The natural logarithm of 2. */ - LN2: number, - /** The base-10 logarithm of e. */ - LOG10E: number, - /** The base-2 logarithm of e. */ - LOG2E: number, - /** Pi. This is the ratio of the circumference of a circle to its diameter. */ - PI: number, - /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */ - SQRT1_2: number, - /** The square root of 2. */ - SQRT2: number, - /** - * Returns the absolute value of a number (the value without regard to whether it is positive or negative). - * For example, the absolute value of -5 is the same as the absolute value of 5. - * @param x A numeric expression for which the absolute value is needed. - */ - abs(x: number): number, - /** - * Returns the arc cosine (or inverse cosine) of a number. - * @param x A numeric expression. - */ - acos(x: number): number, - /** - * Returns the inverse hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - acosh(x: number): number, - /** - * Returns the arcsine of a number. - * @param x A numeric expression. - */ - asin(x: number): number, - /** - * Returns the inverse hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - asinh(x: number): number, - /** - * Returns the arctangent of a number. - * @param x A numeric expression for which the arctangent is needed. - */ - atan(x: number): number, - /** - * Returns the angle (in radians) from the X axis to a point. - * @param y A numeric expression representing the cartesian y-coordinate. - * @param x A numeric expression representing the cartesian x-coordinate. - */ - atan2(y: number, x: number): number, - /** - * Returns the inverse hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - atanh(x: number): number, - /** - * Returns an implementation-dependent approximation to the cube root of number. - * @param x A numeric expression. - */ - cbrt(x: number): number, - /** - * Returns the smallest integer greater than or equal to its numeric argument. - * @param x A numeric expression. - */ - ceil(x: number): number, - /** - * Returns the number of leading zero bits in the 32-bit binary representation of a number. - * @param x A numeric expression. - */ - clz32(x: number): number, - /** - * Returns the cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cos(x: number): number, - /** - * Returns the hyperbolic cosine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - cosh(x: number): number, - /** - * Returns e (the base of natural logarithms) raised to a power. - * @param x A numeric expression representing the power of e. - */ - exp(x: number): number, - /** - * Returns the result of (e^x - 1), which is an implementation-dependent approximation to - * subtracting 1 from the exponential function of x (e raised to the power of x, where e - * is the base of the natural logarithms). - * @param x A numeric expression. - */ - expm1(x: number): number, - /** - * Returns the greatest integer less than or equal to its numeric argument. - * @param x A numeric expression. - */ - floor(x: number): number, - /** - * Returns the nearest single precision float representation of a number. - * @param x A numeric expression. - */ - fround(x: number): number, - /** - * Returns the square root of the sum of squares of its arguments. - * @param values Values to compute the square root for. - * If no arguments are passed, the result is +0. - * If there is only one argument, the result is the absolute value. - * If any argument is +Infinity or -Infinity, the result is +Infinity. - * If any argument is NaN, the result is NaN. - * If all arguments are either +0 or -0, the result is +0. - */ - hypot(...values: Array): number, - /** - * Returns the result of 32-bit multiplication of two numbers. - * @param x First number - * @param y Second number - */ - imul(x: number, y: number): number, - /** - * Returns the natural logarithm (base e) of a number. - * @param x A numeric expression. - */ - log(x: number): number, - /** - * Returns the base 10 logarithm of a number. - * @param x A numeric expression. - */ - log10(x: number): number, - /** - * Returns the natural logarithm of 1 + x. - * @param x A numeric expression. - */ - log1p(x: number): number, - /** - * Returns the base 2 logarithm of a number. - * @param x A numeric expression. - */ - log2(x: number): number, - /** - * Returns the larger of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - max(...values: Array): number, - /** - * Returns the smaller of a set of supplied numeric expressions. - * @param values Numeric expressions to be evaluated. - */ - min(...values: Array): number, - /** - * Returns the value of a base expression taken to a specified power. - * @param x The base value of the expression. - * @param y The exponent value of the expression. - */ - pow(x: number, y: number): number, - /** Returns a pseudorandom number between 0 and 1. */ - random(): number, - /** - * Returns a supplied numeric expression rounded to the nearest integer. - * @param x The value to be rounded to the nearest integer. - */ - round(x: number): number, - /** - * Returns the sign of the x, indicating whether x is positive, negative or zero. - * @param x The numeric expression to test - */ - sign(x: number): number, - /** - * Returns the sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sin(x: number): number, - /** - * Returns the hyperbolic sine of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - sinh(x: number): number, - /** - * Returns the square root of a number. - * @param x A numeric expression. - */ - sqrt(x: number): number, - /** - * Returns the tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tan(x: number): number, - /** - * Returns the hyperbolic tangent of a number. - * @param x A numeric expression that contains an angle measured in radians. - */ - tanh(x: number): number, - /** - * Returns the integral part of the a numeric expression, x, removing any fractional digits. - * If x is already an integer, the result is x. - * @param x A numeric expression. - */ - trunc(x: number): number, - ... -}; - -/** - * A class of Array methods and properties that don't mutate the array. - */ -declare class $ReadOnlyArray<+T> { - @@iterator(): Iterator; - /** - * Returns a string representation of an array. The elements are converted to string using their toLocalString methods. - */ - toLocaleString(): string; - // concat creates a new array - /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. - */ - concat | S>(...items: Array): Array; - /** - * Returns an iterable of key, value pairs for every entry in the array - */ - entries(): Iterator<[number, T]>; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): boolean; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - */ - filter(callbackfn: typeof Boolean): Array<$NonMaybeType>; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param callbackfn find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): T | void; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param callbackfn find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): void; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: mixed, fromIndex?: number): boolean; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. - */ - indexOf(searchElement: mixed, fromIndex?: number): number; - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - /** - * Returns an iterable of keys in the array - */ - keys(): Iterator; - /** - * Returns the index of the last occurrence of a specified value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. - */ - lastIndexOf(searchElement: mixed, fromIndex?: number): number; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => U, thisArg?: mixed): Array; - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callbackfn A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => $ReadOnlyArray | U, thisArg?: mixed): Array; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat(depth: 0): Array; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat(depth: void | 1): Array<$Call<(($ReadOnlyArray) => X) & ((X) => X), T>>; - /** - * Returns a new array with all sub-array elements concatenated into it recursively up to the - * specified depth. - * - * @param depth The maximum recursion depth - */ - flat(depth: number): Array; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - */ - reduce( - callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: $ReadOnlyArray) => T, - ): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce( - callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: $ReadOnlyArray) => U, - initialValue: U - ): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - */ - reduceRight( - callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: $ReadOnlyArray) => T, - ): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight( - callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: $ReadOnlyArray) => U, - initialValue: U - ): U; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(start?: number, end?: number): Array; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callbackfn A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callbackfn: (value: T, index: number, array: $ReadOnlyArray) => mixed, thisArg?: mixed): boolean; - /** - * Returns an iterable of values in the array - */ - values(): Iterator; - +[key: number]: T; - /** - * Gets the length of the array. This is a number one higher than the highest element defined in an array. - */ - +length: number; -} - -declare class Array extends $ReadOnlyArray { - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): T[]; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callbackfn A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): boolean; - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param begin index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: T, begin?: number, end?: number): Array; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - */ - filter(callbackfn: typeof Boolean): Array<$NonMaybeType>; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callbackfn A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. - */ - filter(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): Array; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param callbackfn find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): T | void; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param callbackfn find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): number; - /** - * Performs the specified action for each element in an array. - * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - forEach(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): void; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (value: T, index: number, array: Array) => U, thisArg?: mixed): Array; - /** - * Calls a defined callback function on each element of an array. Then, flattens the result into - * a new array. - * This is identical to a map followed by flat with depth 1. - * - * @param callbackfn A function that accepts up to three arguments. The flatMap method calls the - * callback function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callback function. If - * thisArg is omitted, undefined is used as the this value. - */ - flatMap(callbackfn: (value: T, index: number, array: Array) => $ReadOnlyArray | U, thisArg?: mixed): Array; - /** - * Removes the last element from an array and returns it. - */ - pop(): T; - /** - * Appends new elements to an array, and returns the new length of the array. - * @param items New elements of the Array. - */ - push(...items: Array): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - */ - reduce( - callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: Array) => T, - ): T; - /** - * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduce( - callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: Array) => U, - initialValue: U - ): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - */ - reduceRight( - callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: Array) => T, - ): T; - /** - * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. - * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. - */ - reduceRight( - callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: Array) => U, - initialValue: U - ): U; - /** - * Reverses the elements in an Array. - */ - reverse(): Array; - /** - * Removes the first element from an array and returns it. - */ - shift(): T; - some(callbackfn: (value: T, index: number, array: Array) => mixed, thisArg?: mixed): boolean; - sort(compareFn?: (a: T, b: T) => number): Array; - splice(start: number, deleteCount?: number, ...items: Array): Array; - unshift(...items: Array): number; - - - [key: number]: T; - /** - * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array. - */ - length: number; - static (...values:Array): Array; - static isArray(obj: mixed): bool; - /** - * Creates an array from an iterable object. - * @param iter An iterable object to convert to an array. - * @param mapFn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - static from(iter: Iterable, mapFn: (elem: A, index: number) => B, thisArg?: mixed): Array; - /** - * Creates an array from an iterable object. - * @param iter An iterable object to convert to an array. - */ - static from(iter: Iterable, mapFn: void): Array; - /** - * Creates an array from an iterable object. - * @param iter An iterable object to convert to an array. - * @param mapFn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - static from(iter: Iterator, mapFn: (elem: A, index: number) => B, thisArg?: mixed): Array; - /** - * Creates an array from an iterable object. - * @param iter An array-like object to convert to an array. - */ - static from(iter: Iterator, mapFn: void): Array; - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - * @param mapFn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - static from(arrayLike: { length: number, ... }, mapFn: (elem: void, index: number) => A, thisArg?: mixed): Array; - /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. - */ - static from(arrayLike: { length: number, ... }, mapFn: void): Array; - /** - * Returns a new array from a set of elements. - * @param values A set of elements to include in the new array object. - */ - static of(...values: Array): Array; -} - -type $ArrayLike = { - [indexer: number]: T, - length: number, - ... -} - -type RegExp$flags = $CharSet<"gimsuy">; -type RegExp$matchResult = Array & { - index: number, - input: string, - groups: ?{ [name: string]: string, ... }, - ... -}; - -/** - * Allows manipulation and formatting of text strings and determination and location of substrings within strings. - */ -declare class String { - @@iterator(): Iterator; - /** - * Returns an `` HTML anchor element and sets the name attribute to the text value - * @param name - */ - anchor(name: string): string; - /** - * Returns the character at the specified index. - * @param pos The zero-based index of the desired character. - */ - charAt(pos: number): string; - /** - * Returns the Unicode value of the character at the specified location. - * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. - */ - charCodeAt(index: number): number; - /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position index in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at index, the result is the code unit at index. - */ - codePointAt(index: number): number; - /** - * Returns a string that contains the concatenation of two or more strings. - * @param strings The strings to append to the end of the string. - */ - concat(...strings: Array): string; - constructor(value?: mixed): void; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position - length(this). Otherwise returns false. - */ - endsWith(searchString: string, position?: number): boolean; - /** - * Returns true if searchString appears as a substring of the result of converting this - * object to a String, at one or more positions that are - * greater than or equal to position; otherwise, returns false. - * @param searchString search string - * @param position If position is undefined, 0 is assumed, so as to search all of the String. - */ - includes(searchString: string, position?: number): boolean; - /** - * Returns the position of the first occurrence of a substring. - * @param searchString The substring to search for in the string - * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. - */ - indexOf(searchString: string, position?: number): number; - /** - * Returns the last occurrence of a substring in the string. - * @param searchString The substring to search for. - * @param position The index at which to begin searching. If omitted, the search begins at the end of the string. - */ - lastIndexOf(searchString: string, position?: number): number; - /** Returns an `` HTML element and sets the href attribute value */ - link(href: string): string; - /** - * Determines whether two strings are equivalent in the current or specified locale. - * @param that String to compare to target string - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. - * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. - */ - localeCompare(that: string, locales?: string | Array, options?: Intl$CollatorOptions): number; - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - match(regexp: string | RegExp): RegExp$matchResult | null; - /** - * Matches a string with a regular expression, and returns an iterable of matches - * containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. - */ - matchAll(regexp: string | RegExp): Iterator; - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param format Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(format?: string): string; - /** - * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. - * The padding is applied from the end (right) of the current string. - * - * @param targetLength The length of the resulting string once the current string has been padded. - * If this parameter is smaller than the current string's length, the current string will be returned as it is. - * - * @param padString The string to pad the current string with. - * If this string is too long, it will be truncated and the left-most part will be applied. - * The default value for this parameter is " " (U+0020). - */ - padEnd(targetLength: number, padString?: string): string; - /** - * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. - * The padding is applied from the start (left) of the current string. - * - * @param targetLength The length of the resulting string once the current string has been padded. - * If this parameter is smaller than the current string's length, the current string will be returned as it is. - * - * @param padString The string to pad the current string with. - * If this string is too long, it will be truncated and the left-most part will be applied. - * The default value for this parameter is " " (U+0020). - */ - padStart(targetLength: number, padString?: string): string; - /** - * Returns a String value that is made from count copies appended together. If count is 0, - * the empty string is returned. - * @param count number of copies to append - */ - repeat(count: number): string; - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string or a function that returns the replacement text. - */ - replace(searchValue: string | RegExp, replaceValue: string | (substring: string, ...args: Array) => string): string; - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: string | RegExp): number; - /** - * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. - */ - slice(start?: number, end?: number): string; - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator?: string | RegExp, limit?: number): Array; - /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. - */ - startsWith(searchString: string, position?: number): boolean; - /** - * Gets a substring beginning at the specified location and having the specified length. - * @param from The starting position of the desired substring. The index of the first character in the string is zero. - * @param length The number of characters to include in the returned substring. - */ - substr(from: number, length?: number): string; - /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. - * If end is omitted, the characters from start through the end of the original string are returned. - */ - substring(start: number, end?: number): string; - /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ - toLocaleLowerCase(locale?: string | Array): string; - /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */ - toLocaleUpperCase(locale?: string | Array): string; - /** Converts all the alphabetic characters in a string to lowercase. */ - toLowerCase(): string; - /** Converts all the alphabetic characters in a string to uppercase. */ - toUpperCase(): string; - /** Removes the leading and trailing white space and line terminator characters from a string. */ - trim(): string; - /** Removes the trailing white space and line terminator characters from a string. */ - trimEnd(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimLeft(): string; - /** Removes the trailing white space and line terminator characters from a string. */ - trimRight(): string; - /** Removes the leading white space and line terminator characters from a string. */ - trimStart(): string; - /** Returns the primitive value of the specified object. */ - valueOf(): string; - /** Returns a string representation of a string. */ - toString(): string; - /** Returns the length of a String object. */ - length: number; - [key: number]: string; - static (value:mixed):string; - static fromCharCode(...codes: Array): string; - /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. - */ - static fromCodePoint(...codes: Array): string; - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param templateString A well-formed template string call site representation. - */ - static raw(templateString: string): string; - /** - * String.raw is intended for use as a tag function of a Tagged Template String. When called - * as such the first argument will be a well formed template call site object and the rest - * parameter will contain the substitution values. - * @param callSite A well-formed template string call site representation. - * @param substitutions A set of substitution values. - */ - static raw(callSite: $Shape<{ raw: string, ... }>, ...substitutions: any[]): string; -} - -declare class RegExp { - static (pattern: string | RegExp, flags?: RegExp$flags): RegExp; - compile(): RegExp; - constructor(pattern: string | RegExp, flags?: RegExp$flags): void; - /** - * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search. - * @param string The String object or string literal on which to perform the search. - */ - exec(string: string): RegExp$matchResult | null; - /** - * Returns a string indicating the flags of the regular expression in question. This field is read-only. - * The characters in this string are sequenced and concatenated in the following order: - * - * - "g" for global - * - "i" for ignoreCase - * - "m" for multiline - * - "u" for unicode - * - "y" for sticky - * - * If no flags are set, the value is the empty string. - */ - flags: string; - /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */ - global: boolean; - /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */ - ignoreCase: boolean; - lastIndex: number; - /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */ - multiline: boolean; - /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */ - source: string; - /** - * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular - * expression. Default is false. Read-only. - */ - sticky: boolean; - /** - * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular - * expression. Default is false. Read-only. - */ - unicode: boolean; - /** - * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. - * Default is false. Read-only. - */ - dotAll: boolean; - /** - * Returns a Boolean value that indicates whether or not a pattern exists in a searched string. - * @param string String on which to perform the search. - */ - test(string: string): boolean; - toString(): string; - +[key: $SymbolMatch | $SymbolMatchAll]: (str: string) => Iterator -} - -/** Enables basic storage and retrieval of dates and times. */ -declare class Date { - constructor(): void; - constructor(timestamp: number): void; - constructor(date: Date): void; - constructor(dateString: string): void; - constructor(year: number, month: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number): void; - /** Gets the day-of-the-month, using local time. */ - getDate(): number; - /** Gets the day of the week, using local time. */ - getDay(): number; - /** Gets the year, using local time. */ - getFullYear(): number; - /** Gets the hours in a date, using local time. */ - getHours(): number; - /** Gets the milliseconds of a Date, using local time. */ - getMilliseconds(): number; - /** Gets the minutes of a Date object, using local time. */ - getMinutes(): number; - /** Gets the month, using local time. */ - getMonth(): number; - /** Gets the seconds of a Date object, using local time. */ - getSeconds(): number; - /** Gets the time value in milliseconds. */ - getTime(): number; - /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */ - getTimezoneOffset(): number; - /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */ - getUTCDate(): number; - /** Gets the day of the week using Universal Coordinated Time (UTC). */ - getUTCDay(): number; - /** Gets the year using Universal Coordinated Time (UTC). */ - getUTCFullYear(): number; - /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */ - getUTCHours(): number; - /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCMilliseconds(): number; - /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */ - getUTCMinutes(): number; - /** Gets the month of a Date object using Universal Coordinated Time (UTC). */ - getUTCMonth(): number; - /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */ - getUTCSeconds(): number; - /** - * Sets the numeric day-of-the-month value of the Date object using local time. - * @param date A numeric value equal to the day of the month. - */ - setDate(date: number): number; - /** - * Sets the year of the Date object using local time. - * @param year A numeric value for the year. - * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. - * @param date A numeric value equal for the day of the month. - */ - setFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the hour value in the Date object using local time. - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the milliseconds value in the Date object using local time. - * @param ms A numeric value equal to the millisecond value. - */ - setMilliseconds(ms: number): number; - /** - * Sets the minutes value in the Date object using local time. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the month value in the Date object using local time. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. - */ - setMonth(month: number, date?: number): number; - /** - * Sets the seconds value in the Date object using local time. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setSeconds(sec: number, ms?: number): number; - /** - * Sets the date and time value in the Date object. - * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. - */ - setTime(time: number): number; - /** - * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC). - * @param date A numeric value equal to the day of the month. - */ - setUTCDate(date: number): number; - /** - * Sets the year value in the Date object using Universal Coordinated Time (UTC). - * @param year A numeric value equal to the year. - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. - * @param date A numeric value equal to the day of the month. - */ - setUTCFullYear(year: number, month?: number, date?: number): number; - /** - * Sets the hours value in the Date object using Universal Coordinated Time (UTC). - * @param hours A numeric value equal to the hours value. - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number; - /** - * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC). - * @param ms A numeric value equal to the millisecond value. - */ - setUTCMilliseconds(ms: number): number; - /** - * Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - * @param min A numeric value equal to the minutes value. - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCMinutes(min: number, sec?: number, ms?: number): number; - /** - * Sets the month value in the Date object using Universal Coordinated Time (UTC). - * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. - * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. - */ - setUTCMonth(month: number, date?: number): number; - /** - * Sets the seconds value in the Date object using Universal Coordinated Time (UTC). - * @param sec A numeric value equal to the seconds value. - * @param ms A numeric value equal to the milliseconds value. - */ - setUTCSeconds(sec: number, ms?: number): number; - /** Returns a date as a string value. */ - toDateString(): string; - /** Returns a date as a string value in ISO format. */ - toISOString(): string; - /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */ - toJSON(key?: mixed): string; - /** - * Converts a date to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleDateString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; - /** - * Converts a date and time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; - /** - * Converts a time to a string by using the current or specified locale. - * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. - * @param options An object that contains one or more properties that specify comparison options. - */ - toLocaleTimeString(locales?: string | Array, options?: Intl$DateTimeFormatOptions): string; - /** Returns a time as a string value. */ - toTimeString(): string; - /** Returns a date converted to a string using Universal Coordinated Time (UTC). */ - toUTCString(): string; - /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */ - valueOf(): number; - - static ():string; - static now(): number; - /** - * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970. - * @param s A date string - */ - static parse(s: string): number; - /** - * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. - * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. - * @param month The month as a number between 0 and 11 (January to December). - * @param date The date as a number between 1 and 31. - * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. - * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. - * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. - * @param ms A number from 0 to 999 that specifies the milliseconds. - */ - static UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; - // multiple indexers not yet supported - [key: $SymbolToPrimitive]: (hint: 'string' | 'default' | 'number') => string | number; -} - -declare class CallSite { - getThis(): any; - getTypeName(): string; - getFunction(): ?((...any) => any); - getFunctionName(): string; - getMethodName(): string; - getFileName(): ?string; - getLineNumber(): ?number; - getColumnNumber(): ?number; - getEvalOrigin(): ?CallSite; - getScriptNameOrSourceURL(): ?string; - isToplevel(): bool; - isEval(): bool; - isNative(): bool; - isConstructor(): bool; - toString(): string; -} - -declare class Error { - static (message?:string):Error; - constructor (message?: mixed): void; - name: string; - message: string; - stack: string; - toString(): string; - - // note: microsoft only - description?: string; - number?: number; - - // note: mozilla only - fileName?: string; - lineNumber?: number; - columnNumber?: number; - - // note: v8 only (node/chrome) - static captureStackTrace(target: {[any] : any, ...}, constructor?: any): void; - - static stackTraceLimit: number; - static prepareStackTrace: (err: Error, stack: CallSite[]) => mixed; -} - -declare class EvalError extends Error { - static (message?:string):Error; -} - -declare class RangeError extends Error { - static (message?:string):Error; -} - -declare class ReferenceError extends Error { - static (message?:string):Error; -} - -declare class SyntaxError extends Error { - static (message?:string):Error; -} - -declare class TypeError extends Error { - static (message?:string):Error; -} - -declare class URIError extends Error { - static (message?:string):Error; -} - -/** - * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format. - */ -declare class JSON { - /** - * Converts a JavaScript Object Notation (JSON) string into an object. - * @param text A valid JSON string. - * @param reviver A function that transforms the results. This function is called for each member of the object. - * If a member contains nested objects, the nested objects are transformed before the parent object is. - */ - static parse(text: string, reviver?: (key: any, value: any) => any): any; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - */ - static stringify( - value: null | string | number | boolean | {...} | $ReadOnlyArray, - replacer?: ?((key: string, value: any) => any) | Array, - space?: string | number - ): string; - /** - * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. - * @param value A JavaScript value, usually an object or array, to be converted. - * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. - * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - */ - static stringify( - value: mixed, - replacer?: ?((key: string, value: any) => any) | Array, - space?: string | number - ): string | void; -} - -/* Iterable/Iterator/Generator */ - -type IteratorResult<+Yield,+Return> = - | { - done: true, - +value?: Return, - ... -} - | { - done: false, - +value: Yield, - ... -}; - -interface $Iterator<+Yield,+Return,-Next> { - @@iterator(): $Iterator; - next(value?: Next): IteratorResult; -} -type Iterator<+T> = $Iterator; - -interface $Iterable<+Yield,+Return,-Next> { - @@iterator(): $Iterator; -} -type Iterable<+T> = $Iterable; - -interface Generator<+Yield,+Return,-Next> { - @@iterator(): $Iterator; - next(value?: Next): IteratorResult; - return(value: R): IteratorResult; - throw(error?: any): IteratorResult; -} - -declare function $iterate(p: Iterable): T; - -/* Async Iterable/Iterator/Generator */ - -interface $AsyncIterator<+Yield,+Return,-Next> { - @@asyncIterator(): $AsyncIterator; - next(value?: Next): Promise>; -} -type AsyncIterator<+T> = $AsyncIterator; - -interface $AsyncIterable<+Yield,+Return,-Next> { - @@asyncIterator(): $AsyncIterator; -} -type AsyncIterable<+T> = $AsyncIterable; - -interface AsyncGenerator<+Yield,+Return,-Next> { - @@asyncIterator(): $AsyncIterator; - next(value?: Next): Promise>; - return(value: R): Promise>; - throw(error?: any): Promise>; -} - -declare function $asyncIterator(p: AsyncIterable): T; - -/* Maps and Sets */ - -declare class $ReadOnlyMap { - @@iterator(): Iterator<[K, V]>; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): Iterator<[K, V]>; - forEach(callbackfn: (value: V, index: K, map: $ReadOnlyMap) => mixed, thisArg?: mixed): void; - get(key: K): V | void; - has(key: K): boolean; - /** - * Returns an iterable of keys in the map - */ - keys(): Iterator; - size: number; - /** - * Returns an iterable of values in the map - */ - values(): Iterator; -} - -declare class Map extends $ReadOnlyMap { - @@iterator(): Iterator<[K, V]>; - constructor(iterable: ?Iterable<[K, V]>): void; - clear(): void; - delete(key: K): boolean; - /** - * Returns an iterable of key, value pairs for every entry in the map. - */ - entries(): Iterator<[K, V]>; - forEach(callbackfn: (value: V, index: K, map: Map) => mixed, thisArg?: mixed): void; - get(key: K): V | void; - has(key: K): boolean; - /** - * Returns an iterable of keys in the map - */ - keys(): Iterator; - set(key: K, value: V): Map; - size: number; - /** - * Returns an iterable of values in the map - */ - values(): Iterator; - // Multiple Indexers not yet supported - +[key: $SymbolToStringTag]: any; - static +[key: $SymbolSpecies]: any; -} - -declare class $ReadOnlyWeakMap, +V> { - get(key: K): V | void; - has(key: K): boolean; -} - -declare class WeakMap, V> extends $ReadOnlyWeakMap { - constructor(iterable: ?Iterable<[K, V]>): void; - delete(key: K): boolean; - get(key: K): V | void; - has(key: K): boolean; - set(key: K, value: V): WeakMap; -} - -declare class $ReadOnlySet { - @@iterator(): Iterator; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): Iterator<[T, T]>; - forEach(callbackfn: (value: T, index: T, set: $ReadOnlySet) => mixed, thisArg?: mixed): void; - has(value: T): boolean; - /** - * Despite its name, returns an iterable of the values in the set, - */ - keys(): Iterator; - size: number; - /** - * Returns an iterable of values in the set. - */ - values(): Iterator; -} - -declare class Set extends $ReadOnlySet { - @@iterator(): Iterator; - constructor(iterable: ?Iterable): void; - add(value: T): Set; - clear(): void; - delete(value: T): boolean; - /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. - */ - entries(): Iterator<[T, T]>; - forEach(callbackfn: (value: T, index: T, set: Set) => mixed, thisArg?: mixed): void; - has(value: T): boolean; - /** - * Despite its name, returns an iterable of the values in the set, - */ - keys(): Iterator; - size: number; - /** - * Returns an iterable of values in the set. - */ - values(): Iterator; - +[key: $SymbolToStringTag]: (...any) => any; - static +[key: $SymbolSpecies]: (...any) => any; // This would the Set constructor, can't think of a way to correctly type this -} - -declare class $ReadOnlyWeakSet> { - has(value: T): boolean; -} - -declare class WeakSet> extends $ReadOnlyWeakSet { - constructor(iterable?: Iterable): void; - add(value: T): WeakSet; - delete(value: T): boolean; - has(value: T): boolean; -} - -/* Promises - cf. https://github.com/borisyankov/DefinitelyTyped/blob/master/es6-promises/es6-promises.d.ts -*/ -/** - * Represents the completion of an asynchronous operation - */ -declare class Promise<+R> { - constructor(callback: ( - resolve: (result: Promise | R) => void, - reject: (error: any) => void - ) => mixed): void; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onFulfill The callback to execute when the Promise is resolved. - * @param onReject The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onFulfill: null | void, onReject: null | void): Promise; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onFulfill The callback to execute when the Promise is resolved. - * @param onReject The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onFulfill: null | void, - onReject: (error: any) => Promise | U - ): Promise; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onFulfill The callback to execute when the Promise is resolved. - * @param onReject The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onFulfill: (value: R) => Promise | U, - onReject: null | void | ((error: any) => Promise | U) - ): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onReject The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onReject: null | void): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onReject The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onReject: (error: any) => Promise | U - ): Promise; - - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onFinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onFinally: () => mixed): Promise; - - /** - * Creates a new resolved promise for the provided value. - * @param object A promise. - * @returns A promise whose internal state matches the provided promise. - */ - static resolve(object: Promise | T): Promise; - /** - * Creates a new rejected promise for the provided reason. - * @param error The reason the promise was rejected. - * @returns A new rejected Promise. - */ - static reject(error: any): Promise; - /** - * Creates a Promise that is resolved with an array of results when all of the provided Promises - * resolve, or rejected when any Promise is rejected. - * @param promises An iterable of Promises. - * @returns A new Promise. - */ - static all>(promises: T): Promise<$TupleMap>; - /** - * Creates a Promise that is resolved with an array of results when all - * of the provided Promises resolve or reject. - * @param promises An array of Promises. - * @returns A new Promise. - */ - static allSettled>(promises: T): Promise<$TupleMap(p: Promise | T) => $SettledPromiseResult>>; - /** - * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved - * or rejected. - * @param promises An iterable of Promises. - * @returns A new Promise. - */ - static race | T>(promises: Iterable): Promise; -} - -type $SettledPromiseResult<+T> = {| - +status: 'fulfilled', - +value: T, -|} | {| - +status: 'rejected', - +reason: any, -|}; - -// we use this signature when typing await expressions -declare function $await(p: Promise | T): T; - -/* Binary data */ - -declare class ArrayBuffer { - static isView(arg: mixed): boolean; - constructor(byteLength: number): void; - byteLength: number; - slice(begin: number, end?: number): this; - static +[key: $SymbolSpecies]: Class; -} - -// This is a helper type to simplify the specification, it isn't an interface -// and there are no objects implementing it. -// https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView -type $ArrayBufferView = $TypedArray | DataView; - -// The TypedArray intrinsic object is a constructor function, but does not have -// a global name or appear as a property of the global object. -// http://www.ecma-international.org/ecma-262/6.0/#sec-%typedarray%-intrinsic-object -declare class $TypedArray { - /** - * The size in bytes of each element in the array. - */ - static BYTES_PER_ELEMENT: number; - static from(iterable: Iterable, mapFn?: (element: number) => number, thisArg?: mixed): this; - static of(...values: number[]): this; - - constructor(length: number): void; - constructor(typedArray: $TypedArray): void; - constructor(iterable: Iterable): void; - constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number): void; - - [index: number]: number; - - @@iterator(): Iterator; - - /** - * The ArrayBuffer instance referenced by the array. - */ - buffer: ArrayBuffer; - /** - * The length in bytes of the array. - */ - byteLength: number; - /** - * The offset in bytes of the array. - */ - byteOffset: number; - /** - * The length of the array. - */ - length: number; - - /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the - * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param end If not specified, length of the this object is used as its default value. - */ - copyWithin(target: number, start: number, end?: number): void; - /** - * Returns an array of key, value pairs for every entry in the array - */ - entries(): Iterator<[number, number]>; - /** - * Determines whether all the members of an array satisfy the specified test. - * @param callback A function that accepts up to three arguments. The every method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value false, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - every(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): boolean; - /** - * Returns the this object after filling the section identified by start and end with value - * @param value value to fill array section with - * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. - */ - fill(value: number, start?: number, end?: number): this; - /** - * Returns the elements of an array that meet the condition specified in a callback function. - * @param callback A function that accepts up to three arguments. The filter method calls - * the predicate function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - filter(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): this; - /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. - * @param callback find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, find - * immediately returns that element value. Otherwise, find returns undefined. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - find(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): number | void; - /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. - * @param callback find calls predicate once for each element of the array, in ascending - * order, until it finds one where predicate returns true. If such an element is found, - * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @param thisArg If provided, it will be used as the this value for each invocation of - * predicate. If it is not provided, undefined is used instead. - */ - findIndex(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): number; - /** - * Performs the specified action for each element in an array. - * @param callback A function that accepts up to three arguments. forEach calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - forEach(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): void; - /** - * Determines whether an array includes a certain element, returning true or false as appropriate. - * @param searchElement The element to search for. - * @param fromIndex The position in this array at which to begin searching for searchElement. - */ - includes(searchElement: number, fromIndex?: number): boolean; - /** - * Returns the index of the first occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - indexOf(searchElement: number, fromIndex?: number): number; // -1 if not present - /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - */ - join(separator?: string): string; - /** - * Returns an list of keys in the array - */ - keys(): Iterator; - /** - * Returns the index of the last occurrence of a value in an array. - * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - */ - lastIndexOf(searchElement: number, fromIndex?: number): number; // -1 if not present - /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. - * @param callback A function that accepts up to three arguments. The map method calls the - * callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. - * If thisArg is omitted, undefined is used as the this value. - */ - map(callback: (currentValue: number, index: number, array: this) => number, thisArg?: mixed): this; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callback A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce( - callback: (previousValue: number, currentValue: number, index: number, array: this) => number, - initialValue: void - ): number; - /** - * Calls the specified callback function for all the elements in an array. The return value of - * the callback function is the accumulated result, and is provided as an argument in the next - * call to the callback function. - * @param callback A function that accepts up to four arguments. The reduce method calls the - * callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an argument - * instead of an array value. - */ - reduce( - callback: (previousValue: U, currentValue: number, index: number, array: this) => U, - initialValue: U - ): U; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callback A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight( - callback: (previousValue: number, currentValue: number, index: number, array: this) => number, - initialValue: void - ): number; - /** - * Calls the specified callback function for all the elements in an array, in descending order. - * The return value of the callback function is the accumulated result, and is provided as an - * argument in the next call to the callback function. - * @param callback A function that accepts up to four arguments. The reduceRight method calls - * the callbackfn function one time for each element in the array. - * @param initialValue If initialValue is specified, it is used as the initial value to start - * the accumulation. The first call to the callbackfn function provides this value as an - * argument instead of an array value. - */ - reduceRight( - callback: (previousValue: U, currentValue: number, index: number, array: this) => U, - initialValue: U - ): U; - /** - * Reverses the elements in an Array. - */ - reverse(): this; - /** - * Sets a value or an array of values. - * @param array A typed or untyped array of values to set. - * @param offset The index in the current array at which the values are to be written. - */ - set(array: Array | $TypedArray, offset?: number): void; - /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. - */ - slice(begin?: number, end?: number): this; - /** - * Determines whether the specified callback function returns true for any element of an array. - * @param callback A function that accepts up to three arguments. The some method calls - * the predicate function for each element in the array until the predicate returns a value - * which is coercible to the Boolean value true, or until the end of the array. - * @param thisArg An object to which the this keyword can refer in the predicate function. - * If thisArg is omitted, undefined is used as the this value. - */ - some(callback: (value: number, index: number, array: this) => mixed, thisArg?: mixed): boolean; - /** - * Sorts an array. - * @param compareFn Function used to determine the order of the elements. It is expected to return - * a negative value if first argument is less than second argument, zero if they're equal and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. - * ```ts - * [11,2,22,1].sort((a, b) => a - b) - * ``` - */ - sort(compare?: (a: number, b: number) => number): void; - /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. - * @param begin The index of the beginning of the array. - * @param end The index of the end of the array. - */ - subarray(begin?: number, end?: number): this; - /** - * Returns an list of values in the array - */ - values(): Iterator; -} - -/** - * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ -declare class Int8Array extends $TypedArray {} -/** - * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -declare class Uint8Array extends $TypedArray {} -/** - * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. - * If the requested number of bytes could not be allocated an exception is raised. - */ -declare class Uint8ClampedArray extends $TypedArray {} -/** - * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -declare class Int16Array extends $TypedArray {} -/** - * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -declare class Uint16Array extends $TypedArray {} -/** - * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -declare class Int32Array extends $TypedArray {} -/** - * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the - * requested number of bytes could not be allocated an exception is raised. - */ -declare class Uint32Array extends $TypedArray {} -/** - * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number - * of bytes could not be allocated an exception is raised. - */ -declare class Float32Array extends $TypedArray {} -/** - * A typed array of 64-bit float values. The contents are initialized to 0. If the requested - * number of bytes could not be allocated an exception is raised. - */ -declare class Float64Array extends $TypedArray {} - -declare class DataView { - constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number): void; - buffer: ArrayBuffer; - byteLength: number; - byteOffset: number; - /** - * Gets the Int8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt8(byteOffset: number): number; - /** - * Gets the Uint8 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint8(byteOffset: number): number; - /** - * Gets the Int16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint16 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint16(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Int32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getInt32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Uint32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getUint32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float32 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getFloat32(byteOffset: number, littleEndian?: boolean): number; - /** - * Gets the Float64 value at the specified byte offset from the start of the view. There is - * no alignment constraint; multi-byte values may be fetched from any offset. - * @param byteOffset The place in the buffer at which the value should be retrieved. - */ - getFloat64(byteOffset: number, littleEndian?: boolean): number; - /** - * Stores an Int8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setInt8(byteOffset: number, value: number): void; - /** - * Stores an Uint8 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - */ - setUint8(byteOffset: number, value: number): void; - /** - * Stores an Int16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setInt16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint16 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setUint16(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Int32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setInt32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Uint32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float32 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void; - /** - * Stores an Float64 value at the specified byte offset from the start of the view. - * @param byteOffset The place in the buffer at which the value should be set. - * @param value The value to set. - * @param littleEndian If false or undefined, a big-endian value should be written, - * otherwise a little-endian value should be written. - */ - setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void; -} - -declare function btoa(rawString: string): string; -declare function atob(encodedString: string): string; - -declare function escape(str: string): string; -declare function unescape(str: string): string; - -declare opaque type TimeoutID; -declare opaque type IntervalID; -declare function clearInterval(intervalId: ?IntervalID): void; -declare function clearTimeout(timeoutId: ?TimeoutID): void; -declare function setTimeout>( - callback: (...args: TArguments) => mixed, - ms?: number, - ...args: TArguments -): TimeoutID; -declare function setInterval>( - callback: (...args: TArguments) => mixed, - ms?: number, - ...args: TArguments -): IntervalID; - -/* Reflect API */ - -declare var Reflect: { - apply(target: (...any) => any, thisArg?: any, argumentsList?: Array): any, - construct(target: (...any) => any, argumentsList?: Array, newTarget?: any): any, - defineProperty(o: any, p: any, attributes: any): boolean, - deleteProperty(o: any, p: any): boolean, - get(o: any, p: any, receiver?: any): any, - getOwnPropertyDescriptor(o: any, p: any): any, - getPrototypeOf: Object$GetPrototypeOf, - setPrototypeOf: Object$SetPrototypeOf, - has(o: any, p: any): boolean, - isExtensible(o: any): boolean, - ownKeys(o: any): Array, - preventExtensions(o: any): boolean, - set(o: any, p: any, value: any, receiver?: any): boolean, - ... -} - -/* Proxy */ - -type Proxy$traps = { - getPrototypeOf?: (target: T) => {[any] : any, ...} | null, - setPrototypeOf?: (target: T, prototype: {[any] : any, ...} | null) => boolean, - isExtensible?: (target: T) => boolean, - preventExtensions?: (target: T) => boolean, - getOwnPropertyDescriptor?: (target: T, property: string) => void | PropertyDescriptor, - defineProperty?: (target: T, property: string, descriptor: PropertyDescriptor) => boolean, - has?: (target: T, key: string) => boolean, - get?: (target: T, property: string, receiver: Proxy) => any, - set?: (target: T, property: string, value: any, receiver: Proxy) => boolean, - deleteProperty?: (target: T, property: string) => boolean, - ownKeys?: (target: T) => Array, - apply?: (target: T, context: any, args: Array) => any, - construct?: (target: T, args: Array, newTarget: (...any) => any) => {[any] : any, ...}, - ... -}; - -type Proxy$revocable = T & { revoke(): void, ... }; - -declare class Proxy { - constructor(target: T, handler: Proxy$traps): T; - - static revocable(target: T, handler: Proxy$traps): Proxy$revocable; -} - -/* CommonJS */ - -declare var global: any; - -declare var module: { - exports: any, - require(id: string): any, - id: string, - filename: string, - loaded: boolean, - parent: any, - children: Array, - builtinModules: Array, - ... -}; -declare var require: { - (id: string): any, - resolve: (id: string) => string, - cache: any, - main: typeof module, - ... -}; -declare var exports: any; - -/* Opaque type for module reference magic strings */ -declare opaque type $Flow$ModuleRef<+T>; - -/* Commonly available, shared between node and dom */ -declare var console: { - assert(condition: mixed, ...data: Array): void, - clear(): void, - count(label?: string): void, - countReset(label?: string): void, - debug(...data: Array): void, - dir(...data: Array): void, - dirxml(...data: Array): void, - error(...data: Array): void, - _exception(...data: Array): void, - group(...data: Array): void, - groupCollapsed(...data: Array): void, - groupEnd(): void, - info(...data: Array): void, - log(...data: Array): void, - profile(name?: string): void, - profileEnd(name?: string): void, - table(tabularData: { [key: string]: any, ... } | Array<{ [key: string]: any, ... }> | Array>): void, - time(label?: string): void, - timeEnd(label: string): void, - timeStamp(label?: string): void, - timeLog(label?: string, ...data?: Array): void, - trace(...data: Array): void, - warn(...data: Array): void, - ... -}; - -type $EnumProto = {| - cast(input: ?TRepresentation): void | TEnum, - isValid(input: ?TRepresentation): boolean, - members(): Iterable, - __proto__: null, -|} - -declare class SharedArrayBuffer { - constructor(byteLength: number): void; - - /** - * Read-only. The length of the ArrayBuffer (in bytes). - */ - +byteLength: number; - /** - * Returns a section of an SharedArrayBuffer. - */ - slice(begin?: number, end?: number): this; - - +[key: $SymbolToStringTag]: 'SharedArrayBuffer'; -} - -type $SharedIntegerTypedArray = - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array - -declare var Atomics: { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: $SharedIntegerTypedArray, index: number, expectedValue: number, replacementValue: number): number, - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: $SharedIntegerTypedArray, index: number): number, - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: $SharedIntegerTypedArray, index: number, value: number): number, - - /** - * Returns a value indicating whether high-performance algorithms can use atomic operations - * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed - * array. - */ - isLockFree(size: number): boolean, - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: Int32Array, index: number, value: number, timeout?: number): 'ok' | 'not-equal' | 'timed-out', - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared Int32Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: Int32Array, index: number, count: number): number, - - +[key: $SymbolToStringTag]: 'Atomics', - ... -}; diff --git a/flow-typed/intl.js b/flow-typed/intl.js deleted file mode 100644 index 275502858f..0000000000 --- a/flow-typed/intl.js +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -declare var Intl: { - Collator: Class, - DateTimeFormat: Class, - NumberFormat: Class, - PluralRules: ?Class, - getCanonicalLocales?: (locales?: Intl$Locales) => Intl$Locale[], - ... -} - -type Intl$Locale = string -type Intl$Locales = Intl$Locale | Intl$Locale[] - -declare class Intl$Collator { - constructor ( - locales?: Intl$Locales, - options?: Intl$CollatorOptions - ): Intl$Collator; - - static ( - locales?: Intl$Locales, - options?: Intl$CollatorOptions - ): Intl$Collator; - - compare (string, string): number; - - resolvedOptions (): { - locale: Intl$Locale, - usage: 'sort' | 'search', - sensitivity: 'base' | 'accent' | 'case' | 'variant', - ignorePunctuation: boolean, - collation: string, - numeric: boolean, - caseFirst?: 'upper' | 'lower' | 'false', - ... - }; - - static supportedLocalesOf (locales?: Intl$Locales): Intl$Locale[]; -} - -declare type Intl$CollatorOptions = { - localeMatcher?: 'lookup' | 'best fit', - usage?: 'sort' | 'search', - sensitivity?: 'base' | 'accent' | 'case' | 'variant', - ignorePunctuation?: boolean, - numeric?: boolean, - caseFirst?: 'upper' | 'lower' | 'false', - ... -} - -type FormatToPartsType = | 'day' | 'dayPeriod' | 'era' | 'hour' | 'literal' - | 'minute' | 'month' | 'second' | 'timeZoneName' | 'weekday' | 'year'; - -declare class Intl$DateTimeFormat { - constructor ( - locales?: Intl$Locales, - options?: Intl$DateTimeFormatOptions - ): Intl$DateTimeFormat; - - static ( - locales?: Intl$Locales, - options?: Intl$DateTimeFormatOptions - ): Intl$DateTimeFormat; - - format (value?: Date | number): string; - - formatToParts (value?: Date | number): Array<{ - type: FormatToPartsType, - value: string, - ... - }>; - - resolvedOptions (): { - locale: Intl$Locale, - calendar: string, - numberingSystem: string, - timeZone?: string, - hour12: boolean, - weekday?: 'narrow' | 'short' | 'long', - era?: 'narrow' | 'short' | 'long', - year?: 'numeric' | '2-digit', - month?: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long', - day?: 'numeric' | '2-digit', - hour?: 'numeric' | '2-digit', - minute?: 'numeric' | '2-digit', - second?: 'numeric' | '2-digit', - timeZoneName?: 'short' | 'long', - ... - }; - - static supportedLocalesOf (locales?: Intl$Locales): Intl$Locale[]; -} - -declare type Intl$DateTimeFormatOptions = { - localeMatcher?: 'lookup' | 'best fit', - timeZone?: string, - hour12?: boolean, - formatMatcher?: 'basic' | 'best fit', - weekday?: 'narrow' | 'short' | 'long', - era?: 'narrow' | 'short' | 'long', - year?: 'numeric' | '2-digit', - month?: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long', - day?: 'numeric' | '2-digit', - hour?: 'numeric' | '2-digit', - minute?: 'numeric' | '2-digit', - second?: 'numeric' | '2-digit', - timeZoneName?: 'short' | 'long', - ... -} - -declare class Intl$NumberFormat { - constructor ( - locales?: Intl$Locales, - options?: Intl$NumberFormatOptions - ): Intl$NumberFormat; - - static ( - locales?: Intl$Locales, - options?: Intl$NumberFormatOptions - ): Intl$NumberFormat; - - format (number): string; - - resolvedOptions (): { - locale: Intl$Locale, - numberingSystem: string, - style: 'decimal' | 'currency' | 'percent', - currency?: string, - currencyDisplay?: 'symbol' | 'code' | 'name', - useGrouping: boolean, - minimumIntegerDigits?: number, - minimumFractionDigits?: number, - maximumFractionDigits?: number, - minimumSignificantDigits?: number, - maximumSignificantDigits?: number, - ... - }; - - static supportedLocalesOf (locales?: Intl$Locales): Intl$Locale[]; -} - -declare type Intl$NumberFormatOptions = { - localeMatcher?: 'lookup' | 'best fit', - style?: 'decimal' | 'currency' | 'percent', - currency?: string, - currencyDisplay?: 'symbol' | 'code' | 'name', - useGrouping?: boolean, - minimumIntegerDigits?: number, - minimumFractionDigits?: number, - maximumFractionDigits?: number, - minimumSignificantDigits?: number, - maximumSignificantDigits?: number, - ... -} - -declare class Intl$PluralRules { - constructor ( - locales?: Intl$Locales, - options?: Intl$PluralRulesOptions - ): Intl$PluralRules; - - select (number): Intl$PluralRule; - - resolvedOptions (): { - locale: Intl$Locale, - type: 'cardinal' | 'ordinal', - minimumIntegerDigits?: number, - minimumFractionDigits?: number, - maximumFractionDigits?: number, - minimumSignificantDigits?: number, - maximumSignificantDigits?: number, - pluralCategories: Intl$PluralRule[], - ... - }; - - static supportedLocalesOf (locales?: Intl$Locales): Intl$Locale[]; -} - -type Intl$PluralRule = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other' - -declare type Intl$PluralRulesOptions = { - localeMatcher?: 'lookup' | 'best fit', - type?: 'cardinal' | 'ordinal', - minimumIntegerDigits?: number, - minimumFractionDigits?: number, - maximumFractionDigits?: number, - minimumSignificantDigits?: number, - maximumSignificantDigits?: number, - ... -} diff --git a/flow-typed/node.js b/flow-typed/node.js deleted file mode 100644 index 590d9bf18e..0000000000 --- a/flow-typed/node.js +++ /dev/null @@ -1,5 +0,0 @@ -declare class Process { - env : { [key: string] : string | void, ... }; -} - -declare var process: Process; diff --git a/flow-typed/npm/chai_vx.x.x.js b/flow-typed/npm/chai_vx.x.x.js deleted file mode 100644 index aa4cbe8e4f..0000000000 --- a/flow-typed/npm/chai_vx.x.x.js +++ /dev/null @@ -1,331 +0,0 @@ -declare module 'chai' { - declare type ExpectChain = { - and: ExpectChain, - at: ExpectChain, - be: ExpectChain, - been: ExpectChain, - have: ExpectChain, - has: ExpectChain, - is: ExpectChain, - of: ExpectChain, - same: ExpectChain, - that: ExpectChain, - to: ExpectChain, - which: ExpectChain, - with: ExpectChain, - not: ExpectChain, - deep: ExpectChain, - any: ExpectChain, - all: ExpectChain, - own: ExpectChain, - a: ExpectChain & ((type: string, message?: string) => ExpectChain), - an: ExpectChain & ((type: string, message?: string) => ExpectChain), - include: ExpectChain & - ((value: mixed, message?: string) => ExpectChain), - includes: ExpectChain & - ((value: mixed, message?: string) => ExpectChain), - contain: ExpectChain & - ((value: mixed, message?: string) => ExpectChain), - contains: ExpectChain & - ((value: mixed, message?: string) => ExpectChain), - eq: (value: T, message?: string) => ExpectChain, - eql: (value: T, message?: string) => ExpectChain, - equal: (value: T, message?: string) => ExpectChain, - equals: (value: T, message?: string) => ExpectChain, - above: (value: T & number, message?: string) => ExpectChain, - gt: (value: T & number, message?: string) => ExpectChain, - greaterThan: (value: T & number, message?: string) => ExpectChain, - least: (value: T & number, message?: string) => ExpectChain, - below: (value: T & number, message?: string) => ExpectChain, - lessThan: (value: T & number, message?: string) => ExpectChain, - lt: (value: T & number, message?: string) => ExpectChain, - most: (value: T & number, message?: string) => ExpectChain, - within: ( - start: T & number, - finish: T & number, - message?: string, - ) => ExpectChain, - instanceof: (constructor: mixed, message?: string) => ExpectChain, - instanceOf: (constructor: mixed, message?: string) => ExpectChain, - nested: ExpectChain, - property:

( - name: string, - value?: P, - message?: string, - ) => ExpectChain

& ((name: string) => ExpectChain), - length: ExpectChain & - ((value: number, message?: string) => ExpectChain), - lengthOf: ExpectChain & - ((value: number, message?: string) => ExpectChain), - match: (regex: RegExp, message?: string) => ExpectChain, - matches: (regex: RegExp, message?: string) => ExpectChain, - string: (string: string, message?: string) => ExpectChain, - key: (key: string) => ExpectChain, - keys: ( - key: string | Array, - ...keys: Array - ) => ExpectChain, - throw: ( - err?: Class | Error | RegExp | string, - errMsgMatcher?: RegExp | string, - msg?: string, - ) => ExpectChain, - respondTo: (method: string, message?: string) => ExpectChain, - itself: ExpectChain, - satisfy: ( - method: (value: T) => boolean, - message?: string, - ) => ExpectChain, - closeTo: ( - expected: T & number, - delta: number, - message?: string, - ) => ExpectChain, - members: (set: mixed, message?: string) => ExpectChain, - oneOf: (list: Array, message?: string) => ExpectChain, - change: (obj: mixed, key: string, message?: string) => ExpectChain, - increase: (obj: mixed, key: string, message?: string) => ExpectChain, - decrease: (obj: mixed, key: string, message?: string) => ExpectChain, - by: (delta: number, message?: string) => ExpectChain, - ordered: ExpectChain, - // dirty-chai - ok: () => ExpectChain, - true: () => ExpectChain, - false: () => ExpectChain, - null: () => ExpectChain, - undefined: () => ExpectChain, - exist: () => ExpectChain, - empty: () => ExpectChain, - extensible: () => ExpectChain, - sealed: () => ExpectChain, - frozen: () => ExpectChain, - NaN: () => ExpectChain, - // chai-immutable - size: (n: number) => ExpectChain, - // sinon-chai - called: () => ExpectChain, - callCount: (n: number) => ExpectChain, - calledOnce: () => ExpectChain, - calledTwice: () => ExpectChain, - calledThrice: () => ExpectChain, - calledBefore: (spy: mixed) => ExpectChain, - calledAfter: (spy: mixed) => ExpectChain, - calledImmediatelyBefore: (spy: mixed) => ExpectChain, - calledImmediatelyAfter: (spy: mixed) => ExpectChain, - calledWith: (...args: Array) => ExpectChain, - calledOnceWith: (...args: Array) => ExpectChain, - calledWithMatch: (...args: Array) => ExpectChain, - calledWithExactly: (...args: Array) => ExpectChain, - calledOnceWithExactly: (...args: Array) => ExpectChain, - returned: (returnVal: mixed) => ExpectChain, - alwaysReturned: (returnVal: mixed) => ExpectChain, - // chai-as-promised - eventually: ExpectChain, - resolvedWith: (value: mixed) => Promise & ExpectChain, - resolved: () => Promise & ExpectChain, - rejectedWith: ( - value: mixed, - errMsgMatcher?: RegExp | string, - msg?: string, - ) => Promise & ExpectChain, - rejected: () => Promise & ExpectChain, - notify: (callback: () => mixed) => ExpectChain, - fulfilled: () => Promise & ExpectChain, - // chai-subset - containSubset: (obj: { ... } | Array<{ ... }>) => ExpectChain, - // chai-redux-mock-store - dispatchedActions: ( - actions: Array<{ ... } | ((action: { ... }) => any)>, - ) => ExpectChain, - dispatchedTypes: (actions: Array) => ExpectChain, - // chai-enzyme - attr: (key: string, val?: any) => ExpectChain, - data: (key: string, val?: any) => ExpectChain, - prop: (key: string, val?: any) => ExpectChain, - state: (key: string, val?: any) => ExpectChain, - value: (val: string) => ExpectChain, - className: (val: string) => ExpectChain, - text: (val: string) => ExpectChain, - // chai-karma-snapshot - matchSnapshot: (lang?: any, update?: boolean, msg?: any) => ExpectChain, - ... - }; - - declare var expect: { - (actual: T, message?: string): ExpectChain, - fail: ((message?: string) => void) & - (( - actual: any, - expected: any, - message?: string, - operator?: string, - ) => void), - ... - }; - - declare function use(plugin: (chai: Object, utils: Object) => void): void; - - declare class assert { - static (expression: mixed, message?: string): void; - static fail( - actual: mixed, - expected: mixed, - message?: string, - operator?: string, - ): void; - - static isOk(object: mixed, message?: string): void; - static isNotOk(object: mixed, message?: string): void; - - static empty(object: mixed, message?: string): void; - static isEmpty(object: mixed, message?: string): void; - static notEmpty(object: mixed, message?: string): void; - static isNotEmpty(object: mixed, message?: string): void; - - static equal(actual: mixed, expected: mixed, message?: string): void; - static notEqual(actual: mixed, expected: mixed, message?: string): void; - - static strictEqual(act: mixed, exp: mixed, msg?: string): void; - static notStrictEqual(act: mixed, exp: mixed, msg?: string): void; - - static deepEqual(act: mixed, exp: mixed, msg?: string): void; - static notDeepEqual(act: mixed, exp: mixed, msg?: string): void; - - static ok(val: mixed, msg?: string): void; - static isTrue(val: mixed, msg?: string): void; - static isNotTrue(val: mixed, msg?: string): void; - static isFalse(val: mixed, msg?: string): void; - static isNotFalse(val: mixed, msg?: string): void; - - static isNull(val: mixed, msg?: string): void; - static isNotNull(val: mixed, msg?: string): void; - - static isUndefined(val: mixed, msg?: string): void; - static isDefined(val: mixed, msg?: string): void; - - static isNaN(val: mixed, msg?: string): void; - static isNotNaN(val: mixed, msg?: string): void; - - static isAbove(val: number, abv: number, msg?: string): void; - static isBelow(val: number, blw: number, msg?: string): void; - - static exists(val: mixed, msg?: string): void; - static notExists(val: mixed, msg?: string): void; - - static isAtMost(val: number, atmst: number, msg?: string): void; - static isAtLeast(val: number, atlst: number, msg?: string): void; - - static isFunction(val: mixed, msg?: string): void; - static isNotFunction(val: mixed, msg?: string): void; - - static isObject(val: mixed, msg?: string): void; - static isNotObject(val: mixed, msg?: string): void; - - static isArray(val: mixed, msg?: string): void; - static isNotArray(val: mixed, msg?: string): void; - - static isString(val: mixed, msg?: string): void; - static isNotString(val: mixed, msg?: string): void; - - static isNumber(val: mixed, msg?: string): void; - static isNotNumber(val: mixed, msg?: string): void; - - static isBoolean(val: mixed, msg?: string): void; - static isNotBoolean(val: mixed, msg?: string): void; - - static typeOf(val: mixed, type: string, msg?: string): void; - static notTypeOf(val: mixed, type: string, msg?: string): void; - - static instanceOf(val: mixed, constructor: Class<*>, msg?: string): void; - static notInstanceOf(val: mixed, constructor: Class<*>, msg?: string): void; - - static include(exp: string, inc: mixed, msg?: string): void; - static include(exp: Array, inc: T, msg?: string): void; - - static notInclude(exp: string, inc: mixed, msg?: string): void; - static notInclude(exp: Array, inc: T, msg?: string): void; - - static deepInclude( - haystack: T[] | string, - needle: $Shape, - msg?: string, - ): void; - static notDeepInclude( - haystack: T[] | string, - needle: $Shape, - msg?: string, - ): void; - - static match(exp: mixed, re: RegExp, msg?: string): void; - static notMatch(exp: mixed, re: RegExp, msg?: string): void; - - static property(obj: Object, prop: string, msg?: string): void; - static notProperty(obj: Object, prop: string, msg?: string): void; - static deepProperty(obj: Object, prop: string, msg?: string): void; - static notDeepProperty(obj: Object, prop: string, msg?: string): void; - - static propertyVal( - obj: Object, - prop: string, - val: mixed, - msg?: string, - ): void; - static propertyNotVal( - obj: Object, - prop: string, - val: mixed, - msg?: string, - ): void; - - static deepPropertyVal( - obj: Object, - prop: string, - val: mixed, - msg?: string, - ): void; - static deepPropertyNotVal( - obj: Object, - prop: string, - val: mixed, - msg?: string, - ): void; - - static lengthOf(exp: mixed, len: number, msg?: string): void; - - static throws( - func: () => any, - err?: Class | Error | RegExp | string, - errorMsgMatcher?: string | RegExp, - msg?: string, - ): void; - static doesNotThrow( - func: () => any, - err?: Class | Error | RegExp | string, - errorMsgMatcher?: string | RegExp, - msg?: string, - ): void; - - static closeTo( - actual: number, - expected: number, - delta: number, - msg?: string, - ): void; - static approximately( - actual: number, - expected: number, - delta: number, - msg?: string, - ): void; - - // chai-immutable - static sizeOf(val: mixed, length: number): void; - } - - declare var config: { - includeStack: boolean, - showDiff: boolean, - truncateThreshold: number, - ... - }; -} diff --git a/flow-typed/npm/mocha_vx.x.x.js b/flow-typed/npm/mocha_vx.x.x.js deleted file mode 100644 index f83b48a0b1..0000000000 --- a/flow-typed/npm/mocha_vx.x.x.js +++ /dev/null @@ -1,316 +0,0 @@ -declare interface $npm$mocha$SetupOptions { - slow?: number; - timeout?: number; - ui?: string; - globals?: Array; - reporter?: any; - bail?: boolean; - ignoreLeaks?: boolean; - grep?: any; -} - -declare type $npm$mocha$done = (error?: any) => any; - -// declare interface $npm$mocha$SuiteCallbackContext { -// timeout(ms: number): void; -// retries(n: number): void; -// slow(ms: number): void; -// } - -// declare interface $npm$mocha$TestCallbackContext { -// skip(): void; -// timeout(ms: number): void; -// retries(n: number): void; -// slow(ms: number): void; -// [index: string]: any; -// } - -declare interface $npm$mocha$Suite { - parent: $npm$mocha$Suite; - title: string; - fullTitle(): string; -} - -declare type $npm$mocha$ContextDefinition = {| - ( - description: string, - callback: () => /* this: $npm$mocha$SuiteCallbackContext */ void, - ): $npm$mocha$Suite, - only( - description: string, - callback: () => /* this: $npm$mocha$SuiteCallbackContext */ void, - ): $npm$mocha$Suite, - skip( - description: string, - callback: () => /* this: $npm$mocha$SuiteCallbackContext */ void, - ): void, - timeout(ms: number): void, -|}; - -declare type $npm$mocha$TestDefinition = {| - ( - expectation: string, - callback?: ( - /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, - ) => mixed, - ): $npm$mocha$Test, - only( - expectation: string, - callback?: ( - /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, - ) => mixed, - ): $npm$mocha$Test, - skip( - expectation: string, - callback?: ( - /* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done, - ) => mixed, - ): void, - timeout(ms: number): void, - state: 'failed' | 'passed', -|}; - -declare interface $npm$mocha$Runner {} - -declare class $npm$mocha$BaseReporter { - stats: { - suites: number, - tests: number, - passes: number, - pending: number, - failures: number, - ... - }; - - constructor(runner: $npm$mocha$Runner): $npm$mocha$BaseReporter; -} - -declare class $npm$mocha$DocReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$DotReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$HTMLReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$HTMLCovReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$JSONReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$JSONCovReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$JSONStreamReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$LandingReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$ListReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$MarkdownReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$MinReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$NyanReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$ProgressReporter extends $npm$mocha$BaseReporter { - constructor( - runner: $npm$mocha$Runner, - options?: { - open?: string, - complete?: string, - incomplete?: string, - close?: string, - ... - }, - ): $npm$mocha$ProgressReporter; -} -declare class $npm$mocha$SpecReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$TAPReporter extends $npm$mocha$BaseReporter {} -declare class $npm$mocha$XUnitReporter extends $npm$mocha$BaseReporter { - constructor( - runner: $npm$mocha$Runner, - options?: any, - ): $npm$mocha$XUnitReporter; -} - -declare class $npm$mocha$Mocha { - currentTest: $npm$mocha$TestDefinition; - constructor(options?: { - grep?: RegExp, - ui?: string, - reporter?: string, - timeout?: number, - reporterOptions?: any, - slow?: number, - bail?: boolean, - ... - }): $npm$mocha$Mocha; - setup(options: $npm$mocha$SetupOptions): this; - bail(value?: boolean): this; - addFile(file: string): this; - reporter(name: string): this; - reporter(reporter: (runner: $npm$mocha$Runner, options: any) => any): this; - ui(value: string): this; - grep(value: string): this; - grep(value: RegExp): this; - invert(): this; - ignoreLeaks(value: boolean): this; - checkLeaks(): this; - throwError(error: Error): void; - growl(): this; - globals(value: string): this; - globals(values: Array): this; - useColors(value: boolean): this; - useInlineDiffs(value: boolean): this; - timeout(value: number): this; - slow(value: number): this; - enableTimeouts(value: boolean): this; - asyncOnly(value: boolean): this; - noHighlighting(value: boolean): this; - run(onComplete?: (failures: number) => void): $npm$mocha$Runner; - - static reporters: { - Doc: $npm$mocha$DocReporter, - Dot: $npm$mocha$DotReporter, - HTML: $npm$mocha$HTMLReporter, - HTMLCov: $npm$mocha$HTMLCovReporter, - JSON: $npm$mocha$JSONReporter, - JSONCov: $npm$mocha$JSONCovReporter, - JSONStream: $npm$mocha$JSONStreamReporter, - Landing: $npm$mocha$LandingReporter, - List: $npm$mocha$ListReporter, - Markdown: $npm$mocha$MarkdownReporter, - Min: $npm$mocha$MinReporter, - Nyan: $npm$mocha$NyanReporter, - Progress: $npm$mocha$ProgressReporter, - ... - }; -} - -// declare interface $npm$mocha$HookCallbackContext { -// skip(): void; -// timeout(ms: number): void; -// [index: string]: any; -// } - -declare interface $npm$mocha$Runnable { - title: string; - fn: Function; - async: boolean; - sync: boolean; - timedOut: boolean; -} - -declare interface $npm$mocha$Test extends $npm$mocha$Runnable { - parent: $npm$mocha$Suite; - pending: boolean; - state: 'failed' | 'passed' | void; - fullTitle(): string; - timeout(ms: number): void; -} - -// declare interface $npm$mocha$BeforeAndAfterContext extends $npm$mocha$HookCallbackContext { -// currentTest: $npm$mocha$Test; -// } - -declare var mocha: $npm$mocha$Mocha; -declare var describe: $npm$mocha$ContextDefinition; -declare var xdescribe: $npm$mocha$ContextDefinition; -declare var context: $npm$mocha$ContextDefinition; -declare var suite: $npm$mocha$ContextDefinition; -declare var it: $npm$mocha$TestDefinition; -declare var xit: $npm$mocha$TestDefinition; -declare var test: $npm$mocha$TestDefinition; -declare var specify: $npm$mocha$TestDefinition; - -type Run = () => void; - -declare var run: Run; - -type Setup = ( - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, -) => void; -type Teardown = ( - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, -) => void; -type SuiteSetup = ( - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, -) => void; -type SuiteTeardown = ( - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, -) => void; -type Before = ( - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, -) => - | void - | (( - description: string, - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, - ) => void); -type After = ( - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, -) => - | void - | (( - description: string, - callback: ( - /* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done, - ) => mixed, - ) => void); -type BeforeEach = ( - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, -) => - | void - | (( - description: string, - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, - ) => void); -type AfterEach = ( - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, -) => - | void - | (( - description: string, - callback: ( - /* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done, - ) => mixed, - ) => void); - -declare var setup: Setup; -declare var teardown: Teardown; -declare var suiteSetup: SuiteSetup; -declare var suiteTeardown; -declare var before: Before; -declare var after: After; -declare var beforeEach: BeforeEach; -declare var afterEach: AfterEach; - -declare module 'mocha' { - declare export var mocha: $npm$mocha$TestDefinition; - declare export var describe: $npm$mocha$ContextDefinition; - declare export var xdescribe: $npm$mocha$ContextDefinition; - declare export var context: $npm$mocha$ContextDefinition; - declare export var suite: $npm$mocha$ContextDefinition; - declare export var it: $npm$mocha$TestDefinition; - declare export var xit: $npm$mocha$TestDefinition; - declare export var test: $npm$mocha$TestDefinition; - declare export var specify: $npm$mocha$TestDefinition; - - declare export var run: Run; - - declare export var setup: Setup; - declare export var teardown: Teardown; - declare export var suiteSetup: SuiteSetup; - declare export var suiteTeardown: SuiteTeardown; - declare export var before: Before; - declare export var after: After; - declare export var beforeEach: BeforeEach; - declare export var afterEach: AfterEach; - - declare export default $npm$mocha$Mocha; -} diff --git a/integrationTests/flow/.flowconfig b/integrationTests/flow/.flowconfig deleted file mode 100644 index 872c3947a6..0000000000 --- a/integrationTests/flow/.flowconfig +++ /dev/null @@ -1,8 +0,0 @@ -[include] -./index.mjs - -[declarations] -.*/node_modules/.* - -[options] -include_warnings=true diff --git a/integrationTests/flow/index.mjs b/integrationTests/flow/index.mjs deleted file mode 100644 index ee14390b35..0000000000 --- a/integrationTests/flow/index.mjs +++ /dev/null @@ -1,54 +0,0 @@ -// @flow strict - -import { parse } from 'graphql/language'; -import { GraphQLString, GraphQLSchema, GraphQLObjectType } from 'graphql/type'; -import { type ExecutionResult, execute } from 'graphql/execution'; -import { graphqlSync } from 'graphql'; - -interface SomeExtension { - number: number; - string: string; -} - -const example: SomeExtension = { - number: 42, - string: 'Meaning of life', -}; - -const queryType: GraphQLObjectType = new GraphQLObjectType({ - name: 'Query', - fields: { - sayHi: { - type: GraphQLString, - args: { - who: { - type: GraphQLString, - extensions: { - someArgumentExtension: example, - }, - }, - }, - resolve: (_root, args) => 'Hello ' + (args.who || 'World'), - extensions: { - someFieldExtension: example, - }, - }, - }, - extensions: { - someObjectExtension: example, - }, -}); - -const schema: GraphQLSchema = new GraphQLSchema({ - query: queryType, -}); - -const result: ExecutionResult = graphqlSync({ - schema, - source: ` - query helloWho($who: String){ - test(who: $who) - } - `, - variableValues: { who: 'Dolly' }, -}); diff --git a/integrationTests/flow/package.json b/integrationTests/flow/package.json deleted file mode 100644 index 8a87590458..0000000000 --- a/integrationTests/flow/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "private": true, - "scripts": { - "test": "flow check" - }, - "dependencies": { - "graphql": "file:../graphql.tgz", - "flow-bin": "0.135.0" - } -} diff --git a/integrationTests/integration-test.js b/integrationTests/integration-test.js index 7d57e9077d..df27b801a7 100644 --- a/integrationTests/integration-test.js +++ b/integrationTests/integration-test.js @@ -39,10 +39,6 @@ describe('Integration Tests', () => { testOnNodeProject('ts'); }).timeout(40000); - // it('Should compile with Flow', () => { - // testOnNodeProject('flow'); - // }).timeout(10000); - it('Should work on all supported node versions', () => { testOnNodeProject('node'); }).timeout(40000); diff --git a/package-lock.json b/package-lock.json index 762ca369ea..35998cc7b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@babel/core": "7.13.15", "@babel/eslint-parser": "7.13.14", - "@babel/plugin-transform-flow-strip-types": "7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", "@typescript-eslint/eslint-plugin": "4.21.0", @@ -23,7 +22,6 @@ "eslint-plugin-internal-rules": "file:./resources/eslint-internal-rules", "eslint-plugin-istanbul": "0.1.2", "eslint-plugin-node": "11.1.0", - "flow-bin": "0.148.0", "mocha": "8.3.2", "nyc": "15.1.0", "prettier": "2.2.1", @@ -623,18 +621,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-flow": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz", - "integrity": "sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", "dev": true, @@ -844,19 +830,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz", - "integrity": "sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-flow": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-for-of": { "version": "7.13.0", "dev": true, @@ -3512,18 +3485,6 @@ "dev": true, "license": "ISC" }, - "node_modules/flow-bin": { - "version": "0.148.0", - "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.148.0.tgz", - "integrity": "sha512-7Cx6BUm8UAlbqtYJNYXdMrh900MQhNV+SjtBxZuWN7UmlVG4tIRNzNLEOjNnj2DN2vcL1wfI5IlSUXnws/QCEw==", - "dev": true, - "bin": { - "flow": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/foreground-child": { "version": "2.0.0", "dev": true, @@ -6909,15 +6870,6 @@ "@babel/helper-plugin-utils": "^7.8.3" } }, - "@babel/plugin-syntax-flow": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.12.13.tgz", - "integrity": "sha512-J/RYxnlSLXZLVR7wTRsozxKT8qbsx1mNKJzXEEjQ0Kjx1ZACcyHgbanNWNCFtc36IzuWhYWPpvJFFoexoOWFmA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "dev": true, @@ -7056,16 +7008,6 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, - "@babel/plugin-transform-flow-strip-types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.13.0.tgz", - "integrity": "sha512-EXAGFMJgSX8gxWD7PZtW/P6M+z74jpx3wm/+9pn+c2dOawPpBkUX7BrfyPvo6ZpXbgRIEuwgwDb/MGlKvu2pOg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/plugin-syntax-flow": "^7.12.13" - } - }, "@babel/plugin-transform-for-of": { "version": "7.13.0", "dev": true, @@ -8965,12 +8907,6 @@ "version": "3.1.1", "dev": true }, - "flow-bin": { - "version": "0.148.0", - "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.148.0.tgz", - "integrity": "sha512-7Cx6BUm8UAlbqtYJNYXdMrh900MQhNV+SjtBxZuWN7UmlVG4tIRNzNLEOjNnj2DN2vcL1wfI5IlSUXnws/QCEw==", - "dev": true - }, "foreground-child": { "version": "2.0.0", "dev": true, diff --git a/package.json b/package.json index 4150b28d78..a931fa860d 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,8 @@ "fuzzonly": "mocha --full-trace src/**/__tests__/**/*-fuzz.ts", "changelog": "node resources/gen-changelog.js", "benchmark": "node benchmark/benchmark.js", - "test": "npm run lint && npm run check && npm run testonly && npm run prettier:check && npm run check:spelling && npm run check:integrations", + "test": "npm run lint && npm run testonly && npm run prettier:check && npm run check:spelling && npm run build:npm && npm run build:deno && npm run check:integrations", "lint": "eslint --cache .", - "check": "flow check", "testonly": "mocha --full-trace src/**/__tests__/**/*-test.ts", "testonly:cover": "nyc npm run testonly", "prettier": "prettier --write --list-different .", @@ -46,7 +45,6 @@ "devDependencies": { "@babel/core": "7.13.15", "@babel/eslint-parser": "7.13.14", - "@babel/plugin-transform-flow-strip-types": "7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", "@typescript-eslint/eslint-plugin": "4.21.0", @@ -58,7 +56,6 @@ "eslint-plugin-internal-rules": "file:./resources/eslint-internal-rules", "eslint-plugin-istanbul": "0.1.2", "eslint-plugin-node": "11.1.0", - "flow-bin": "0.148.0", "mocha": "8.3.2", "nyc": "15.1.0", "prettier": "2.2.1", diff --git a/resources/check-cycles.js b/resources/check-cycles.js deleted file mode 100644 index e5f0385d5f..0000000000 --- a/resources/check-cycles.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -const os = require('os'); -const fs = require('fs'); -const path = require('path'); -const assert = require('assert'); - -const { exec } = require('./utils'); - -const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'flow-dep-graph')); -const tmpFile = path.join(tmpDir, 'out.dot'); - -exec(`npx flow graph dep-graph --quiet --strip-root --out ${tmpFile}`); -const dot = fs.readFileSync(tmpFile, 'utf-8'); -assert(dot.startsWith('digraph {\n') && dot.endsWith('\n}')); -const dotLines = dot.split('\n').slice(1, -1); - -let depGraph = []; -for (const line of dotLines) { - const [, from, to] = line.trim().match(/^"(.*?)" -> "(.*?)"$/); - assert(from && to); - depGraph.push([from, to]); -} - -for (const [from, to] of depGraph) { - if ( - path.basename(to) === 'index.js' && - !path.dirname(to).endsWith('__fixtures__') && - path.basename(from) !== 'index.js' - ) { - console.log(from); - } -} - -let removedEdges; -do { - removedEdges = 0; - const fromFiles = new Set(); - const toFiles = new Set(); - - for (const [from, to] of depGraph) { - fromFiles.add(from); - toFiles.add(to); - } - - console.log(depGraph.length); - // eslint-disable-next-line no-loop-func - depGraph = depGraph.filter(([from, to]) => { - if (!toFiles.has(from) || !fromFiles.has(to)) { - ++removedEdges; - return false; - } - return true; - }); -} while (removedEdges > 0); - -console.log('digraph {'); -for (const [from, to] of depGraph) { - console.log(` "${from}" -> "${to}"`); -} -console.log('}'); diff --git a/src/jsutils/__tests__/toObjMap-test.ts b/src/jsutils/__tests__/toObjMap-test.ts index a0f1a2dba3..9a94fdfb55 100644 --- a/src/jsutils/__tests__/toObjMap-test.ts +++ b/src/jsutils/__tests__/toObjMap-test.ts @@ -4,7 +4,7 @@ import { describe, it } from 'mocha'; import type { ObjMapLike } from '../ObjMap'; import { toObjMap } from '../toObjMap'; -// Workaround to make both ESLint and Flow happy +// Workaround to make ESLint happy const __proto__: string = '__proto__'; describe('toObjMap', () => { From a05b95d3195bcab07122ae35880ca70cda4aaf18 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 12:38:05 -0600 Subject: [PATCH 33/65] build: rename to TS eslint rules and temporarily disable eslint rules --- .eslintrc.yml | 54 ++++++++----------- src/execution/__tests__/executor-test.ts | 4 +- src/jsutils/__tests__/inspect-test.ts | 1 + src/type/definition.ts | 2 + .../__tests__/getIntrospectionQuery-test.ts | 1 + src/validation/validate.ts | 1 + 6 files changed, 28 insertions(+), 35 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 19aaba217c..ade1823ba6 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -250,7 +250,7 @@ rules: no-self-assign: error no-self-compare: off # TODO no-sequences: error - no-throw-literal: error + no-throw-literal: off no-unmodified-loop-condition: error no-unused-expressions: error no-unused-labels: error @@ -456,22 +456,21 @@ overrides: '@typescript-eslint/await-thenable': error '@typescript-eslint/ban-ts-comment': [error, { 'ts-expect-error': false }] '@typescript-eslint/ban-tslint-comment': error - '@typescript-eslint/ban-types': error + '@typescript-eslint/ban-types': off # TODO temporarily disabled '@typescript-eslint/class-literal-property-style': off # TODO enable after TS conversion '@typescript-eslint/consistent-indexed-object-style': off # TODO enable after TS conversion - '@typescript-eslint/consistent-type-assertions': - [error, { assertionStyle: as, objectLiteralTypeAssertions: never }] + '@typescript-eslint/consistent-type-assertions': off # TODO temporarily disable '@typescript-eslint/consistent-type-definitions': off # TODO consider '@typescript-eslint/consistent-type-imports': off # TODO enable after TS conversion '@typescript-eslint/explicit-function-return-type': off # TODO consider '@typescript-eslint/explicit-member-accessibility': off # TODO consider '@typescript-eslint/explicit-module-boundary-types': off # TODO consider - '@typescript-eslint/member-ordering': off # TODO consider + '@typescript-eslint/member-ordering': error '@typescript-eslint/method-signature-style': error '@typescript-eslint/naming-convention': off # TODO consider '@typescript-eslint/no-base-to-string': error '@typescript-eslint/no-confusing-non-null-assertion': error - '@typescript-eslint/no-confusing-void-expression': error + '@typescript-eslint/no-confusing-void-expression': off # TODO temporarily disabled '@typescript-eslint/no-dynamic-delete': off '@typescript-eslint/no-empty-interface': error '@typescript-eslint/no-explicit-any': off # TODO error @@ -481,41 +480,40 @@ overrides: '@typescript-eslint/no-for-in-array': error '@typescript-eslint/no-implicit-any-catch': off # TODO: Enable after TS convertion '@typescript-eslint/no-implied-eval': error - '@typescript-eslint/no-inferrable-types': - [error, { ignoreParameters: true, ignoreProperties: true }] + '@typescript-eslint/no-inferrable-types': off #TODO temporarily disabled '@typescript-eslint/no-misused-new': error '@typescript-eslint/no-misused-promises': error '@typescript-eslint/no-namespace': error '@typescript-eslint/no-non-null-asserted-optional-chain': error '@typescript-eslint/no-non-null-assertion': error '@typescript-eslint/no-parameter-properties': error - '@typescript-eslint/no-invalid-void-type': error + '@typescript-eslint/no-invalid-void-type': off #TODO temporarily disabled '@typescript-eslint/no-require-imports': error '@typescript-eslint/no-this-alias': error '@typescript-eslint/no-throw-literal': error '@typescript-eslint/no-type-alias': off # TODO consider - '@typescript-eslint/no-unnecessary-boolean-literal-compare': error - '@typescript-eslint/no-unnecessary-condition': error + '@typescript-eslint/no-unnecessary-boolean-literal-compare': off #TODO temporarily disabled + '@typescript-eslint/no-unnecessary-condition': off #TODO temporarily disabled '@typescript-eslint/no-unnecessary-qualifier': error '@typescript-eslint/no-unnecessary-type-arguments': error - '@typescript-eslint/no-unnecessary-type-assertion': error - '@typescript-eslint/no-unnecessary-type-constraint': off # TODO consider + '@typescript-eslint/no-unnecessary-type-assertion': off #TODO temporarily disabled + '@typescript-eslint/no-unnecessary-type-constraint': error '@typescript-eslint/no-unsafe-argument': off # TODO consider '@typescript-eslint/no-unsafe-assignment': off # TODO consider '@typescript-eslint/no-unsafe-call': off # TODO consider '@typescript-eslint/no-unsafe-member-access': off # TODO consider '@typescript-eslint/no-unsafe-return': off # TODO consider '@typescript-eslint/no-var-requires': error - '@typescript-eslint/non-nullable-type-assertion-style': error - '@typescript-eslint/prefer-as-const': off # TODO consider - '@typescript-eslint/prefer-enum-initializers': off # TODO consider + '@typescript-eslint/non-nullable-type-assertion-style': off #TODO temporarily disabled + '@typescript-eslint/prefer-as-const': error + '@typescript-eslint/prefer-enum-initializers': error '@typescript-eslint/prefer-for-of': off # TODO switch to error after TS migration '@typescript-eslint/prefer-function-type': error '@typescript-eslint/prefer-includes': off # TODO switch to error after IE11 drop '@typescript-eslint/prefer-literal-enum-member': error '@typescript-eslint/prefer-namespace-keyword': error '@typescript-eslint/prefer-nullish-coalescing': error - '@typescript-eslint/prefer-optional-chain': error + '@typescript-eslint/prefer-optional-chain': off #TODO temporarily disabled '@typescript-eslint/prefer-readonly': error '@typescript-eslint/prefer-readonly-parameter-types': off # TODO consider '@typescript-eslint/prefer-reduce-type-parameter': error @@ -524,12 +522,11 @@ overrides: '@typescript-eslint/prefer-string-starts-ends-with': off # TODO switch to error after IE11 drop '@typescript-eslint/promise-function-async': off '@typescript-eslint/require-array-sort-compare': error - '@typescript-eslint/restrict-plus-operands': - [error, { checkCompoundAssignments: true }] - '@typescript-eslint/restrict-template-expressions': error + '@typescript-eslint/restrict-plus-operands': off #TODO temporarily disabled + '@typescript-eslint/restrict-template-expressions': off #TODO temporarily disabled '@typescript-eslint/sort-type-union-intersection-members': off # TODO consider '@typescript-eslint/strict-boolean-expressions': off # TODO consider - '@typescript-eslint/switch-exhaustiveness-check': error + '@typescript-eslint/switch-exhaustiveness-check': off #TODO temporarily disabled '@typescript-eslint/triple-slash-reference': error '@typescript-eslint/typedef': off '@typescript-eslint/unbound-method': off # TODO consider @@ -566,20 +563,11 @@ overrides: '@typescript-eslint/no-loop-func': error '@typescript-eslint/no-loss-of-precision': error '@typescript-eslint/no-redeclare': error - '@typescript-eslint/no-shadow': error + '@typescript-eslint/no-shadow': off #TODO temporarily disabled '@typescript-eslint/no-unused-expressions': error - '@typescript-eslint/no-unused-vars': - [ - error, - { - vars: all, - args: all, - argsIgnorePattern: '^_', - varsIgnorePattern: '^_T', - }, - ] + '@typescript-eslint/no-unused-vars': off #TODO temporarily disabled '@typescript-eslint/no-useless-constructor': error - '@typescript-eslint/require-await': error + '@typescript-eslint/require-await': off #TODO temporarily disabled '@typescript-eslint/return-await': error # Disable for JS and TS diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index 1ba08cdd42..67e81845e5 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -440,7 +440,7 @@ describe('Execute: Handles basic execution tasks', () => { throw new Error('Error getting syncError'); }, syncRawError() { - // eslint-disable-next-line no-throw-literal + // eslint-disable-next-line @typescript-eslint/no-throw-literal throw 'Error getting syncRawError'; }, syncReturnError() { @@ -477,7 +477,7 @@ describe('Execute: Handles basic execution tasks', () => { }, asyncRawError() { return new Promise(() => { - // eslint-disable-next-line no-throw-literal + // eslint-disable-next-line @typescript-eslint/no-throw-literal throw 'Error getting asyncRawError'; }); }, diff --git a/src/jsutils/__tests__/inspect-test.ts b/src/jsutils/__tests__/inspect-test.ts index c3912993c0..14241f474a 100644 --- a/src/jsutils/__tests__/inspect-test.ts +++ b/src/jsutils/__tests__/inspect-test.ts @@ -170,6 +170,7 @@ describe('inspect', () => { // eslint-disable-next-line func-names const objectWithoutClassName = new (function () { + // eslint-disable-next-line @typescript-eslint/no-invalid-this this.foo = 1; })(); expect(inspect([[objectWithoutClassName]])).to.equal('[[[Object]]]'); diff --git a/src/type/definition.ts b/src/type/definition.ts index 2299c264e7..7e495d8c2f 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -434,6 +434,8 @@ export function assertNullableType(type: unknown): GraphQLNullableType { export function getNullableType(type: void | null): void; export function getNullableType(type: T): T; export function getNullableType( + // FIXME Disabled because of https://github.com/yaacovCR/graphql-tools-fork/issues/40#issuecomment-586671219 + // eslint-disable-next-line @typescript-eslint/unified-signatures type: GraphQLNonNull, ): T; export function getNullableType(type) { diff --git a/src/utilities/__tests__/getIntrospectionQuery-test.ts b/src/utilities/__tests__/getIntrospectionQuery-test.ts index 3f0c36298f..6bb94fc812 100644 --- a/src/utilities/__tests__/getIntrospectionQuery-test.ts +++ b/src/utilities/__tests__/getIntrospectionQuery-test.ts @@ -12,6 +12,7 @@ function expectIntrospectionQuery(options?: IntrospectionOptions) { const pattern = toRegExp(name); expect(query).to.match(pattern); + // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec expect(query.match(pattern)).to.have.lengthOf(times); }, toNotMatch(name: string): void { diff --git a/src/validation/validate.ts b/src/validation/validate.ts index 1e2f44b6a2..cff932b7c4 100644 --- a/src/validation/validate.ts +++ b/src/validation/validate.ts @@ -57,6 +57,7 @@ export function validate( 'Too many validation errors, error limit reached. Validation aborted.', ), ); + // eslint-disable-next-line @typescript-eslint/no-throw-literal throw abortObj; } errors.push(error); From 37a41f686ab9cda73257b53cb6b6cd08f5f05bae Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 12:44:28 -0600 Subject: [PATCH 34/65] build: enable `@typescript-eslint/no-unused-vars` --- .eslintrc.yml | 11 ++++++++++- src/subscription/__tests__/subscribe-test.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index ade1823ba6..99e1d30bc6 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -565,7 +565,16 @@ overrides: '@typescript-eslint/no-redeclare': error '@typescript-eslint/no-shadow': off #TODO temporarily disabled '@typescript-eslint/no-unused-expressions': error - '@typescript-eslint/no-unused-vars': off #TODO temporarily disabled + '@typescript-eslint/no-unused-vars': + [ + error, + { + vars: all, + args: all, + argsIgnorePattern: '^_', + varsIgnorePattern: '^_T', + }, + ] '@typescript-eslint/no-useless-constructor': error '@typescript-eslint/require-await': off #TODO temporarily disabled '@typescript-eslint/return-await': error diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 9309570022..7b572e9e10 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -66,7 +66,7 @@ const EmailEventType = new GraphQLObjectType({ const emailSchema = emailSchemaWithResolvers(); -function emailSchemaWithResolvers( +function emailSchemaWithResolvers( subscribeFn?: (T) => unknown, resolveFn?: (T) => unknown, ) { From f4f0440f96f9a2a6e869b3e92c1f6b2a8765d45c Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 13:14:34 -0600 Subject: [PATCH 35/65] build: enable `@typescript-eslint/no-invalid-void-type` --- .eslintrc.yml | 2 +- src/error/GraphQLError.ts | 14 +++++++------- src/error/formatError.ts | 4 ++-- src/error/locatedError.ts | 2 +- src/execution/__tests__/union-interface-test.ts | 14 +++++++------- src/execution/execute.ts | 8 ++++---- src/execution/values.ts | 2 +- src/jsutils/Path.ts | 8 ++++---- src/jsutils/suggestionList.ts | 2 +- src/language/ast.ts | 4 ++-- src/language/parser.ts | 4 ++-- src/language/visitor.ts | 4 ++-- src/type/definition.ts | 6 +++--- src/utilities/TypeInfo.ts | 4 ++-- src/utilities/assertValidName.ts | 2 +- src/utilities/coerceInputValue.ts | 2 +- src/utilities/typeFromAST.ts | 6 +++--- src/utilities/valueFromAST.ts | 2 +- src/validation/rules/KnownDirectivesRule.ts | 2 +- 19 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 99e1d30bc6..2554409ed5 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -487,7 +487,7 @@ overrides: '@typescript-eslint/no-non-null-asserted-optional-chain': error '@typescript-eslint/no-non-null-assertion': error '@typescript-eslint/no-parameter-properties': error - '@typescript-eslint/no-invalid-void-type': off #TODO temporarily disabled + '@typescript-eslint/no-invalid-void-type': error '@typescript-eslint/no-require-imports': error '@typescript-eslint/no-this-alias': error '@typescript-eslint/no-throw-literal': error diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 0c60a7a7b9..2fd1ca6989 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -33,7 +33,7 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - readonly locations: ReadonlyArray | void; + readonly locations: ReadonlyArray | undefined; /** * An array describing the JSON-path into the execution response which @@ -41,12 +41,12 @@ export class GraphQLError extends Error { * * Enumerable, and appears in the result of JSON.stringify(). */ - readonly path: ReadonlyArray | void; + readonly path: ReadonlyArray | undefined; /** * An array of GraphQL AST Nodes corresponding to this error. */ - readonly nodes: ReadonlyArray | void; + readonly nodes: ReadonlyArray | undefined; /** * The source GraphQL document for the first location of this error. @@ -54,13 +54,13 @@ export class GraphQLError extends Error { * Note that if this Error represents more than one node, the source may not * represent nodes after the first node. */ - readonly source: Source | void; + readonly source: Source | undefined; /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ - readonly positions: ReadonlyArray | void; + readonly positions: ReadonlyArray | undefined; /** * The original error thrown from a field resolver during execution. @@ -70,11 +70,11 @@ export class GraphQLError extends Error { /** * Extension fields to add to the formatted error. */ - readonly extensions: { [key: string]: unknown } | void; + readonly extensions: { [key: string]: unknown } | undefined; constructor( message: string, - nodes?: ReadonlyArray | ASTNode | void | null, + nodes?: ReadonlyArray | ASTNode | undefined | null, source?: Maybe, positions?: Maybe>, path?: Maybe>, diff --git a/src/error/formatError.ts b/src/error/formatError.ts index dfb3de7f0f..efb0382e0d 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -34,14 +34,14 @@ export type GraphQLFormattedError = { * If an error can be associated to a particular point in the requested * GraphQL document, it should contain a list of locations. */ - readonly locations: ReadonlyArray | void; + readonly locations: ReadonlyArray | undefined; /** * If an error can be associated to a particular field in the GraphQL result, * it _must_ contain an entry with the key `path` that details the path of * the response field which experienced the error. This allows clients to * identify whether a null result is intentional or caused by a runtime error. */ - readonly path: ReadonlyArray | void; + readonly path: ReadonlyArray | undefined; /** * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index 279e783265..89a1d00b76 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -12,7 +12,7 @@ import { GraphQLError } from './GraphQLError'; */ export function locatedError( rawOriginalError: unknown, - nodes: ASTNode | ReadonlyArray | void | null, + nodes: ASTNode | ReadonlyArray | undefined | null, path?: Maybe>, ): GraphQLError { // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. diff --git a/src/execution/__tests__/union-interface-test.ts b/src/execution/__tests__/union-interface-test.ts index 6e8d1f98b1..fe6fc87583 100644 --- a/src/execution/__tests__/union-interface-test.ts +++ b/src/execution/__tests__/union-interface-test.ts @@ -17,8 +17,8 @@ import { executeSync } from '../execute'; class Dog { name: string; barks: boolean; - mother: Dog | void; - father: Dog | void; + mother: Dog | undefined; + father: Dog | undefined; progeny: Array; constructor(name: string, barks: boolean) { @@ -31,8 +31,8 @@ class Dog { class Cat { name: string; meows: boolean; - mother: Cat | void; - father: Cat | void; + mother: Cat | undefined; + father: Cat | undefined; progeny: Array; constructor(name: string, meows: boolean) { @@ -44,13 +44,13 @@ class Cat { class Person { name: string; - pets: Array | void; - friends: Array | void; + pets: Array | undefined; + friends: Array | undefined; constructor( name: string, pets?: Array, - friends?: Array | void, + friends?: Array | undefined, ) { this.name = name; this.pets = pets; diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 670a11d3a4..d2e5f3ec9a 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -231,7 +231,7 @@ export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, -): void { +): undefined { devAssert(document, 'Must provide document.'); // If the schema used for execution is invalid, throw an error. @@ -262,7 +262,7 @@ export function buildExecutionContext( fieldResolver: Maybe>, typeResolver?: Maybe>, ): ReadonlyArray | ExecutionContext { - let operation: OperationDefinitionNode | void; + let operation: OperationDefinitionNode | undefined; const fragments: ObjMap = Object.create(null); for (const definition of document.definitions) { switch (definition.kind) { @@ -369,7 +369,7 @@ function executeFieldsSerially( exeContext: ExecutionContext, parentType: GraphQLObjectType, sourceValue: unknown, - path: Path | void, + path: Path | undefined, fields: ObjMap>, ): PromiseOrValue> { return promiseReduce( @@ -408,7 +408,7 @@ function executeFields( exeContext: ExecutionContext, parentType: GraphQLObjectType, sourceValue: unknown, - path: Path | void, + path: Path | undefined, fields: ObjMap>, ): PromiseOrValue> { const results = Object.create(null); diff --git a/src/execution/values.ts b/src/execution/values.ts index 7051d8c547..ddde0e0b14 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -247,7 +247,7 @@ export function getDirectiveValues( directiveDef: GraphQLDirective, node: { readonly directives?: ReadonlyArray }, variableValues?: Maybe>, -): void | { [argument: string]: unknown } { +): undefined | { [argument: string]: unknown } { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const directiveNode = node.directives?.find( (directive) => directive.name.value === directiveDef.name, diff --git a/src/jsutils/Path.ts b/src/jsutils/Path.ts index c727312bee..215f38beba 100644 --- a/src/jsutils/Path.ts +++ b/src/jsutils/Path.ts @@ -1,18 +1,18 @@ import type { Maybe } from './Maybe'; export type Path = { - readonly prev: Path | void; + readonly prev: Path | undefined; readonly key: string | number; - readonly typename: string | void; + readonly typename: string | undefined; }; /** * Given a Path and a key, return a new Path containing the new key. */ export function addPath( - prev: Readonly | void, + prev: Readonly | undefined, key: string | number, - typename: string | void, + typename: string | undefined, ): Path { return { prev, key, typename }; } diff --git a/src/jsutils/suggestionList.ts b/src/jsutils/suggestionList.ts index 40838ed92b..53ad685c8c 100644 --- a/src/jsutils/suggestionList.ts +++ b/src/jsutils/suggestionList.ts @@ -57,7 +57,7 @@ class LexicalDistance { ]; } - measure(option: string, threshold: number): number | void { + measure(option: string, threshold: number): number | undefined { if (this._input === option) { return 0; } diff --git a/src/language/ast.ts b/src/language/ast.ts index 9c42ec7542..136e2869ba 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -77,7 +77,7 @@ export class Token { /** * For non-punctuation tokens, represents the interpreted value of the token. */ - readonly value: string | void; + readonly value: string | undefined; /** * Tokens exist as nodes in a double-linked-list amongst all tokens @@ -108,7 +108,7 @@ export class Token { toJSON(): { kind: TokenKindEnum; - value: string | void; + value: string | undefined; line: number; column: number; } { diff --git a/src/language/parser.ts b/src/language/parser.ts index 5b6f218939..77f133b213 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -743,7 +743,7 @@ export class Parser { /** * Description : StringValue */ - parseDescription(): void | StringValueNode { + parseDescription(): undefined | StringValueNode { if (this.peekDescription()) { return this.parseStringLiteral(); } @@ -1343,7 +1343,7 @@ export class Parser { /** * Returns a location object, used to identify the place in the source that created a given parsed object. */ - loc(startToken: Token): Location | void { + loc(startToken: Token): Location | undefined { if (this._options?.noLocation !== true) { return new Location( startToken, diff --git a/src/language/visitor.ts b/src/language/visitor.ts index cb002a29ef..c2e3ecb099 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -29,9 +29,9 @@ export type ASTVisitFn = ( // The current node being visiting. node: TVisitedNode, // The index or key to this node from the parent node or Array. - key: string | number | void, + key: string | number | undefined, // The parent immediately above this node, which may be an Array. - parent: ASTNode | ReadonlyArray | void, + parent: ASTNode | ReadonlyArray | undefined, // The key path to get to this node from the root node. path: ReadonlyArray, // All nodes and Arrays visited before reaching parent of this node. diff --git a/src/type/definition.ts b/src/type/definition.ts index 7e495d8c2f..910cbafba0 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -431,7 +431,7 @@ export function assertNullableType(type: unknown): GraphQLNullableType { return type; } -export function getNullableType(type: void | null): void; +export function getNullableType(type: undefined | null): void; export function getNullableType(type: T): T; export function getNullableType( // FIXME Disabled because of https://github.com/yaacovCR/graphql-tools-fork/issues/40#issuecomment-586671219 @@ -473,7 +473,7 @@ export function assertNamedType(type: unknown): GraphQLNamedType { return type; } -export function getNamedType(type: void | null): void; +export function getNamedType(type: undefined | null): void; export function getNamedType(type: GraphQLType): GraphQLNamedType; export function getNamedType(type) { if (type) { @@ -875,7 +875,7 @@ export type GraphQLTypeResolver = ( context: TContext, info: GraphQLResolveInfo, abstractType: GraphQLAbstractType, -) => PromiseOrValue; +) => PromiseOrValue; export type GraphQLIsTypeOfFn = ( source: TSource, diff --git a/src/utilities/TypeInfo.ts b/src/utilities/TypeInfo.ts index 1e75c8d8f3..4ade8a95ff 100644 --- a/src/utilities/TypeInfo.ts +++ b/src/utilities/TypeInfo.ts @@ -227,8 +227,8 @@ export class TypeInfo { } case Kind.OBJECT_FIELD: { const objectType: unknown = getNamedType(this.getInputType()); - let inputFieldType: GraphQLInputType | void; - let inputField: GraphQLInputField | void; + let inputFieldType: GraphQLInputType | undefined; + let inputField: GraphQLInputField | undefined; if (isInputObjectType(objectType)) { inputField = objectType.getFields()[node.name.value]; if (inputField) { diff --git a/src/utilities/assertValidName.ts b/src/utilities/assertValidName.ts index 3f294da39d..355780e7df 100644 --- a/src/utilities/assertValidName.ts +++ b/src/utilities/assertValidName.ts @@ -18,7 +18,7 @@ export function assertValidName(name: string): string { /** * Returns an Error if a name is invalid. */ -export function isValidNameError(name: string): GraphQLError | void { +export function isValidNameError(name: string): GraphQLError | undefined { devAssert(typeof name === 'string', 'Expected name to be a string.'); if (name.length > 1 && name[0] === '_' && name[1] === '_') { return new GraphQLError( diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 4e8ec798e2..786c63c162 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -52,7 +52,7 @@ function coerceInputValueImpl( inputValue: unknown, type: GraphQLInputType, onError: OnErrorCB, - path: Path | void, + path: Path | undefined, ): unknown { if (isNonNullType(type)) { if (inputValue != null) { diff --git a/src/utilities/typeFromAST.ts b/src/utilities/typeFromAST.ts index 2188156ffe..7a653d0e03 100644 --- a/src/utilities/typeFromAST.ts +++ b/src/utilities/typeFromAST.ts @@ -23,15 +23,15 @@ import { GraphQLList, GraphQLNonNull } from '../type/definition'; export function typeFromAST( schema: GraphQLSchema, typeNode: NamedTypeNode, -): GraphQLNamedType | void; +): GraphQLNamedType | undefined; export function typeFromAST( schema: GraphQLSchema, typeNode: ListTypeNode, -): GraphQLList | void; +): GraphQLList | undefined; export function typeFromAST( schema: GraphQLSchema, typeNode: NonNullTypeNode, -): GraphQLNonNull | void; +): GraphQLNonNull | undefined; export function typeFromAST(schema, typeNode) { let innerType; if (typeNode.kind === Kind.LIST_TYPE) { diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index 3c1c00c520..80c65e8442 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -39,7 +39,7 @@ export function valueFromAST( valueNode: Maybe, type: GraphQLInputType, variables?: Maybe>, -): unknown | void { +): unknown | undefined { if (!valueNode) { // When there is no node, then there is also no value. // Importantly, this is different from returning the value null. diff --git a/src/validation/rules/KnownDirectivesRule.ts b/src/validation/rules/KnownDirectivesRule.ts index 08044aaa47..308a4167c7 100644 --- a/src/validation/rules/KnownDirectivesRule.ts +++ b/src/validation/rules/KnownDirectivesRule.ts @@ -69,7 +69,7 @@ export function KnownDirectivesRule( function getDirectiveLocationForASTPath( ancestors: ReadonlyArray>, -): DirectiveLocationEnum | void { +): DirectiveLocationEnum | undefined { const appliedTo = ancestors[ancestors.length - 1]; invariant(!Array.isArray(appliedTo)); From 039def9142451bf20d98da34b6ed3bde2af4dad6 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 13:16:05 -0600 Subject: [PATCH 36/65] build: enable `@typescript-eslint/no-inferrable-types` --- .eslintrc.yml | 3 ++- src/__testUtils__/kitchenSinkSDL.ts | 2 +- src/jsutils/__tests__/toObjMap-test.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 2554409ed5..1a085fe16f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -480,7 +480,8 @@ overrides: '@typescript-eslint/no-for-in-array': error '@typescript-eslint/no-implicit-any-catch': off # TODO: Enable after TS convertion '@typescript-eslint/no-implied-eval': error - '@typescript-eslint/no-inferrable-types': off #TODO temporarily disabled + '@typescript-eslint/no-inferrable-types': + [error, { ignoreParameters: true, ignoreProperties: true }] '@typescript-eslint/no-misused-new': error '@typescript-eslint/no-misused-promises': error '@typescript-eslint/no-namespace': error diff --git a/src/__testUtils__/kitchenSinkSDL.ts b/src/__testUtils__/kitchenSinkSDL.ts index 1c97bd87f8..cdf2f9afce 100644 --- a/src/__testUtils__/kitchenSinkSDL.ts +++ b/src/__testUtils__/kitchenSinkSDL.ts @@ -1,4 +1,4 @@ -export const kitchenSinkSDL: string = ` +export const kitchenSinkSDL = ` """This is a description of the schema as a whole.""" schema { query: QueryType diff --git a/src/jsutils/__tests__/toObjMap-test.ts b/src/jsutils/__tests__/toObjMap-test.ts index 9a94fdfb55..797d652dff 100644 --- a/src/jsutils/__tests__/toObjMap-test.ts +++ b/src/jsutils/__tests__/toObjMap-test.ts @@ -5,7 +5,7 @@ import type { ObjMapLike } from '../ObjMap'; import { toObjMap } from '../toObjMap'; // Workaround to make ESLint happy -const __proto__: string = '__proto__'; +const __proto__ = '__proto__'; describe('toObjMap', () => { it('convert empty object to ObjMap', () => { From 570b559e3cf9a684574c590683eb958ed69aa42a Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 13:48:41 -0600 Subject: [PATCH 37/65] build: enable `@typescript-eslint/non-nullable-type-assertion-style` --- .eslintrc.yml | 2 +- src/execution/execute.ts | 3 +-- src/language/parser.ts | 10 +++++----- src/utilities/astFromValue.ts | 2 +- src/utilities/coerceInputValue.ts | 2 +- src/utilities/extendSchema.ts | 7 ++----- src/utilities/findBreakingChanges.ts | 2 +- src/utilities/lexicographicSortSchema.ts | 2 +- src/utilities/printSchema.ts | 2 +- src/utilities/valueFromAST.ts | 2 +- src/validation/rules/KnownDirectivesRule.ts | 2 +- src/validation/rules/PossibleTypeExtensionsRule.ts | 2 +- 12 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 1a085fe16f..93d055e582 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -505,7 +505,7 @@ overrides: '@typescript-eslint/no-unsafe-member-access': off # TODO consider '@typescript-eslint/no-unsafe-return': off # TODO consider '@typescript-eslint/no-var-requires': error - '@typescript-eslint/non-nullable-type-assertion-style': off #TODO temporarily disabled + '@typescript-eslint/non-nullable-type-assertion-style': error '@typescript-eslint/prefer-as-const': error '@typescript-eslint/prefer-enum-initializers': error '@typescript-eslint/prefer-for-of': off # TODO switch to error after TS migration diff --git a/src/execution/execute.ts b/src/execution/execute.ts index d2e5f3ec9a..abc37bf610 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -806,8 +806,7 @@ function completeValue( // istanbul ignore next (Not reachable. All possible output types have been considered) invariant( false, - 'Cannot complete value of unexpected output type: ' + - inspect(returnType as never), + 'Cannot complete value of unexpected output type: ' + inspect(returnType), ); } diff --git a/src/language/parser.ts b/src/language/parser.ts index 77f133b213..d57c8f1acf 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -168,7 +168,7 @@ export class Parser { const token = this.expectToken(TokenKind.NAME); return { kind: Kind.NAME, - value: token.value as string, + value: token.value, loc: this.loc(token), }; } @@ -523,14 +523,14 @@ export class Parser { this._lexer.advance(); return { kind: Kind.INT, - value: token.value as string, + value: token.value, loc: this.loc(token), }; case TokenKind.FLOAT: this._lexer.advance(); return { kind: Kind.FLOAT, - value: token.value as string, + value: token.value, loc: this.loc(token), }; case TokenKind.STRING: @@ -548,7 +548,7 @@ export class Parser { default: return { kind: Kind.ENUM, - value: token.value as string, + value: token.value, loc: this.loc(token), }; } @@ -566,7 +566,7 @@ export class Parser { this._lexer.advance(); return { kind: Kind.STRING, - value: token.value as string, + value: token.value, block: token.kind === TokenKind.BLOCK_STRING, loc: this.loc(token), }; diff --git a/src/utilities/astFromValue.ts b/src/utilities/astFromValue.ts index 2ec80e06b7..98d315f8d6 100644 --- a/src/utilities/astFromValue.ts +++ b/src/utilities/astFromValue.ts @@ -142,7 +142,7 @@ export function astFromValue( } // istanbul ignore next (Not reachable. All possible input types have been considered) - invariant(false, 'Unexpected input type: ' + inspect(type as never)); + invariant(false, 'Unexpected input type: ' + inspect(type)); } /** diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 786c63c162..3c5204a411 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -184,5 +184,5 @@ function coerceInputValueImpl( } // istanbul ignore next (Not reachable. All possible input types have been considered) - invariant(false, 'Unexpected input type: ' + inspect(type as never)); + invariant(false, 'Unexpected input type: ' + inspect(type)); } diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index b51e3f3a46..91a81e3946 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -5,7 +5,6 @@ import { invariant } from '../jsutils/invariant'; import { devAssert } from '../jsutils/devAssert'; import type { Maybe } from '../jsutils/Maybe'; -import type { DirectiveLocationEnum } from '../language/directiveLocation'; import type { DocumentNode, TypeNode, @@ -267,7 +266,7 @@ export function extendSchemaImpl( } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect(type as never)); + invariant(false, 'Unexpected type: ' + inspect(type)); } function extendInputObjectType( @@ -432,9 +431,7 @@ export function extendSchemaImpl( } function buildDirective(node: DirectiveDefinitionNode): GraphQLDirective { - const locations = node.locations.map( - ({ value }) => value as DirectiveLocationEnum, - ); + const locations = node.locations.map(({ value }) => value); return new GraphQLDirective({ name: node.name.value, diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 621d4b0d82..93c7571c80 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -531,7 +531,7 @@ function typeKindName(type: GraphQLNamedType): string { } // istanbul ignore next (Not reachable. All possible named types have been considered) - invariant(false, 'Unexpected type: ' + inspect(type as never)); + invariant(false, 'Unexpected type: ' + inspect(type)); } function stringifyValue(value: unknown, type: GraphQLInputType): string { diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 12c96fa337..7c4f6e9c41 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -155,7 +155,7 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect(type as never)); + invariant(false, 'Unexpected type: ' + inspect(type)); } } diff --git a/src/utilities/printSchema.ts b/src/utilities/printSchema.ts index c63f660a08..194c6a03bd 100644 --- a/src/utilities/printSchema.ts +++ b/src/utilities/printSchema.ts @@ -147,7 +147,7 @@ export function printType(type: GraphQLNamedType): string { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect(type as never)); + invariant(false, 'Unexpected type: ' + inspect(type)); } function printScalar(type: GraphQLScalarType): string { diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index 80c65e8442..5f246f38eb 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -146,7 +146,7 @@ export function valueFromAST( } // istanbul ignore next (Not reachable. All possible input types have been considered) - invariant(false, 'Unexpected input type: ' + inspect(type as never)); + invariant(false, 'Unexpected input type: ' + inspect(type)); } // Returns true if the provided valueNode is a variable which is not defined diff --git a/src/validation/rules/KnownDirectivesRule.ts b/src/validation/rules/KnownDirectivesRule.ts index 308a4167c7..04b98566ca 100644 --- a/src/validation/rules/KnownDirectivesRule.ts +++ b/src/validation/rules/KnownDirectivesRule.ts @@ -133,5 +133,5 @@ function getDirectiveLocationForOperation( } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected operation: ' + inspect(operation as never)); + invariant(false, 'Unexpected operation: ' + inspect(operation)); } diff --git a/src/validation/rules/PossibleTypeExtensionsRule.ts b/src/validation/rules/PossibleTypeExtensionsRule.ts index d9177b61a0..ab7db3105b 100644 --- a/src/validation/rules/PossibleTypeExtensionsRule.ts +++ b/src/validation/rules/PossibleTypeExtensionsRule.ts @@ -120,7 +120,7 @@ function typeToExtKind(type: GraphQLNamedType): KindEnum { } // istanbul ignore next (Not reachable. All possible types have been considered) - invariant(false, 'Unexpected type: ' + inspect(type as never)); + invariant(false, 'Unexpected type: ' + inspect(type)); } function extensionKindToTypeName(kind: KindEnum): string { From cd91f2a321e57714fb127fc1c7abb347464db65e Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 13:50:59 -0600 Subject: [PATCH 38/65] build: enable `@typescript-eslint/no-unnecessary-type-assertion` --- .eslintrc.yml | 2 +- src/utilities/extendSchema.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 93d055e582..8306620589 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -497,7 +497,7 @@ overrides: '@typescript-eslint/no-unnecessary-condition': off #TODO temporarily disabled '@typescript-eslint/no-unnecessary-qualifier': error '@typescript-eslint/no-unnecessary-type-arguments': error - '@typescript-eslint/no-unnecessary-type-assertion': off #TODO temporarily disabled + '@typescript-eslint/no-unnecessary-type-assertion': error '@typescript-eslint/no-unnecessary-type-constraint': error '@typescript-eslint/no-unsafe-argument': off # TODO consider '@typescript-eslint/no-unsafe-assignment': off # TODO consider diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 91a81e3946..837719d2d7 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -592,7 +592,7 @@ export function extendSchemaImpl( switch (astNode.kind) { case Kind.OBJECT_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLObjectType({ @@ -605,7 +605,7 @@ export function extendSchemaImpl( }); } case Kind.INTERFACE_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInterfaceType({ @@ -618,7 +618,7 @@ export function extendSchemaImpl( }); } case Kind.ENUM_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLEnumType({ @@ -630,7 +630,7 @@ export function extendSchemaImpl( }); } case Kind.UNION_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLUnionType({ @@ -642,7 +642,7 @@ export function extendSchemaImpl( }); } case Kind.SCALAR_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; return new GraphQLScalarType({ name, @@ -653,7 +653,7 @@ export function extendSchemaImpl( }); } case Kind.INPUT_OBJECT_TYPE_DEFINITION: { - const extensionASTNodes = extensionNodes as any; + const extensionASTNodes = extensionNodes; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInputObjectType({ From 207e43416857c5081516f84890abb009afda335f Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 14:37:41 -0600 Subject: [PATCH 39/65] build: enable `@typescript-eslint/consistent-type-definitions` --- .eslintrc.yml | 2 +- src/__tests__/starWarsData.ts | 12 +- src/error/formatError.ts | 4 +- src/execution/execute.ts | 16 +- src/graphql.ts | 4 +- src/jsutils/ObjMap.ts | 10 +- src/jsutils/Path.ts | 4 +- src/jsutils/instanceOf.ts | 4 +- src/language/ast.ts | 176 +++++++++---------- src/language/location.ts | 4 +- src/language/parser.ts | 4 +- src/language/source.ts | 4 +- src/language/visitor.ts | 8 +- src/subscription/__tests__/subscribe-test.ts | 4 +- src/subscription/subscribe.ts | 4 +- src/type/definition.ts | 104 +++++------ src/type/directives.ts | 4 +- src/type/schema.ts | 4 +- src/utilities/findBreakingChanges.ts | 8 +- src/utilities/getIntrospectionQuery.ts | 70 ++++---- src/validation/ValidationContext.ts | 4 +- 21 files changed, 230 insertions(+), 224 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 8306620589..093b4042fc 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -460,7 +460,7 @@ overrides: '@typescript-eslint/class-literal-property-style': off # TODO enable after TS conversion '@typescript-eslint/consistent-indexed-object-style': off # TODO enable after TS conversion '@typescript-eslint/consistent-type-assertions': off # TODO temporarily disable - '@typescript-eslint/consistent-type-definitions': off # TODO consider + '@typescript-eslint/consistent-type-definitions': ['error', 'interface'] '@typescript-eslint/consistent-type-imports': off # TODO enable after TS conversion '@typescript-eslint/explicit-function-return-type': off # TODO consider '@typescript-eslint/explicit-member-accessibility': off # TODO consider diff --git a/src/__tests__/starWarsData.ts b/src/__tests__/starWarsData.ts index 7708554d4c..04cd648546 100644 --- a/src/__tests__/starWarsData.ts +++ b/src/__tests__/starWarsData.ts @@ -2,30 +2,30 @@ * These are types which correspond to the schema. * They represent the shape of the data visited during field resolution. */ -export type Character = { +export interface Character { id: string; name: string; friends: Array; appearsIn: Array; -}; +} -export type Human = { +export interface Human { type: 'Human'; id: string; name: string; friends: Array; appearsIn: Array; homePlanet?: string; -}; +} -export type Droid = { +export interface Droid { type: 'Droid'; id: string; name: string; friends: Array; appearsIn: Array; primaryFunction: string; -}; +} /** * This defines a basic set of data for our Star Wars Schema. diff --git a/src/error/formatError.ts b/src/error/formatError.ts index efb0382e0d..a13b87ed09 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -23,7 +23,7 @@ export function formatError(error: GraphQLError): GraphQLFormattedError { /** * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors */ -export type GraphQLFormattedError = { +export interface GraphQLFormattedError { /** * A short, human-readable summary of the problem that **SHOULD NOT** change * from occurrence to occurrence of the problem, except for purposes of @@ -47,4 +47,4 @@ export type GraphQLFormattedError = { * and hence there are no additional restrictions on its contents. */ readonly extensions?: { [key: string]: unknown }; -}; +} diff --git a/src/execution/execute.ts b/src/execution/execute.ts index abc37bf610..26df836155 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -93,7 +93,7 @@ import { * Namely, schema of the type system that is currently executing, * and the fragments defined in the query document */ -export type ExecutionContext = { +export interface ExecutionContext { schema: GraphQLSchema; fragments: ObjMap; rootValue: unknown; @@ -103,7 +103,7 @@ export type ExecutionContext = { fieldResolver: GraphQLFieldResolver; typeResolver: GraphQLTypeResolver; errors: Array; -}; +} /** * The result of GraphQL execution. @@ -112,19 +112,19 @@ export type ExecutionContext = { * - `data` is the result of a successful execution of the query. * - `extensions` is reserved for adding non-standard properties. */ -export type ExecutionResult = { +export interface ExecutionResult { errors?: ReadonlyArray; data?: ObjMap | null; extensions?: ObjMap; -}; +} -export type FormattedExecutionResult = { +export interface FormattedExecutionResult { errors?: ReadonlyArray; data?: ObjMap | null; extensions?: ObjMap; -}; +} -export type ExecutionArgs = { +export interface ExecutionArgs { schema: GraphQLSchema; document: DocumentNode; rootValue?: unknown; @@ -133,7 +133,7 @@ export type ExecutionArgs = { operationName?: Maybe; fieldResolver?: Maybe>; typeResolver?: Maybe>; -}; +} /** * Implements the "Evaluating requests" section of the GraphQL specification. diff --git a/src/graphql.ts b/src/graphql.ts index dd8b58fe34..430588f8e4 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -56,7 +56,7 @@ import type { Maybe } from './jsutils/Maybe'; * If not provided, the default type resolver is used (which looks for a * `__typename` field or alternatively calls the `isTypeOf` method). */ -export type GraphQLArgs = { +export interface GraphQLArgs { schema: GraphQLSchema; source: string | Source; rootValue?: unknown; @@ -65,7 +65,7 @@ export type GraphQLArgs = { operationName?: Maybe; fieldResolver?: Maybe>; typeResolver?: Maybe>; -}; +} export function graphql(args: GraphQLArgs): Promise { // Always return a Promise for a consistent API. diff --git a/src/jsutils/ObjMap.ts b/src/jsutils/ObjMap.ts index f465745bb1..f76b1399d3 100644 --- a/src/jsutils/ObjMap.ts +++ b/src/jsutils/ObjMap.ts @@ -1,7 +1,13 @@ -export type ObjMap = { [key: string]: T; __proto__: null }; +export interface ObjMap { + [key: string]: T; + __proto__: null; +} export type ObjMapLike = ObjMap | { [key: string]: T }; -export type ReadOnlyObjMap = { readonly [key: string]: T; __proto__: null }; +export interface ReadOnlyObjMap { + readonly [key: string]: T; + __proto__: null; +} export type ReadOnlyObjMapLike = | ReadOnlyObjMap | { readonly [key: string]: T }; diff --git a/src/jsutils/Path.ts b/src/jsutils/Path.ts index 215f38beba..64f6c78358 100644 --- a/src/jsutils/Path.ts +++ b/src/jsutils/Path.ts @@ -1,10 +1,10 @@ import type { Maybe } from './Maybe'; -export type Path = { +export interface Path { readonly prev: Path | undefined; readonly key: string | number; readonly typename: string | undefined; -}; +} /** * Given a Path and a key, return a new Path containing the new key. diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index 7af2fdd86d..76b6379e93 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -37,6 +37,6 @@ spurious results.`, return false; }; -type Constructor = { +interface Constructor { name: string; -}; +} diff --git a/src/language/ast.ts b/src/language/ast.ts index 136e2869ba..2b70ac7cba 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -179,7 +179,7 @@ export type ASTNode = /** * Utility type listing all nodes indexed by their kind. */ -export type ASTKindToNode = { +export interface ASTKindToNode { Name: NameNode; Document: DocumentNode; OperationDefinition: OperationDefinitionNode; @@ -223,23 +223,23 @@ export type ASTKindToNode = { UnionTypeExtension: UnionTypeExtensionNode; EnumTypeExtension: EnumTypeExtensionNode; InputObjectTypeExtension: InputObjectTypeExtensionNode; -}; +} // Name -export type NameNode = { +export interface NameNode { readonly kind: 'Name'; readonly loc?: Location; readonly value: string; -}; +} // Document -export type DocumentNode = { +export interface DocumentNode { readonly kind: 'Document'; readonly loc?: Location; readonly definitions: ReadonlyArray; -}; +} export type DefinitionNode = | ExecutableDefinitionNode @@ -250,7 +250,7 @@ export type ExecutableDefinitionNode = | OperationDefinitionNode | FragmentDefinitionNode; -export type OperationDefinitionNode = { +export interface OperationDefinitionNode { readonly kind: 'OperationDefinition'; readonly loc?: Location; readonly operation: OperationTypeNode; @@ -258,34 +258,34 @@ export type OperationDefinitionNode = { readonly variableDefinitions?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly selectionSet: SelectionSetNode; -}; +} export type OperationTypeNode = 'query' | 'mutation' | 'subscription'; -export type VariableDefinitionNode = { +export interface VariableDefinitionNode { readonly kind: 'VariableDefinition'; readonly loc?: Location; readonly variable: VariableNode; readonly type: TypeNode; readonly defaultValue?: ValueNode; readonly directives?: ReadonlyArray; -}; +} -export type VariableNode = { +export interface VariableNode { readonly kind: 'Variable'; readonly loc?: Location; readonly name: NameNode; -}; +} -export type SelectionSetNode = { +export interface SelectionSetNode { kind: 'SelectionSet'; loc?: Location; selections: ReadonlyArray; -}; +} export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; -export type FieldNode = { +export interface FieldNode { readonly kind: 'Field'; readonly loc?: Location; readonly alias?: NameNode; @@ -293,33 +293,33 @@ export type FieldNode = { readonly arguments?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly selectionSet?: SelectionSetNode; -}; +} -export type ArgumentNode = { +export interface ArgumentNode { readonly kind: 'Argument'; readonly loc?: Location; readonly name: NameNode; readonly value: ValueNode; -}; +} // Fragments -export type FragmentSpreadNode = { +export interface FragmentSpreadNode { readonly kind: 'FragmentSpread'; readonly loc?: Location; readonly name: NameNode; readonly directives?: ReadonlyArray; -}; +} -export type InlineFragmentNode = { +export interface InlineFragmentNode { readonly kind: 'InlineFragment'; readonly loc?: Location; readonly typeCondition?: NamedTypeNode; readonly directives?: ReadonlyArray; readonly selectionSet: SelectionSetNode; -}; +} -export type FragmentDefinitionNode = { +export interface FragmentDefinitionNode { readonly kind: 'FragmentDefinition'; readonly loc?: Location; readonly name: NameNode; @@ -328,7 +328,7 @@ export type FragmentDefinitionNode = { readonly typeCondition: NamedTypeNode; readonly directives?: ReadonlyArray; readonly selectionSet: SelectionSetNode; -}; +} // Values @@ -343,91 +343,91 @@ export type ValueNode = | ListValueNode | ObjectValueNode; -export type IntValueNode = { +export interface IntValueNode { readonly kind: 'IntValue'; readonly loc?: Location; readonly value: string; -}; +} -export type FloatValueNode = { +export interface FloatValueNode { readonly kind: 'FloatValue'; readonly loc?: Location; readonly value: string; -}; +} -export type StringValueNode = { +export interface StringValueNode { readonly kind: 'StringValue'; readonly loc?: Location; readonly value: string; readonly block?: boolean; -}; +} -export type BooleanValueNode = { +export interface BooleanValueNode { readonly kind: 'BooleanValue'; readonly loc?: Location; readonly value: boolean; -}; +} -export type NullValueNode = { +export interface NullValueNode { readonly kind: 'NullValue'; readonly loc?: Location; -}; +} -export type EnumValueNode = { +export interface EnumValueNode { readonly kind: 'EnumValue'; readonly loc?: Location; readonly value: string; -}; +} -export type ListValueNode = { +export interface ListValueNode { readonly kind: 'ListValue'; readonly loc?: Location; readonly values: ReadonlyArray; -}; +} -export type ObjectValueNode = { +export interface ObjectValueNode { readonly kind: 'ObjectValue'; readonly loc?: Location; readonly fields: ReadonlyArray; -}; +} -export type ObjectFieldNode = { +export interface ObjectFieldNode { readonly kind: 'ObjectField'; readonly loc?: Location; readonly name: NameNode; readonly value: ValueNode; -}; +} // Directives -export type DirectiveNode = { +export interface DirectiveNode { readonly kind: 'Directive'; readonly loc?: Location; readonly name: NameNode; readonly arguments?: ReadonlyArray; -}; +} // Type Reference export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; -export type NamedTypeNode = { +export interface NamedTypeNode { readonly kind: 'NamedType'; readonly loc?: Location; readonly name: NameNode; -}; +} -export type ListTypeNode = { +export interface ListTypeNode { readonly kind: 'ListType'; readonly loc?: Location; readonly type: TypeNode; -}; +} -export type NonNullTypeNode = { +export interface NonNullTypeNode { readonly kind: 'NonNullType'; readonly loc?: Location; readonly type: NamedTypeNode | ListTypeNode; -}; +} // Type System Definition @@ -436,20 +436,20 @@ export type TypeSystemDefinitionNode = | TypeDefinitionNode | DirectiveDefinitionNode; -export type SchemaDefinitionNode = { +export interface SchemaDefinitionNode { readonly kind: 'SchemaDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly directives?: ReadonlyArray; readonly operationTypes: ReadonlyArray; -}; +} -export type OperationTypeDefinitionNode = { +export interface OperationTypeDefinitionNode { readonly kind: 'OperationTypeDefinition'; readonly loc?: Location; readonly operation: OperationTypeNode; readonly type: NamedTypeNode; -}; +} // Type Definition @@ -461,15 +461,15 @@ export type TypeDefinitionNode = | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode; -export type ScalarTypeDefinitionNode = { +export interface ScalarTypeDefinitionNode { readonly kind: 'ScalarTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly name: NameNode; readonly directives?: ReadonlyArray; -}; +} -export type ObjectTypeDefinitionNode = { +export interface ObjectTypeDefinitionNode { readonly kind: 'ObjectTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; @@ -477,9 +477,9 @@ export type ObjectTypeDefinitionNode = { readonly interfaces?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} -export type FieldDefinitionNode = { +export interface FieldDefinitionNode { readonly kind: 'FieldDefinition'; readonly loc?: Location; readonly description?: StringValueNode; @@ -487,9 +487,9 @@ export type FieldDefinitionNode = { readonly arguments?: ReadonlyArray; readonly type: TypeNode; readonly directives?: ReadonlyArray; -}; +} -export type InputValueDefinitionNode = { +export interface InputValueDefinitionNode { readonly kind: 'InputValueDefinition'; readonly loc?: Location; readonly description?: StringValueNode; @@ -497,9 +497,9 @@ export type InputValueDefinitionNode = { readonly type: TypeNode; readonly defaultValue?: ValueNode; readonly directives?: ReadonlyArray; -}; +} -export type InterfaceTypeDefinitionNode = { +export interface InterfaceTypeDefinitionNode { readonly kind: 'InterfaceTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; @@ -507,46 +507,46 @@ export type InterfaceTypeDefinitionNode = { readonly interfaces?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} -export type UnionTypeDefinitionNode = { +export interface UnionTypeDefinitionNode { readonly kind: 'UnionTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly types?: ReadonlyArray; -}; +} -export type EnumTypeDefinitionNode = { +export interface EnumTypeDefinitionNode { readonly kind: 'EnumTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly values?: ReadonlyArray; -}; +} -export type EnumValueDefinitionNode = { +export interface EnumValueDefinitionNode { readonly kind: 'EnumValueDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly name: NameNode; readonly directives?: ReadonlyArray; -}; +} -export type InputObjectTypeDefinitionNode = { +export interface InputObjectTypeDefinitionNode { readonly kind: 'InputObjectTypeDefinition'; readonly loc?: Location; readonly description?: StringValueNode; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} // Directive Definitions -export type DirectiveDefinitionNode = { +export interface DirectiveDefinitionNode { readonly kind: 'DirectiveDefinition'; readonly loc?: Location; readonly description?: StringValueNode; @@ -554,18 +554,18 @@ export type DirectiveDefinitionNode = { readonly arguments?: ReadonlyArray; readonly repeatable: boolean; readonly locations: ReadonlyArray; -}; +} // Type System Extensions export type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; -export type SchemaExtensionNode = { +export interface SchemaExtensionNode { readonly kind: 'SchemaExtension'; readonly loc?: Location; readonly directives?: ReadonlyArray; readonly operationTypes?: ReadonlyArray; -}; +} // Type Extensions @@ -577,51 +577,51 @@ export type TypeExtensionNode = | EnumTypeExtensionNode | InputObjectTypeExtensionNode; -export type ScalarTypeExtensionNode = { +export interface ScalarTypeExtensionNode { readonly kind: 'ScalarTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly directives?: ReadonlyArray; -}; +} -export type ObjectTypeExtensionNode = { +export interface ObjectTypeExtensionNode { readonly kind: 'ObjectTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly interfaces?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} -export type InterfaceTypeExtensionNode = { +export interface InterfaceTypeExtensionNode { readonly kind: 'InterfaceTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly interfaces?: ReadonlyArray; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} -export type UnionTypeExtensionNode = { +export interface UnionTypeExtensionNode { readonly kind: 'UnionTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly types?: ReadonlyArray; -}; +} -export type EnumTypeExtensionNode = { +export interface EnumTypeExtensionNode { readonly kind: 'EnumTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly values?: ReadonlyArray; -}; +} -export type InputObjectTypeExtensionNode = { +export interface InputObjectTypeExtensionNode { readonly kind: 'InputObjectTypeExtension'; readonly loc?: Location; readonly name: NameNode; readonly directives?: ReadonlyArray; readonly fields?: ReadonlyArray; -}; +} diff --git a/src/language/location.ts b/src/language/location.ts index 22cd7e4176..f4773d90c3 100644 --- a/src/language/location.ts +++ b/src/language/location.ts @@ -3,10 +3,10 @@ import type { Source } from './source'; /** * Represents a location in a Source. */ -export type SourceLocation = { +export interface SourceLocation { readonly line: number; readonly column: number; -}; +} /** * Takes a Source and a UTF-8 character offset, and returns the corresponding diff --git a/src/language/parser.ts b/src/language/parser.ts index d57c8f1acf..b28474f6da 100644 --- a/src/language/parser.ts +++ b/src/language/parser.ts @@ -60,7 +60,7 @@ import { Lexer, isPunctuatorTokenKind } from './lexer'; /** * Configuration options to control parser behavior */ -export type ParseOptions = { +export interface ParseOptions { /** * By default, the parser creates AST nodes that know the location * in the source that they correspond to. This configuration flag @@ -83,7 +83,7 @@ export type ParseOptions = { * */ allowLegacyFragmentVariables?: boolean; -}; +} /** * Given a GraphQL source, parses it into a Document. diff --git a/src/language/source.ts b/src/language/source.ts index b13739262c..202d04b33d 100644 --- a/src/language/source.ts +++ b/src/language/source.ts @@ -2,10 +2,10 @@ import { inspect } from '../jsutils/inspect'; import { devAssert } from '../jsutils/devAssert'; import { instanceOf } from '../jsutils/instanceOf'; -type Location = { +interface Location { line: number; column: number; -}; +} /** * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are diff --git a/src/language/visitor.ts b/src/language/visitor.ts index c2e3ecb099..d1e1973aef 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -16,10 +16,10 @@ type KindVisitor = { | EnterLeaveVisitor; }; -type EnterLeaveVisitor = { - readonly enter?: ASTVisitFn; - readonly leave?: ASTVisitFn; -}; +interface EnterLeaveVisitor { + readonly enter?: ASTVisitFn, + readonly leave?: ASTVisitFn, +} /** * A visitor is comprised of visit functions, which are called on each node diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 7b572e9e10..640c8b0b02 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -17,12 +17,12 @@ import { createSourceEventStream, subscribe } from '../subscribe'; import { SimplePubSub } from './simplePubSub'; -type Email = { +interface Email { from: string; subject: string; message: string; unread: boolean; -}; +} const EmailType = new GraphQLObjectType({ name: 'Email', diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 0b66af5ca5..e3ac542a97 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -26,7 +26,7 @@ import { getOperationRootType } from '../utilities/getOperationRootType'; import { mapAsyncIterator } from './mapAsyncIterator'; -export type SubscriptionArgs = { +export interface SubscriptionArgs { schema: GraphQLSchema; document: DocumentNode; rootValue?: unknown; @@ -35,7 +35,7 @@ export type SubscriptionArgs = { operationName?: Maybe; fieldResolver?: Maybe>; subscribeFieldResolver?: Maybe>; -}; +} /** * Implements the "Subscribe" algorithm described in the GraphQL specification. diff --git a/src/type/definition.ts b/src/type/definition.ts index 910cbafba0..7cb52a87f6 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -612,7 +612,7 @@ export type GraphQLScalarLiteralParser = ( variables: Maybe>, ) => Maybe; -export type GraphQLScalarTypeConfig = { +export interface GraphQLScalarTypeConfig { name: string; description?: Maybe; specifiedByUrl?: Maybe; @@ -625,7 +625,7 @@ export type GraphQLScalarTypeConfig = { extensions?: Maybe>; astNode?: Maybe; extensionASTNodes?: Maybe>; -}; +} interface GraphQLScalarTypeNormalizedConfig extends GraphQLScalarTypeConfig { @@ -848,16 +848,16 @@ export function argsToArgsConfig( ); } -export type GraphQLObjectTypeConfig = { - name: string; - description?: Maybe; - interfaces?: ThunkArray; - fields: ThunkObjMap>; - isTypeOf?: Maybe>; - extensions?: Maybe>; - astNode?: Maybe; - extensionASTNodes?: Maybe>; -}; +export interface GraphQLObjectTypeConfig { + name: string, + description?: Maybe, + interfaces?: ThunkArray, + fields: ThunkObjMap>, + isTypeOf?: Maybe>, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, +} interface GraphQLObjectTypeNormalizedConfig extends GraphQLObjectTypeConfig { @@ -894,7 +894,7 @@ export type GraphQLFieldResolver< info: GraphQLResolveInfo, ) => unknown; -export type GraphQLResolveInfo = { +export interface GraphQLResolveInfo { readonly fieldName: string; readonly fieldNodes: ReadonlyArray; readonly returnType: GraphQLOutputType; @@ -905,13 +905,13 @@ export type GraphQLResolveInfo = { readonly rootValue: unknown; readonly operation: OperationDefinitionNode; readonly variableValues: { [variable: string]: unknown }; -}; +} -export type GraphQLFieldConfig< +export interface GraphQLFieldConfig< TSource, TContext, TArgs = { [argument: string]: any } -> = { +> { description?: Maybe; type: GraphQLOutputType; args?: GraphQLFieldConfigArgumentMap; @@ -920,28 +920,28 @@ export type GraphQLFieldConfig< deprecationReason?: Maybe; extensions?: Maybe>; astNode?: Maybe; -}; +} export type GraphQLFieldConfigArgumentMap = ObjMap; -export type GraphQLArgumentConfig = { +export interface GraphQLArgumentConfig { description?: Maybe; type: GraphQLInputType; defaultValue?: unknown; extensions?: Maybe>; deprecationReason?: Maybe; astNode?: Maybe; -}; +} export type GraphQLFieldConfigMap = ObjMap< GraphQLFieldConfig >; -export type GraphQLField< +export interface GraphQLField< TSource, TContext, TArgs = { [argument: string]: any } -> = { +> { name: string; description: Maybe; type: GraphQLOutputType; @@ -951,9 +951,9 @@ export type GraphQLField< deprecationReason: Maybe; extensions: Maybe>; astNode: Maybe; -}; +} -export type GraphQLArgument = { +export interface GraphQLArgument { name: string; description: Maybe; type: GraphQLInputType; @@ -961,7 +961,7 @@ export type GraphQLArgument = { deprecationReason: Maybe; extensions: Maybe>; astNode: Maybe; -}; +} export function isRequiredArgument(arg: GraphQLArgument): boolean { return isNonNullType(arg.type) && arg.defaultValue === undefined; @@ -1058,11 +1058,11 @@ export class GraphQLInterfaceType { } } -export type GraphQLInterfaceTypeConfig = { - name: string; - description?: Maybe; - interfaces?: ThunkArray; - fields: ThunkObjMap>; +export interface GraphQLInterfaceTypeConfig { + name: string, + description?: Maybe, + interfaces?: ThunkArray, + fields: ThunkObjMap>, /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing @@ -1072,7 +1072,7 @@ export type GraphQLInterfaceTypeConfig = { extensions?: Maybe>; astNode?: Maybe; extensionASTNodes?: Maybe>; -}; +} export interface GraphQLInterfaceTypeNormalizedConfig extends GraphQLInterfaceTypeConfig { @@ -1175,10 +1175,10 @@ function defineTypes( return types; } -export type GraphQLUnionTypeConfig = { - name: string; - description?: Maybe; - types: ThunkArray; +export interface GraphQLUnionTypeConfig { + name: string, + description?: Maybe, + types: ThunkArray, /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing @@ -1188,7 +1188,7 @@ export type GraphQLUnionTypeConfig = { extensions?: Maybe>; astNode?: Maybe; extensionASTNodes?: Maybe>; -}; +} interface GraphQLUnionTypeNormalizedConfig extends GraphQLUnionTypeConfig { @@ -1379,14 +1379,14 @@ function defineEnumValues( }); } -export type GraphQLEnumTypeConfig /* */ = { +export interface GraphQLEnumTypeConfig { name: string; description?: Maybe; values: GraphQLEnumValueConfigMap /* */; extensions?: Maybe>; astNode?: Maybe; extensionASTNodes?: Maybe>; -}; +} interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig { extensions: Maybe>; @@ -1395,22 +1395,22 @@ interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig { export type GraphQLEnumValueConfigMap /* */ = ObjMap */>; -export type GraphQLEnumValueConfig /* */ = { +export interface GraphQLEnumValueConfig { description?: Maybe; value?: any /* T */; deprecationReason?: Maybe; extensions?: Maybe>; astNode?: Maybe; -}; +} -export type GraphQLEnumValue /* */ = { +export interface GraphQLEnumValue { name: string; description: Maybe; value: any /* T */; deprecationReason: Maybe; extensions: Maybe>; astNode: Maybe; -}; +} /** * Input Object Type Definition @@ -1517,13 +1517,13 @@ function defineInputFieldMap( }); } -export type GraphQLInputObjectTypeConfig = { - name: string; - description?: Maybe; - fields: ThunkObjMap; - extensions?: Maybe>; - astNode?: Maybe; - extensionASTNodes?: Maybe>; +export interface GraphQLInputObjectTypeConfig { + name: string, + description?: Maybe, + fields: ThunkObjMap, + extensions?: Maybe>, + astNode?: Maybe, + extensionASTNodes?: Maybe>, }; interface GraphQLInputObjectTypeNormalizedConfig @@ -1533,18 +1533,18 @@ interface GraphQLInputObjectTypeNormalizedConfig extensionASTNodes: ReadonlyArray; } -export type GraphQLInputFieldConfig = { +export interface GraphQLInputFieldConfig { description?: Maybe; type: GraphQLInputType; defaultValue?: unknown; deprecationReason?: Maybe; extensions?: Maybe>; astNode?: Maybe; -}; +} export type GraphQLInputFieldConfigMap = ObjMap; -export type GraphQLInputField = { +export interface GraphQLInputField { name: string; description: Maybe; type: GraphQLInputType; @@ -1552,7 +1552,7 @@ export type GraphQLInputField = { deprecationReason: Maybe; extensions: Maybe>; astNode: Maybe; -}; +} export function isRequiredInputField(field: GraphQLInputField): boolean { return isNonNullType(field.type) && field.defaultValue === undefined; diff --git a/src/type/directives.ts b/src/type/directives.ts index de4b3fedc8..8f75d8838a 100644 --- a/src/type/directives.ts +++ b/src/type/directives.ts @@ -102,7 +102,7 @@ export class GraphQLDirective { } } -export type GraphQLDirectiveConfig = { +export interface GraphQLDirectiveConfig { name: string; description?: Maybe; locations: Array; @@ -110,7 +110,7 @@ export type GraphQLDirectiveConfig = { isRepeatable?: Maybe; extensions?: Maybe>; astNode?: Maybe; -}; +} interface GraphQLDirectiveNormalizedConfig extends GraphQLDirectiveConfig { args: GraphQLFieldConfigArgumentMap; diff --git a/src/type/schema.ts b/src/type/schema.ts index 1be4e852fe..ac6638c531 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -347,7 +347,7 @@ export class GraphQLSchema { type TypeMap = ObjMap; -export type GraphQLSchemaValidationOptions = { +export interface GraphQLSchemaValidationOptions { /** * When building a schema from a GraphQL service's introspection result, it * might be safe to assume the schema is valid. Set to true to assume the @@ -356,7 +356,7 @@ export type GraphQLSchemaValidationOptions = { * Default: false */ assumeValid?: boolean; -}; +} export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { description?: Maybe; diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 93c7571c80..3c7f69420b 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -63,15 +63,15 @@ export const DangerousChangeType = Object.freeze({ ARG_DEFAULT_VALUE_CHANGE: 'ARG_DEFAULT_VALUE_CHANGE', }); -export type BreakingChange = { +export interface BreakingChange { type: keyof typeof BreakingChangeType; description: string; -}; +} -export type DangerousChange = { +export interface DangerousChange { type: keyof typeof DangerousChangeType; description: string; -}; +} /** * Given two schemas, returns an Array containing descriptions of all the types diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts index 56720cc567..ea469c038f 100644 --- a/src/utilities/getIntrospectionQuery.ts +++ b/src/utilities/getIntrospectionQuery.ts @@ -1,7 +1,7 @@ import type { Maybe } from '../jsutils/Maybe'; import type { DirectiveLocationEnum } from '../language/directiveLocation'; -export type IntrospectionOptions = { +export interface IntrospectionOptions { // Whether to include descriptions in the introspection result. // Default: true descriptions?: boolean; @@ -21,7 +21,7 @@ export type IntrospectionOptions = { // Whether target GraphQL server support deprecation of input values. // Default: false inputValueDeprecation?: boolean; -}; +} export function getIntrospectionQuery(options?: IntrospectionOptions): string { const optionsWithDefault = { @@ -148,11 +148,11 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string { `; } -export type IntrospectionQuery = { +export interface IntrospectionQuery { readonly __schema: IntrospectionSchema; -}; +} -export type IntrospectionSchema = { +export interface IntrospectionSchema { readonly description?: Maybe; readonly queryType: IntrospectionNamedTypeRef; readonly mutationType: Maybe< @@ -163,7 +163,7 @@ export type IntrospectionSchema = { >; readonly types: ReadonlyArray; readonly directives: ReadonlyArray; -}; +} export type IntrospectionType = | IntrospectionScalarType @@ -185,14 +185,14 @@ export type IntrospectionInputType = | IntrospectionEnumType | IntrospectionInputObjectType; -export type IntrospectionScalarType = { +export interface IntrospectionScalarType { readonly kind: 'SCALAR'; readonly name: string; readonly description?: Maybe; readonly specifiedByUrl?: Maybe; -}; +} -export type IntrospectionObjectType = { +export interface IntrospectionObjectType { readonly kind: 'OBJECT'; readonly name: string; readonly description?: Maybe; @@ -200,9 +200,9 @@ export type IntrospectionObjectType = { readonly interfaces: ReadonlyArray< IntrospectionNamedTypeRef >; -}; +} -export type IntrospectionInterfaceType = { +export interface IntrospectionInterfaceType { readonly kind: 'INTERFACE'; readonly name: string; readonly description?: Maybe; @@ -213,44 +213,44 @@ export type IntrospectionInterfaceType = { readonly possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef >; -}; +} -export type IntrospectionUnionType = { +export interface IntrospectionUnionType { readonly kind: 'UNION'; readonly name: string; readonly description?: Maybe; readonly possibleTypes: ReadonlyArray< IntrospectionNamedTypeRef >; -}; +} -export type IntrospectionEnumType = { +export interface IntrospectionEnumType { readonly kind: 'ENUM'; readonly name: string; readonly description?: Maybe; readonly enumValues: ReadonlyArray; -}; +} -export type IntrospectionInputObjectType = { +export interface IntrospectionInputObjectType { readonly kind: 'INPUT_OBJECT'; readonly name: string; readonly description?: Maybe; readonly inputFields: ReadonlyArray; -}; +} -export type IntrospectionListTypeRef< +export interface IntrospectionListTypeRef< T extends IntrospectionTypeRef = IntrospectionTypeRef -> = { +> { readonly kind: 'LIST'; readonly ofType: T; -}; +} -export type IntrospectionNonNullTypeRef< +export interface IntrospectionNonNullTypeRef< T extends IntrospectionTypeRef = IntrospectionTypeRef -> = { +> { readonly kind: 'NON_NULL'; readonly ofType: T; -}; +} export type IntrospectionTypeRef = | IntrospectionNamedTypeRef @@ -275,42 +275,42 @@ export type IntrospectionInputTypeRef = | IntrospectionListTypeRef >; -export type IntrospectionNamedTypeRef< +export interface IntrospectionNamedTypeRef< T extends IntrospectionType = IntrospectionType -> = { +> { readonly kind: T['kind']; readonly name: string; -}; +} -export type IntrospectionField = { +export interface IntrospectionField { readonly name: string; readonly description?: Maybe; readonly args: ReadonlyArray; readonly type: IntrospectionOutputTypeRef; readonly isDeprecated: boolean; readonly deprecationReason: Maybe; -}; +} -export type IntrospectionInputValue = { +export interface IntrospectionInputValue { readonly name: string; readonly description?: Maybe; readonly type: IntrospectionInputTypeRef; readonly defaultValue: Maybe; readonly isDeprecated?: boolean; readonly deprecationReason?: Maybe; -}; +} -export type IntrospectionEnumValue = { +export interface IntrospectionEnumValue { readonly name: string; readonly description?: Maybe; readonly isDeprecated: boolean; readonly deprecationReason: Maybe; -}; +} -export type IntrospectionDirective = { +export interface IntrospectionDirective { readonly name: string; readonly description?: Maybe; readonly isRepeatable?: boolean; readonly locations: ReadonlyArray; readonly args: ReadonlyArray; -}; +} diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index 4ef0b9702f..4071e20d8f 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -30,11 +30,11 @@ import { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo'; import type { Maybe } from '../jsutils/Maybe'; type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; -type VariableUsage = { +interface VariableUsage { readonly node: VariableNode; readonly type: Maybe; readonly defaultValue: Maybe; -}; +} /** * An instance of this class is passed as the "this" context to all validators, From 63a1798572388880976c4ec57ae75ba81f8149ab Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 14:45:29 -0600 Subject: [PATCH 40/65] build: enable `@typescript-eslint/consistent-type-imports` --- .eslintrc.yml | 2 +- src/type/schema.ts | 7 ++----- src/validation/__tests__/harness.ts | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 093b4042fc..92da033c67 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -461,7 +461,7 @@ overrides: '@typescript-eslint/consistent-indexed-object-style': off # TODO enable after TS conversion '@typescript-eslint/consistent-type-assertions': off # TODO temporarily disable '@typescript-eslint/consistent-type-definitions': ['error', 'interface'] - '@typescript-eslint/consistent-type-imports': off # TODO enable after TS conversion + '@typescript-eslint/consistent-type-imports': error '@typescript-eslint/explicit-function-return-type': off # TODO consider '@typescript-eslint/explicit-member-accessibility': off # TODO consider '@typescript-eslint/explicit-module-boundary-types': off # TODO consider diff --git a/src/type/schema.ts b/src/type/schema.ts index ac6638c531..ae0f7eaeac 100644 --- a/src/type/schema.ts +++ b/src/type/schema.ts @@ -25,11 +25,8 @@ import type { GraphQLInterfaceType, } from './definition'; import { __Schema } from './introspection'; -import { - GraphQLDirective, - isDirective, - specifiedDirectives, -} from './directives'; +import type { GraphQLDirective } from './directives'; +import { isDirective, specifiedDirectives } from './directives'; import { isObjectType, isInterfaceType, diff --git a/src/validation/__tests__/harness.ts b/src/validation/__tests__/harness.ts index 102f5049d9..711ea91a6e 100644 --- a/src/validation/__tests__/harness.ts +++ b/src/validation/__tests__/harness.ts @@ -4,7 +4,7 @@ import type { Maybe } from '../../jsutils/Maybe'; import { parse } from '../../language/parser'; -import { GraphQLSchema } from '../../type/schema'; +import type { GraphQLSchema } from '../../type/schema'; import { buildSchema } from '../../utilities/buildASTSchema'; From d490f3d21abf396270bc7183c85e89d93547e66c Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:38:07 -0600 Subject: [PATCH 41/65] match `.d.ts` definition --- src/execution/execute.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 26df836155..084babf471 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -112,16 +112,24 @@ export interface ExecutionContext { * - `data` is the result of a successful execution of the query. * - `extensions` is reserved for adding non-standard properties. */ -export interface ExecutionResult { +export interface ExecutionResult< + TData = { [key: string]: any }, + TExtensions = { [key: string]: any } +> { errors?: ReadonlyArray; - data?: ObjMap | null; - extensions?: ObjMap; + // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229 + data?: TData | null; + extensions?: TExtensions; } -export interface FormattedExecutionResult { +export interface FormattedExecutionResult< + TData = { [key: string]: any }, + TExtensions = { [key: string]: any } +> { errors?: ReadonlyArray; - data?: ObjMap | null; - extensions?: ObjMap; + // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229 + data?: TData | null; + extensions?: TExtensions; } export interface ExecutionArgs { From 1d9a8f993ed7fbc668924b08a71ab0bc48c6f182 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 21:17:03 -0600 Subject: [PATCH 42/65] fix: TS2355 function whose declared type is neither 'void' nor 'any' must return a value Co-Authored-By: Kamil Kisiela --- src/execution/execute.ts | 2 +- src/utilities/valueFromASTUntyped.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 084babf471..74c921ec0b 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -239,7 +239,7 @@ export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, -): undefined { +) { devAssert(document, 'Must provide document.'); // If the schema used for execution is invalid, throw an error. diff --git a/src/utilities/valueFromASTUntyped.ts b/src/utilities/valueFromASTUntyped.ts index 75461215c1..f543ab8de0 100644 --- a/src/utilities/valueFromASTUntyped.ts +++ b/src/utilities/valueFromASTUntyped.ts @@ -53,5 +53,5 @@ export function valueFromASTUntyped( } // istanbul ignore next (Not reachable. All possible value nodes have been considered) - invariant(false, 'Unexpected value node: ' + inspect(valueNode as never)); + invariant(false, 'Unexpected value node: ' + inspect(valueNode)); } From 99e029f9e6eaafdd7a06e45b7dac13b17e68af6e Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:47:17 -0600 Subject: [PATCH 43/65] convert ObjMap to use Record Co-Authored-By: Kamil Kisiela --- src/jsutils/ObjMap.ts | 16 +++++----------- src/type/definition.ts | 12 ++++-------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/jsutils/ObjMap.ts b/src/jsutils/ObjMap.ts index f76b1399d3..29f31fae66 100644 --- a/src/jsutils/ObjMap.ts +++ b/src/jsutils/ObjMap.ts @@ -1,13 +1,7 @@ -export interface ObjMap { - [key: string]: T; - __proto__: null; -} -export type ObjMapLike = ObjMap | { [key: string]: T }; +export type ObjMap = Record; +export type ObjMapLike = ObjMap | Record; -export interface ReadOnlyObjMap { - readonly [key: string]: T; - __proto__: null; -} +export type ReadOnlyObjMap = Readonly>; export type ReadOnlyObjMapLike = - | ReadOnlyObjMap - | { readonly [key: string]: T }; + | Readonly> + | ReadOnlyObjMap; diff --git a/src/type/definition.ts b/src/type/definition.ts index 7cb52a87f6..185f34b772 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -886,7 +886,7 @@ export type GraphQLIsTypeOfFn = ( export type GraphQLFieldResolver< TSource, TContext, - TArgs = { [argument: string]: any } + TArgs = Record > = ( source: TSource, args: TArgs, @@ -904,13 +904,13 @@ export interface GraphQLResolveInfo { readonly fragments: ObjMap; readonly rootValue: unknown; readonly operation: OperationDefinitionNode; - readonly variableValues: { [variable: string]: unknown }; + readonly variableValues: Record; } export interface GraphQLFieldConfig< TSource, TContext, - TArgs = { [argument: string]: any } + TArgs = Record > { description?: Maybe; type: GraphQLOutputType; @@ -937,11 +937,7 @@ export type GraphQLFieldConfigMap = ObjMap< GraphQLFieldConfig >; -export interface GraphQLField< - TSource, - TContext, - TArgs = { [argument: string]: any } -> { +export interface GraphQLField> { name: string; description: Maybe; type: GraphQLOutputType; From 462d04d7aaccce5ed15566d998fac953711f467e Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:48:34 -0600 Subject: [PATCH 44/65] refactor: CoercedVariableValues type into union of interfaces Co-Authored-By: Kamil Kisiela --- src/execution/values.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/execution/values.ts b/src/execution/values.ts index ddde0e0b14..b72bdefa93 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -23,9 +23,16 @@ import { valueFromAST } from '../utilities/valueFromAST'; import { coerceInputValue } from '../utilities/coerceInputValue'; import type { Maybe } from '../jsutils/Maybe'; +export interface CoercedVariableValuesErrors { + errors: ReadonlyArray; +} +export interface CoercedVariableValuesData { + coerced: Record; +} + type CoercedVariableValues = - | { errors: ReadonlyArray } - | { coerced: { [variable: string]: unknown } }; + | CoercedVariableValuesData + | CoercedVariableValuesErrors; /** * Prepares an object map of variableValues of the correct type based on the From 89861c54f780d6e4f2639fd49918524447bd995b Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:49:41 -0600 Subject: [PATCH 45/65] refactor: convert to use `Record` Co-Authored-By: Kamil Kisiela --- src/__tests__/starWarsData.ts | 4 ++-- src/error/GraphQLError.ts | 4 ++-- src/error/formatError.ts | 2 +- src/execution/__tests__/variables-test.ts | 5 +---- src/execution/execute.ts | 16 ++++++++-------- src/execution/values.ts | 8 ++++---- src/graphql.ts | 2 +- src/subscription/subscribe.ts | 2 +- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/__tests__/starWarsData.ts b/src/__tests__/starWarsData.ts index 04cd648546..ba7b1895e2 100644 --- a/src/__tests__/starWarsData.ts +++ b/src/__tests__/starWarsData.ts @@ -78,7 +78,7 @@ const tarkin: Human = { appearsIn: [4], }; -const humanData: { [id: string]: Human } = { +const humanData: Record = { [luke.id]: luke, [vader.id]: vader, [han.id]: han, @@ -104,7 +104,7 @@ const artoo: Droid = { primaryFunction: 'Astromech', }; -const droidData: { [id: string]: Droid } = { +const droidData: Record = { [threepio.id]: threepio, [artoo.id]: artoo, }; diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 2fd1ca6989..668be45a8e 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -70,7 +70,7 @@ export class GraphQLError extends Error { /** * Extension fields to add to the formatted error. */ - readonly extensions: { [key: string]: unknown } | undefined; + readonly extensions: Record | undefined; constructor( message: string, @@ -79,7 +79,7 @@ export class GraphQLError extends Error { positions?: Maybe>, path?: Maybe>, originalError?: Maybe, - extensions?: Maybe<{ [key: string]: unknown }>, + extensions?: Maybe>, ) { super(message); diff --git a/src/error/formatError.ts b/src/error/formatError.ts index a13b87ed09..258b825259 100644 --- a/src/error/formatError.ts +++ b/src/error/formatError.ts @@ -46,5 +46,5 @@ export interface GraphQLFormattedError { * Reserved for implementors to extend the protocol however they see fit, * and hence there are no additional restrictions on its contents. */ - readonly extensions?: { [key: string]: unknown }; + readonly extensions?: Record; } diff --git a/src/execution/__tests__/variables-test.ts b/src/execution/__tests__/variables-test.ts index ad71465568..a2d87e96bb 100644 --- a/src/execution/__tests__/variables-test.ts +++ b/src/execution/__tests__/variables-test.ts @@ -117,10 +117,7 @@ const TestType = new GraphQLObjectType({ const schema = new GraphQLSchema({ query: TestType }); -function executeQuery( - query: string, - variableValues?: { [variable: string]: unknown }, -) { +function executeQuery(query: string, variableValues?: Record) { const document = parse(query); return executeSync({ schema, document, variableValues }); } diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 74c921ec0b..e3e48db1ac 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -99,7 +99,7 @@ export interface ExecutionContext { rootValue: unknown; contextValue: unknown; operation: OperationDefinitionNode; - variableValues: { [variable: string]: unknown }; + variableValues: Record; fieldResolver: GraphQLFieldResolver; typeResolver: GraphQLTypeResolver; errors: Array; @@ -113,8 +113,8 @@ export interface ExecutionContext { * - `extensions` is reserved for adding non-standard properties. */ export interface ExecutionResult< - TData = { [key: string]: any }, - TExtensions = { [key: string]: any } + TData = Record, + TExtensions = Record > { errors?: ReadonlyArray; // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229 @@ -123,8 +123,8 @@ export interface ExecutionResult< } export interface FormattedExecutionResult< - TData = { [key: string]: any }, - TExtensions = { [key: string]: any } + TData = Record, + TExtensions = Record > { errors?: ReadonlyArray; // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229 @@ -137,7 +137,7 @@ export interface ExecutionArgs { document: DocumentNode; rootValue?: unknown; contextValue?: unknown; - variableValues?: Maybe<{ readonly [variable: string]: unknown }>; + variableValues?: Maybe>>; operationName?: Maybe; fieldResolver?: Maybe>; typeResolver?: Maybe>; @@ -238,7 +238,7 @@ function buildResponse( export function assertValidExecutionArguments( schema: GraphQLSchema, document: DocumentNode, - rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, + rawVariableValues: Maybe>>, ) { devAssert(document, 'Must provide document.'); @@ -265,7 +265,7 @@ export function buildExecutionContext( document: DocumentNode, rootValue: unknown, contextValue: unknown, - rawVariableValues: Maybe<{ readonly [variable: string]: unknown }>, + rawVariableValues: Maybe>>, operationName: Maybe, fieldResolver: Maybe>, typeResolver?: Maybe>, diff --git a/src/execution/values.ts b/src/execution/values.ts index b72bdefa93..e38802ea90 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -81,9 +81,9 @@ export function getVariableValues( function coerceVariableValues( schema: GraphQLSchema, varDefNodes: ReadonlyArray, - inputs: { readonly [variable: string]: unknown }, + inputs: Readonly>, onError: (GraphQLError) => void, -): { [variable: string]: unknown } { +): Record { const coercedValues = {}; for (const varDefNode of varDefNodes) { const varName = varDefNode.variable.name.value; @@ -168,7 +168,7 @@ export function getArgumentValues( def: GraphQLField | GraphQLDirective, node: FieldNode | DirectiveNode, variableValues?: Maybe>, -): { [argument: string]: unknown } { +): Record { const coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') @@ -254,7 +254,7 @@ export function getDirectiveValues( directiveDef: GraphQLDirective, node: { readonly directives?: ReadonlyArray }, variableValues?: Maybe>, -): undefined | { [argument: string]: unknown } { +): Record | undefined { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') const directiveNode = node.directives?.find( (directive) => directive.name.value === directiveDef.name, diff --git a/src/graphql.ts b/src/graphql.ts index 430588f8e4..6023486567 100644 --- a/src/graphql.ts +++ b/src/graphql.ts @@ -61,7 +61,7 @@ export interface GraphQLArgs { source: string | Source; rootValue?: unknown; contextValue?: unknown; - variableValues?: Maybe<{ readonly [variable: string]: unknown }>; + variableValues?: Maybe>>; operationName?: Maybe; fieldResolver?: Maybe>; typeResolver?: Maybe>; diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index e3ac542a97..5f4344c989 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -141,7 +141,7 @@ export async function createSourceEventStream( document: DocumentNode, rootValue?: unknown, contextValue?: unknown, - variableValues?: Maybe<{ readonly [variable: string]: unknown }>, + variableValues?: Maybe>>, operationName?: Maybe, fieldResolver?: Maybe>, ): Promise | ExecutionResult> { From 59971b9304256924ea40c88a67bbfe8cb2523772 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:55:51 -0600 Subject: [PATCH 46/65] refactor: ensureArray func to return proper typed values Co-Authored-By: Kamil Kisiela --- src/error/GraphQLError.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 668be45a8e..caf62bee9e 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -7,6 +7,18 @@ import type { SourceLocation } from '../language/location'; import { getLocation } from '../language/location'; import { printLocation, printSourceLocation } from '../language/printLocation'; +function ensureArray( + nodes: ReadonlyArray | T | null | undefined, +): ReadonlyArray | undefined { + return Array.isArray(nodes) + ? nodes.length !== 0 + ? nodes + : undefined + : nodes + ? ([nodes] as ReadonlyArray) + : undefined; +} + /** * A GraphQLError describes an Error found during the parse, validate, or * execute phases of performing a GraphQL operation. In addition to a message @@ -84,13 +96,7 @@ export class GraphQLError extends Error { super(message); // Compute list of blame nodes. - const _nodes = Array.isArray(nodes) - ? nodes.length !== 0 - ? nodes - : undefined - : nodes - ? [nodes] - : undefined; + const _nodes = ensureArray(nodes); // Compute locations in the source for the given nodes/positions. let _source = source; From d7f9f69d221345d548af57240d8d5b9c4a49d758 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Feb 2021 22:57:23 -0600 Subject: [PATCH 47/65] feat: typecast to ensure type safety Co-Authored-By: Kamil Kisiela --- src/error/GraphQLError.ts | 2 +- src/error/__tests__/GraphQLError-test.ts | 10 +++++++--- src/error/locatedError.ts | 2 +- src/execution/__tests__/executor-test.ts | 3 ++- src/execution/__tests__/variables-test.ts | 3 ++- src/execution/execute.ts | 4 +++- src/jsutils/__tests__/inspect-test.ts | 2 +- src/jsutils/__tests__/isIteratableObject-test.ts | 2 +- src/jsutils/isPromise.ts | 2 +- src/language/__tests__/printer-test.ts | 6 +++++- src/language/__tests__/schema-printer-test.ts | 3 ++- src/language/__tests__/visitor-test.ts | 4 ++-- src/language/ast.ts | 2 +- src/language/kinds.ts | 2 +- src/language/printLocation.ts | 4 +++- src/language/tokenKind.ts | 2 +- src/type/validate.ts | 11 ++++++----- src/utilities/__tests__/TypeInfo-test.ts | 3 ++- src/utilities/__tests__/coerceInputValue-test.ts | 2 +- .../__tests__/getOperationRootType-test.ts | 14 +++++++++----- src/utilities/extendSchema.ts | 11 ++++------- src/utilities/lexicographicSortSchema.ts | 6 +++--- src/utilities/separateOperations.ts | 2 +- src/validation/rules/KnownDirectivesRule.ts | 4 ++-- .../rules/ProvidedRequiredArgumentsRule.ts | 4 ++-- .../rules/UniqueDirectivesPerLocationRule.ts | 7 +++++-- 26 files changed, 69 insertions(+), 48 deletions(-) diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index caf62bee9e..1b999f2a9d 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -117,7 +117,7 @@ export class GraphQLError extends Error { _positions = undefined; } - let _locations; + let _locations: Array; if (positions && source) { _locations = positions.map((pos) => getLocation(source, pos)); } else if (_nodes) { diff --git a/src/error/__tests__/GraphQLError-test.ts b/src/error/__tests__/GraphQLError-test.ts index be349ddaba..15503f662c 100644 --- a/src/error/__tests__/GraphQLError-test.ts +++ b/src/error/__tests__/GraphQLError-test.ts @@ -8,6 +8,10 @@ import { invariant } from '../../jsutils/invariant'; import { Kind } from '../../language/kinds'; import { parse } from '../../language/parser'; import { Source } from '../../language/source'; +import type { + ObjectTypeDefinitionNode, + OperationDefinitionNode, +} from '../../language/ast'; import { GraphQLError, printError } from '../GraphQLError'; @@ -17,7 +21,7 @@ const source = new Source(dedent` } `); const ast = parse(source); -const operationNode = ast.definitions[0]; +const operationNode = ast.definitions[0] as OperationDefinitionNode; invariant(operationNode.kind === Kind.OPERATION_DEFINITION); const fieldNode = operationNode.selectionSet.selections[0]; invariant(fieldNode); @@ -159,7 +163,7 @@ describe('printError', () => { 'SourceA', ), ); - const opA = docA.definitions[0]; + const opA = docA.definitions[0] as ObjectTypeDefinitionNode; invariant(opA.kind === Kind.OBJECT_TYPE_DEFINITION && opA.fields); const fieldA = opA.fields[0]; @@ -173,7 +177,7 @@ describe('printError', () => { 'SourceB', ), ); - const opB = docB.definitions[0]; + const opB = docB.definitions[0] as ObjectTypeDefinitionNode; invariant(opB.kind === Kind.OBJECT_TYPE_DEFINITION && opB.fields); const fieldB = opB.fields[0]; diff --git a/src/error/locatedError.ts b/src/error/locatedError.ts index 89a1d00b76..f6cd4baa68 100644 --- a/src/error/locatedError.ts +++ b/src/error/locatedError.ts @@ -22,7 +22,7 @@ export function locatedError( : new Error('Unexpected error value: ' + inspect(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts. - if (Array.isArray(originalError.path)) { + if (Array.isArray((originalError as any).path)) { return originalError as any; } diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index 67e81845e5..da9f4f9ef1 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -6,6 +6,7 @@ import { invariant } from '../../jsutils/invariant'; import { Kind } from '../../language/kinds'; import { parse } from '../../language/parser'; +import type { OperationDefinitionNode } from '../../language/ast'; import { GraphQLSchema } from '../../type/schema'; import { GraphQLInt, GraphQLBoolean, GraphQLString } from '../../type/scalars'; @@ -259,7 +260,7 @@ describe('Execute: Handles basic execution tasks', () => { 'variableValues', ); - const operation = document.definitions[0]; + const operation = document.definitions[0] as OperationDefinitionNode; invariant(operation.kind === Kind.OPERATION_DEFINITION); expect(resolvedInfo).to.include({ diff --git a/src/execution/__tests__/variables-test.ts b/src/execution/__tests__/variables-test.ts index a2d87e96bb..e47b492c03 100644 --- a/src/execution/__tests__/variables-test.ts +++ b/src/execution/__tests__/variables-test.ts @@ -6,6 +6,7 @@ import { invariant } from '../../jsutils/invariant'; import { Kind } from '../../language/kinds'; import { parse } from '../../language/parser'; +import type { OperationDefinitionNode } from '../../language/ast'; import type { GraphQLArgumentConfig } from '../../type/definition'; import { GraphQLSchema } from '../../type/schema'; @@ -1004,7 +1005,7 @@ describe('Execute: Handles inputs', () => { } `); - const operation = doc.definitions[0]; + const operation = doc.definitions[0] as OperationDefinitionNode; invariant(operation.kind === Kind.OPERATION_DEFINITION); const { variableDefinitions } = operation; invariant(variableDefinitions != null); diff --git a/src/execution/execute.ts b/src/execution/execute.ts index e3e48db1ac..2b2643f103 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -61,6 +61,7 @@ import { import { typeFromAST } from '../utilities/typeFromAST'; import { getOperationRootType } from '../utilities/getOperationRootType'; +import type { CoercedVariableValuesData } from './values'; import { getVariableValues, getArgumentValues, @@ -322,7 +323,8 @@ export function buildExecutionContext( rootValue, contextValue, operation, - variableValues: coercedVariableValues.coerced, + variableValues: (coercedVariableValues as CoercedVariableValuesData) + .coerced, fieldResolver: fieldResolver ?? defaultFieldResolver, typeResolver: typeResolver ?? defaultTypeResolver, errors: [], diff --git a/src/jsutils/__tests__/inspect-test.ts b/src/jsutils/__tests__/inspect-test.ts index 14241f474a..0b32c01f2b 100644 --- a/src/jsutils/__tests__/inspect-test.ts +++ b/src/jsutils/__tests__/inspect-test.ts @@ -124,7 +124,7 @@ describe('inspect', () => { }); it('detect circular objects', () => { - const obj = {}; + const obj: any = {}; obj.self = obj; obj.deepSelf = { self: obj }; diff --git a/src/jsutils/__tests__/isIteratableObject-test.ts b/src/jsutils/__tests__/isIteratableObject-test.ts index 828e3ada56..0ce9091243 100644 --- a/src/jsutils/__tests__/isIteratableObject-test.ts +++ b/src/jsutils/__tests__/isIteratableObject-test.ts @@ -60,7 +60,7 @@ describe('isIteratableObject', () => { }; expect(isIteratableObject(invalidIteratable)).to.equal(false); - const arrayLike = {}; + const arrayLike: Record = {}; arrayLike[0] = 'Alpha'; arrayLike[1] = 'Bravo'; arrayLike[2] = 'Charlie'; diff --git a/src/jsutils/isPromise.ts b/src/jsutils/isPromise.ts index 94e93e24ec..4d7887887e 100644 --- a/src/jsutils/isPromise.ts +++ b/src/jsutils/isPromise.ts @@ -3,5 +3,5 @@ * otherwise returns false. */ export function isPromise(value: unknown): value is Promise { - return typeof value?.then === 'function'; + return typeof (value as any)?.then === 'function'; } diff --git a/src/language/__tests__/printer-test.ts b/src/language/__tests__/printer-test.ts index c72e78e8c7..fcb8b06039 100644 --- a/src/language/__tests__/printer-test.ts +++ b/src/language/__tests__/printer-test.ts @@ -3,13 +3,17 @@ import { describe, it } from 'mocha'; import { dedent, dedentString } from '../../__testUtils__/dedent'; import { kitchenSinkQuery } from '../../__testUtils__/kitchenSinkQuery'; +import type { FieldNode } from '../ast'; import { parse } from '../parser'; import { print } from '../printer'; describe('Printer: Query document', () => { it('prints minimal ast', () => { - const ast = { kind: 'Field', name: { kind: 'Name', value: 'foo' } }; + const ast: FieldNode = { + kind: 'Field', + name: { kind: 'Name', value: 'foo' }, + }; expect(print(ast)).to.equal('foo'); }); diff --git a/src/language/__tests__/schema-printer-test.ts b/src/language/__tests__/schema-printer-test.ts index 0250e57be7..2e01d11d25 100644 --- a/src/language/__tests__/schema-printer-test.ts +++ b/src/language/__tests__/schema-printer-test.ts @@ -3,13 +3,14 @@ import { describe, it } from 'mocha'; import { dedent } from '../../__testUtils__/dedent'; import { kitchenSinkSDL } from '../../__testUtils__/kitchenSinkSDL'; +import type { ScalarTypeDefinitionNode } from '../ast'; import { parse } from '../parser'; import { print } from '../printer'; describe('Printer: SDL document', () => { it('prints minimal ast', () => { - const ast = { + const ast: ScalarTypeDefinitionNode = { kind: 'ScalarTypeDefinition', name: { kind: 'Name', value: 'foo' }, }; diff --git a/src/language/__tests__/visitor-test.ts b/src/language/__tests__/visitor-test.ts index 1f7455cbda..76d7d5a2ae 100644 --- a/src/language/__tests__/visitor-test.ts +++ b/src/language/__tests__/visitor-test.ts @@ -517,7 +517,7 @@ describe('Visitor', () => { const argsStack = []; visit(ast, { - enter(node, key, parent) { + enter(node, key, parent: any) { visited.push([ 'enter', node.kind, @@ -529,7 +529,7 @@ describe('Visitor', () => { argsStack.push([...arguments]); }, - leave(node, key, parent) { + leave(node, key, parent: any) { visited.push([ 'leave', node.kind, diff --git a/src/language/ast.ts b/src/language/ast.ts index 2b70ac7cba..538287c9d9 100644 --- a/src/language/ast.ts +++ b/src/language/ast.ts @@ -125,7 +125,7 @@ export class Token { * @internal */ export function isNode(maybeNode: unknown): maybeNode is ASTNode { - return maybeNode != null && typeof maybeNode.kind === 'string'; + return maybeNode != null && typeof (maybeNode as any).kind === 'string'; } /** diff --git a/src/language/kinds.ts b/src/language/kinds.ts index 7e181c7e7b..4c918ec447 100644 --- a/src/language/kinds.ts +++ b/src/language/kinds.ts @@ -66,7 +66,7 @@ export const Kind = Object.freeze({ UNION_TYPE_EXTENSION: 'UnionTypeExtension', ENUM_TYPE_EXTENSION: 'EnumTypeExtension', INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension', -}); +} as const); /** * The enum type representing the possible kind values of AST nodes. diff --git a/src/language/printLocation.ts b/src/language/printLocation.ts index faa9fda6b2..29dfefa03b 100644 --- a/src/language/printLocation.ts +++ b/src/language/printLocation.ts @@ -47,7 +47,9 @@ export function printSourceLocation( locationStr + printPrefixedLines([ [`${lineNum} |`, subLines[0]], - ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]), + ...subLines + .slice(1, subLineIndex + 1) + .map<[string, string]>((subLine) => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)], ['|', subLines[subLineIndex + 1]], ]) diff --git a/src/language/tokenKind.ts b/src/language/tokenKind.ts index 18efb8561c..10e1e66a80 100644 --- a/src/language/tokenKind.ts +++ b/src/language/tokenKind.ts @@ -25,7 +25,7 @@ export const TokenKind = Object.freeze({ STRING: 'String', BLOCK_STRING: 'BlockString', COMMENT: 'Comment', -}); +} as const); /** * The enum type representing the token kinds values. diff --git a/src/type/validate.ts b/src/type/validate.ts index e51173af5d..7fae27786f 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -117,7 +117,7 @@ function validateRootTypes(context: SchemaValidationContext): void { `Query root type must be Object type, it cannot be ${inspect( queryType, )}.`, - getOperationTypeNode(schema, 'query') ?? queryType.astNode, + getOperationTypeNode(schema, 'query') ?? (queryType as any).astNode, ); } @@ -126,7 +126,7 @@ function validateRootTypes(context: SchemaValidationContext): void { context.reportError( 'Mutation root type must be Object type if provided, it cannot be ' + `${inspect(mutationType)}.`, - getOperationTypeNode(schema, 'mutation') ?? mutationType.astNode, + getOperationTypeNode(schema, 'mutation') ?? (mutationType as any).astNode, ); } @@ -135,7 +135,8 @@ function validateRootTypes(context: SchemaValidationContext): void { context.reportError( 'Subscription root type must be Object type if provided, it cannot be ' + `${inspect(subscriptionType)}.`, - getOperationTypeNode(schema, 'subscription') ?? subscriptionType.astNode, + getOperationTypeNode(schema, 'subscription') ?? + (subscriptionType as any).astNode, ); } } @@ -157,7 +158,7 @@ function validateDirectives(context: SchemaValidationContext): void { if (!isDirective(directive)) { context.reportError( `Expected directive but got: ${inspect(directive)}.`, - directive?.astNode, + (directive as any)?.astNode, ); continue; } @@ -216,7 +217,7 @@ function validateTypes(context: SchemaValidationContext): void { if (!isNamedType(type)) { context.reportError( `Expected GraphQL named type but got: ${inspect(type)}.`, - type.astNode, + (type as any).astNode, ); continue; } diff --git a/src/utilities/__tests__/TypeInfo-test.ts b/src/utilities/__tests__/TypeInfo-test.ts index 7650032153..ff19a287c2 100644 --- a/src/utilities/__tests__/TypeInfo-test.ts +++ b/src/utilities/__tests__/TypeInfo-test.ts @@ -6,6 +6,7 @@ import { invariant } from '../../jsutils/invariant'; import { parse, parseValue } from '../../language/parser'; import { print } from '../../language/printer'; import { visit } from '../../language/visitor'; +import type { OperationDefinitionNode } from '../../language/ast'; import { getNamedType, isCompositeType } from '../../type/definition'; @@ -360,7 +361,7 @@ describe('visitWithTypeInfo', () => { const typeInfo = new TypeInfo(testSchema, humanType); const ast = parse('{ name, pets { name } }'); - const operationNode = ast.definitions[0]; + const operationNode = ast.definitions[0] as OperationDefinitionNode; invariant(operationNode.kind === 'OperationDefinition'); const visited = []; diff --git a/src/utilities/__tests__/coerceInputValue-test.ts b/src/utilities/__tests__/coerceInputValue-test.ts index df0e6b0c22..8e272d1a19 100644 --- a/src/utilities/__tests__/coerceInputValue-test.ts +++ b/src/utilities/__tests__/coerceInputValue-test.ts @@ -72,7 +72,7 @@ describe('coerceInputValue', () => { describe('for GraphQLScalar', () => { const TestScalar = new GraphQLScalarType({ name: 'TestScalar', - parseValue(input) { + parseValue(input: any) { invariant(typeof input === 'object' && input !== null); if (input.error != null) { throw new Error(input.error); diff --git a/src/utilities/__tests__/getOperationRootType-test.ts b/src/utilities/__tests__/getOperationRootType-test.ts index 606836efc8..065516c205 100644 --- a/src/utilities/__tests__/getOperationRootType-test.ts +++ b/src/utilities/__tests__/getOperationRootType-test.ts @@ -3,7 +3,11 @@ import { describe, it } from 'mocha'; import { invariant } from '../../jsutils/invariant'; -import type { DocumentNode } from '../../language/ast'; +import type { + DocumentNode, + OperationDefinitionNode, + SchemaDefinitionNode, +} from '../../language/ast'; import { Kind } from '../../language/kinds'; import { parse } from '../../language/parser'; @@ -35,7 +39,7 @@ const subscriptionType = new GraphQLObjectType({ }); function getOperationNode(doc: DocumentNode) { - const operationNode = doc.definitions[0]; + const operationNode = doc.definitions[0] as OperationDefinitionNode; invariant(operationNode && operationNode.kind === Kind.OPERATION_DEFINITION); return operationNode; } @@ -75,7 +79,7 @@ describe('getOperationRootType', () => { } `); - const schemaNode = doc.definitions[0]; + const schemaNode = doc.definitions[0] as SchemaDefinitionNode; invariant(schemaNode && schemaNode.kind === Kind.SCHEMA_DEFINITION); const [ queryNode, @@ -149,9 +153,9 @@ describe('getOperationRootType', () => { it('Throws when operation not a valid operation kind', () => { const testSchema = new GraphQLSchema({}); const doc = parse('{ field }'); - const operationNode = { + const operationNode: OperationDefinitionNode = { ...getOperationNode(doc), - operation: 'non_existent_operation', + operation: 'non_existent_operation' as any, }; expect(() => getOperationRootType(testSchema, operationNode)).to.throw( diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 837719d2d7..ffb6fc7c7d 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -217,12 +217,12 @@ export function extendSchemaImpl( function replaceType(type: T): T { if (isListType(type)) { - return new GraphQLList(replaceType(type.ofType)); + return new GraphQLList(replaceType(type.ofType)) as T; } if (isNonNullType(type)) { - return new GraphQLNonNull(replaceType(type.ofType)); + return new GraphQLNonNull(replaceType(type.ofType)) as T; } - return replaceNamedType(type); + return replaceNamedType(type) as T; } function replaceNamedType(type: T): T { @@ -667,10 +667,7 @@ export function extendSchemaImpl( } // istanbul ignore next (Not reachable. All possible type definition nodes have been considered) - invariant( - false, - 'Unexpected type definition node: ' + inspect(astNode as never), - ); + invariant(false, 'Unexpected type definition node: ' + inspect(astNode)); } } diff --git a/src/utilities/lexicographicSortSchema.ts b/src/utilities/lexicographicSortSchema.ts index 7c4f6e9c41..3b09a9f233 100644 --- a/src/utilities/lexicographicSortSchema.ts +++ b/src/utilities/lexicographicSortSchema.ts @@ -57,11 +57,11 @@ export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema { function replaceType(type: T): T { if (isListType(type)) { - return new GraphQLList(replaceType(type.ofType)); + return new GraphQLList(replaceType(type.ofType)) as T; } else if (isNonNullType(type)) { - return new GraphQLNonNull(replaceType(type.ofType)); + return new GraphQLNonNull(replaceType(type.ofType)) as T; } - return replaceNamedType(type); + return replaceNamedType(type as GraphQLNamedType) as T; } function replaceNamedType(type: T): T { diff --git a/src/utilities/separateOperations.ts b/src/utilities/separateOperations.ts index 5da3c1d1ea..6f33d4a234 100644 --- a/src/utilities/separateOperations.ts +++ b/src/utilities/separateOperations.ts @@ -38,7 +38,7 @@ export function separateOperations( // is necessary for completing that operation. const separatedDocumentASTs = Object.create(null); for (const operation of operations) { - const dependencies = new Set(); + const dependencies = new Set(); for (const fragmentName of collectDependencies(operation.selectionSet)) { collectTransitiveDependencies(dependencies, depGraph, fragmentName); diff --git a/src/validation/rules/KnownDirectivesRule.ts b/src/validation/rules/KnownDirectivesRule.ts index 04b98566ca..d8d4a70a29 100644 --- a/src/validation/rules/KnownDirectivesRule.ts +++ b/src/validation/rules/KnownDirectivesRule.ts @@ -70,7 +70,7 @@ export function KnownDirectivesRule( function getDirectiveLocationForASTPath( ancestors: ReadonlyArray>, ): DirectiveLocationEnum | undefined { - const appliedTo = ancestors[ancestors.length - 1]; + const appliedTo = ancestors[ancestors.length - 1] as ASTNode; invariant(!Array.isArray(appliedTo)); switch (appliedTo.kind) { @@ -112,7 +112,7 @@ function getDirectiveLocationForASTPath( case Kind.INPUT_OBJECT_TYPE_EXTENSION: return DirectiveLocation.INPUT_OBJECT; case Kind.INPUT_VALUE_DEFINITION: { - const parentNode = ancestors[ancestors.length - 3]; + const parentNode = ancestors[ancestors.length - 3] as ASTNode; return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? DirectiveLocation.INPUT_FIELD_DEFINITION : DirectiveLocation.ARGUMENT_DEFINITION; diff --git a/src/validation/rules/ProvidedRequiredArgumentsRule.ts b/src/validation/rules/ProvidedRequiredArgumentsRule.ts index 0ddc8f784d..58da5f67da 100644 --- a/src/validation/rules/ProvidedRequiredArgumentsRule.ts +++ b/src/validation/rules/ProvidedRequiredArgumentsRule.ts @@ -4,7 +4,7 @@ import { keyMap } from '../../jsutils/keyMap'; import { GraphQLError } from '../../error/GraphQLError'; import type { ASTVisitor } from '../../language/visitor'; -import type { InputValueDefinitionNode } from '../../language/ast'; +import type { FieldNode, InputValueDefinitionNode } from '../../language/ast'; import { Kind } from '../../language/kinds'; import { print } from '../../language/printer'; @@ -30,7 +30,7 @@ export function ProvidedRequiredArgumentsRule( ...ProvidedRequiredArgumentsOnDirectivesRule(context), Field: { // Validate on leave to allow for deeper errors to appear first. - leave(fieldNode) { + leave(fieldNode: FieldNode) { const fieldDef = context.getFieldDef(); if (!fieldDef) { return false; diff --git a/src/validation/rules/UniqueDirectivesPerLocationRule.ts b/src/validation/rules/UniqueDirectivesPerLocationRule.ts index a21c081790..b703eb3115 100644 --- a/src/validation/rules/UniqueDirectivesPerLocationRule.ts +++ b/src/validation/rules/UniqueDirectivesPerLocationRule.ts @@ -6,6 +6,7 @@ import { isTypeDefinitionNode, isTypeExtensionNode, } from '../../language/predicates'; +import type { DirectiveNode } from '../../language/ast'; import { specifiedDirectives } from '../../type/directives'; @@ -48,7 +49,7 @@ export function UniqueDirectivesPerLocationRule( // them all, just listen for entering any node, and check to see if it // defines any directives. enter(node) { - if (node.directives == null) { + if ((node as any).directives == null) { return; } @@ -68,7 +69,9 @@ export function UniqueDirectivesPerLocationRule( seenDirectives = Object.create(null); } - for (const directive of node.directives) { + for (const directive of (node as { + readonly directives?: ReadonlyArray; + }).directives) { const directiveName = directive.name.value; if (uniqueDirectiveMap[directiveName]) { From 58185c66e90ada577d3b530d948b3ef7c90adf05 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 11:04:51 -0600 Subject: [PATCH 48/65] feat: type guard isObjectLike to `Record` Co-Authored-By: Kamil Kisiela --- src/jsutils/isObjectLike.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsutils/isObjectLike.ts b/src/jsutils/isObjectLike.ts index d217187562..dd59576eb0 100644 --- a/src/jsutils/isObjectLike.ts +++ b/src/jsutils/isObjectLike.ts @@ -2,6 +2,6 @@ * Return true if `value` is object-like. A value is object-like if it's not * `null` and has a `typeof` result of "object". */ -export function isObjectLike(value: unknown): value is object { +export function isObjectLike(value: unknown): value is Record { return typeof value == 'object' && value !== null; } From a43cbd059a2e2b66bfa90de632765c692ecbb43e Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 11:21:43 -0600 Subject: [PATCH 49/65] test: use `@ts-expect-error` Co-Authored-By: Kamil Kisiela --- src/error/__tests__/formatError-test.ts | 1 + src/execution/__tests__/executor-test.ts | 3 ++ src/jsutils/__tests__/identityFunc-test.ts | 1 + src/language/__tests__/printer-test.ts | 1 + src/language/__tests__/schema-printer-test.ts | 1 + src/language/__tests__/source-test.ts | 2 ++ src/language/__tests__/visitor-test.ts | 1 + src/subscription/__tests__/subscribe-test.ts | 3 ++ src/type/__tests__/definition-test.ts | 36 +++++++++++++++++++ src/type/__tests__/directive-test.ts | 4 +++ src/type/__tests__/enumType-test.ts | 1 + src/type/__tests__/schema-test.ts | 4 +++ src/type/__tests__/validation-test.ts | 11 ++++++ .../__tests__/assertValidName-test.ts | 1 + .../__tests__/buildASTSchema-test.ts | 1 + .../__tests__/buildClientSchema-test.ts | 1 + src/utilities/__tests__/extendSchema-test.ts | 1 + 17 files changed, 73 insertions(+) diff --git a/src/error/__tests__/formatError-test.ts b/src/error/__tests__/formatError-test.ts index 0a6dc012a6..d618f8d2d0 100644 --- a/src/error/__tests__/formatError-test.ts +++ b/src/error/__tests__/formatError-test.ts @@ -6,6 +6,7 @@ import { GraphQLError } from '../GraphQLError'; describe('formatError: default error formatter', () => { it('uses default message', () => { + // @ts-expect-error const e = new GraphQLError(); expect(formatError(e)).to.deep.equal({ diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index da9f4f9ef1..bf77eb162f 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -32,12 +32,14 @@ describe('Execute: Handles basic execution tasks', () => { }), }); + // @ts-expect-error expect(() => executeSync({ schema })).to.throw('Must provide document.'); }); it('throws if no schema is provided', () => { const document = parse('{ field }'); + // @ts-expect-error expect(() => executeSync({ document })).to.throw( 'Expected undefined to be a GraphQL schema.', ); @@ -62,6 +64,7 @@ describe('Execute: Handles basic execution tasks', () => { `); const variableValues = '{ "a": 1 }'; + // @ts-expect-error expect(() => executeSync({ schema, document, variableValues })).to.throw( 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.', ); diff --git a/src/jsutils/__tests__/identityFunc-test.ts b/src/jsutils/__tests__/identityFunc-test.ts index 82a6c914d8..3e4683b665 100644 --- a/src/jsutils/__tests__/identityFunc-test.ts +++ b/src/jsutils/__tests__/identityFunc-test.ts @@ -5,6 +5,7 @@ import { identityFunc } from '../identityFunc'; describe('identityFunc', () => { it('returns the first argument it receives', () => { + // @ts-expect-error expect(identityFunc()).to.equal(undefined); expect(identityFunc(undefined)).to.equal(undefined); expect(identityFunc(null)).to.equal(null); diff --git a/src/language/__tests__/printer-test.ts b/src/language/__tests__/printer-test.ts index fcb8b06039..316adb1a53 100644 --- a/src/language/__tests__/printer-test.ts +++ b/src/language/__tests__/printer-test.ts @@ -20,6 +20,7 @@ describe('Printer: Query document', () => { it('produces helpful error messages', () => { const badAST = { random: 'Data' }; + // @ts-expect-error expect(() => print(badAST)).to.throw( 'Invalid AST Node: { random: "Data" }.', ); diff --git a/src/language/__tests__/schema-printer-test.ts b/src/language/__tests__/schema-printer-test.ts index 2e01d11d25..c03fcb8b39 100644 --- a/src/language/__tests__/schema-printer-test.ts +++ b/src/language/__tests__/schema-printer-test.ts @@ -20,6 +20,7 @@ describe('Printer: SDL document', () => { it('produces helpful error messages', () => { const badAST = { random: 'Data' }; + // @ts-expect-error expect(() => print(badAST)).to.throw( 'Invalid AST Node: { random: "Data" }.', ); diff --git a/src/language/__tests__/source-test.ts b/src/language/__tests__/source-test.ts index 9e1b69dc81..6bf8a93e6d 100644 --- a/src/language/__tests__/source-test.ts +++ b/src/language/__tests__/source-test.ts @@ -5,12 +5,14 @@ import { Source } from '../source'; describe('Source', () => { it('asserts that a body was provided', () => { + // @ts-expect-error expect(() => new Source()).to.throw( 'Body must be a string. Received: undefined.', ); }); it('asserts that a valid body was provided', () => { + // @ts-expect-error expect(() => new Source({})).to.throw( 'Body must be a string. Received: {}.', ); diff --git a/src/language/__tests__/visitor-test.ts b/src/language/__tests__/visitor-test.ts index 76d7d5a2ae..6d20b9b2ba 100644 --- a/src/language/__tests__/visitor-test.ts +++ b/src/language/__tests__/visitor-test.ts @@ -263,6 +263,7 @@ describe('Visitor', () => { if (node.kind === 'Field' && node.name.value === 'a') { return { kind: 'Field', + // @ts-expect-error selectionSet: [addedField].concat(node.selectionSet), }; } diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 640c8b0b02..59900382b5 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -305,6 +305,7 @@ describe('Subscription Initialization Phase', () => { ); await expectPromiseToThrow( + // @ts-expect-error () => subscribe({ document }), 'Expected undefined to be a GraphQL schema.', ); @@ -317,6 +318,7 @@ describe('Subscription Initialization Phase', () => { ); await expectPromiseToThrow( + // @ts-expect-error () => subscribe({ schema: emailSchema }), 'Must provide document.', ); @@ -345,6 +347,7 @@ describe('Subscription Initialization Phase', () => { it('should pass through unexpected errors thrown in subscribe', async () => { let expectedError; try { + // @ts-expect-error await subscribe({ schema: emailSchema, document: {} }); } catch (error) { expectedError = error; diff --git a/src/type/__tests__/definition-test.ts b/src/type/__tests__/definition-test.ts index c345a853ea..95080e3ca6 100644 --- a/src/type/__tests__/definition-test.ts +++ b/src/type/__tests__/definition-test.ts @@ -83,9 +83,11 @@ describe('Type System: Scalars', () => { }, }); + // @ts-expect-error expect(scalar.parseLiteral(parseValue('null'))).to.equal( 'parseValue: null', ); + // @ts-expect-error expect(scalar.parseLiteral(parseValue('{ foo: "bar" }'))).to.equal( 'parseValue: { foo: "bar" }', ); @@ -95,6 +97,7 @@ describe('Type System: Scalars', () => { }); it('rejects a Scalar type without name', () => { + // @ts-expect-error expect(() => new GraphQLScalarType({})).to.throw('Must provide name.'); }); @@ -103,6 +106,7 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', + // @ts-expect-error serialize: {}, }), ).to.throw( @@ -127,7 +131,9 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', + // @ts-expect-error parseValue: {}, + // @ts-expect-error parseLiteral: {}, }), ).to.throw( @@ -140,6 +146,7 @@ describe('Type System: Scalars', () => { () => new GraphQLScalarType({ name: 'SomeScalar', + // @ts-expect-error specifiedByUrl: {}, }), ).to.throw( @@ -320,6 +327,7 @@ describe('Type System: Objects', () => { }); it('rejects an Object type without name', () => { + // @ts-expect-error expect(() => new GraphQLObjectType({})).to.throw('Must provide name.'); }); @@ -327,6 +335,7 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: { + // $FlowExpectedError[incompatible-call] f: undefined, }, }); @@ -338,6 +347,7 @@ describe('Type System: Objects', () => { it('rejects an Object type with incorrectly typed fields', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', + // @ts-expect-error fields: [{ field: ScalarType }], }); expect(() => objType.getFields()).to.throw( @@ -348,6 +358,7 @@ describe('Type System: Objects', () => { it('rejects an Object type with a field function that returns incorrect type', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', + // @ts-expect-error fields() { return [{ field: ScalarType }]; }, @@ -361,6 +372,7 @@ describe('Type System: Objects', () => { fields: { badField: { type: ScalarType, + // @ts-expect-error args: [{ badArg: ScalarType }], }, }, @@ -374,6 +386,7 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: {}, + // @ts-expect-error interfaces: {}, }); expect(() => objType.getInterfaces()).to.throw( @@ -385,6 +398,7 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: {}, + // @ts-expect-error interfaces() { return {}; }, @@ -398,6 +412,7 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: { + // @ts-expect-error field: { type: ScalarType, resolve: {} }, }, }); @@ -411,6 +426,7 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: { + // @ts-expect-error field: { type: ScalarType, resolve: 0 }, }, }); @@ -426,6 +442,7 @@ describe('Type System: Objects', () => { new GraphQLObjectType({ name: 'AnotherObject', fields: {}, + // @ts-expect-error isTypeOf: {}, }), ).to.throw( @@ -464,6 +481,7 @@ describe('Type System: Interfaces', () => { }); it('rejects an Interface type without name', () => { + // @ts-expect-error expect(() => new GraphQLInterfaceType({})).to.throw('Must provide name.'); }); @@ -471,6 +489,7 @@ describe('Type System: Interfaces', () => { const objType = new GraphQLInterfaceType({ name: 'AnotherInterface', fields: {}, + // @ts-expect-error interfaces: {}, }); expect(() => objType.getInterfaces()).to.throw( @@ -482,6 +501,7 @@ describe('Type System: Interfaces', () => { const objType = new GraphQLInterfaceType({ name: 'AnotherInterface', fields: {}, + // @ts-expect-error interfaces() { return {}; }, @@ -497,6 +517,7 @@ describe('Type System: Interfaces', () => { new GraphQLInterfaceType({ name: 'AnotherInterface', fields: {}, + // @ts-expect-error resolveType: {}, }), ).to.throw( @@ -541,6 +562,7 @@ describe('Type System: Unions', () => { }); it('rejects an Union type without name', () => { + // @ts-expect-error expect(() => new GraphQLUnionType({})).to.throw('Must provide name.'); }); @@ -550,6 +572,7 @@ describe('Type System: Unions', () => { new GraphQLUnionType({ name: 'SomeUnion', types: [], + // @ts-expect-error resolveType: {}, }), ).to.throw( @@ -560,6 +583,7 @@ describe('Type System: Unions', () => { it('rejects a Union type with incorrectly typed types', () => { const unionType = new GraphQLUnionType({ name: 'SomeUnion', + // @ts-expect-error types: { ObjectType }, }); @@ -653,6 +677,7 @@ describe('Type System: Enums', () => { }); it('rejects an Enum type without name', () => { + // @ts-expect-error expect(() => new GraphQLEnumType({ values: {} })).to.throw( 'Must provide name.', ); @@ -663,6 +688,7 @@ describe('Type System: Enums', () => { () => new GraphQLEnumType({ name: 'SomeEnum', + // @ts-expect-error values: [{ FOO: 10 }], }), ).to.throw('SomeEnum values must be an object with value names as keys.'); @@ -685,6 +711,7 @@ describe('Type System: Enums', () => { () => new GraphQLEnumType({ name: 'SomeEnum', + // @ts-expect-error values: { FOO: 10 }, }), ).to.throw( @@ -736,6 +763,7 @@ describe('Type System: Input Objects', () => { }); it('rejects an Input Object type without name', () => { + // @ts-expect-error expect(() => new GraphQLInputObjectType({})).to.throw( 'Must provide name.', ); @@ -744,6 +772,7 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with incorrect fields', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', + // @ts-expect-error fields: [], }); expect(() => inputObjType.getFields()).to.throw( @@ -754,6 +783,7 @@ describe('Type System: Input Objects', () => { it('rejects an Input Object type with fields function that returns incorrect type', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', + // @ts-expect-error fields: () => [], }); expect(() => inputObjType.getFields()).to.throw( @@ -767,6 +797,7 @@ describe('Type System: Input Objects', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', fields: { + // @ts-expect-error f: { type: ScalarType, resolve: dummyFunc }, }, }); @@ -779,6 +810,7 @@ describe('Type System: Input Objects', () => { const inputObjType = new GraphQLInputObjectType({ name: 'SomeInputObject', fields: { + // @ts-expect-error f: { type: ScalarType, resolve: {} }, }, }); @@ -806,7 +838,9 @@ describe('Type System: List', () => { }); it('rejects a non-type as item type of list', () => { + // @ts-expect-error expectList({}).to.throw('Expected {} to be a GraphQL type.'); + // @ts-expect-error expectList(String).to.throw( 'Expected [function String] to be a GraphQL type.', ); @@ -835,7 +869,9 @@ describe('Type System: Non-Null', () => { expectNonNull(NonNullScalarType).to.throw( 'Expected Scalar! to be a GraphQL nullable type.', ); + // @ts-expect-error expectNonNull({}).to.throw('Expected {} to be a GraphQL nullable type.'); + // @ts-expect-error expectNonNull(String).to.throw( 'Expected [function String] to be a GraphQL nullable type.', ); diff --git a/src/type/__tests__/directive-test.ts b/src/type/__tests__/directive-test.ts index fbd22de601..19249b3b14 100644 --- a/src/type/__tests__/directive-test.ts +++ b/src/type/__tests__/directive-test.ts @@ -85,6 +85,7 @@ describe('Type System: Directive', () => { }); it('rejects an unnamed directive', () => { + // @ts-expect-error expect(() => new GraphQLDirective({ locations: ['QUERY'] })).to.throw( 'Directive must be named.', ); @@ -96,18 +97,21 @@ describe('Type System: Directive', () => { new GraphQLDirective({ name: 'Foo', locations: ['QUERY'], + // @ts-expect-error args: [], }), ).to.throw('@Foo args must be an object with argument names as keys.'); }); it('rejects a directive with undefined locations', () => { + // @ts-expect-error expect(() => new GraphQLDirective({ name: 'Foo' })).to.throw( '@Foo locations must be an Array.', ); }); it('rejects a directive with incorrectly typed locations', () => { + // @ts-expect-error expect(() => new GraphQLDirective({ name: 'Foo', locations: {} })).to.throw( '@Foo locations must be an Array.', ); diff --git a/src/type/__tests__/enumType-test.ts b/src/type/__tests__/enumType-test.ts index 3e2771c140..c3cf23cd1c 100644 --- a/src/type/__tests__/enumType-test.ts +++ b/src/type/__tests__/enumType-test.ts @@ -364,6 +364,7 @@ describe('Type System: Enum Values', () => { const oneValue = ComplexEnum.getValue('ONE'); expect(oneValue).to.include({ name: 'ONE', value: Complex1 }); + // @ts-expect-error const badUsage = ComplexEnum.getValue(Complex1); expect(badUsage).to.equal(undefined); }); diff --git a/src/type/__tests__/schema-test.ts b/src/type/__tests__/schema-test.ts index 04ed0f2519..44ace12c11 100644 --- a/src/type/__tests__/schema-test.ts +++ b/src/type/__tests__/schema-test.ts @@ -328,8 +328,11 @@ describe('Type System: Schema', () => { }); it('checks the configuration for mistakes', () => { + // @ts-expect-error expect(() => new GraphQLSchema(JSON.parse)).to.throw(); + // @ts-expect-error expect(() => new GraphQLSchema({ types: {} })).to.throw(); + // @ts-expect-error expect(() => new GraphQLSchema({ directives: {} })).to.throw(); }); }); @@ -358,6 +361,7 @@ describe('Type System: Schema', () => { }); const types = [{}, query, {}]; + // @ts-expect-error expect(() => new GraphQLSchema({ query, types })).to.throw( 'One of the provided types for building the Schema is missing a name.', ); diff --git a/src/type/__tests__/validation-test.ts b/src/type/__tests__/validation-test.ts index 58791c6cc8..1e2548c047 100644 --- a/src/type/__tests__/validation-test.ts +++ b/src/type/__tests__/validation-test.ts @@ -391,6 +391,7 @@ describe('Type System: A Schema must have Object root types', () => { it('rejects a Schema whose types are incorrectly typed', () => { const schema = new GraphQLSchema({ query: SomeObjectType, + // @ts-expect-error types: [{ name: 'SomeType' }, SomeDirective], }); expect(validateSchema(schema)).to.deep.equal([ @@ -407,6 +408,7 @@ describe('Type System: A Schema must have Object root types', () => { it('rejects a Schema whose directives are incorrectly typed', () => { const schema = new GraphQLSchema({ query: SomeObjectType, + // @ts-expect-error directives: [null, 'SomeDirective', SomeScalarType], }); expect(validateSchema(schema)).to.deep.equal([ @@ -686,6 +688,7 @@ describe('Type System: Union types must be valid', () => { for (const memberType of badUnionMemberTypes) { const badUnion = new GraphQLUnionType({ name: 'BadUnion', + // @ts-expect-error types: [memberType], }); const badSchema = schemaWithFieldType(badUnion); @@ -1045,6 +1048,7 @@ describe('Type System: Object fields must have output types', () => { for (const type of notOutputTypes) { const typeStr = inspect(type); it(`rejects a non-output type as an Object field type: ${typeStr}`, () => { + // @ts-expect-error const schema = schemaWithObjectField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1055,6 +1059,7 @@ describe('Type System: Object fields must have output types', () => { } it('rejects a non-type value as an Object field type', () => { + // @ts-expect-error const schema = schemaWithObjectField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1366,6 +1371,7 @@ describe('Type System: Interface fields must have output types', () => { for (const type of notOutputTypes) { const typeStr = inspect(type); it(`rejects a non-output type as an Interface field type: ${typeStr}`, () => { + // @ts-expect-error const schema = schemaWithInterfaceField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1379,6 +1385,7 @@ describe('Type System: Interface fields must have output types', () => { } it('rejects a non-type value as an Interface field type', () => { + // @ts-expect-error const schema = schemaWithInterfaceField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1499,6 +1506,7 @@ describe('Type System: Arguments must have input types', () => { for (const type of notInputTypes) { const typeStr = inspect(type); it(`rejects a non-input type as a field arg type: ${typeStr}`, () => { + // @ts-expect-error const schema = schemaWithArg({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1512,6 +1520,7 @@ describe('Type System: Arguments must have input types', () => { } it('rejects a non-type value as a field arg type', () => { + // @ts-expect-error const schema = schemaWithArg({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1630,6 +1639,7 @@ describe('Type System: Input Object fields must have input types', () => { for (const type of notInputTypes) { const typeStr = inspect(type); it(`rejects a non-input type as an input field type: ${typeStr}`, () => { + // @ts-expect-error const schema = schemaWithInputField({ type }); expect(validateSchema(schema)).to.deep.equal([ { @@ -1640,6 +1650,7 @@ describe('Type System: Input Object fields must have input types', () => { } it('rejects a non-type value as an input field type', () => { + // @ts-expect-error const schema = schemaWithInputField({ type: Number }); expect(validateSchema(schema)).to.deep.equal([ { diff --git a/src/utilities/__tests__/assertValidName-test.ts b/src/utilities/__tests__/assertValidName-test.ts index 56c87de274..a794d5fb68 100644 --- a/src/utilities/__tests__/assertValidName-test.ts +++ b/src/utilities/__tests__/assertValidName-test.ts @@ -15,6 +15,7 @@ describe('assertValidName()', () => { }); it('throws for non-strings', () => { + // @ts-expect-error expect(() => assertValidName({})).to.throw('Expected name to be a string.'); }); diff --git a/src/utilities/__tests__/buildASTSchema-test.ts b/src/utilities/__tests__/buildASTSchema-test.ts index b2df91b22b..2deaa1ffd8 100644 --- a/src/utilities/__tests__/buildASTSchema-test.ts +++ b/src/utilities/__tests__/buildASTSchema-test.ts @@ -1100,6 +1100,7 @@ describe('Schema Builder', () => { 'Must provide valid Document AST', ); + // @ts-expect-error expect(() => buildASTSchema({})).to.throw( 'Must provide valid Document AST', ); diff --git a/src/utilities/__tests__/buildClientSchema-test.ts b/src/utilities/__tests__/buildClientSchema-test.ts index 6ce0509e3e..a7ac22c588 100644 --- a/src/utilities/__tests__/buildClientSchema-test.ts +++ b/src/utilities/__tests__/buildClientSchema-test.ts @@ -629,6 +629,7 @@ describe('Type System: build schema from introspection', () => { 'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: null.', ); + // @ts-expect-error expect(() => buildClientSchema({})).to.throw( 'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: {}.', ); diff --git a/src/utilities/__tests__/extendSchema-test.ts b/src/utilities/__tests__/extendSchema-test.ts index c697523852..97c8e219d2 100644 --- a/src/utilities/__tests__/extendSchema-test.ts +++ b/src/utilities/__tests__/extendSchema-test.ts @@ -1148,6 +1148,7 @@ describe('extendSchema', () => { 'Must provide valid Document AST', ); + // @ts-expect-error expect(() => extendSchema(schema, {})).to.throw( 'Must provide valid Document AST', ); From 8dbbcacd1b3d7de076a99c0dcc44283450e96393 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 11:57:10 -0600 Subject: [PATCH 50/65] build: add @types/node --- package-lock.json | 60 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ tsconfig.json | 1 - 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 35998cc7b7..2db5702b27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,10 @@ "devDependencies": { "@babel/core": "7.13.15", "@babel/eslint-parser": "7.13.14", + "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", "@typescript-eslint/parser": "4.21.0", "chai": "4.3.4", @@ -710,6 +712,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz", + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-arrow-functions": { "version": "7.13.0", "dev": true, @@ -1064,6 +1078,20 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz", + "integrity": "sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-typescript": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", "dev": true, @@ -1657,6 +1685,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "14.14.37", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", + "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", + "dev": true + }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -6928,6 +6962,15 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-typescript": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz", + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, "@babel/plugin-transform-arrow-functions": { "version": "7.13.0", "dev": true, @@ -7163,6 +7206,17 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-transform-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz", + "integrity": "sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-typescript": "^7.12.13" + } + }, "@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", "dev": true, @@ -7688,6 +7742,12 @@ "version": "0.0.29", "dev": true }, + "@types/node": { + "version": "14.14.37", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", + "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", + "dev": true + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", diff --git a/package.json b/package.json index a931fa860d..55650d102e 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,10 @@ "devDependencies": { "@babel/core": "7.13.15", "@babel/eslint-parser": "7.13.14", + "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", "@typescript-eslint/parser": "4.21.0", "chai": "4.3.4", diff --git a/tsconfig.json b/tsconfig.json index 036a113fdc..3c207288bd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,6 @@ "noImplicitThis": false, "strictNullChecks": false, "strictFunctionTypes": false, - "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true } From 9ad53e815a39607b128ddf2078b04d07d652a2f6 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 13:06:12 -0600 Subject: [PATCH 51/65] feat: use `in` operator to check TS type while doing boolean checks Co-Authored-By: Kamil Kisiela --- src/execution/execute.ts | 2 +- src/type/introspection.ts | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 2b2643f103..70fb1a1a38 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -312,7 +312,7 @@ export function buildExecutionContext( { maxErrors: 50 }, ); - if (coercedVariableValues.errors) { + if ('errors' in coercedVariableValues && coercedVariableValues.errors) { return coercedVariableValues.errors; } diff --git a/src/type/introspection.ts b/src/type/introspection.ts index 85d2555b83..40ff61148a 100644 --- a/src/type/introspection.ts +++ b/src/type/introspection.ts @@ -234,17 +234,22 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({ }, name: { type: GraphQLString, - resolve: (type) => (type.name !== undefined ? type.name : undefined), + resolve: (type) => + 'name' in type && type.name ? type.name : undefined, }, description: { type: GraphQLString, resolve: (type) => - type.description !== undefined ? type.description : undefined, + 'description' in type && type.description + ? type.description + : undefined, }, specifiedByUrl: { type: GraphQLString, resolve: (obj) => - obj.specifiedByUrl !== undefined ? obj.specifiedByUrl : undefined, + 'specifiedByUrl' in obj && obj.specifiedByUrl + ? obj.specifiedByUrl + : undefined, }, fields: { type: new GraphQLList(new GraphQLNonNull(__Field)), @@ -309,8 +314,7 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({ }, ofType: { type: __Type, - resolve: (type) => - type.ofType !== undefined ? type.ofType : undefined, + resolve: (type) => ('ofType' in type ? type.ofType : undefined), }, } as GraphQLFieldConfigMap), }); From e021f1bcddaf08dac1430ee4bd8b499e728d0a15 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 13:04:35 -0600 Subject: [PATCH 52/65] TODO: need to fix these TS errors --- src/execution/execute.ts | 1 + src/execution/values.ts | 1 + src/language/__tests__/visitor-test.ts | 1 + src/type/__tests__/introspection-test.ts | 1 + src/type/__tests__/predicate-test.ts | 10 ++++++++++ src/utilities/TypeInfo.ts | 1 + src/utilities/__tests__/printSchema-test.ts | 1 + src/utilities/__tests__/valueFromAST-test.ts | 1 + src/utilities/astFromValue.ts | 2 ++ src/utilities/buildClientSchema.ts | 9 +++++++++ src/utilities/coerceInputValue.ts | 3 +++ src/utilities/extendSchema.ts | 1 + src/utilities/findBreakingChanges.ts | 2 ++ src/utilities/valueFromAST.ts | 2 ++ src/validation/ValidationContext.ts | 2 ++ .../rules/OverlappingFieldsCanBeMergedRule.ts | 3 ++- src/validation/rules/VariablesAreInputTypesRule.ts | 1 + 17 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 70fb1a1a38..67bda83407 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -773,6 +773,7 @@ function completeValue( if (isListType(returnType)) { return completeListValue( exeContext, + // @ts-expect-error: FIXME returnType, fieldNodes, info, diff --git a/src/execution/values.ts b/src/execution/values.ts index e38802ea90..7d39e4fd44 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -87,6 +87,7 @@ function coerceVariableValues( const coercedValues = {}; for (const varDefNode of varDefNodes) { const varName = varDefNode.variable.name.value; + // @ts-expect-error: FIXME const varType = typeFromAST(schema, varDefNode.type); if (!isInputType(varType)) { // Must use input types for variables. This should be caught during diff --git a/src/language/__tests__/visitor-test.ts b/src/language/__tests__/visitor-test.ts index 6d20b9b2ba..c1bbd00da1 100644 --- a/src/language/__tests__/visitor-test.ts +++ b/src/language/__tests__/visitor-test.ts @@ -50,6 +50,7 @@ function checkVisitorFnArgs(ast: any, args: any, isEdited: boolean = false) { } function getValue(node: ASTNode) { + // @ts-expect-error: FIXME return node.value != null ? node.value : undefined; } diff --git a/src/type/__tests__/introspection-test.ts b/src/type/__tests__/introspection-test.ts index 2e5f261e94..5ab1851121 100644 --- a/src/type/__tests__/introspection-test.ts +++ b/src/type/__tests__/introspection-test.ts @@ -1578,6 +1578,7 @@ describe('Introspection', () => { const result = graphqlSync({ schema, source, + // @ts-expect-error FIX ME fieldResolver, typeResolver, }); diff --git a/src/type/__tests__/predicate-test.ts b/src/type/__tests__/predicate-test.ts index 94e152e1aa..ed6af352d8 100644 --- a/src/type/__tests__/predicate-test.ts +++ b/src/type/__tests__/predicate-test.ts @@ -582,6 +582,7 @@ describe('Type predicates', () => { const requiredArg = buildArg({ type: new GraphQLNonNull(GraphQLString), }); + // @ts-expect-error: FIXME expect(isRequiredArgument(requiredArg)).to.equal(true); }); @@ -589,23 +590,27 @@ describe('Type predicates', () => { const optArg1 = buildArg({ type: GraphQLString, }); + // @ts-expect-error: FIXME expect(isRequiredArgument(optArg1)).to.equal(false); const optArg2 = buildArg({ type: GraphQLString, defaultValue: null, }); + // @ts-expect-error: FIXME expect(isRequiredArgument(optArg2)).to.equal(false); const optArg3 = buildArg({ type: new GraphQLList(new GraphQLNonNull(GraphQLString)), }); + // @ts-expect-error: FIXME expect(isRequiredArgument(optArg3)).to.equal(false); const optArg4 = buildArg({ type: new GraphQLNonNull(GraphQLString), defaultValue: 'default', }); + // @ts-expect-error: FIXME expect(isRequiredArgument(optArg4)).to.equal(false); }); }); @@ -630,6 +635,7 @@ describe('Type predicates', () => { const requiredField = buildInputField({ type: new GraphQLNonNull(GraphQLString), }); + // @ts-expect-error: FIXME expect(isRequiredInputField(requiredField)).to.equal(true); }); @@ -637,23 +643,27 @@ describe('Type predicates', () => { const optField1 = buildInputField({ type: GraphQLString, }); + // @ts-expect-error: FIXME expect(isRequiredInputField(optField1)).to.equal(false); const optField2 = buildInputField({ type: GraphQLString, defaultValue: null, }); + // @ts-expect-error: FIXME expect(isRequiredInputField(optField2)).to.equal(false); const optField3 = buildInputField({ type: new GraphQLList(new GraphQLNonNull(GraphQLString)), }); + // @ts-expect-error: FIXME expect(isRequiredInputField(optField3)).to.equal(false); const optField4 = buildInputField({ type: new GraphQLNonNull(GraphQLString), defaultValue: 'default', }); + // @ts-expect-error: FIXME expect(isRequiredInputField(optField4)).to.equal(false); }); }); diff --git a/src/utilities/TypeInfo.ts b/src/utilities/TypeInfo.ts index 4ade8a95ff..e3d3ee0892 100644 --- a/src/utilities/TypeInfo.ts +++ b/src/utilities/TypeInfo.ts @@ -192,6 +192,7 @@ export class TypeInfo { break; } case Kind.VARIABLE_DEFINITION: { + // @ts-expect-error: FIXME const inputType: unknown = typeFromAST(schema, node.type); this._inputTypeStack.push( isInputType(inputType) ? inputType : undefined, diff --git a/src/utilities/__tests__/printSchema-test.ts b/src/utilities/__tests__/printSchema-test.ts index c7e5c8eff3..e7ad4da227 100644 --- a/src/utilities/__tests__/printSchema-test.ts +++ b/src/utilities/__tests__/printSchema-test.ts @@ -159,6 +159,7 @@ describe('Type System Printer', () => { }); expectPrintedSchema(schema).to.equal( + // @ts-expect-error: FIXME dedent(String.raw` type Query { singleField(argOne: String = "tes\t de\fault"): String diff --git a/src/utilities/__tests__/valueFromAST-test.ts b/src/utilities/__tests__/valueFromAST-test.ts index 6c08ccf15c..e22c5bf858 100644 --- a/src/utilities/__tests__/valueFromAST-test.ts +++ b/src/utilities/__tests__/valueFromAST-test.ts @@ -67,6 +67,7 @@ describe('valueFromAST', () => { name: 'PassthroughScalar', parseLiteral(node) { invariant(node.kind === 'StringValue'); + // @ts-expect-error: FIXME return node.value; }, parseValue: identityFunc, diff --git a/src/utilities/astFromValue.ts b/src/utilities/astFromValue.ts index 98d315f8d6..cba7a4507e 100644 --- a/src/utilities/astFromValue.ts +++ b/src/utilities/astFromValue.ts @@ -69,6 +69,7 @@ export function astFromValue( // Since we transpile for-of in loose mode it doesn't support iterators // and it's required to first convert iteratable into array for (const item of Array.from(value)) { + // @ts-expect-error: FIXME const itemNode = astFromValue(item, itemType); if (itemNode != null) { valuesNodes.push(itemNode); @@ -76,6 +77,7 @@ export function astFromValue( } return { kind: Kind.LIST, values: valuesNodes }; } + // @ts-expect-error: FIXME return astFromValue(value, itemType); } diff --git a/src/utilities/buildClientSchema.ts b/src/utilities/buildClientSchema.ts index ff2afd46c4..87d97143fe 100644 --- a/src/utilities/buildClientSchema.ts +++ b/src/utilities/buildClientSchema.ts @@ -123,6 +123,7 @@ export function buildClientSchema( // preferring cached instances before building new instances. function getType(typeRef: IntrospectionTypeRef): GraphQLType { if (typeRef.kind === TypeKind.LIST) { + // @ts-expect-error: FIXME const itemRef = typeRef.ofType; if (!itemRef) { throw new Error('Decorated type deeper than introspection query.'); @@ -130,6 +131,7 @@ export function buildClientSchema( return new GraphQLList(getType(itemRef)); } if (typeRef.kind === TypeKind.NON_NULL) { + // @ts-expect-error: FIXME const nullableRef = typeRef.ofType; if (!nullableRef) { throw new Error('Decorated type deeper than introspection query.'); @@ -137,6 +139,7 @@ export function buildClientSchema( const nullableType = getType(nullableRef); return new GraphQLNonNull(assertNullableType(nullableType)); } + // @ts-expect-error: FIXME return getNamedType(typeRef); } @@ -174,16 +177,22 @@ export function buildClientSchema( if (type != null && type.name != null && type.kind != null) { switch (type.kind) { case TypeKind.SCALAR: + // @ts-expect-error: FIXME return buildScalarDef(type); case TypeKind.OBJECT: + // @ts-expect-error: FIXME return buildObjectDef(type); case TypeKind.INTERFACE: + // @ts-expect-error: FIXME return buildInterfaceDef(type); case TypeKind.UNION: + // @ts-expect-error: FIXME return buildUnionDef(type); case TypeKind.ENUM: + // @ts-expect-error: FIXME return buildEnumDef(type); case TypeKind.INPUT_OBJECT: + // @ts-expect-error: FIXME return buildInputObjectDef(type); } } diff --git a/src/utilities/coerceInputValue.ts b/src/utilities/coerceInputValue.ts index 3c5204a411..6f4ccd6014 100644 --- a/src/utilities/coerceInputValue.ts +++ b/src/utilities/coerceInputValue.ts @@ -32,6 +32,7 @@ export function coerceInputValue( type: GraphQLInputType, onError: OnErrorCB = defaultOnError, ): unknown { + // @ts-expect-error: FIXME return coerceInputValueImpl(inputValue, type, onError); } @@ -78,10 +79,12 @@ function coerceInputValueImpl( if (isIteratableObject(inputValue)) { return Array.from(inputValue, (itemValue, index) => { const itemPath = addPath(path, index, undefined); + // @ts-expect-error: FIXME return coerceInputValueImpl(itemValue, itemType, onError, itemPath); }); } // Lists accept a non-list value as a list of one. + // @ts-expect-error: FIXME return [coerceInputValueImpl(inputValue, itemType, onError, path)]; } diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index ffb6fc7c7d..7cd79983b5 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -222,6 +222,7 @@ export function extendSchemaImpl( if (isNonNullType(type)) { return new GraphQLNonNull(replaceType(type.ofType)) as T; } + // @ts-expect-error: FIXME return replaceNamedType(type) as T; } diff --git a/src/utilities/findBreakingChanges.ts b/src/utilities/findBreakingChanges.ts index 3c7f69420b..5a0c43d6dc 100644 --- a/src/utilities/findBreakingChanges.ts +++ b/src/utilities/findBreakingChanges.ts @@ -471,6 +471,7 @@ function isChangeSafeForObjectOrInterfaceField( return ( // if they're both named types, see if their names are equivalent + // @ts-expect-error: FIXME (isNamedType(newType) && oldType.name === newType.name) || // moving from nullable to non-null of the same underlying type is safe (isNonNullType(newType) && @@ -506,6 +507,7 @@ function isChangeSafeForInputObjectFieldOrFieldArg( } // if they're both named types, see if their names are equivalent + // @ts-expect-error: FIXME return isNamedType(newType) && oldType.name === newType.name; } diff --git a/src/utilities/valueFromAST.ts b/src/utilities/valueFromAST.ts index 5f246f38eb..2e7128ae2d 100644 --- a/src/utilities/valueFromAST.ts +++ b/src/utilities/valueFromAST.ts @@ -87,6 +87,7 @@ export function valueFromAST( } coercedValues.push(null); } else { + // @ts-expect-error: FIXME const itemValue = valueFromAST(itemNode, itemType, variables); if (itemValue === undefined) { return; // Invalid: intentionally return no value. @@ -96,6 +97,7 @@ export function valueFromAST( } return coercedValues; } + // @ts-expect-error: FIXME const coercedValue = valueFromAST(valueNode, itemType, variables); if (coercedValue === undefined) { return; // Invalid: intentionally return no value. diff --git a/src/validation/ValidationContext.ts b/src/validation/ValidationContext.ts index 4071e20d8f..32a79230b3 100644 --- a/src/validation/ValidationContext.ts +++ b/src/validation/ValidationContext.ts @@ -90,6 +90,7 @@ export class ASTValidationContext { const set = setsToVisit.pop(); for (const selection of set.selections) { if (selection.kind === Kind.FRAGMENT_SPREAD) { + // @ts-expect-error: FIXME spreads.push(selection); } else if (selection.selectionSet) { setsToVisit.push(selection.selectionSet); @@ -117,6 +118,7 @@ export class ASTValidationContext { collectedNames[fragName] = true; const fragment = this.getFragment(fragName); if (fragment) { + // @ts-expect-error: FIXME fragments.push(fragment); nodesToVisit.push(fragment.selectionSet); } diff --git a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts index e790d94619..2b91f0a6ad 100644 --- a/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts +++ b/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts @@ -659,7 +659,8 @@ function doTypesConflict( } if (isNonNullType(type1)) { return isNonNullType(type2) - ? doTypesConflict(type1.ofType, type2.ofType) + ? // @ts-expect-error: FIXME + doTypesConflict(type1.ofType, type2.ofType) : true; } if (isNonNullType(type2)) { diff --git a/src/validation/rules/VariablesAreInputTypesRule.ts b/src/validation/rules/VariablesAreInputTypesRule.ts index 0dc9daa250..583da7f698 100644 --- a/src/validation/rules/VariablesAreInputTypesRule.ts +++ b/src/validation/rules/VariablesAreInputTypesRule.ts @@ -21,6 +21,7 @@ export function VariablesAreInputTypesRule( ): ASTVisitor { return { VariableDefinition(node: VariableDefinitionNode) { + // @ts-expect-error: FIXME const type = typeFromAST(context.getSchema(), node.type); if (type && !isInputType(type)) { From abd7a03a2f6d372af3cde03d62e663499dd76370 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 17 Feb 2021 13:44:25 -0600 Subject: [PATCH 53/65] build + CI: add TS type check script --- .github/workflows/ci.yml | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1f1e7f3d5..de96398c3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,9 @@ jobs: - name: Spellcheck run: npm run check:spelling + - name: Check Types + run: npm run check + checkForCommonlyIgnoredFiles: name: Check for commonly ignored files runs-on: ubuntu-latest diff --git a/package.json b/package.json index 55650d102e..703339970a 100644 --- a/package.json +++ b/package.json @@ -29,13 +29,14 @@ "fuzzonly": "mocha --full-trace src/**/__tests__/**/*-fuzz.ts", "changelog": "node resources/gen-changelog.js", "benchmark": "node benchmark/benchmark.js", - "test": "npm run lint && npm run testonly && npm run prettier:check && npm run check:spelling && npm run build:npm && npm run build:deno && npm run check:integrations", + "test": "npm run lint && npm run check && npm run testonly && npm run prettier:check && npm run check:spelling && npm run build:npm && npm run build:deno && npm run check:integrations", "lint": "eslint --cache .", "testonly": "mocha --full-trace src/**/__tests__/**/*-test.ts", "testonly:cover": "nyc npm run testonly", "prettier": "prettier --write --list-different .", "prettier:check": "prettier --check .", "check:spelling": "cspell --no-progress '**/*'", + "check": "tsc --pretty", "check:integrations": "npm run build:npm && npm run build:deno && mocha --full-trace integrationTests/*-test.js", "build:npm": "node resources/build-npm.js", "build:deno": "node resources/build-deno.js", From 329334aeb7157486586964583c179f4c10889acd Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 18 Feb 2021 09:25:57 -0600 Subject: [PATCH 54/65] build: add `@types/mocha` --- package-lock.json | 14 ++++++++++++++ package.json | 1 + 2 files changed, 15 insertions(+) diff --git a/package-lock.json b/package-lock.json index 2db5702b27..50c93ca6fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/mocha": "8.2.2", "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", "@typescript-eslint/parser": "4.21.0", @@ -1685,6 +1686,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mocha": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", + "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "14.14.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", @@ -7742,6 +7750,12 @@ "version": "0.0.29", "dev": true }, + "@types/mocha": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", + "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", + "dev": true + }, "@types/node": { "version": "14.14.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", diff --git a/package.json b/package.json index 703339970a..372a10f5fe 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/mocha": "8.2.2", "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", "@typescript-eslint/parser": "4.21.0", From 261b381ca8f77b832a0548018f3fbb705ab8df33 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Thu, 18 Feb 2021 09:27:02 -0600 Subject: [PATCH 55/65] build: add `@types/chai` --- package-lock.json | 13 +++++++++++++ package.json | 1 + 2 files changed, 14 insertions(+) diff --git a/package-lock.json b/package-lock.json index 50c93ca6fc..3f98ddcf02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/chai": "4.2.16", "@types/mocha": "8.2.2", "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", @@ -1675,6 +1676,12 @@ "node": ">= 8" } }, + "node_modules/@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", @@ -7740,6 +7747,12 @@ "fastq": "^1.6.0" } }, + "@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", diff --git a/package.json b/package.json index 372a10f5fe..84fbb21da7 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-env": "7.13.15", "@babel/register": "7.13.14", + "@types/chai": "4.2.16", "@types/mocha": "8.2.2", "@types/node": "14.14.37", "@typescript-eslint/eslint-plugin": "4.21.0", From 44222dcfd042ffbfb6e691aed9b373c192353057 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 23 Feb 2021 00:20:22 -0600 Subject: [PATCH 56/65] remove $FlowExpectedError[incompatible-call] --- src/type/__tests__/definition-test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/type/__tests__/definition-test.ts b/src/type/__tests__/definition-test.ts index 95080e3ca6..2a0d3e5de3 100644 --- a/src/type/__tests__/definition-test.ts +++ b/src/type/__tests__/definition-test.ts @@ -335,7 +335,6 @@ describe('Type System: Objects', () => { const objType = new GraphQLObjectType({ name: 'SomeObject', fields: { - // $FlowExpectedError[incompatible-call] f: undefined, }, }); From 99921a31922dcd4df092b7286777df2dc51600a4 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Tue, 16 Mar 2021 21:31:58 -0500 Subject: [PATCH 57/65] style: run prettier --- src/language/visitor.ts | 4 ++-- src/type/definition.ts | 44 ++++++++++++++++++++--------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/language/visitor.ts b/src/language/visitor.ts index d1e1973aef..b4e626d79f 100644 --- a/src/language/visitor.ts +++ b/src/language/visitor.ts @@ -17,8 +17,8 @@ type KindVisitor = { }; interface EnterLeaveVisitor { - readonly enter?: ASTVisitFn, - readonly leave?: ASTVisitFn, + readonly enter?: ASTVisitFn; + readonly leave?: ASTVisitFn; } /** diff --git a/src/type/definition.ts b/src/type/definition.ts index 185f34b772..0562823199 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -849,14 +849,14 @@ export function argsToArgsConfig( } export interface GraphQLObjectTypeConfig { - name: string, - description?: Maybe, - interfaces?: ThunkArray, - fields: ThunkObjMap>, - isTypeOf?: Maybe>, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, + name: string; + description?: Maybe; + interfaces?: ThunkArray; + fields: ThunkObjMap>; + isTypeOf?: Maybe>; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; } interface GraphQLObjectTypeNormalizedConfig @@ -1055,10 +1055,10 @@ export class GraphQLInterfaceType { } export interface GraphQLInterfaceTypeConfig { - name: string, - description?: Maybe, - interfaces?: ThunkArray, - fields: ThunkObjMap>, + name: string; + description?: Maybe; + interfaces?: ThunkArray; + fields: ThunkObjMap>; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing @@ -1172,9 +1172,9 @@ function defineTypes( } export interface GraphQLUnionTypeConfig { - name: string, - description?: Maybe, - types: ThunkArray, + name: string; + description?: Maybe; + types: ThunkArray; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing @@ -1514,13 +1514,13 @@ function defineInputFieldMap( } export interface GraphQLInputObjectTypeConfig { - name: string, - description?: Maybe, - fields: ThunkObjMap, - extensions?: Maybe>, - astNode?: Maybe, - extensionASTNodes?: Maybe>, -}; + name: string; + description?: Maybe; + fields: ThunkObjMap; + extensions?: Maybe>; + astNode?: Maybe; + extensionASTNodes?: Maybe>; +} interface GraphQLInputObjectTypeNormalizedConfig extends GraphQLInputObjectTypeConfig { From d4aa269bb0727c5a8c96ee3727facd3e5305b78d Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Fri, 19 Mar 2021 21:29:10 -0500 Subject: [PATCH 58/65] TODO: add `@ts-expect-error` fix me --- src/execution/execute.ts | 2 ++ src/jsutils/inspect.ts | 2 ++ src/language/__tests__/visitor-test.ts | 2 +- src/subscription/__tests__/mapAsyncIterator-test.ts | 1 + src/subscription/mapAsyncIterator.ts | 6 +++++- src/subscription/subscribe.ts | 1 + src/type/__tests__/introspection-test.ts | 1 - src/type/__tests__/predicate-test.ts | 10 ---------- src/type/validate.ts | 11 +++++++---- src/utilities/__tests__/valueFromAST-test.ts | 1 - src/utilities/extendSchema.ts | 1 + src/validation/rules/KnownTypeNamesRule.ts | 1 + 12 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 67bda83407..7d7f393e15 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -194,7 +194,9 @@ export function execute(args: ExecutionArgs): PromiseOrValue { // field and its descendants will be omitted, and sibling fields will still // be executed. An execution which encounters errors will still result in a // resolved Promise. + // @ts-expect-error FIXME const data = executeOperation(exeContext, exeContext.operation, rootValue); + // @ts-expect-error FIXME return buildResponse(exeContext, data); } diff --git a/src/jsutils/inspect.ts b/src/jsutils/inspect.ts index f204bbeaf5..f521ec2f97 100644 --- a/src/jsutils/inspect.ts +++ b/src/jsutils/inspect.ts @@ -35,7 +35,9 @@ function formatObjectValue( const seenValues = [...previouslySeenValues, value]; + // @ts-expect-error FIX ME if (typeof value.toJSON === 'function') { + // @ts-expect-error FIX ME const jsonValue = (value.toJSON as () => unknown)(); // check for infinite recursion diff --git a/src/language/__tests__/visitor-test.ts b/src/language/__tests__/visitor-test.ts index c1bbd00da1..156a9294d5 100644 --- a/src/language/__tests__/visitor-test.ts +++ b/src/language/__tests__/visitor-test.ts @@ -422,7 +422,7 @@ describe('Visitor', () => { it('visit nodes with unknown kinds but does not traverse deeper', () => { const customAST = parse('{ a }'); - // $FlowExpectedError[prop-missing] + // @ts-expect-error FIXME customAST.definitions[0].selectionSet.selections.push({ kind: 'CustomField', name: { kind: 'Name', value: 'NamedNodeToBeSkipped' }, diff --git a/src/subscription/__tests__/mapAsyncIterator-test.ts b/src/subscription/__tests__/mapAsyncIterator-test.ts index 94b600ee6f..7c8f3666c3 100644 --- a/src/subscription/__tests__/mapAsyncIterator-test.ts +++ b/src/subscription/__tests__/mapAsyncIterator-test.ts @@ -159,6 +159,7 @@ describe('mapAsyncIterator', () => { } } + // @ts-expect-error const doubles = mapAsyncIterator(source(), (x) => x + x); expect(await doubles.next()).to.deep.equal({ value: 2, done: false }); diff --git a/src/subscription/mapAsyncIterator.ts b/src/subscription/mapAsyncIterator.ts index fa261f1b0b..6193010ad8 100644 --- a/src/subscription/mapAsyncIterator.ts +++ b/src/subscription/mapAsyncIterator.ts @@ -29,7 +29,7 @@ export function mapAsyncIterator( if (result.done) { return result; } - + // @ts-expect-error FIXME return { value: await callback(result.value), done: false }; } catch (callbackError) { return abruptClose(callbackError); @@ -38,8 +38,10 @@ export function mapAsyncIterator( return { next(): Promise> { + // @ts-expect-error FIXME return mapResult(iterator.next()); }, + // @ts-expect-error FIXME return() { return typeof iterator.return === 'function' ? mapResult(iterator.return()) @@ -47,8 +49,10 @@ export function mapAsyncIterator( }, throw(error?: unknown): Promise> { if (typeof iterator.throw === 'function') { + // @ts-expect-error FIXME return mapResult(iterator.throw(error)); } + // @ts-expect-error FIXME return Promise.reject(error).catch(abruptClose); }, [Symbol.asyncIterator]() { diff --git a/src/subscription/subscribe.ts b/src/subscription/subscribe.ts index 5f4344c989..ed113572e2 100644 --- a/src/subscription/subscribe.ts +++ b/src/subscription/subscribe.ts @@ -166,6 +166,7 @@ export async function createSourceEventStream( return { errors: exeContext }; } + // @ts-expect-error FIXME const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error. diff --git a/src/type/__tests__/introspection-test.ts b/src/type/__tests__/introspection-test.ts index 5ab1851121..2e5f261e94 100644 --- a/src/type/__tests__/introspection-test.ts +++ b/src/type/__tests__/introspection-test.ts @@ -1578,7 +1578,6 @@ describe('Introspection', () => { const result = graphqlSync({ schema, source, - // @ts-expect-error FIX ME fieldResolver, typeResolver, }); diff --git a/src/type/__tests__/predicate-test.ts b/src/type/__tests__/predicate-test.ts index ed6af352d8..94e152e1aa 100644 --- a/src/type/__tests__/predicate-test.ts +++ b/src/type/__tests__/predicate-test.ts @@ -582,7 +582,6 @@ describe('Type predicates', () => { const requiredArg = buildArg({ type: new GraphQLNonNull(GraphQLString), }); - // @ts-expect-error: FIXME expect(isRequiredArgument(requiredArg)).to.equal(true); }); @@ -590,27 +589,23 @@ describe('Type predicates', () => { const optArg1 = buildArg({ type: GraphQLString, }); - // @ts-expect-error: FIXME expect(isRequiredArgument(optArg1)).to.equal(false); const optArg2 = buildArg({ type: GraphQLString, defaultValue: null, }); - // @ts-expect-error: FIXME expect(isRequiredArgument(optArg2)).to.equal(false); const optArg3 = buildArg({ type: new GraphQLList(new GraphQLNonNull(GraphQLString)), }); - // @ts-expect-error: FIXME expect(isRequiredArgument(optArg3)).to.equal(false); const optArg4 = buildArg({ type: new GraphQLNonNull(GraphQLString), defaultValue: 'default', }); - // @ts-expect-error: FIXME expect(isRequiredArgument(optArg4)).to.equal(false); }); }); @@ -635,7 +630,6 @@ describe('Type predicates', () => { const requiredField = buildInputField({ type: new GraphQLNonNull(GraphQLString), }); - // @ts-expect-error: FIXME expect(isRequiredInputField(requiredField)).to.equal(true); }); @@ -643,27 +637,23 @@ describe('Type predicates', () => { const optField1 = buildInputField({ type: GraphQLString, }); - // @ts-expect-error: FIXME expect(isRequiredInputField(optField1)).to.equal(false); const optField2 = buildInputField({ type: GraphQLString, defaultValue: null, }); - // @ts-expect-error: FIXME expect(isRequiredInputField(optField2)).to.equal(false); const optField3 = buildInputField({ type: new GraphQLList(new GraphQLNonNull(GraphQLString)), }); - // @ts-expect-error: FIXME expect(isRequiredInputField(optField3)).to.equal(false); const optField4 = buildInputField({ type: new GraphQLNonNull(GraphQLString), defaultValue: 'default', }); - // @ts-expect-error: FIXME expect(isRequiredInputField(optField4)).to.equal(false); }); }); diff --git a/src/type/validate.ts b/src/type/validate.ts index 7fae27786f..51b7b306a8 100644 --- a/src/type/validate.ts +++ b/src/type/validate.ts @@ -146,10 +146,13 @@ function getOperationTypeNode( operation: OperationTypeNode, ): Maybe { // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203') - return [schema.astNode] - .concat(schema.extensionASTNodes) - .flatMap((schemaNode) => schemaNode?.operationTypes ?? []) - .find((operationNode) => operationNode.operation === operation)?.type; + return ( + [schema.astNode] + // @ts-expect-error FIX ME + .concat(schema.extensionASTNodes) + .flatMap((schemaNode) => schemaNode?.operationTypes ?? []) + .find((operationNode) => operationNode.operation === operation)?.type + ); } function validateDirectives(context: SchemaValidationContext): void { diff --git a/src/utilities/__tests__/valueFromAST-test.ts b/src/utilities/__tests__/valueFromAST-test.ts index e22c5bf858..6c08ccf15c 100644 --- a/src/utilities/__tests__/valueFromAST-test.ts +++ b/src/utilities/__tests__/valueFromAST-test.ts @@ -67,7 +67,6 @@ describe('valueFromAST', () => { name: 'PassthroughScalar', parseLiteral(node) { invariant(node.kind === 'StringValue'); - // @ts-expect-error: FIXME return node.value; }, parseValue: identityFunc, diff --git a/src/utilities/extendSchema.ts b/src/utilities/extendSchema.ts index 7cd79983b5..e8814c5968 100644 --- a/src/utilities/extendSchema.ts +++ b/src/utilities/extendSchema.ts @@ -673,6 +673,7 @@ export function extendSchemaImpl( } const stdTypeMap = keyMap( + // @ts-expect-error FIX ME specifiedScalarTypes.concat(introspectionTypes), (type) => type.name, ); diff --git a/src/validation/rules/KnownTypeNamesRule.ts b/src/validation/rules/KnownTypeNamesRule.ts index 6d2ec6985b..ba0fcbf5d9 100644 --- a/src/validation/rules/KnownTypeNamesRule.ts +++ b/src/validation/rules/KnownTypeNamesRule.ts @@ -75,6 +75,7 @@ const standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map( function isSDLNode(value: ASTNode | ReadonlyArray): boolean { return ( !Array.isArray(value) && + // @ts-expect-error FIXME (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value)) ); } From 81363f1ceec469fa59b590ac6ade14c1e14a00a1 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Mon, 12 Apr 2021 13:07:55 -0500 Subject: [PATCH 59/65] feat: Mutable type utility --- src/error/GraphQLError.ts | 3 ++- src/jsutils/mutable.ts | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/jsutils/mutable.ts diff --git a/src/error/GraphQLError.ts b/src/error/GraphQLError.ts index 1b999f2a9d..5cfda40b7b 100644 --- a/src/error/GraphQLError.ts +++ b/src/error/GraphQLError.ts @@ -1,5 +1,6 @@ import { isObjectLike } from '../jsutils/isObjectLike'; import type { Maybe } from '../jsutils/Maybe'; +import type { Mutable } from '../jsutils/mutable'; import type { ASTNode } from '../language/ast'; import type { Source } from '../language/source'; @@ -104,7 +105,7 @@ export class GraphQLError extends Error { _source = _nodes[0].loc?.source; } - let _positions = positions; + let _positions = positions as Mutable; if (!_positions && _nodes) { _positions = []; for (const node of _nodes) { diff --git a/src/jsutils/mutable.ts b/src/jsutils/mutable.ts new file mode 100644 index 0000000000..79abe5fc17 --- /dev/null +++ b/src/jsutils/mutable.ts @@ -0,0 +1,7 @@ +/** + * Change readonly property + * @see https://stackoverflow.com/a/58904378/11321732 + */ +export type Mutable = { + -readonly [K in keyof T]: T[K]; +}; From fee1315b46cffecfbf25ee271d95f44470f1a4fa Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Mon, 12 Apr 2021 17:46:46 -0500 Subject: [PATCH 60/65] TS: improve types mapAsyncIterator-test --- src/subscription/__tests__/mapAsyncIterator-test.ts | 10 +++++----- src/subscription/mapAsyncIterator.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/subscription/__tests__/mapAsyncIterator-test.ts b/src/subscription/__tests__/mapAsyncIterator-test.ts index 7c8f3666c3..f2c51acfc0 100644 --- a/src/subscription/__tests__/mapAsyncIterator-test.ts +++ b/src/subscription/__tests__/mapAsyncIterator-test.ts @@ -25,12 +25,12 @@ describe('mapAsyncIterator', () => { it('maps over async iterator', async () => { const items = [1, 2, 3]; - const iterator: $FlowFixMe = { + const iterator = { [Symbol.asyncIterator]() { return this; }, - next(): Promise> { + next(): Promise> { if (items.length > 0) { return Promise.resolve({ done: false, value: items.shift() }); } @@ -75,7 +75,7 @@ describe('mapAsyncIterator', () => { const doubles: AsyncIterator = mapAsyncIterator( source(), - async (x) => (await x) + x, + async (x) => x + x, ); expect(await doubles.next()).to.deep.equal({ value: 2, done: false }); @@ -121,7 +121,7 @@ describe('mapAsyncIterator', () => { it('allows returning early from mapped async iterator', async () => { const items = [1, 2, 3]; - const iterator: any = { + const iterator = { [Symbol.asyncIterator]() { return this; }, @@ -185,7 +185,7 @@ describe('mapAsyncIterator', () => { it('allows throwing errors through async iterators', async () => { const items = [1, 2, 3]; - const iterator: any = { + const iterator = { [Symbol.asyncIterator]() { return this; }, diff --git a/src/subscription/mapAsyncIterator.ts b/src/subscription/mapAsyncIterator.ts index 6193010ad8..e6f0bc7e8b 100644 --- a/src/subscription/mapAsyncIterator.ts +++ b/src/subscription/mapAsyncIterator.ts @@ -6,10 +6,10 @@ import type { PromiseOrValue } from '../jsutils/PromiseOrValue'; */ export function mapAsyncIterator( iterable: AsyncIterable | AsyncGenerator, - callback: (T) => PromiseOrValue, + callback: (value: T) => PromiseOrValue, ): AsyncGenerator { const iteratorMethod = iterable[Symbol.asyncIterator]; - const iterator: any = iteratorMethod.call(iterable); + const iterator = iteratorMethod.call(iterable); async function abruptClose(error: unknown) { if (typeof iterator.return === 'function') { @@ -58,5 +58,5 @@ export function mapAsyncIterator( [Symbol.asyncIterator]() { return this; }, - } as any; // FIXME: removed $FlowFixMe in TS conversion + }; } From 738956e1da8ee400d33ea45c123aed0ee7260cd7 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 09:51:02 -0500 Subject: [PATCH 61/65] fix: instanceOf types --- src/jsutils/instanceOf.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jsutils/instanceOf.ts b/src/jsutils/instanceOf.ts index 76b6379e93..26b6c16d1b 100644 --- a/src/jsutils/instanceOf.ts +++ b/src/jsutils/instanceOf.ts @@ -4,7 +4,7 @@ * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production * See: https://webpack.js.org/guides/production/ */ -export const instanceOf: (mixed, Constructor) => boolean = +export const instanceOf: (value: unknown, constructor: Constructor) => boolean = process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') function instanceOf(value: unknown, constructor: Constructor): boolean { @@ -37,6 +37,6 @@ spurious results.`, return false; }; -interface Constructor { +interface Constructor extends Function { name: string; } From 23aba04fa2154a5a26a2c3a25ef4a9b788c35e81 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 09:51:13 -0500 Subject: [PATCH 62/65] fix: invariant types --- src/jsutils/invariant.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jsutils/invariant.ts b/src/jsutils/invariant.ts index 28ef791849..47561cbb3c 100644 --- a/src/jsutils/invariant.ts +++ b/src/jsutils/invariant.ts @@ -1,4 +1,7 @@ -export function invariant(condition: unknown, message?: string): void { +export function invariant( + condition: unknown, + message?: string, +): asserts condition { const booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js') if (!booleanCondition) { From 948f6560b7c3b2d0cbadab2679d6479ddb2cd510 Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 09:55:13 -0500 Subject: [PATCH 63/65] fix: ProvidedRequiredArgumentsRule types --- src/validation/rules/ProvidedRequiredArgumentsRule.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/validation/rules/ProvidedRequiredArgumentsRule.ts b/src/validation/rules/ProvidedRequiredArgumentsRule.ts index 58da5f67da..d01a4490c6 100644 --- a/src/validation/rules/ProvidedRequiredArgumentsRule.ts +++ b/src/validation/rules/ProvidedRequiredArgumentsRule.ts @@ -1,5 +1,6 @@ import { inspect } from '../../jsutils/inspect'; import { keyMap } from '../../jsutils/keyMap'; +import type { ObjMap } from '../../jsutils/ObjMap'; import { GraphQLError } from '../../error/GraphQLError'; @@ -10,6 +11,7 @@ import { print } from '../../language/printer'; import { specifiedDirectives } from '../../type/directives'; import { isType, isRequiredArgument } from '../../type/definition'; +import type { GraphQLArgument } from '../../type/definition'; import type { ValidationContext, @@ -62,7 +64,9 @@ export function ProvidedRequiredArgumentsRule( export function ProvidedRequiredArgumentsOnDirectivesRule( context: ValidationContext | SDLValidationContext, ): ASTVisitor { - const requiredArgsMap = Object.create(null); + const requiredArgsMap: ObjMap< + ObjMap + > = Object.create(null); const schema = context.getSchema(); const definedDirectives = schema?.getDirectives() ?? specifiedDirectives; From 72b5a98397a03f402502f0ac44b3fef6df7f1dce Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 09:55:32 -0500 Subject: [PATCH 64/65] fix: introspection type --- src/type/__tests__/introspection-test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type/__tests__/introspection-test.ts b/src/type/__tests__/introspection-test.ts index 2e5f261e94..cb5fe8fa57 100644 --- a/src/type/__tests__/introspection-test.ts +++ b/src/type/__tests__/introspection-test.ts @@ -1571,7 +1571,7 @@ describe('Introspection', () => { } // istanbul ignore next (Called only to fail test) - function typeResolver(_1, _2, info) { + function typeResolver(_1, _2, info): undefined { expect.fail(`Called on ${info.parentType.name}::${info.fieldName}`); } From 43ce601aeea1b2f7dba857c2d2c3cc379c9d7cee Mon Sep 17 00:00:00 2001 From: Saihajpreet Singh Date: Wed, 14 Apr 2021 10:03:37 -0500 Subject: [PATCH 65/65] add eslint-disable comment --- src/subscription/__tests__/subscribe-test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/subscription/__tests__/subscribe-test.ts b/src/subscription/__tests__/subscribe-test.ts index 59900382b5..36e36c6b9a 100644 --- a/src/subscription/__tests__/subscribe-test.ts +++ b/src/subscription/__tests__/subscribe-test.ts @@ -283,12 +283,14 @@ describe('Subscription Initialization Phase', () => { }); invariant(isAsyncIterable(subscription)); + // eslint-disable-next-line @typescript-eslint/no-floating-promises subscription.next(); // Ask for a result, but ignore it. expect(didResolveImportantEmail).to.equal(true); expect(didResolveNonImportantEmail).to.equal(false); // Close subscription + // eslint-disable-next-line @typescript-eslint/no-floating-promises subscription.return(); }); @@ -746,6 +748,7 @@ describe('Subscription Publish Phase', () => { }); payload = subscription.next(); + // eslint-disable-next-line @typescript-eslint/no-floating-promises subscription.return(); // A new email arrives!