From 4495ce9f63f2a7b0e75e0fd172c6ff6a2baf4854 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Tue, 17 Aug 2021 20:38:29 +0200 Subject: [PATCH 01/16] feat(gql-tag-operations): support module augmentation --- .changeset/lucky-rabbits-build.md | 6 + dev-test/codegen.yml | 6 + .../gql-tag-operations-urql/gql/graphql.ts | 189 ++++++++++++++++++ .../gql-tag-operations-urql/gql/index.d.ts | 25 +++ .../gql-tag-operations-urql/schema.graphql | 52 +++++ dev-test/gql-tag-operations-urql/src/index.ts | 25 +++ dev-test/test-schema/resolvers-root.ts | 10 +- .../gql-tag-operations/src/index.ts | 65 ++++-- .../presets/gql-tag-operations/src/index.ts | 28 ++- 9 files changed, 376 insertions(+), 30 deletions(-) create mode 100644 .changeset/lucky-rabbits-build.md create mode 100644 dev-test/gql-tag-operations-urql/gql/graphql.ts create mode 100644 dev-test/gql-tag-operations-urql/gql/index.d.ts create mode 100644 dev-test/gql-tag-operations-urql/schema.graphql create mode 100644 dev-test/gql-tag-operations-urql/src/index.ts diff --git a/.changeset/lucky-rabbits-build.md b/.changeset/lucky-rabbits-build.md new file mode 100644 index 00000000000..30e7c833214 --- /dev/null +++ b/.changeset/lucky-rabbits-build.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/gql-tag-operations': minor +'@graphql-codegen/gql-tag-operations-preset': minor +--- + +feat: support module augumentation for extending the types of gql functions from existing packages via the `augmentedModuleName` config option. diff --git a/dev-test/codegen.yml b/dev-test/codegen.yml index 052b56a4f76..4b0f0f25760 100644 --- a/dev-test/codegen.yml +++ b/dev-test/codegen.yml @@ -392,3 +392,9 @@ generates: schema: ./dev-test/gql-tag-operations/schema.graphql documents: './dev-test/gql-tag-operations/src/**/*.ts' preset: gql-tag-operations-preset + ./dev-test/gql-tag-operations-urql/gql: + schema: ./dev-test/gql-tag-operations-urql/schema.graphql + documents: './dev-test/gql-tag-operations-urql/src/**/*.ts' + preset: gql-tag-operations-preset + presetConfig: + augmentedModuleName: '@urql/core' diff --git a/dev-test/gql-tag-operations-urql/gql/graphql.ts b/dev-test/gql-tag-operations-urql/gql/graphql.ts new file mode 100644 index 00000000000..819e3387f97 --- /dev/null +++ b/dev-test/gql-tag-operations-urql/gql/graphql.ts @@ -0,0 +1,189 @@ +/* eslint-disable */ +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +export type Maybe = T | null; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + Date: any; + Url: any; +}; + +export type Meta = { + __typename?: 'Meta'; + count?: Maybe; +}; + +export type Mutation = { + __typename?: 'Mutation'; + createTweet?: Maybe; + deleteTweet?: Maybe; + markTweetRead?: Maybe; +}; + +export type MutationCreateTweetArgs = { + body?: Maybe; +}; + +export type MutationDeleteTweetArgs = { + id: Scalars['ID']; +}; + +export type MutationMarkTweetReadArgs = { + id: Scalars['ID']; +}; + +export type Notification = { + __typename?: 'Notification'; + date?: Maybe; + id?: Maybe; + type?: Maybe; +}; + +export type Query = { + __typename?: 'Query'; + Notifications?: Maybe>>; + NotificationsMeta?: Maybe; + Tweet?: Maybe; + Tweets?: Maybe>>; + TweetsMeta?: Maybe; + User?: Maybe; +}; + +export type QueryNotificationsArgs = { + limit?: Maybe; +}; + +export type QueryTweetArgs = { + id: Scalars['ID']; +}; + +export type QueryTweetsArgs = { + limit?: Maybe; + skip?: Maybe; + sort_field?: Maybe; + sort_order?: Maybe; +}; + +export type QueryUserArgs = { + id: Scalars['ID']; +}; + +export type Stat = { + __typename?: 'Stat'; + likes?: Maybe; + responses?: Maybe; + retweets?: Maybe; + views?: Maybe; +}; + +export type Tweet = { + __typename?: 'Tweet'; + Author?: Maybe; + Stats?: Maybe; + body?: Maybe; + date?: Maybe; + id: Scalars['ID']; +}; + +export type User = { + __typename?: 'User'; + avatar_url?: Maybe; + first_name?: Maybe; + full_name?: Maybe; + id: Scalars['ID']; + last_name?: Maybe; + /** @deprecated Field no longer supported */ + name?: Maybe; + username?: Maybe; +}; + +export type FooQueryVariables = Exact<{ [key: string]: never }>; + +export type FooQuery = { + __typename?: 'Query'; + Tweets?: Array<{ __typename?: 'Tweet'; id: string } | null | undefined> | null | undefined; +}; + +export type LelFragment = { __typename?: 'Tweet'; id: string; body?: string | null | undefined }; + +export type BarQueryVariables = Exact<{ [key: string]: never }>; + +export type BarQuery = { + __typename?: 'Query'; + Tweets?: + | Array<{ __typename?: 'Tweet'; id: string; body?: string | null | undefined } | null | undefined> + | null + | undefined; +}; + +export const LelFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Lel' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Tweet' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'body' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const FooDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'Foo' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'Tweets' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'id' } }], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const BarDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'Bar' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'Tweets' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Lel' } }], + }, + }, + ], + }, + }, + ...LelFragmentDoc.definitions, + ], +} as unknown as DocumentNode; diff --git a/dev-test/gql-tag-operations-urql/gql/index.d.ts b/dev-test/gql-tag-operations-urql/gql/index.d.ts new file mode 100644 index 00000000000..985f0834eb5 --- /dev/null +++ b/dev-test/gql-tag-operations-urql/gql/index.d.ts @@ -0,0 +1,25 @@ +/* eslint-disable */ +declare module '@urql/core' { + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + + export function gql( + source: '\n query Foo {\n Tweets {\n id\n }\n }\n' + ): typeof import('./graphql').FooDocument; + + export function gql( + source: '\n fragment Lel on Tweet {\n id\n body\n }\n' + ): typeof import('./graphql').LelFragmentDoc; + + export function gql( + source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' + ): typeof import('./graphql').BarDocument; + + export function gql(source: string): unknown; + + export type DocumentType> = TDocumentNode extends DocumentNode< + infer TType, + any + > + ? TType + : never; +} diff --git a/dev-test/gql-tag-operations-urql/schema.graphql b/dev-test/gql-tag-operations-urql/schema.graphql new file mode 100644 index 00000000000..fe7ab4d8c8f --- /dev/null +++ b/dev-test/gql-tag-operations-urql/schema.graphql @@ -0,0 +1,52 @@ +scalar Url +scalar Date + +type Tweet { + id: ID! + body: String + date: Date + Author: User + Stats: Stat +} + +type User { + id: ID! + username: String + first_name: String + last_name: String + full_name: String + name: String @deprecated + avatar_url: Url +} + +type Stat { + views: Int + likes: Int + retweets: Int + responses: Int +} + +type Notification { + id: ID + date: Date + type: String +} + +type Meta { + count: Int +} + +type Query { + Tweet(id: ID!): Tweet + Tweets(limit: Int, skip: Int, sort_field: String, sort_order: String): [Tweet] + TweetsMeta: Meta + User(id: ID!): User + Notifications(limit: Int): [Notification] + NotificationsMeta: Meta +} + +type Mutation { + createTweet(body: String): Tweet + deleteTweet(id: ID!): Tweet + markTweetRead(id: ID!): Boolean +} diff --git a/dev-test/gql-tag-operations-urql/src/index.ts b/dev-test/gql-tag-operations-urql/src/index.ts new file mode 100644 index 00000000000..efa1372c767 --- /dev/null +++ b/dev-test/gql-tag-operations-urql/src/index.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { gql } from 'urql'; + +const FooQuery = gql(/* GraphQL */ ` + query Foo { + Tweets { + id + } + } +`); + +const LelFragment = gql(/* GraphQL */ ` + fragment Lel on Tweet { + id + body + } +`); + +const BarQuery = gql(/* GraphQL */ ` + query Bar { + Tweets { + ...Lel + } + } +`); diff --git a/dev-test/test-schema/resolvers-root.ts b/dev-test/test-schema/resolvers-root.ts index 08d7d47fdde..0af6c89358b 100644 --- a/dev-test/test-schema/resolvers-root.ts +++ b/dev-test/test-schema/resolvers-root.ts @@ -117,8 +117,8 @@ export type DirectiveResolverFn; Int: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; - QueryRoot: ResolverTypeWrapper; + Query: ResolverTypeWrapper; + QueryRoot: ResolverTypeWrapper<{}>; String: ResolverTypeWrapper; SubscriptionRoot: ResolverTypeWrapper<{}>; User: ResolverTypeWrapper; @@ -128,8 +128,8 @@ export type ResolversTypes = { export type ResolversParentTypes = { Boolean: Scalars['Boolean']; Int: Scalars['Int']; - Query: {}; - QueryRoot: QueryRoot; + Query: Query; + QueryRoot: {}; String: Scalars['String']; SubscriptionRoot: {}; User: User; @@ -140,6 +140,7 @@ export type QueryResolvers< ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'] > = { someDummyField?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; }; export type QueryRootResolvers< @@ -154,7 +155,6 @@ export type QueryRootResolvers< ContextType, RequireFields >; - __isTypeOf?: IsTypeOfResolverFn; }; export type SubscriptionRootResolvers< diff --git a/packages/plugins/typescript/gql-tag-operations/src/index.ts b/packages/plugins/typescript/gql-tag-operations/src/index.ts index bb888118102..0ea0ce20cdc 100644 --- a/packages/plugins/typescript/gql-tag-operations/src/index.ts +++ b/packages/plugins/typescript/gql-tag-operations/src/index.ts @@ -24,26 +24,45 @@ export type DocumentType> = TDocume export const plugin: PluginFunction<{ sourcesWithOperations: Array; useTypeImports?: boolean; -}> = (_, __, { sourcesWithOperations, useTypeImports }, _info) => { + augmentedModuleName?: string; +}> = (_, __, { sourcesWithOperations, useTypeImports, augmentedModuleName }, _info) => { if (!sourcesWithOperations) { return ''; } + + if (augmentedModuleName == null) { + return [ + `import * as graphql from './graphql';\n`, + `${ + useTypeImports ? 'import type' : 'import' + } { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, + `\n`, + ...getDocumentRegistryChunk(sourcesWithOperations), + `\n`, + ...getGqlOverloadChunk(sourcesWithOperations, 'lookup'), + `\n`, + `export function gql(source: string): unknown;\n`, + `export function gql(source: string) {\n`, + ` return (documents as any)[source] ?? {};\n`, + `}\n`, + documentTypePartial, + ].join(``); + } + return [ - `import * as graphql from './graphql';\n`, - `${ - useTypeImports ? 'import type' : 'import' - } { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, - `\n`, - ...getDocumentRegistryChunk(sourcesWithOperations), - `\n`, - ...getGqlOverloadChunk(sourcesWithOperations), - `\n`, - `export function gql(source: string): unknown;\n`, - `export function gql(source: string) {\n`, - ` return (documents as any)[source] ?? {};\n`, - `}\n`, - documentTypePartial, - ].join(``); + `declare module "${augmentedModuleName}" {`, + [ + `import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, + `\n`, + ...getGqlOverloadChunk(sourcesWithOperations, 'augmented'), + `export function gql(source: string): unknown;\n`, + documentTypePartial, + ] + .map(line => (line === `\n` ? line : ` ${line}`)) + .join(`\n`), + + `}`, + ].join(`\n`); }; function getDocumentRegistryChunk(sourcesWithOperations: Array = []) { @@ -62,18 +81,20 @@ function getDocumentRegistryChunk(sourcesWithOperations: Array) { +type Mode = 'lookup' | 'augmented'; + +function getGqlOverloadChunk(sourcesWithOperations: Array, mode: Mode) { const lines = new Set(); // We intentionally don't use a generic, because TS // would print very long `gql` function signatures (duplicating the source). for (const { operations, ...rest } of sourcesWithOperations) { const originalString = rest.source.rawSDL!; - lines.add( - `export function gql(source: ${JSON.stringify(originalString)}): (typeof documents)[${JSON.stringify( - originalString - )}];\n` - ); + const returnType = + mode === 'lookup' + ? `(typeof documents)[${JSON.stringify(originalString)}]` + : `typeof import('./graphql').${operations[0].initialName};`; + lines.add(`export function gql(source: ${JSON.stringify(originalString)}): ${returnType};\n`); } return lines; diff --git a/packages/presets/gql-tag-operations/src/index.ts b/packages/presets/gql-tag-operations/src/index.ts index 846a4a04c19..6c3ffab99da 100644 --- a/packages/presets/gql-tag-operations/src/index.ts +++ b/packages/presets/gql-tag-operations/src/index.ts @@ -8,7 +8,24 @@ import * as gqlTagPlugin from '@graphql-codegen/gql-tag-operations'; import { processSources } from './process-sources'; import { ClientSideBaseVisitor } from '@graphql-codegen/visitor-plugin-common'; -export type GqlTagConfig = {}; +export type GqlTagConfig = { + /** + * @description Instead of generating a `gql` function, this preset can also generate a d.ts that will enhance the `gql` function of your framework. + * + * E.g. `graphql-tag` or `@urql/core`. + * + * @exampleMarkdown + * ```yml + * generates: + * gql/: + * preset: gql-tag-operations-preset + * presetConfig: + * augmentedModuleName: '@urql/core' + * + * ``` + */ + augmentedModuleName?: string; +}; export const preset: Types.OutputPreset = { buildGeneratesSection: options => { @@ -43,6 +60,8 @@ export const preset: Types.OutputPreset = { { [`gen-dts`]: { sourcesWithOperations } }, ]; + const artifactFileExtension = options.presetConfig.augmentedModuleName == null ? `ts` : `d.ts`; + return [ { filename: `${options.baseOutputDir}/graphql.ts`, @@ -53,11 +72,14 @@ export const preset: Types.OutputPreset = { documents: sources, }, { - filename: `${options.baseOutputDir}/index.ts`, + filename: `${options.baseOutputDir}/index.${artifactFileExtension}`, plugins: genDtsPlugins, pluginMap, schema: options.schema, - config: options.config, + config: { + ...options.config, + augmentedModuleName: options.presetConfig.augmentedModuleName, + }, documents: sources, }, ]; From 8a9722541b86b30e67e33284000f14a13863f71a Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Tue, 17 Aug 2021 20:53:24 +0200 Subject: [PATCH 02/16] refactor: change style of generated artifact --- dev-test/gql-tag-operations-urql/gql/index.d.ts | 3 --- .../typescript/gql-tag-operations/src/index.ts | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dev-test/gql-tag-operations-urql/gql/index.d.ts b/dev-test/gql-tag-operations-urql/gql/index.d.ts index 985f0834eb5..fed8bf093b2 100644 --- a/dev-test/gql-tag-operations-urql/gql/index.d.ts +++ b/dev-test/gql-tag-operations-urql/gql/index.d.ts @@ -5,15 +5,12 @@ declare module '@urql/core' { export function gql( source: '\n query Foo {\n Tweets {\n id\n }\n }\n' ): typeof import('./graphql').FooDocument; - export function gql( source: '\n fragment Lel on Tweet {\n id\n body\n }\n' ): typeof import('./graphql').LelFragmentDoc; - export function gql( source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' ): typeof import('./graphql').BarDocument; - export function gql(source: string): unknown; export type DocumentType> = TDocumentNode extends DocumentNode< diff --git a/packages/plugins/typescript/gql-tag-operations/src/index.ts b/packages/plugins/typescript/gql-tag-operations/src/index.ts index 0ea0ce20cdc..1e38e30903c 100644 --- a/packages/plugins/typescript/gql-tag-operations/src/index.ts +++ b/packages/plugins/typescript/gql-tag-operations/src/index.ts @@ -19,7 +19,7 @@ export type DocumentType> = TDocume > ? TType : never; -`; +`.split(`\n`); export const plugin: PluginFunction<{ sourcesWithOperations: Array; @@ -45,7 +45,8 @@ export const plugin: PluginFunction<{ `export function gql(source: string) {\n`, ` return (documents as any)[source] ?? {};\n`, `}\n`, - documentTypePartial, + `\n`, + ...documentTypePartial, ].join(``); } @@ -56,11 +57,11 @@ export const plugin: PluginFunction<{ `\n`, ...getGqlOverloadChunk(sourcesWithOperations, 'augmented'), `export function gql(source: string): unknown;\n`, - documentTypePartial, + `\n`, + ...documentTypePartial, ] .map(line => (line === `\n` ? line : ` ${line}`)) - .join(`\n`), - + .join(``), `}`, ].join(`\n`); }; @@ -92,7 +93,7 @@ function getGqlOverloadChunk(sourcesWithOperations: Array, const originalString = rest.source.rawSDL!; const returnType = mode === 'lookup' - ? `(typeof documents)[${JSON.stringify(originalString)}]` + ? `(typeof documents)[${JSON.stringify(originalString)}];` : `typeof import('./graphql').${operations[0].initialName};`; lines.add(`export function gql(source: ${JSON.stringify(originalString)}): ${returnType};\n`); } From ea32e56db08b6ff586061a5a3d518708f2f9d161 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Tue, 17 Aug 2021 21:07:55 +0200 Subject: [PATCH 03/16] fix: move import statement outside the module declaration --- dev-test/gql-tag-operations-urql/gql/index.d.ts | 4 ++-- packages/plugins/typescript/gql-tag-operations/src/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-test/gql-tag-operations-urql/gql/index.d.ts b/dev-test/gql-tag-operations-urql/gql/index.d.ts index fed8bf093b2..2bb13e0433b 100644 --- a/dev-test/gql-tag-operations-urql/gql/index.d.ts +++ b/dev-test/gql-tag-operations-urql/gql/index.d.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -declare module '@urql/core' { - import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +declare module '@urql/core' { export function gql( source: '\n query Foo {\n Tweets {\n id\n }\n }\n' ): typeof import('./graphql').FooDocument; diff --git a/packages/plugins/typescript/gql-tag-operations/src/index.ts b/packages/plugins/typescript/gql-tag-operations/src/index.ts index 1e38e30903c..54aac5f1bcc 100644 --- a/packages/plugins/typescript/gql-tag-operations/src/index.ts +++ b/packages/plugins/typescript/gql-tag-operations/src/index.ts @@ -51,9 +51,9 @@ export const plugin: PluginFunction<{ } return [ + `import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, `declare module "${augmentedModuleName}" {`, [ - `import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, `\n`, ...getGqlOverloadChunk(sourcesWithOperations, 'augmented'), `export function gql(source: string): unknown;\n`, From 892b384c90118bb44d61a4d00e80afd6a1f2630e Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 10:13:22 +0200 Subject: [PATCH 04/16] add first draft of babel plugin --- .../presets/gql-tag-operations/package.json | 17 +- .../presets/gql-tag-operations/src/babel.ts | 75 ++ .../gql-tag-operations/tests/babel.spec.ts | 29 + .../simple-lowercase-operation-name.ts | 12 +- .../simple-uppercase-operation-name.ts | 12 +- yarn.lock | 1179 +++++++++-------- 6 files changed, 745 insertions(+), 579 deletions(-) create mode 100644 packages/presets/gql-tag-operations/src/babel.ts create mode 100644 packages/presets/gql-tag-operations/tests/babel.spec.ts diff --git a/packages/presets/gql-tag-operations/package.json b/packages/presets/gql-tag-operations/package.json index 5385286498c..9424fe19ead 100644 --- a/packages/presets/gql-tag-operations/package.json +++ b/packages/presets/gql-tag-operations/package.json @@ -14,15 +14,18 @@ "prepack": "bob prepack" }, "devDependencies": { - "@types/parse-filepath": "1.0.0" + "@types/babel__helper-plugin-utils": "7.10.0", + "@types/babel__template": "7.4.1" }, "dependencies": { - "@graphql-codegen/add": "3.1.0", - "@graphql-codegen/typed-document-node": "2.1.4", - "@graphql-codegen/typescript": "2.2.2", - "@graphql-codegen/typescript-operations": "2.1.6", - "@graphql-codegen/gql-tag-operations": "1.1.5", - "tslib": "2.3.1" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/template": "^7.15.4", + "@graphql-codegen/add": "^3.1.0", + "@graphql-codegen/typed-document-node": "^2.1.4", + "@graphql-codegen/typescript": "^2.2.2", + "@graphql-codegen/typescript-operations": "^2.1.6", + "@graphql-codegen/gql-tag-operations": "^1.1.5", + "tslib": "~2.3.0" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" diff --git a/packages/presets/gql-tag-operations/src/babel.ts b/packages/presets/gql-tag-operations/src/babel.ts new file mode 100644 index 00000000000..9b1dd4b1778 --- /dev/null +++ b/packages/presets/gql-tag-operations/src/babel.ts @@ -0,0 +1,75 @@ +import type { PluginObj } from '@babel/core'; +import { declare } from '@babel/helper-plugin-utils'; +import template from '@babel/template'; +import type { NodePath } from '@babel/traverse'; +import type { Program } from '@babel/types'; +import { parse } from 'graphql'; + +const gqlMagicComment = 'graphql'; + +export default declare((api): PluginObj => { + let program: NodePath; + return { + name: 'gql-tag-operations', + visitor: { + Program(path) { + // TODO: load codegen config + // TODO: initialize ClientSideBaseVisitor + + program = path; + }, + CallExpression(path) { + if (path.node.callee.type !== 'Identifier' || path.node.callee.name !== 'gql') { + return; + } + const [argument] = path.node.arguments; + if (argument == null) { + return; + } + if (argument.type !== 'TemplateLiteral') { + return; + } + + const [leadingComment] = argument.leadingComments; + + if (leadingComment == null) { + return; + } + + const leadingCommentValue = leadingComment.value.trim().toLowerCase(); + + if (leadingCommentValue !== gqlMagicComment) { + return; + } + + const [content] = argument.quasis; + const ast = parse(content.value.raw); + + const [firstDefinition] = ast.definitions; + + if (firstDefinition.kind !== 'FragmentDefinition' && firstDefinition.kind !== 'OperationDefinition') { + return; + } + + if (firstDefinition.name == null) { + return; + } + + // TODO: use ClientSideBaseVisitor.getFragmentVariableName or ClientSideBaseVisitor.getOperationVariableName for generating the import name + const operationOrFragmentName = firstDefinition.name.value; + + // TODO: figure out how to get the correct "./gql/graphql" when operating within nested stuff + const importDeclaration = template(` + import { %%importName%% } from "./gql/graphql" + `); + program.unshiftContainer( + 'body', + importDeclaration({ + importName: api.types.identifier(operationOrFragmentName), + }) + ); + path.replaceWith(api.types.identifier(operationOrFragmentName)); + }, + }, + }; +}); diff --git a/packages/presets/gql-tag-operations/tests/babel.spec.ts b/packages/presets/gql-tag-operations/tests/babel.spec.ts new file mode 100644 index 00000000000..d4918c8db49 --- /dev/null +++ b/packages/presets/gql-tag-operations/tests/babel.spec.ts @@ -0,0 +1,29 @@ +import { transformFileSync } from '@babel/core'; +import * as path from 'path'; +import babelPlugin from '../src/babel'; + +describe('gql-tag-operations-preset > babelPlugin', () => { + test('can do sth', () => { + const result = transformFileSync(path.join(__dirname, 'fixtures/simple-uppercase-operation-name.ts'), { + plugins: [[babelPlugin]], + babelrc: false, + configFile: false, + }).code; + // TODO: update snapshot once implementation is fixed :) + expect(result).toMatchInlineSnapshot(` +"import { C } from \\"./gql/graphql\\"; +import { B } from \\"./gql/graphql\\"; +import { A } from \\"./gql/graphql\\"; + +/* eslint-disable @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/ban-ts-comment */ +//@ts-ignore +import gql from 'gql'; //@ts-ignore + +const A = A; //@ts-ignore + +const B = B; //@ts-ignore + +const C = C;" +`); + }); +}); diff --git a/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts b/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts index 580796e814f..fbaa44fffbf 100644 --- a/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts +++ b/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts @@ -3,22 +3,22 @@ import gql from 'gql'; //@ts-ignore -const A = gql` +const A = gql(/* GraphQL */ ` query a { a } -`; +`); //@ts-ignore -const B = gql` +const B = gql(/* GraphQL */ ` query b { b } -`; +`); //@ts-ignore -const C = gql` +const C = gql(/* GraphQL */ ` query c { c } -`; +`); diff --git a/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts b/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts index eb22b360ca5..a1b044454f9 100644 --- a/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts +++ b/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts @@ -3,22 +3,22 @@ import gql from 'gql'; //@ts-ignore -const A = gql` +const A = gql(/* GraphQL */ ` query A { a } -`; +`); //@ts-ignore -const B = gql` +const B = gql(/* GraphQL */ ` query B { b } -`; +`); //@ts-ignore -const C = gql` +const C = gql(/* GraphQL */ ` query C { c } -`; +`); diff --git a/yarn.lock b/yarn.lock index 9992bb529c3..07315e1aacf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,128 +2,128 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.2.1.tgz#95fc07cfa40b5a38e3f80acd75d1fb94968215a8" - integrity sha512-/SLS6636Wpl7eFiX7eEy0E3wBo60sUm1qRYybJBDt1fs8reiJ1+OSy+dZgrLBfLL4mSFqRIIUHXbVp25QdZ+iw== +"@algolia/autocomplete-core@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.2.2.tgz#c121e70c78fd0175c989a219918124ad7758e48b" + integrity sha512-JOQaURze45qVa8OOFDh+ozj2a/ObSRsVyz6Zd0aiBeej+RSTqrr1hDVpGNbbXYLW26G5ujuc9QIdH+rBHn95nw== dependencies: - "@algolia/autocomplete-shared" "1.2.1" + "@algolia/autocomplete-shared" "1.2.2" -"@algolia/autocomplete-preset-algolia@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.2.1.tgz#bda1741823268ff76ba78306259036f000198e01" - integrity sha512-Lf4PpPVgHNXm1ytrnVdrZYV7hAYSCpAI/TrebF8UC6xflPY6sKb1RL/2OfrO9On7SDjPBtNd+6MArSar5JmK0g== +"@algolia/autocomplete-preset-algolia@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.2.2.tgz#da734ef9e42a5f64cdad2dfc81c4e9fbf805d976" + integrity sha512-AZkh+bAMaJDzMZTelFOXJTJqkp5VPGH8W3n0B+Ggce7DdozlMRsDLguKTCQAkZ0dJ1EbBPyFL5ztL/JImB137Q== dependencies: - "@algolia/autocomplete-shared" "1.2.1" + "@algolia/autocomplete-shared" "1.2.2" -"@algolia/autocomplete-shared@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.2.1.tgz#96f869fb2285ed6a34a5ac2509722c065df93016" - integrity sha512-RHCwcXAYFwDXTlomstjWRFIzOfyxtQ9KmViacPE5P5hxUSSjkmG3dAb77xdydift1PaZNbho5TNTCi5UZe0RpA== +"@algolia/autocomplete-shared@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.2.2.tgz#ff25dc308f2a296b2b9b325f1e3b57498eea3e0c" + integrity sha512-mLTl7d2C1xVVazHt/bqh9EE/u2lbp5YOxLDdcjILXmUqOs5HH1D4SuySblXaQG1uf28FhTqMGp35qE5wJQnqAw== -"@algolia/cache-browser-local-storage@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.10.3.tgz#3bf81e0f66a4a1079a75914a987eb1ef432c7c68" - integrity sha512-TD1N7zg5lb56/PLjjD4bBl2eccEvVHhC7yfgFu2r9k5tf+gvbGxEZ3NhRZVKu2MObUIcEy2VR4LVLxOQu45Hlg== +"@algolia/cache-browser-local-storage@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.10.5.tgz#961cf07cf59955de17af13bd74f7806bd2119553" + integrity sha512-cfX2rEKOtuuljcGI5DMDHClwZHdDqd2nT2Ohsc8aHtBiz6bUxKVyIqxr2gaC6tU8AgPtrTVBzcxCA+UavXpKww== dependencies: - "@algolia/cache-common" "4.10.3" + "@algolia/cache-common" "4.10.5" -"@algolia/cache-common@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.10.3.tgz#311b2b5ae06d55300f4230944c99bc39ad15847d" - integrity sha512-q13cPPUmtf8a2suBC4kySSr97EyulSXuxUkn7l1tZUCX/k1y5KNheMp8npBy8Kc8gPPmHpacxddRSfOncjiKFw== +"@algolia/cache-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.10.5.tgz#9510419e9dfb6d8814582c6b20615196f213a9d6" + integrity sha512-1mClwdmTHll+OnHkG+yeRoFM17kSxDs4qXkjf6rNZhoZGXDvfYLy3YcZ1FX4Kyz0DJv8aroq5RYGBDsWkHj6Tw== -"@algolia/cache-in-memory@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.10.3.tgz#697e4994538426272ea29ccf2b32b46ea4c48862" - integrity sha512-JhPajhOXAjUP+TZrZTh6KJpF5VKTKyWK2aR1cD8NtrcVHwfGS7fTyfXfVm5BqBqkD9U0gVvufUt/mVyI80aZww== +"@algolia/cache-in-memory@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.10.5.tgz#de9331cb86734bf7f7624063cdaa639e43509be1" + integrity sha512-+ciQnfIGi5wjMk02XhEY8fmy2pzy+oY1nIIfu8LBOglaSipCRAtjk6WhHc7/KIbXPiYzIwuDbM2K1+YOwSGjwA== dependencies: - "@algolia/cache-common" "4.10.3" + "@algolia/cache-common" "4.10.5" -"@algolia/client-account@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.10.3.tgz#f2cbefb1abce74c341115607d6af199df1b056ae" - integrity sha512-S/IsJB4s+e1xYctdpW3nAbwrR2y3pjSo9X21fJGoiGeIpTRdvQG7nydgsLkhnhcgAdLnmqBapYyAqMGmlcyOkg== +"@algolia/client-account@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.10.5.tgz#82f7c330fc5f0625b5b559afe9c6b1aa6722b6cf" + integrity sha512-I9UkSS2glXm7RBZYZIALjBMmXSQbw/fI/djPcBHxiwXIheNIlqIFl2SNPkvihpPF979BSkzjqdJNRPhE1vku3Q== dependencies: - "@algolia/client-common" "4.10.3" - "@algolia/client-search" "4.10.3" - "@algolia/transporter" "4.10.3" + "@algolia/client-common" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/client-analytics@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.10.3.tgz#43d934ef8df0cf551c78e6b2e9f2452e7fb27d93" - integrity sha512-vlHTbBqJktRgclh3v7bPQLfZvFIqY4erNFIZA5C7nisCj9oLeTgzefoUrr+R90+I+XjfoLxnmoeigS1Z1yg1vw== +"@algolia/client-analytics@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.10.5.tgz#269e47c9de7e53e9e05e4a2d3c380607c3d2631f" + integrity sha512-h2owwJSkovPxzc+xIsjY1pMl0gj+jdVwP9rcnGjlaTY2fqHbSLrR9yvGyyr6305LvTppxsQnfAbRdE/5Z3eFxw== dependencies: - "@algolia/client-common" "4.10.3" - "@algolia/client-search" "4.10.3" - "@algolia/requester-common" "4.10.3" - "@algolia/transporter" "4.10.3" + "@algolia/client-common" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/client-common@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.10.3.tgz#c4257dd5c57c5c8ec4bd48a7b1897573e372d403" - integrity sha512-uFyP2Z14jG2hsFRbAoavna6oJf4NTXaSDAZgouZUZlHlBp5elM38sjNeA5HR9/D9J/GjwaB1SgB7iUiIWYBB4w== +"@algolia/client-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.10.5.tgz#a7d0833796a9a2da68be16be76b6dc3962bf2f18" + integrity sha512-21FAvIai5qm8DVmZHm2Gp4LssQ/a0nWwMchAx+1hIRj1TX7OcdW6oZDPyZ8asQdvTtK7rStQrRnD8a95SCUnzA== dependencies: - "@algolia/requester-common" "4.10.3" - "@algolia/transporter" "4.10.3" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/client-personalization@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.10.3.tgz#58c800f90ab8ab4aa29abdf29a97e89e6bda419e" - integrity sha512-NS7Nx8EJ/nduGXT8CFo5z7kLF0jnFehTP3eC+z+GOEESH3rrs7uR12IZHxv5QhQswZa9vl925zCOZDcDVoENCg== +"@algolia/client-personalization@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.10.5.tgz#78a8fb8161bdbeaa66b400b3283640ef689e155b" + integrity sha512-nH+IyFKBi8tCyzGOanJTbXC5t4dspSovX3+ABfmwKWUYllYzmiQNFUadpb3qo+MLA3jFx5IwBesjneN6dD5o3w== dependencies: - "@algolia/client-common" "4.10.3" - "@algolia/requester-common" "4.10.3" - "@algolia/transporter" "4.10.3" + "@algolia/client-common" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/client-search@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.10.3.tgz#aa6b02c2d528cb264830f276739b7f68b58988ef" - integrity sha512-Zwnp2G94IrNFKWCG/k7epI5UswRkPvL9FCt7/slXe2bkjP2y/HA37gzRn+9tXoLVRwd7gBzrtOA4jFKIyjrtVw== +"@algolia/client-search@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.10.5.tgz#47907232a3e4ecf2aa4459b8de17242afd88147c" + integrity sha512-1eQFMz9uodrc5OM+9HeT+hHcfR1E1AsgFWXwyJ9Q3xejA2c1c4eObGgOgC9ZoshuHHdptaTN1m3rexqAxXRDBg== dependencies: - "@algolia/client-common" "4.10.3" - "@algolia/requester-common" "4.10.3" - "@algolia/transporter" "4.10.3" + "@algolia/client-common" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/transporter" "4.10.5" -"@algolia/logger-common@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.3.tgz#6773d2e38581bf9ac57e2dda02f0c4f1bc72ce94" - integrity sha512-M6xi+qov2bkgg1H9e1Qtvq/E/eKsGcgz8RBbXNzqPIYoDGZNkv+b3b8YMo3dxd4Wd6M24HU1iqF3kmr1LaXndg== +"@algolia/logger-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.10.5.tgz#cf807107e755ad4a72c5afc787e968ff1196f1cc" + integrity sha512-gRJo9zt1UYP4k3woEmZm4iuEBIQd/FrArIsjzsL/b+ihNoOqIxZKTSuGFU4UUZOEhvmxDReiA4gzvQXG+TMTmA== -"@algolia/logger-console@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.10.3.tgz#bd8bdc1f9dba89db37be25d673ac1f2e68de7913" - integrity sha512-vVgRI7b4PHjgBdRkv/cRz490twvkLoGdpC4VYzIouSrKj8SIVLRhey3qgXk7oQXi3xoxVAv6NrklHfpO8Bpx0w== +"@algolia/logger-console@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.10.5.tgz#f961a7a7c6718c3f3842fb9b522d47b03b9df8ad" + integrity sha512-4WfIbn4253EDU12u9UiYvz+QTvAXDv39mKNg9xSoMCjKE5szcQxfcSczw2byc6pYhahOJ9PmxPBfs1doqsdTKQ== dependencies: - "@algolia/logger-common" "4.10.3" + "@algolia/logger-common" "4.10.5" -"@algolia/requester-browser-xhr@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.10.3.tgz#81ae8f6caf562a28f96102f03da7f4b19bba568c" - integrity sha512-4WIk1zreFbc1EF6+gsfBTQvwSNjWc20zJAAExRWql/Jq5yfVHmwOqi/CajA53/cXKFBqo80DAMRvOiwP+hOLYw== +"@algolia/requester-browser-xhr@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.10.5.tgz#7063e3bc6d9c72bc535e1794352eddf47459dfe6" + integrity sha512-53/MURQEqtK+bGdfq4ITSPwTh5hnADU99qzvpAINGQveUFNSFGERipJxHjTJjIrjFz3vxj5kKwjtxDnU6ygO9g== dependencies: - "@algolia/requester-common" "4.10.3" + "@algolia/requester-common" "4.10.5" -"@algolia/requester-common@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.10.3.tgz#c3112393cff97be79863bc28de76f9c69b2f5a95" - integrity sha512-PNfLHmg0Hujugs3rx55uz/ifv7b9HVdSFQDb2hj0O5xZaBEuQCNOXC6COrXR8+9VEfqp2swpg7zwgtqFxh+BtQ== +"@algolia/requester-common@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.10.5.tgz#52abfbf10b743d26afd3ce20f62771bc393ff4f0" + integrity sha512-UkVa1Oyuj6NPiAEt5ZvrbVopEv1m/mKqjs40KLB+dvfZnNcj+9Fry4Oxnt15HMy/HLORXsx4UwcthAvBuOXE9Q== -"@algolia/requester-node-http@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.10.3.tgz#75ea7805ac0ba25a1124989d8632ef39c31441c1" - integrity sha512-A9ZcGfEvgqf0luJApdNcIhsRh6MShn2zn2tbjwjGG1joF81w+HUY+BWuLZn56vGwAA9ZB9n00IoJJpxibbfofg== +"@algolia/requester-node-http@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.10.5.tgz#db7e9ece1fda1b71a28c8e623666aaa096320b5c" + integrity sha512-aNEKVKXL4fiiC+bS7yJwAHdxln81ieBwY3tsMCtM4zF9f5KwCzY2OtN4WKEZa5AAADVcghSAUdyjs4AcGUlO5w== dependencies: - "@algolia/requester-common" "4.10.3" + "@algolia/requester-common" "4.10.5" -"@algolia/transporter@4.10.3": - version "4.10.3" - resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.10.3.tgz#0aeee752923957cffe63e4cf1c7a22ca48d96dde" - integrity sha512-n1lRyKDbrckbMEgm7QXtj3nEWUuzA3aKLzVQ43/F/RCFib15j4IwtmYhXR6OIBRSc7+T0Hm48S0J6F+HeYCQkw== +"@algolia/transporter@4.10.5": + version "4.10.5" + resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.10.5.tgz#9354989f12af3e2ce7d3109a94f519d467a960e0" + integrity sha512-F8DLkmIlvCoMwSCZA3FKHtmdjH3o5clbt0pi2ktFStVNpC6ZDmY307HcK619bKP5xW6h8sVJhcvrLB775D2cyA== dependencies: - "@algolia/cache-common" "4.10.3" - "@algolia/logger-common" "4.10.3" - "@algolia/requester-common" "4.10.3" + "@algolia/cache-common" "4.10.5" + "@algolia/logger-common" "4.10.5" + "@algolia/requester-common" "4.10.5" "@apollo/client@3.4.16": version "3.4.16" @@ -272,12 +272,12 @@ "@babel/types" "^7.15.4" "@babel/helper-builder-binary-assignment-operator-visitor@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz#b939b43f8c37765443a19ae74ad8b15978e0a191" - integrity sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w== + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz#21ad815f609b84ee0e3058676c33cf6d1670525f" + integrity sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q== dependencies: - "@babel/helper-explode-assignable-expression" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/helper-explode-assignable-expression" "^7.15.4" + "@babel/types" "^7.15.4" "@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.15.4": version "7.15.4" @@ -289,7 +289,7 @@ browserslist "^4.16.6" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.15.0", "@babel/helper-create-class-features-plugin@^7.15.4": +"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz#7f977c17bd12a5fba363cb19bea090394bf37d2e" integrity sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw== @@ -323,12 +323,12 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-explode-assignable-expression@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz#8aa72e708205c7bb643e45c73b4386cdf2a1f645" - integrity sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ== +"@babel/helper-explode-assignable-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz#f9aec9d219f271eaf92b9f561598ca6b2682600c" + integrity sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.15.4" "@babel/helper-function-name@^7.14.5", "@babel/helper-function-name@^7.15.4": version "7.15.4" @@ -481,7 +481,12 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA== -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.12.16", "@babel/parser@^7.12.5", "@babel/parser@^7.12.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8", "@babel/parser@^7.7.2": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.12.16", "@babel/parser@^7.12.5", "@babel/parser@^7.12.7", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.7.2": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" + integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== + +"@babel/parser@^7.15.8": version "7.15.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== @@ -1066,11 +1071,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-typescript@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz#553f230b9d5385018716586fc48db10dd228eb7e" - integrity sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w== + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.4.tgz#db7a062dcf8be5fc096bc0eeb40a13fbfa1fa251" + integrity sha512-sM1/FEjwYjXvMwu1PJStH11kJ154zd/lpY56NQJ5qH2D0mabMv1CAy/kdvS9RP4Xgfj9fBBA3JiSLdDHgXdzOA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.15.0" + "@babel/helper-create-class-features-plugin" "^7.15.4" "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript" "^7.14.5" @@ -1201,17 +1206,17 @@ "@babel/plugin-transform-typescript" "^7.15.0" "@babel/runtime-corejs3@^7.12.13": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.9.tgz#fb21b1cf11650dcb8fcf4de2e6b3b8cf411da3f3" - integrity sha512-64RiH2ON4/y8qYtoa8rUiyam/tUVyGqRyNYhe+vCRGmjnV4bUlZvY+mwd0RrmLoCpJpdq3RsrNqKb7SJdw/4kw== + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.15.4.tgz#403139af262b9a6e8f9ba04a6fdcebf8de692bf1" + integrity sha512-lWcAqKeB624/twtTc3w6w/2o9RqJPaNBhPGK6DKLSiwuVWC7WFkypWyNg+CpZoyJH0jVzv1uMtXZ/5/lQOLtCg== dependencies: core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.4", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" - integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.4", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== dependencies: regenerator-runtime "^0.13.4" @@ -1262,7 +1267,7 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.14.5", "@babel/types@^7.14.9", "@babel/types@^7.15.0", "@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.14.9", "@babel/types@^7.15.0", "@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== @@ -1471,19 +1476,19 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" -"@docsearch/css@3.0.0-alpha.39": - version "3.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.0.0-alpha.39.tgz#1ebd390d93e06aad830492f5ffdc8e05d058813f" - integrity sha512-lr10MFTgcR3NRea/FtJ7uNtIpQz0XVwYxbpO5wxykgfHu1sxZTr6zwkuPquRgFYXnccxsTvfoIiK3rMH0fLr/w== +"@docsearch/css@3.0.0-alpha.40": + version "3.0.0-alpha.40" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.0.0-alpha.40.tgz#c37bd7b03f4c30a6ea7a19b87fe71880d2e8b22a" + integrity sha512-PrOTPgJMl+Iji1zOH0+J0PEDMriJ1teGxbgll7o4h8JrvJW6sJGqQw7/bLW7enWiFaxbJMK76w1yyPNLFHV7Qg== "@docsearch/react@^3.0.0-alpha.39": - version "3.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.0.0-alpha.39.tgz#bbd253f6fc591f63c1a171e7ef2da26b253164d9" - integrity sha512-urTIt82tan6CU+D2kO6xXpWQom/r1DA7L/55m2JiCIK/3SLh2z15FJFVN2abeK7B4wl8pCfWunYOwCsSHhWDLA== + version "3.0.0-alpha.40" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.0.0-alpha.40.tgz#d912b4bb7281cb0faf65590c9cf022aa2a13d823" + integrity sha512-aKxnu7sgpP1R7jtgOV/pZdJEHXx6Ts+jnS9U/ejSUS2BMUpwQI5SA3oLs1BA5TA9kIViJ5E+rrjh0VsbcsJ6sQ== dependencies: - "@algolia/autocomplete-core" "1.2.1" - "@algolia/autocomplete-preset-algolia" "1.2.1" - "@docsearch/css" "3.0.0-alpha.39" + "@algolia/autocomplete-core" "1.2.2" + "@algolia/autocomplete-preset-algolia" "1.2.2" + "@docsearch/css" "3.0.0-alpha.40" algoliasearch "^4.0.0" "@docusaurus/core@2.0.0-beta.6": @@ -1974,106 +1979,106 @@ tslib "2.0.2" "@graphql-tools/apollo-engine-loader@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.0.5.tgz#d6710b9d2a8aa5fc62966c34ccc0f92da91cd7d6" - integrity sha512-ABprEk3ziv4af2XCzRVFTsJXKHC9g2TN3nL/hfGt3G7oelZpLUJp+cdZaGn3i8H9NoASuaMOPorIvVC1LsF84Q== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.1.0.tgz#12d58a459da976b496c7632bd41b76f3aceed48e" + integrity sha512-JKK34xQiB1l2sBfi8G5c1HZZkleQbwOlLAkySycKTrU+VMzu5lEjhzYwowIbLLjTthjUHQkRFANHkxvB42t5SQ== dependencies: - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/utils" "^8.2.0" cross-fetch "^3.1.4" sync-fetch "0.3.0" tslib "~2.3.0" -"@graphql-tools/batch-execute@^8.0.5": - version "8.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.0.5.tgz#a0f8a9ff2c61209974c626faf3dd922a5c68d2b0" - integrity sha512-Zx+zs12BLGNvrQtfESIhitzwIkrWnKyKOkAfcaMNuOLGOO2pDmhwIRzbHj+6Jtq9V1/JTaVkSnm/4ozaCRck5A== +"@graphql-tools/batch-execute@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.1.0.tgz#fd463bab0e870a662bb00f12d5ce0013b11ae990" + integrity sha512-PPf8SZto4elBtkaV65RldkjvxCuwYV7tLYKH+w6QnsxogfjrtiwijmewtqIlfnpPRnuhmMzmOlhoDyf0I8EwHw== dependencies: - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/utils" "^8.2.0" dataloader "2.0.0" tslib "~2.3.0" value-or-promise "1.0.10" "@graphql-tools/code-file-loader@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.0.6.tgz#f6ca4554c11a9554fc305cf2d587148626d879e9" - integrity sha512-+xddAWyvrcW5Em3Yx+RJ7vwFMyOoS8pwqgeVr0CTZF9YbrQSPz7wQJRAVFZNJQaJOalKlPWxsmKkSyMQRG+t4A== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.1.0.tgz#3fd040ce92510a12c361bac85d0d954951e231f5" + integrity sha512-1EVuKGzTDcZoPQAjJYy0Fw2vwLN1ZnWYDlCZLaqml87tCUzJcqcHlQw26SRhDEvVnJC/oCV+mH+2QE55UxqWuA== dependencies: - "@graphql-tools/graphql-tag-pluck" "^7.0.5" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/graphql-tag-pluck" "^7.1.0" + "@graphql-tools/utils" "^8.2.0" globby "^11.0.3" tslib "~2.3.0" unixify "^1.0.0" -"@graphql-tools/delegate@^8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-8.1.0.tgz#8e811bdb0079a87607d2f98685d1ff329fef4638" - integrity sha512-jJmty2rr4k2k6pG3H0qoCH9LDezjyVe0wLNUbVQcSfWBj1VgeHX6BF4qgbT5HsDD3oOP8ruiHZgbn6EbrOwDfA== +"@graphql-tools/delegate@^8.2.0": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-8.2.1.tgz#750df27be7641836e0cb654b953581de30f2d1a6" + integrity sha512-fvQjSrCJCfchSQlLNHPcj1TwojyV1CPtXmwtSEVKvyp9axokuP37WGyliOWUYCepfwpklklLFUeTEiWlCoxv2Q== dependencies: - "@graphql-tools/batch-execute" "^8.0.5" - "@graphql-tools/schema" "^8.1.2" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/batch-execute" "^8.1.0" + "@graphql-tools/schema" "^8.2.0" + "@graphql-tools/utils" "^8.2.0" dataloader "2.0.0" tslib "~2.3.0" value-or-promise "1.0.10" "@graphql-tools/git-loader@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-7.0.5.tgz#b1000206eb48bc3d63d32f5e6cc3428d0ac0b691" - integrity sha512-f0O/5jXHClc8x6hIw3d4DUjoxj/dB9mimx5Q1YtLOSC67DRUbO3S0Pv54usX80EK4qcnVW9tK+6HqKFeFQB0Vw== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-7.1.0.tgz#6d4978752e058b69047bccca1d11c50b1e29b401" + integrity sha512-n6JBKc7Po8aE9/pueH0wO2EXicueuCT3VCo9YcFcCkdEl1tUZwIoIUgNUqgki2eS8u2Z76F2EWZwWBWO2ipXEw== dependencies: - "@graphql-tools/graphql-tag-pluck" "^7.0.5" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/graphql-tag-pluck" "^7.1.0" + "@graphql-tools/utils" "^8.2.0" is-glob "4.0.1" micromatch "^4.0.4" tslib "~2.3.0" unixify "^1.0.0" "@graphql-tools/github-loader@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-7.0.5.tgz#f08f1c5f4b01e922e7fc24cafb0142a66781bf2f" - integrity sha512-dDoHZa5Fi9JkqjgugASaafGRwXe+sUkTZdCmxf5m+vl1OFy5S/bw3bPML18tzm+e7bu+Vb/sVHSb2Drlo2q3VA== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-7.1.0.tgz#2309460f3b5c931b406ffc2506f3d7504b6c6c8c" + integrity sha512-RL8bREscN+CO/gP58BE+aA+PXUIwMY7okmrWtrupjRyo1IYv0bfaZXKHRF+qb2gqlJxksM5Q9HevO/MIj6T1eQ== dependencies: - "@graphql-tools/graphql-tag-pluck" "^7.0.5" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/graphql-tag-pluck" "^7.1.0" + "@graphql-tools/utils" "^8.2.0" cross-fetch "3.1.4" tslib "~2.3.0" "@graphql-tools/graphql-file-loader@^7.0.1", "@graphql-tools/graphql-file-loader@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.0.5.tgz#38d538fd1cf746627b38e948c8fa90d2148fed47" - integrity sha512-hYdz/zvA2z2M6zqgTCkEiqWPIKLsFirg1ZawaKzCLN0sUi+hRrLVTc1eIlz/vfR8ojvswEq81OMtk5d+lbHiHQ== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.1.0.tgz#6249074a7d268a30c81e923ee2bb991ec9a4c7b7" + integrity sha512-VWGetkBuyWrUxSpMnbpzZs2yHWBFeo9nTYjc8+o+xyJKpG/CRfvQrhBRNRFfV/5C0j5/Z1FMfUgsroEAG5H3HQ== dependencies: - "@graphql-tools/import" "^6.2.6" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/import" "^6.4.0" + "@graphql-tools/utils" "^8.2.0" globby "^11.0.3" tslib "~2.3.0" unixify "^1.0.0" -"@graphql-tools/graphql-tag-pluck@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.0.5.tgz#b21137c0fc364da283fdf7c7de8973cf183d3dc0" - integrity sha512-/eNFl/4gshnlgNvx1Koaey3036edcv5/Nko+px/DbkfjKedwikRWubURcCaMp/4VE6CyIUibxRrP6TzVByhVrw== +"@graphql-tools/graphql-tag-pluck@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.1.0.tgz#1116ef046370723b7d63ee1f66167129a6fcb8c9" + integrity sha512-Y0iRqHKoB0i1RCpskuFKmvnehBcKSu9awEq7ml4/RWSMHRkVlJs8PAFuChyOO6jASC2ttkyfssB6qLJugvc+DQ== dependencies: "@babel/parser" "7.15.3" "@babel/traverse" "7.15.0" "@babel/types" "7.15.0" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/utils" "^8.2.0" tslib "~2.3.0" -"@graphql-tools/import@^6.2.6": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.3.1.tgz#731c47ab6c6ac9f7994d75c76b6c2fa127d2d483" - integrity sha512-1szR19JI6WPibjYurMLdadHKZoG9C//8I/FZ0Dt4vJSbrMdVNp8WFxg4QnZrDeMG4MzZc90etsyF5ofKjcC+jw== +"@graphql-tools/import@^6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.4.0.tgz#eb2178d6df8d964e7b9d6b1ed75f80d12f9060a7" + integrity sha512-jfE01oPcmc4vzAcYLs6xT7XC4jJWrM1HNtIwc7HyyHTxrC3nf36XrF3txEZ2l20GT53+OWnMgYx1HhauLGdJmA== dependencies: resolve-from "5.0.0" - tslib "~2.2.0" + tslib "~2.3.0" "@graphql-tools/json-file-loader@^7.0.1", "@graphql-tools/json-file-loader@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.1.2.tgz#8cff19b6fb179aaea806506d7d5699246b857ae2" - integrity sha512-/CrnNBwi4WDvt4yc2PcRmQxqGIOtK84s4iI5vsHwlcK7D02WX1cza4YEblFlMQUkxR9pmwGIYXverUOiaysqRA== + version "7.2.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.2.0.tgz#0d5cdc372a5d925a470c7b2269f26dd659eef841" + integrity sha512-YMGjYtjYoalmGHUynypSqxm99fSBOXWqoDeDVYTHAZy970yo61yTi72owEtg7dwB4fQndL2wCoh6ZDS5ruiDDg== dependencies: - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/utils" "^8.2.0" globby "^11.0.3" tslib "~2.3.0" unixify "^1.0.0" @@ -2103,15 +2108,6 @@ p-limit "3.1.0" tslib "~2.3.0" -"@graphql-tools/merge@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-7.0.0.tgz#af3380f5dc4536870397a3bac5afd0cd53e11add" - integrity sha512-u7TTwKQ7cybAkn6snYPRg3um/C2u690wlD8TgHITAmGQDAExN/yipSSBgu4rXWopsPLsY0G30mJ8tOWToZVE1w== - dependencies: - "@graphql-tools/schema" "^8.0.3" - "@graphql-tools/utils" "8.0.2" - tslib "~2.3.0" - "@graphql-tools/merge@^6.2.16", "@graphql-tools/merge@^6.2.4": version "6.2.17" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-6.2.17.tgz#4dedf87d8435a5e1091d7cc8d4f371ed1e029f1f" @@ -2122,38 +2118,37 @@ tslib "~2.3.0" "@graphql-tools/merge@^8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.1.0.tgz#e8bdf860f63880ff657cb85de4ac6ab078db67ab" - integrity sha512-Lza419UHgnn0w42wLpviHYmg/k42bdxTsguAaUwfrgMbJ99nyx8/1Owu1ij6k1bc5RN0YynS5N/rLGw7skw8vQ== + version "8.1.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.1.2.tgz#50f5763927c51de764d09c5bfd20261671976e24" + integrity sha512-kFLd4kKNJXYXnKIhM8q9zgGAtbLmsy3WmGdDxYq3YHBJUogucAxnivQYyRIseUq37KGmSAIWu3pBQ23TKGsGOw== dependencies: - "@graphql-tools/utils" "^8.2.0" + "@graphql-tools/utils" "^8.2.2" tslib "~2.3.0" "@graphql-tools/mock@^8.1.2": - version "8.1.8" - resolved "https://registry.yarnpkg.com/@graphql-tools/mock/-/mock-8.1.8.tgz#754253d38e222c8cc4e19d07e36932d7916aa43d" - integrity sha512-ZLt4THOdDrwzMP5bKYaWJwJFYmacQojNWHt5Oo0c50N0jWe+PD/AbPbrn8Jb7mdVMhnxDgdMGwhsEFBhHSKJVA== + version "8.3.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/mock/-/mock-8.3.1.tgz#da89829e91d7492d6559efdfe1c5426a20e033ed" + integrity sha512-iJ3GeQ10Vqa0Tg4QJHiulxUUI4r84RAvltM3Sc+XPj07QlrLzMHOHO/goO7FC4TN2/HVncj7pWHwrmLPT9du/Q== dependencies: - "@graphql-tools/merge" "7.0.0" - "@graphql-tools/schema" "^8.0.3" - "@graphql-tools/utils" "8.0.2" + "@graphql-tools/schema" "^8.2.0" + "@graphql-tools/utils" "^8.2.0" fast-json-stable-stringify "^2.1.0" tslib "~2.3.0" "@graphql-tools/optimize@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.0.1.tgz#9933fffc5a3c63f95102b1cb6076fb16ac7bb22d" - integrity sha512-cRlUNsbErYoBtzzS6zXahXeTBZGPVlPHXCpnEZ0XiK/KY/sQL96cyzak0fM/Gk6qEI9/l32MYEICjasiBQrl5w== + version "1.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.1.0.tgz#c498f628907891b88378cdc5cbdecd8f875762a0" + integrity sha512-OW3tX3DHZ/5bRPPGI5UNgaQpaV7HihvV9zX6MYCLwERWRZTbc2DsNIq+H8L5Y5q2E2G8/H7vuz7q8LH8RgyP6A== dependencies: - tslib "~2.0.1" + tslib "~2.3.0" "@graphql-tools/prisma-loader@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/prisma-loader/-/prisma-loader-7.0.6.tgz#4b791eacd26d8fbf3783fba48c0239ec6cc5c621" - integrity sha512-HxtlW+15bRd6fDdtJO391+PPVpuJngMN5H6ND3ChNxVvcJzGuG+6r3oi5GNe5BZUgc12N0pEZ0eGIK3+TU6QSg== + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/prisma-loader/-/prisma-loader-7.1.0.tgz#790dd29ad682f6c1fc7ceb3cf48b04cb1064b7f4" + integrity sha512-fehVzximGYuVkbl4mIbXjPz3XlL+7N4BlnXI5QEAif2DJ8fkTpPN7E9PoV80lxWkLDNokFFDHH6qq7hr99JyOg== dependencies: - "@graphql-tools/url-loader" "^7.0.11" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/url-loader" "^7.1.0" + "@graphql-tools/utils" "^8.2.0" "@types/js-yaml" "^4.0.0" "@types/json-stable-stringify" "^1.0.32" "@types/jsonwebtoken" "^8.5.0" @@ -2174,15 +2169,15 @@ yaml-ast-parser "^0.0.43" "@graphql-tools/relay-operation-optimizer@^6.3.7": - version "6.3.7" - resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.3.7.tgz#16c874a091a1a37bc308136d87277443cebe5056" - integrity sha512-7UYnxPvIUDrdEKFAYrNF/YsoVBYMj6l3rwwuNs1jZyzAVZh8uq3TdvaFIIlcYvRychj45BEsg1jvRBvmhTaj3Q== + version "6.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.4.0.tgz#3ef4d7ec0620239f3a4e9b9acfa3c263636c5ad2" + integrity sha512-auNvHC8gHu9BHBPnLA5c8Iv5VAXQG866KZJz7ljhKpXPdlPevK4zjHlVJwqnF8H6clJ9NgZpizN4kNNCe/3R9g== dependencies: - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/utils" "^8.2.0" relay-compiler "11.0.2" tslib "~2.3.0" -"@graphql-tools/schema@8.2.0", "@graphql-tools/schema@^8.0.0", "@graphql-tools/schema@^8.0.2", "@graphql-tools/schema@^8.0.3", "@graphql-tools/schema@^8.1.2": +"@graphql-tools/schema@8.2.0", "@graphql-tools/schema@^8.0.0", "@graphql-tools/schema@^8.0.2", "@graphql-tools/schema@^8.1.2", "@graphql-tools/schema@^8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.2.0.tgz#ae75cbb2df6cee9ed6d89fce56be467ab23758dc" integrity sha512-ufmI5mJQa8NJczzfkh0pUttKvspqDcT5LLakA3jUmOrrE4d4NVj6onZlazdTzF5sAepSNqanFnwhrxZpCAJMKg== @@ -2192,22 +2187,23 @@ tslib "~2.3.0" value-or-promise "1.0.10" -"@graphql-tools/url-loader@^7.0.11", "@graphql-tools/url-loader@^7.0.3": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.0.11.tgz#4826c15efd4ac382e5e9aebdf0bba7d5c6da990c" - integrity sha512-4u+h5RtjJXaQjhfBdClreNWavBZqa0U92Cx3Z+zFvIsIYRrEboy7x+cH4QD9OEca/LuUcskJ4yyWllztz/ktow== +"@graphql-tools/url-loader@^7.0.11", "@graphql-tools/url-loader@^7.0.3", "@graphql-tools/url-loader@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.1.0.tgz#371fb4bc975364033cab892a344cc9f979d96ac4" + integrity sha512-h0NAcjPBei/Zf69OeFZWUbPXKA2aK5YXyfAZkAc+LP8pnBDBZW+mPr2lOZZJPJ8LMZPPjf5hwVHqXGImduHgmA== dependencies: "@ardatan/fetch-event-source" "2.0.2" - "@graphql-tools/delegate" "^8.1.0" - "@graphql-tools/utils" "^8.1.1" - "@graphql-tools/wrap" "^8.0.13" + "@graphql-tools/delegate" "^8.2.0" + "@graphql-tools/utils" "^8.2.0" + "@graphql-tools/wrap" "^8.1.0" "@n1ru4l/graphql-live-query" "0.7.1" "@types/websocket" "1.0.4" + "@types/ws" "^7.4.7" abort-controller "3.0.0" cross-fetch "3.1.4" extract-files "11.0.0" form-data "4.0.0" - graphql-ws "^5.0.0" + graphql-ws "^5.4.1" is-promise "4.0.0" isomorphic-ws "4.0.1" lodash "4.17.21" @@ -2217,7 +2213,7 @@ tslib "~2.3.0" valid-url "1.0.9" value-or-promise "1.0.10" - ws "8.2.0" + ws "8.2.1" "@graphql-tools/utils@8.0.2": version "8.0.2" @@ -2226,7 +2222,7 @@ dependencies: tslib "~2.3.0" -"@graphql-tools/utils@8.2.5", "@graphql-tools/utils@^8.0.0", "@graphql-tools/utils@^8.0.1", "@graphql-tools/utils@^8.1.1", "@graphql-tools/utils@^8.2.0": +"@graphql-tools/utils@8.2.5": version "8.2.5" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.2.5.tgz#695e6d760c1187ad2b159d5d3c4696eff9c08a27" integrity sha512-k/Rktklhy22dQfbJLKiLGfQymQCTr6Rd2BilC7g2Yk6wFSzVLYr8jeXNoTD+/p61XBQzBjTVayskvaMvNS3BDg== @@ -2242,14 +2238,21 @@ camel-case "4.1.1" tslib "~2.0.1" -"@graphql-tools/wrap@^8.0.13": - version "8.0.13" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-8.0.13.tgz#17a4096efbc64e15b27a74135d920c8bd3e5385a" - integrity sha512-GTkHbN+Zgs+D7bFniFx3/YqNIDv8ET17prM7FewmU8LNRc2P48y6d4/dkQLcwQmryy1TZF87es6yA9FMNfQtWg== +"@graphql-tools/utils@^8.0.0", "@graphql-tools/utils@^8.0.1", "@graphql-tools/utils@^8.1.1", "@graphql-tools/utils@^8.2.0", "@graphql-tools/utils@^8.2.2": + version "8.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.2.4.tgz#89f92c8dc0cdb6b9f32c90e904aa90e66a2e0a58" + integrity sha512-uB+JL7CqTKJ2Q5zXA+a2la1cA8YYPcc0RHO/3mK54hxlZa2Z5/9k9XrNfMof4LZQefTaBM7M6QWtaxGklJln4A== + dependencies: + tslib "~2.3.0" + +"@graphql-tools/wrap@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-8.1.0.tgz#2e618c78de910725130e5231666ca69a75f6cf99" + integrity sha512-WLT/bFewOIY8KJMzgOJSM/02fXJSFktFvI+JRu39wDH+hwFy1y7pFC0Bs1TP8B/hAEJ+t9+7JspX0LQWAUFjDg== dependencies: - "@graphql-tools/delegate" "^8.1.0" - "@graphql-tools/schema" "^8.1.2" - "@graphql-tools/utils" "^8.1.1" + "@graphql-tools/delegate" "^8.2.0" + "@graphql-tools/schema" "^8.2.0" + "@graphql-tools/utils" "^8.2.0" tslib "~2.3.0" value-or-promise "1.0.10" @@ -2626,9 +2629,9 @@ tslib "^1.9.3" "@oclif/plugin-help@^3": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.2.tgz#063ee08cee556573a5198fbdfdaa32796deba0ed" - integrity sha512-SPZ8U8PBYK0n4srFjCLedk0jWU4QlxgEYLCXIBShJgOwPhTTQknkUlsEwaMIevvCU4iCQZhfMX+D8Pz5GZjFgA== + version "3.2.3" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.3.tgz#cd24010e7eb326782843d3aa6d6b5a4affebb2c3" + integrity sha512-l2Pd0lbOMq4u/7xsl9hqISFqyR9gWEz/8+05xmrXFr67jXyS6EUCQB+mFBa0wepltrmJu0sAFg9AvA2mLaMMqQ== dependencies: "@oclif/command" "^1.5.20" "@oclif/config" "^1.15.1" @@ -2641,10 +2644,10 @@ widest-line "^3.1.0" wrap-ansi "^4.0.0" -"@polka/url@^1.0.0-next.15": - version "1.0.0-next.15" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.15.tgz#6a9d143f7f4f49db2d782f9e1c8839a29b43ae23" - integrity sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA== +"@polka/url@^1.0.0-next.20": + version "1.0.0-next.20" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.20.tgz#111b5db0f501aa89b05076fa31f0ea0e0c292cd3" + integrity sha512-88p7+M0QGxKpmnkfXjS4V26AnoC/eiqZutE8GLdaI5X12NY75bXSdTY9NkmYb2Xyk1O+MmkuO6Frmsj84V6I8Q== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -2968,10 +2971,10 @@ dependencies: "@types/node" "*" -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.1.15" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.15.tgz#2ccfb1ad55a02c83f8e0ad327cbc332f55eb1024" - integrity sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew== +"@types/babel__core@*", "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": + version "7.1.16" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" + integrity sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -2986,7 +2989,14 @@ dependencies: "@babel/types" "^7.0.0" -"@types/babel__template@*": +"@types/babel__helper-plugin-utils@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@types/babel__helper-plugin-utils/-/babel__helper-plugin-utils-7.10.0.tgz#dcd2416f9c189d5837ab2a276368cf67134efe78" + integrity sha512-60YtHzhQ9HAkToHVV+TB4VLzBn9lrfgrsOjiJMtbv/c1jPdekBxaByd6DMsGBzROXWoIL6U3lEFvvbu69RkUoA== + dependencies: + "@types/babel__core" "*" + +"@types/babel__template@*", "@types/babel__template@7.4.1": version "7.4.1" resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== @@ -3111,9 +3121,9 @@ "@types/node" "*" "@types/hast@^2.0.0": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.2.tgz#236201acca9e2695e42f713d7dd4f151dc2982e4" - integrity sha512-Op5W7jYgZI7AWKY5wQ0/QNMzQM7dGQPyW1rXKNiymVCy5iTfdPuGu4HhYNOM2sIv8gUfIuIdcYlXmAepwaowow== + version "2.3.4" + resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.4.tgz#8aa5ef92c117d20d974a82bdfb6a648b08c0bafc" + integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g== dependencies: "@types/unist" "*" @@ -3188,9 +3198,9 @@ integrity sha512-v7qlPA0VpKUlEdhghbDqRoKMxFB3h3Ch688TApBJ6v+XLDdvWCGLJIYiPKGZnS6MAOie+IorCfNYVHOPIHSWwQ== "@types/jsonwebtoken@^8.5.0": - version "8.5.4" - resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz#50ccaf0aa6f5d7b9956e70fe323b76e582991913" - integrity sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg== + version "8.5.5" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.5.tgz#da5f2f4baee88f052ef3e4db4c1a0afb46cff22c" + integrity sha512-OGqtHQ7N5/Ap/TUwO6IgHDuLiAoTmHhGpNvgkCm/F4N6pKzx/RBSfr2OXZSwC6vkfnsEdb6+7DNZVtiXiwdwFw== dependencies: "@types/node" "*" @@ -3213,9 +3223,9 @@ integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== "@types/mdast@^3.0.0": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.7.tgz#cba63d0cc11eb1605cea5c0ad76e02684394166b" - integrity sha512-YwR7OK8aPmaBvMMUi+pZXBNoW2unbVbfok4YRqGMJBe1dpDlzpRkJrYEYmvjxgs5JhuQmKfDexrN98u941Zasg== + version "3.0.10" + resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af" + integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== dependencies: "@types/unist" "*" @@ -3267,14 +3277,14 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^12.7.1": - version "12.20.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.19.tgz#538e61fc220f77ae4a4663c3d8c3cb391365c209" - integrity sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw== + version "12.20.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" + integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== "@types/node@^15.0.1": - version "15.14.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.7.tgz#29fea9a5b14e2b75c19028e1c7a32edd1e89fe92" - integrity sha512-FA45p37/mLhpebgbPWWCKfOisTjxGK9lwcHlJ6XVLfu3NgfcazOJHdYUZCWPMK8QX4LhNZdmfo6iMz9FqpUbaw== + version "15.14.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.9.tgz#bc43c990c3c9be7281868bbc7b8fdd6e2b57adfa" + integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -3401,6 +3411,13 @@ dependencies: "@types/node" "*" +"@types/ws@^7.4.7": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "20.2.1" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" @@ -3747,9 +3764,9 @@ acorn-walk@^7.0.0, acorn-walk@^7.1.1: integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== acorn-walk@^8.0.0, acorn-walk@^8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" - integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" @@ -3757,9 +3774,9 @@ acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" - integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== + version "8.5.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" + integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== address@1.1.2, address@^1.0.1: version "1.1.2" @@ -3819,24 +3836,24 @@ algoliasearch-helper@^3.3.4, algoliasearch-helper@^3.5.3: events "^1.1.1" algoliasearch@^4.0.0, algoliasearch@^4.8.4, algoliasearch@^4.9.1: - version "4.10.3" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.10.3.tgz#22df4bb02fbf13a765b18b85df8745ee9c04f00a" - integrity sha512-OLY0AWlPKGLbSaw14ivMB7BT5fPdp8VdzY4L8FtzZnqmLKsyes24cltGlf7/X96ACkYEcT390SReCDt/9SUIRg== - dependencies: - "@algolia/cache-browser-local-storage" "4.10.3" - "@algolia/cache-common" "4.10.3" - "@algolia/cache-in-memory" "4.10.3" - "@algolia/client-account" "4.10.3" - "@algolia/client-analytics" "4.10.3" - "@algolia/client-common" "4.10.3" - "@algolia/client-personalization" "4.10.3" - "@algolia/client-search" "4.10.3" - "@algolia/logger-common" "4.10.3" - "@algolia/logger-console" "4.10.3" - "@algolia/requester-browser-xhr" "4.10.3" - "@algolia/requester-common" "4.10.3" - "@algolia/requester-node-http" "4.10.3" - "@algolia/transporter" "4.10.3" + version "4.10.5" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.10.5.tgz#1faf34a3ae5ac3bef27282eb141251c70c7f5db2" + integrity sha512-KmH2XkiN+8FxhND4nWFbQDkIoU6g2OjfeU9kIv4Lb+EiOOs3Gpp7jvd+JnatsCisAZsnWQdjd7zVlW7I/85QvQ== + dependencies: + "@algolia/cache-browser-local-storage" "4.10.5" + "@algolia/cache-common" "4.10.5" + "@algolia/cache-in-memory" "4.10.5" + "@algolia/client-account" "4.10.5" + "@algolia/client-analytics" "4.10.5" + "@algolia/client-common" "4.10.5" + "@algolia/client-personalization" "4.10.5" + "@algolia/client-search" "4.10.5" + "@algolia/logger-common" "4.10.5" + "@algolia/logger-console" "4.10.5" + "@algolia/requester-browser-xhr" "4.10.5" + "@algolia/requester-common" "4.10.5" + "@algolia/requester-node-http" "4.10.5" + "@algolia/transporter" "4.10.5" alphanum-sort@^1.0.2: version "1.0.2" @@ -4118,10 +4135,10 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -arg@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90" - integrity sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ== +arg@^5.0.0, arg@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" + integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== argparse@^1.0.7: version "1.0.10" @@ -4253,11 +4270,11 @@ async-limiter@~1.0.0: integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== async-retry@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.1.tgz#139f31f8ddce50c0870b0ba558a6079684aaed55" - integrity sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA== + version "1.3.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" + integrity sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw== dependencies: - retry "0.12.0" + retry "0.13.1" async@^2.6.2: version "2.6.3" @@ -4287,28 +4304,28 @@ auto-bind@4.0.0, auto-bind@~4.0.0: integrity sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ== autoprefixer@^10.2.0, autoprefixer@^10.2.5: - version "10.3.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.1.tgz#954214821d3aa06692406c6a0a9e9d401eafbed2" - integrity sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A== + version "10.3.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.4.tgz#29efe5d19f51c281953178ddb5b84c5f1ca24c86" + integrity sha512-EKjKDXOq7ug+jagLzmnoTRpTT0q1KVzEJqrJd0hCBa7FiG0WbFOBCcJCy2QkW1OckpO3qgttA1aWjVbeIPAecw== dependencies: - browserslist "^4.16.6" - caniuse-lite "^1.0.30001243" - colorette "^1.2.2" + browserslist "^4.16.8" + caniuse-lite "^1.0.30001252" + colorette "^1.3.0" fraction.js "^4.1.1" normalize-range "^0.1.2" postcss-value-parser "^4.1.0" -available-typed-arrays@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" - integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" babel-helper-evaluate-path@^0.5.0: version "0.5.0" @@ -5002,7 +5019,18 @@ browserslist@4.14.2: escalade "^3.0.2" node-releases "^1.1.61" -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.17.3: +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.16.8, browserslist@^4.17.0: + version "4.17.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.0.tgz#1fcd81ec75b41d6d4994fb0831b92ac18c01649c" + integrity sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g== + dependencies: + caniuse-lite "^1.0.30001254" + colorette "^1.3.0" + electron-to-chromium "^1.3.830" + escalade "^3.1.1" + node-releases "^1.1.75" + +browserslist@^4.17.3: version "4.17.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.3.tgz#2844cd6eebe14d12384b0122d217550160d2d624" integrity sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ== @@ -5191,7 +5219,12 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001243, caniuse-lite@^1.0.30001264: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001252, caniuse-lite@^1.0.30001254: + version "1.0.30001255" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz#f3b09b59ab52e39e751a569523618f47c4298ca0" + integrity sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ== + +caniuse-lite@^1.0.30001264: version "1.0.30001265" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz#0613c9e6c922e422792e6fcefdf9a3afeee4f8c3" integrity sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw== @@ -5219,7 +5252,7 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4. escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -5617,7 +5650,7 @@ color-string@^1.6.0: color-name "^1.0.0" simple-swizzle "^0.2.2" -color@^3.1.3, color@^3.2.0: +color@^3.1.3: version "3.2.1" resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== @@ -5625,12 +5658,20 @@ color@^3.1.3, color@^3.2.0: color-convert "^1.9.3" color-string "^1.6.0" -colord@^2.0.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.6.0.tgz#6cd716e1270cfff8d6f66e751768749650e209cd" - integrity sha512-8yMrtE20ZxH1YWvvSoeJFtvqY+GIAOfU+mZ3jx7ZSiEMasnAmNqD1BKUP3CuCWcy/XHgcXkLW6YU8C35nhOYVg== +color@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/color/-/color-4.0.1.tgz#21df44cd10245a91b1ccf5ba031609b0e10e7d67" + integrity sha512-rpZjOKN5O7naJxkH2Rx1sZzzBgaiWECc6BYXjeCE6kF0kcASJYbUq02u7JqIHwCb/j3NhV+QhRL2683aICeGZA== + dependencies: + color-convert "^2.0.1" + color-string "^1.6.0" -colorette@^1.2.2, colorette@^1.4.0: +colord@^2.0.1, colord@^2.6: + version "2.7.0" + resolved "https://registry.yarnpkg.com/colord/-/colord-2.7.0.tgz#706ea36fe0cd651b585eb142fe64b6480185270e" + integrity sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q== + +colorette@^1.2.2, colorette@^1.3.0, colorette@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== @@ -5677,7 +5718,7 @@ commander@^6.0.0, commander@^6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^7.1.0: +commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -5830,7 +5871,15 @@ copy-webpack-plugin@^9.0.0: schema-utils "^3.0.0" serialize-javascript "^6.0.0" -core-js-compat@^3.16.0, core-js-compat@^3.16.2: +core-js-compat@^3.16.0: + version "3.17.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.17.3.tgz#b39c8e4dec71ecdc735c653ce5233466e561324e" + integrity sha512-+in61CKYs4hQERiADCJsdgewpdl/X0GhEX77pjKgbeibXviIt2oxEjTc8O2fqHX8mDdBrDvX8MYD/RYsBv4OiA== + dependencies: + browserslist "^4.17.0" + semver "7.0.0" + +core-js-compat@^3.16.2: version "3.18.2" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.2.tgz#e40c266fbd613948dd8d2d2156345da8ac03c142" integrity sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ== @@ -5839,19 +5888,19 @@ core-js-compat@^3.16.0, core-js-compat@^3.16.2: semver "7.0.0" core-js-pure@^3.10.2, core-js-pure@^3.16.0: - version "3.16.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.1.tgz#b997df2669c957a5b29f06e95813a171f993592e" - integrity sha512-TyofCdMzx0KMhi84mVRS8rL1XsRk2SPUNz2azmth53iRN0/08Uim9fdhQTaZTG1LqaXHYVci4RDHka6WrXfnvg== + version "3.17.3" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.17.3.tgz#98ea3587188ab7ef4695db6518eeb71aec42604a" + integrity sha512-YusrqwiOTTn8058JDa0cv9unbXdIiIgcgI9gXso0ey4WgkFLd3lYlV9rp9n7nDCsYxXsMDTjA4m1h3T348mdlQ== core-js@^3.14.0, core-js@^3.9.1: - version "3.16.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.1.tgz#f4485ce5c9f3c6a7cb18fa80488e08d362097249" - integrity sha512-AAkP8i35EbefU+JddyWi12AWE9f2N/qr/pwnDtWz4nyUIBGMJPX99ANFFRSw6FefM374lDujdtLDyhN2A/btHw== + version "3.17.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.3.tgz#8e8bd20e91df9951e903cabe91f9af4a0895bc1e" + integrity sha512-lyvajs+wd8N1hXfzob1LdOCCHFU4bGMbqqmLn1Q4QlCpDqWPpGf+p0nj+LNrvDDG33j0hZXw2nsvvVpHysxyNw== core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== cors@^2.8.5: version "2.8.5" @@ -6015,9 +6064,9 @@ css-color-names@^1.0.1: integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== css-declaration-sorter@^6.0.3: - version "6.1.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.1.1.tgz#77b32b644ba374bc562c0fc6f4fdaba4dfb0b749" - integrity sha512-BZ1aOuif2Sb7tQYY1GeCjG7F++8ggnwUkH5Ictw0mrdpqpEd+zWmcPdstnH2TItlb74FqR0DrVEieon221T/1Q== + version "6.1.3" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.1.3.tgz#e9852e4cf940ba79f509d9425b137d1f94438dc2" + integrity sha512-SvjQjNRZgh4ULK1LDJ2AduPKUKxIqmtU7ZAyi47BTV+M90Qvxr9AB6lKlLbDUfXqI9IQeYA8LbAsCZPpJEV3aA== dependencies: timsort "^0.3.0" @@ -6094,7 +6143,7 @@ css-tree@1.0.0-alpha.37: mdn-data "2.0.4" source-map "^0.6.1" -css-tree@^1.1.2: +css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== @@ -6133,21 +6182,21 @@ cssfilter@0.0.10: integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= cssnano-preset-advanced@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.1.3.tgz#a2c6cf2fe39108b81e88810e3c399d1c0fe030ea" - integrity sha512-pS4+Q2Hoo/FevZs2JqA2BG8Vn5o5VeXgj+z6kGndKTq3RFYvlKeJ1ZPnLXo9zyYKwmSqWW0rWqtGxxmigIte0Q== + version "5.1.4" + resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.1.4.tgz#b492d03756550f75cd8131d59105efdea88c2f7e" + integrity sha512-pFtIM15OzryDk09RcK+bBBtwSl80+g/POTAf/sVPqPmnOAleK6vBkY5wTmPjqGyV5/UTPjEzWMtbOQ3Z0kCBXA== dependencies: autoprefixer "^10.2.0" - cssnano-preset-default "^5.1.3" + cssnano-preset-default "^5.1.4" postcss-discard-unused "^5.0.1" postcss-merge-idents "^5.0.1" postcss-reduce-idents "^5.0.1" postcss-zindex "^5.0.1" -cssnano-preset-default@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" - integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== +cssnano-preset-default@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz#359943bf00c5c8e05489f12dd25f3006f2c1cbd2" + integrity sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ== dependencies: css-declaration-sorter "^6.0.3" cssnano-utils "^2.0.1" @@ -6161,7 +6210,7 @@ cssnano-preset-default@^5.1.3: postcss-merge-longhand "^5.0.2" postcss-merge-rules "^5.0.2" postcss-minify-font-values "^5.0.1" - postcss-minify-gradients "^5.0.1" + postcss-minify-gradients "^5.0.2" postcss-minify-params "^5.0.1" postcss-minify-selectors "^5.1.0" postcss-normalize-charset "^5.0.1" @@ -6185,11 +6234,11 @@ cssnano-utils@^2.0.1: integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== cssnano@^5.0.4, cssnano@^5.0.6: - version "5.0.7" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" - integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== + version "5.0.8" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.8.tgz#39ad166256980fcc64faa08c9bb18bb5789ecfa9" + integrity sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg== dependencies: - cssnano-preset-default "^5.1.3" + cssnano-preset-default "^5.1.4" is-resolvable "^1.1.0" lilconfig "^2.0.3" yaml "^1.10.2" @@ -6223,30 +6272,30 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340" integrity sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw== -csv-generate@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-3.4.0.tgz#360ed73ef8ec7119515a47c3bd5970ac4b988f00" - integrity sha512-D6yi7c6lL70cpTx3TQIVWKrfxuLiKa0pBizu0zi7fSRXlhmE7u674gk9k1IjCEnxKq2t6xzbXnxcOmSdBbE8vQ== +csv-generate@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-3.4.3.tgz#bc42d943b45aea52afa896874291da4b9108ffff" + integrity sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw== -csv-parse@^4.15.3: - version "4.16.0" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.16.0.tgz#b4c875e288a41f7ff917cb0d7d45880d563034f6" - integrity sha512-Zb4tGPANH4SW0LgC9+s9Mnequs9aqn7N3/pCqNbVjs2XhEF6yWNU2Vm4OGl1v2Go9nw8rXt87Cm2QN/o6Vpqgg== +csv-parse@^4.16.3: + version "4.16.3" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.16.3.tgz#7ca624d517212ebc520a36873c3478fa66efbaf7" + integrity sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg== -csv-stringify@^5.6.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.6.2.tgz#e653783e2189c4c797fbb12abf7f4943c787caa9" - integrity sha512-n3rIVbX6ylm1YsX2NEug9IaPV8xRnT+9/NNZbrA/bcHgOSSeqtWla6XnI/xmyu57wIw+ASCAoX1oM6EZtqJV0A== +csv-stringify@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.6.5.tgz#c6d74badda4b49a79bf4e72f91cce1e33b94de00" + integrity sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A== csv@^5.3.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/csv/-/csv-5.5.0.tgz#8ef89e9ac22559064aedf3cbbb912ed4c2aaf9ac" - integrity sha512-32tcuxdb4HW3zbk8NBcVQb8/7xuJB5sv+q4BuQ6++E/K6JvHvWoCHcGzB5Au95vVikNH4ztE0XNC/Bws950cfA== + version "5.5.3" + resolved "https://registry.yarnpkg.com/csv/-/csv-5.5.3.tgz#cd26c1e45eae00ce6a9b7b27dcb94955ec95207d" + integrity sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g== dependencies: - csv-generate "^3.4.0" - csv-parse "^4.15.3" - csv-stringify "^5.6.2" - stream-transform "^2.1.0" + csv-generate "^3.4.3" + csv-parse "^4.16.3" + csv-stringify "^5.6.5" + stream-transform "^2.1.3" data-urls@^2.0.0: version "2.0.0" @@ -6346,9 +6395,9 @@ deep-extend@^0.6.0: integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.2.2" @@ -6648,9 +6697,9 @@ domhandler@^2.3.0: domelementtype "1" domhandler@^4.0.0, domhandler@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" - integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== + version "4.2.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f" + integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w== dependencies: domelementtype "^2.2.0" @@ -6671,9 +6720,9 @@ domutils@^1.5.1, domutils@^1.7.0: domelementtype "1" domutils@^2.5.2, domutils@^2.6.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442" - integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg== + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== dependencies: dom-serializer "^1.0.1" domelementtype "^2.2.0" @@ -6726,7 +6775,12 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.857: +electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.830: + version "1.3.835" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.835.tgz#98fa4402ab7bc6afbe4953a8ca9b63cb3a6bf08b" + integrity sha512-rHQszGg2KLMqOWPNTpwCnlp7Kb85haJa8j089DJCreZueykoSN/in+EMlay3SSDMNKR4VGPvfskxofHV18xVJg== + +electron-to-chromium@^1.3.857: version "1.3.861" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.861.tgz#981e37a79af7a7b29bbaeed36376f4795527de13" integrity sha512-GZyflmpMnZRdZ1e2yAyvuFwz1MPSVQelwHX4TJZyXypB8NcxdPvPNwy5lOTxnlkrK13EiQzyTPugRSnj6cBgKg== @@ -6754,11 +6808,6 @@ emittery@^0.8.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== -"emoji-regex@>=6.0.0 <=6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" - integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4= - emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -6831,21 +6880,22 @@ error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5: - version "1.18.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" - integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== + version "1.18.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.6.tgz#2c44e3ea7a6255039164d26559777a6d978cb456" + integrity sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" has "^1.0.3" has-symbols "^1.0.2" internal-slot "^1.0.3" - is-callable "^1.2.3" + is-callable "^1.2.4" is-negative-zero "^2.0.1" - is-regex "^1.1.3" - is-string "^1.0.6" + is-regex "^1.1.4" + is-string "^1.0.7" object-inspect "^1.11.0" object-keys "^1.1.1" object.assign "^4.1.2" @@ -6873,9 +6923,9 @@ es6-object-assign@^1.1.0: integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= esbuild@^0.12.9: - version "0.12.19" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.19.tgz#ab849766705a5093df5acd8ec2f6ba2159a38a6c" - integrity sha512-5NuT1G6THW7l3fsSCDkcPepn24R0XtyPjKoqKHD8LfhqMXzCdz0mrS9HgO6hIhzVT7zt0T+JGbzCqF5AH8hS9w== + version "0.12.26" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.26.tgz#35f2d58ac3fa4629df24aa4d6fd72feb5522e94b" + integrity sha512-YmTkhPKjvTJ+G5e96NyhGf69bP+hzO0DscqaVJTi5GM34uaD4Ecj7omu5lJO+NrxCUBRhy2chONLK1h/2LwoXA== escalade@^3.0.2, escalade@^3.1.1: version "3.1.1" @@ -7395,9 +7445,9 @@ fast-url-parser@1.1.3: punycode "^1.3.2" fastq@^1.6.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.1.tgz#5d8175aae17db61947f8b162cfc7f63264d22807" - integrity sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw== + version "1.12.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794" + integrity sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg== dependencies: reusify "^1.0.4" @@ -7530,9 +7580,9 @@ finalhandler@~1.1.2: unpipe "~1.0.0" find-cache-dir@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" - integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== + version "3.3.2" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== dependencies: commondir "^1.0.1" make-dir "^3.0.2" @@ -7627,16 +7677,16 @@ focus-trap-react@8.7.1: focus-trap "^6.6.1" focus-trap@^6.6.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-6.7.1.tgz#d474f86dbaf3c7fbf0d53cf0b12295f4f4068d10" - integrity sha512-a6czHbT9twVpy2RpkWQA9vIgwQgB9Nx1PIxNNUxQT4nugG/3QibwxO+tWTh9i+zSY2SFiX4pnYhTaFaQF/6ZAg== + version "6.6.1" + resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-6.6.1.tgz#761ce2c82ddd72beeb049e968bc8414e25b704aa" + integrity sha512-x9BWuAeF5UrfWuYKJ3jYrjcVYSYptS9CqtxH5IH7lPlZrMsaugKeAa0HtoZSBZe5DmeTMx2m0qY464ZMzqarzw== dependencies: tabbable "^5.2.1" -follow-redirects@^1.0.0, follow-redirects@^1.10.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" - integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== +follow-redirects@^1.0.0, follow-redirects@^1.14.0: + version "1.14.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" + integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== for-in@^1.0.2: version "1.0.2" @@ -7834,17 +7884,23 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= github-slugger@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9" - integrity sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q== - dependencies: - emoji-regex ">=6.0.0 <=6.1.1" + version "1.4.0" + resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.4.0.tgz#206eb96cdb22ee56fdc53a28d5a302338463444e" + integrity sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ== glob-parent@^3.1.0: version "3.1.0" @@ -7861,7 +7917,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.0: +glob-parent@^6.0.0, glob-parent@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7" integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== @@ -7926,9 +7982,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.6.0, globals@^13.9.0: - version "13.10.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" - integrity sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g== + version "13.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" + integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== dependencies: type-fest "^0.20.2" @@ -8081,10 +8137,10 @@ graphql-tag@2.12.5, graphql-tag@^2.11.0, graphql-tag@^2.12.3, graphql-tag@^2.12. dependencies: tslib "^2.1.0" -graphql-ws@^5.0.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.3.0.tgz#345f73686b639735f1f4ef0b9ea28e17c7f6a745" - integrity sha512-53MbSTOmgx5i6hf3DHVD5PrXix1drDmt2ja8MW7NG+aTpKGzkXVLyNcyNpxme4SK8jVtIV6ZIHkiwirqN0efpw== +graphql-ws@^5.4.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.5.0.tgz#79f10248d23d104369eaef93acb9f887276a2c42" + integrity sha512-WQepPMGQQoqS2VsrI2I3RMLCVz3CW4/6ZqGV6ABDOwH4R62DzjxwMlwZbj6vhSI/7IM3/C911yITwgs77iO/hw== graphql@15.6.1, graphql@^15.0.0, graphql@^15.5.1: version "15.6.1" @@ -8823,9 +8879,11 @@ is-arrayish@^0.3.1: integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== is-bigint@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.3.tgz#fc9d9e364210480675653ddaea0518528d49a581" - integrity sha512-ZU538ajmYJmzysE5yU4Y7uIrPQ2j704u+hXFiIPQExpqzzUbpe5jCPdTfmz7jXRxZdvjY3KZ3ZNenoXQovX+Dg== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" is-binary-path@^1.0.0: version "1.0.1" @@ -8859,7 +8917,7 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-callable@^1.1.4, is-callable@^1.2.3: +is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== @@ -9156,7 +9214,7 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== -is-regex@^1.0.4, is-regex@^1.1.3: +is-regex@^1.0.4, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -9196,7 +9254,7 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-string@^1.0.5, is-string@^1.0.6: +is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -9217,12 +9275,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.3, is-typed-array@^1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.7.tgz#881ddc660b13cb8423b2090fa88c0fe37a83eb2f" - integrity sha512-VxlpTBGknhQ3o7YiVjIhdLU6+oD8dPz/79vvvH4F+S/c8608UCVa9fgDpa1kZgFoUST2DCgacc70UszKgzKuvA== +is-typed-array@^1.1.3, is-typed-array@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" + integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== dependencies: - available-typed-arrays "^1.0.4" + available-typed-arrays "^1.0.5" call-bind "^1.0.2" es-abstract "^1.18.5" foreach "^2.0.5" @@ -9780,7 +9838,7 @@ jest-watcher@^27.2.4: jest-util "^27.2.4" string-length "^4.0.1" -jest-worker@^27.0.2, jest-worker@^27.2.4: +jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.2.4: version "27.2.4" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.4.tgz#881455df75e22e7726a53f43703ab74d6b36f82d" integrity sha512-Zq9A2Pw59KkVjBBKD1i3iE2e22oSjXhUKKuAK1HGX8flGwkm6NMozyEYzKd41hXc64dbd/0eWFeEEuxqXyhM+g== @@ -10430,11 +10488,6 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash.toarray@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" - integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= - lodash.topath@^4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009" @@ -10779,10 +10832,10 @@ microevent.ts@~0.1.1: resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== -micromark-core-commonmark@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.0.0.tgz#b767fa7687c205c224175bf067796360a3830350" - integrity sha512-y9g7zymcKRBHM/aNBekstvs/Grpf+y4OEBULUTYvGZcusnp+JeOxmilJY4GMpo2/xY7iHQL9fjz5pD9pSAud9A== +micromark-core-commonmark@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.0.1.tgz#a64987cafe872e8b80bc8f2352a5d988586ac4f1" + integrity sha512-vEOw8hcQ3nwHkKKNIyP9wBi8M50zjNajtmI+cCUWcVfJS+v5/3WCh4PLKf7PPRZFUutjzl4ZjlHwBWUKfb/SkA== dependencies: micromark-factory-destination "^1.0.0" micromark-factory-label "^1.0.0" @@ -10797,7 +10850,7 @@ micromark-core-commonmark@^1.0.0: micromark-util-resolve-all "^1.0.0" micromark-util-subtokenize "^1.0.0" micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" + micromark-util-types "^1.0.1" parse-entities "^3.0.0" micromark-factory-destination@^1.0.0: @@ -10932,19 +10985,19 @@ micromark-util-symbol@^1.0.0: resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-1.0.0.tgz#91cdbcc9b2a827c0129a177d36241bcd3ccaa34d" integrity sha512-NZA01jHRNCt4KlOROn8/bGi6vvpEmlXld7EHcRH+aYWUfL3Wc8JLUNNlqUMKa0hhz6GrpUWsHtzPmKof57v0gQ== -micromark-util-types@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.0.0.tgz#0ebdfaea3fa7c15fc82b1e06ea1ef0152d0fb2f0" - integrity sha512-psf1WAaP1B77WpW4mBGDkTr+3RsPuDAgsvlP47GJzbH1jmjH8xjOx7Z6kp84L8oqHmy5pYO3Ev46odosZV+3AA== +micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.0.1.tgz#8bb8a092d93d326bd29fe29602799f2d0d922fd4" + integrity sha512-UT0ylWEEy80RFYzK9pEaugTqaxoD/j0Y9WhHpSyitxd99zjoQz7JJ+iKuhPAgOW2MiPSUAx+c09dcqokeyaROA== micromark@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.0.3.tgz#4c9f76fce8ba68eddf8730bb4fee2041d699d5b7" - integrity sha512-fWuHx+JKV4zA8WfCFor2DWP9XmsZkIiyWRGofr7P7IGfpRIlb7/C5wwusGsNyr1D8HI5arghZDG1Ikc0FBwS5Q== + version "3.0.5" + resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.0.5.tgz#d24792c8a06f201d5608c106dbfadef34c299684" + integrity sha512-QfjERBnPw0G9mxhOCkkbRP0n8SX8lIBLrEKeEVceviUukqVMv3hWE4AgNTOK/W6GWqtPvvIHg2Apl3j1Dxm6aQ== dependencies: "@types/debug" "^4.0.0" debug "^4.0.0" - micromark-core-commonmark "^1.0.0" + micromark-core-commonmark "^1.0.1" micromark-factory-space "^1.0.0" micromark-util-character "^1.0.0" micromark-util-chunked "^1.0.0" @@ -10956,7 +11009,7 @@ micromark@^3.0.0: micromark-util-sanitize-uri "^1.0.0" micromark-util-subtokenize "^1.0.0" micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" + micromark-util-types "^1.0.1" parse-entities "^3.0.0" micromatch@^3.1.10, micromatch@^3.1.4: @@ -11109,7 +11162,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mixme@^0.5.0: +mixme@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mixme/-/mixme-0.5.1.tgz#b3da79a563b2da46efba9519830059e4c2a9e40f" integrity sha512-NaeZIckeBFT7i0XBEpGyFcAE0/bLcQ9MHErTpnU3bLWVE5WZbxG5Y3fDsMxYGifTo5khDA42OquXCC2ngKJB+g== @@ -11201,9 +11254,9 @@ nano-time@1.0.0: big-integer "^1.6.16" nanoid@^3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== + version "3.1.25" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" + integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== nanomatch@^1.2.9: version "1.2.13" @@ -11260,12 +11313,12 @@ nock@13.1.3: lodash.set "^4.3.2" propagate "^2.0.0" -node-emoji@^1.10.0, node-emoji@^1.8.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" - integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== +node-emoji@^1.10.0, node-emoji@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== dependencies: - lodash.toarray "^4.4.0" + lodash "^4.17.21" node-fetch@2.6.1, node-fetch@^2.6.1: version "2.6.1" @@ -11317,7 +11370,12 @@ node-polyfill-webpack-plugin@1.1.4: util "^0.12.4" vm-browserify "^1.1.2" -node-releases@^1.1.61, node-releases@^1.1.77: +node-releases@^1.1.61, node-releases@^1.1.75: + version "1.1.75" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" + integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== + +node-releases@^1.1.77: version "1.1.77" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== @@ -11798,9 +11856,9 @@ parse-json@^5.0.0: lines-and-columns "^1.1.6" parse-numeric-range@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.2.0.tgz#aa70b00f29624ed13e9f943e9461b306e386b0fa" - integrity sha512-1q2tXpAOplPxcl8vrIGPWz1dJxxfmdRkCFcpxxMBerDnGuuHalOWF/xj9L8Nn5XoTUoB/6F0CeQBp2fMgkOYFg== + version "1.3.0" + resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3" + integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== parse5@6.0.1, parse5@^6.0.0: version "6.0.1" @@ -12179,13 +12237,13 @@ postcss-minify-font-values@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-minify-gradients@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.1.tgz#2dc79fd1a1afcb72a9e727bc549ce860f93565d2" - integrity sha512-odOwBFAIn2wIv+XYRpoN2hUV3pPQlgbJ10XeXPq8UY2N+9ZG42xu45lTn/g9zZ+d70NKSQD6EOi6UiCMu3FN7g== +postcss-minify-gradients@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz#7c175c108f06a5629925d698b3c4cf7bd3864ee5" + integrity sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ== dependencies: + colord "^2.6" cssnano-utils "^2.0.1" - is-color-stop "^1.1.0" postcss-value-parser "^4.1.0" postcss-minify-params@^5.0.1: @@ -12235,12 +12293,12 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" -postcss-nested@5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.5.tgz#f0a107d33a9fab11d7637205f5321e27223e3603" - integrity sha512-GSRXYz5bccobpTzLQZXOnSOfKl6TwVr5CyAQJUPub4nuRJSOECK5AqurxVgmtxP48p0Kc/ndY/YyS1yqldX0Ew== +postcss-nested@5.0.6: + version "5.0.6" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" + integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== dependencies: - postcss-selector-parser "^6.0.4" + postcss-selector-parser "^6.0.6" postcss-normalize-charset@^5.0.1: version "5.0.1" @@ -12879,24 +12937,24 @@ react-router-config@^5.1.1: "@babel/runtime" "^7.1.2" react-router-dom@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" - integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== + version "5.3.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.0.tgz#da1bfb535a0e89a712a93b97dd76f47ad1f32363" + integrity sha512-ObVBLjUZsphUUMVycibxgMdh5jJ1e3o+KpAZBVeHcNQZ4W+uUGGWsokurzlF4YOldQYRQL4y6yFRWM4m3svmuQ== dependencies: - "@babel/runtime" "^7.1.2" + "@babel/runtime" "^7.12.13" history "^4.9.0" loose-envify "^1.3.1" prop-types "^15.6.2" - react-router "5.2.0" + react-router "5.2.1" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.2.0, react-router@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" - integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== +react-router@5.2.1, react-router@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.1.tgz#4d2e4e9d5ae9425091845b8dbc6d9d276239774d" + integrity sha512-lIboRiOtDLFdg1VTemMwud9vRVuOCZmUIT/7lUoZiSpPODiiH1UQlfXy+vPLC/7IWdFYnhRwAyNqA/+I7wnvKQ== dependencies: - "@babel/runtime" "^7.1.2" + "@babel/runtime" "^7.12.13" history "^4.9.0" hoist-non-react-statics "^3.1.0" loose-envify "^1.3.1" @@ -13037,9 +13095,9 @@ readdirp@~3.6.0: picomatch "^2.2.1" reading-time@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.3.0.tgz#d13e74431589a4a9038669f24d5acbc08bbb015d" - integrity sha512-RJ8J5O6UvrclfZpcPSPuKusrdRfoY7uXXoYOOdeswZNtSkQaewT3919yz6RyloDBR+iwcUyz5zGOUjhgvfuv3g== + version "1.4.0" + resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.4.0.tgz#53fd822ceed6ca44e07497b3e975af1712ba5a86" + integrity sha512-0I9aP583rqQhm6T6Y+pYgYaM4w649VHgQPC24xSWXpn/4qRs08Zu6KgXRf0da6/k7IHoC6idm76fU6vz4mmzHQ== rechoir@^0.6.2: version "0.6.2" @@ -13470,7 +13528,12 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry@0.12.0, retry@^0.12.0: +retry@0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + +retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= @@ -13538,10 +13601,10 @@ rollup@2.3.2: optionalDependencies: fsevents "~2.1.2" -rollup@^2.45.2: - version "2.56.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.1.tgz#f29dbc04a5d532dfa904f76b62395f359506211e" - integrity sha512-KkrsNjeiTfGJMUFBi/PNfj3fnt70akqdoNXOjlzwo98uA1qrlkmgt6SGaK5OwhyDYCVnJb6jb2Xa2wbI47P4Nw== +rollup@^2.56.1: + version "2.56.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.3.tgz#b63edadd9851b0d618a6d0e6af8201955a77aeff" + integrity sha512-Au92NuznFklgQCUcV96iXlxUbHuB1vQMaH76DHl5M11TotjOHwqk9CwcrT78+Tnv4FN9uTBxq6p4EJoYkpyekg== optionalDependencies: fsevents "~2.3.2" @@ -13640,7 +13703,7 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0, schema-utils@^3.1.0: +schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== @@ -13890,11 +13953,11 @@ simple-swizzle@^0.2.2: is-arrayish "^0.3.1" sirv@^1.0.7: - version "1.0.12" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.12.tgz#d816c882b35489b3c63290e2f455ae3eccd5f652" - integrity sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg== + version "1.0.17" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.17.tgz#86e2c63c612da5a1dace1c16c46f524aaa26ac45" + integrity sha512-qx9go5yraB7ekT7bCMqUHJ5jEaOC/GXBxUWv+jeWnb7WzHUFdcQPGWk7YmAwFBaQBrogpuSqd/azbC2lZRqqmw== dependencies: - "@polka/url" "^1.0.0-next.15" + "@polka/url" "^1.0.0-next.20" mime "^2.3.1" totalist "^1.0.0" @@ -13996,16 +14059,16 @@ snapdragon@^0.8.1: use "^3.1.0" sockjs-client@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.1.tgz#256908f6d5adfb94dabbdbd02c66362cca0f9ea6" - integrity sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ== + version "1.5.2" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.2.tgz#4bc48c2da9ce4769f19dc723396b50f5c12330a3" + integrity sha512-ZzRxPBISQE7RpzlH4tKJMQbHM9pabHluk0WBaxAQ+wm/UieeBVBou0p4wVnSQGN9QmpAZygQ0cDIypWuqOFmFQ== dependencies: debug "^3.2.6" eventsource "^1.0.7" faye-websocket "^0.11.3" inherits "^2.0.4" json3 "^3.3.3" - url-parse "^1.5.1" + url-parse "^1.5.3" sockjs@^0.3.21: version "0.3.21" @@ -14050,9 +14113,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@^0.5.17, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + version "0.5.20" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" + integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -14237,12 +14300,12 @@ stream-http@^3.2.0: readable-stream "^3.6.0" xtend "^4.0.2" -stream-transform@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-2.1.0.tgz#e68cc062cced5b8ee669ae97f4be473eee5d9227" - integrity sha512-bwQO+75rzQbug7e5OOHnOR3FgbJ0fCjHmDIdynkwUaFzleBXugGmv2dx3sX3aIHUQRLjrcisRPgN9BWl63uGgw== +stream-transform@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-2.1.3.tgz#a1c3ecd72ddbf500aa8d342b0b9df38f5aa598e3" + integrity sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ== dependencies: - mixme "^0.5.0" + mixme "^0.5.1" string-argv@0.3.1: version "0.3.1" @@ -14535,15 +14598,15 @@ svgo@^1.2.2: util.promisify "~1.0.0" svgo@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.1.tgz#603a69ce50311c0e36791528f549644ec1b3f4bc" - integrity sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw== + version "2.5.0" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.5.0.tgz#3c9051b606d85a02fcb59f459b19970d2cc2c9bf" + integrity sha512-FSdBOOo271VyF/qZnOn1PgwCdt1v4Dx0Sey+U1jgqm1vqRYjPGdip0RGrFW6ItwtkBB8rHgHk26dlVr0uCs82Q== dependencies: "@trysound/sax" "0.1.1" - chalk "^4.1.0" - commander "^7.1.0" + colorette "^1.3.0" + commander "^7.2.0" css-select "^4.1.3" - css-tree "^1.1.2" + css-tree "^1.1.3" csso "^4.2.0" stable "^0.1.8" @@ -14594,34 +14657,35 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tailwindcss@^2.1.0, tailwindcss@^2.1.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.7.tgz#795d07a14ef46c2dc4a1610f7f906f697daaf731" - integrity sha512-jv35rugP5j8PpzbXnsria7ZAry7Evh0KtQ4MZqNd+PhF+oIKPwJTVwe/rmfRx9cZw3W7iPZyzBmeoAoNwfJ1yg== +tailwindcss@^2.1.4, tailwindcss@^2.2.7: + version "2.2.14" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.14.tgz#7f71ce6783a5e9768bd0e2ad1cb48eefba42e2ca" + integrity sha512-gQQPKbV8qb8GthGhJGbRR+lKluSpFq+L78CJZLmqumEBKPMDkD+l5wFlOTzlOhWozG4S1I9AUSaPkD1EfnNsug== dependencies: - arg "^5.0.0" + arg "^5.0.1" bytes "^3.0.0" - chalk "^4.1.1" + chalk "^4.1.2" chokidar "^3.5.2" - color "^3.2.0" - cosmiconfig "^7.0.0" + color "^4.0.1" + cosmiconfig "^7.0.1" detective "^5.2.0" didyoumean "^1.2.2" dlv "^1.1.3" fast-glob "^3.2.7" fs-extra "^10.0.0" - glob-parent "^6.0.0" + glob-parent "^6.0.1" html-tags "^3.1.0" + is-color-stop "^1.1.0" is-glob "^4.0.1" lodash "^4.17.21" lodash.topath "^4.5.2" modern-normalize "^1.1.0" - node-emoji "^1.8.1" + node-emoji "^1.11.0" normalize-path "^3.0.0" object-hash "^2.2.0" postcss-js "^3.0.3" postcss-load-config "^3.1.0" - postcss-nested "5.0.5" + postcss-nested "5.0.6" postcss-selector-parser "^6.0.6" postcss-value-parser "^4.1.0" pretty-hrtime "^1.0.3" @@ -14662,16 +14726,16 @@ terminal-link@^2.0.0: supports-hyperlinks "^2.0.0" terser-webpack-plugin@^5.1.3: - version "5.1.4" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" - integrity sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA== + version "5.2.4" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz#ad1be7639b1cbe3ea49fab995cbe7224b31747a1" + integrity sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA== dependencies: - jest-worker "^27.0.2" + jest-worker "^27.0.6" p-limit "^3.1.0" - schema-utils "^3.0.0" + schema-utils "^3.1.1" serialize-javascript "^6.0.0" source-map "^0.6.1" - terser "^5.7.0" + terser "^5.7.2" terser@^4.6.3: version "4.8.0" @@ -14682,10 +14746,10 @@ terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.1.tgz#2dc7a61009b66bb638305cb2a824763b116bf784" - integrity sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg== +terser@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.2.tgz#d4d95ed4f8bf735cb933e802f2a1829abf545e3f" + integrity sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -14783,9 +14847,9 @@ tmp@^0.2.1: rimraf "^3.0.0" tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-fast-properties@^2.0.0: version "2.0.0" @@ -14923,9 +14987,9 @@ ts-invariant@^0.4.0: tslib "^1.9.3" ts-invariant@^0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.1.tgz#87dfde9894a4ce3c7711b02b1b449e7fd7384b13" - integrity sha512-hSeYibh29ULlHkuEfukcoiyTct+s2RzczMLTv4x3NWC/YrBy7x7ps5eYq/b4Y3Sb9/uAlf54+/5CAEMVxPhuQw== + version "0.9.3" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.3.tgz#4b41e0a80c2530a56ce4b8fd4e14183aaac0efa8" + integrity sha512-HinBlTbFslQI0OHP07JLsSXPibSegec6r9ai5xxq/qHYCsIQbzpymLpDhAUsnXcSrDEcd0L62L8vsOEdzM0qlA== dependencies: tslib "^2.1.0" @@ -15008,15 +15072,10 @@ tslib@~2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== -tslib@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" - integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== - tsup@^4.12.5: - version "4.13.1" - resolved "https://registry.yarnpkg.com/tsup/-/tsup-4.13.1.tgz#052265d281ebbb2a124867b420c69cf6a5f3e4d3" - integrity sha512-OSJjTe8Kj+mm0gagg6Ory5vNm2NkQ11IfaDMjgGA3DDco0c2G5kObLkqmRDTmvFqw24mF2knfDMnq7vEuD5+7w== + version "4.14.0" + resolved "https://registry.yarnpkg.com/tsup/-/tsup-4.14.0.tgz#3e2f602d8446041b48fcb557904a709c0fcec981" + integrity sha512-77rWdzhikTP9mQ34XMRzK83tw++LF6f4ox/HNERlgesB7g6g5VQ1iJlueG9O0P9HAZGVKavUwyoZv0+322p6rg== dependencies: cac "^6.7.2" chalk "^4.1.0" @@ -15028,7 +15087,7 @@ tsup@^4.12.5: joycon "^3.0.1" postcss-load-config "^3.0.1" resolve-from "^5.0.0" - rollup "^2.45.2" + rollup "^2.56.1" sucrase "^3.18.1" tree-kill "^1.2.2" @@ -15057,9 +15116,9 @@ tty-table@^2.8.10: yargs "^15.1.0" twin.macro@^2.4.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/twin.macro/-/twin.macro-2.6.2.tgz#e230ca54cffd9f0de04ce0b74031d611d72d2bc3" - integrity sha512-4SL+Wrydqh7RRfYjuLh2ftNLv4rmRHXq1xpj1gaLuQkCwsgdwSbwMJrXKDh+WdX2yboXJ6T1QWv7/VIXX/+6mg== + version "2.7.0" + resolved "https://registry.yarnpkg.com/twin.macro/-/twin.macro-2.7.0.tgz#2107e79339e24041de1f72e0f045ae321041f007" + integrity sha512-7RictvVsITP3Odm7zd5EcZ3i8+deBuDCZBAwnm/H5MSixaKESjvEFQaHA/T8nkHb6vKcp/2f/6+txRzXLj//gg== dependencies: "@babel/parser" "^7.12.5" "@babel/template" "^7.14.5" @@ -15074,7 +15133,7 @@ twin.macro@^2.4.2: lodash.merge "^4.6.2" postcss "^8.1.8" string-similarity "^4.0.3" - tailwindcss "^2.1.0" + tailwindcss "^2.2.7" timsort "^0.3.0" type-check@^0.4.0, type-check@~0.4.0: @@ -15523,7 +15582,7 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.4.3, url-parse@^1.5.1: +url-parse@^1.4.3, url-parse@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== @@ -15712,9 +15771,9 @@ vfile@^4.0.0: vfile-message "^2.0.0" vfile@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.0.2.tgz#57773d1d91478b027632c23afab58ec3590344f0" - integrity sha512-5cV+K7tX83MT3bievROc+7AvHv0GXDB0zqbrTjbOe+HRbkzvY4EP+wS3IR77kUBCoWFMdG9py18t0sesPtQ1Rw== + version "5.1.0" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.1.0.tgz#18e78016f0f71e98d737d40f0fca921dc264a600" + integrity sha512-4o7/DJjEaFPYSh0ckv5kcYkJTHQgCKdL8ozMM1jLAxO9ox95IzveDPXCZp08HamdWq8JXTkClDvfAKaeLQeKtg== dependencies: "@types/unist" "^2.0.0" is-buffer "^2.0.0" @@ -15920,9 +15979,9 @@ webpack-sources@^3.2.0: integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== webpack@^5.40.0: - version "5.49.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.49.0.tgz#e250362b781a9fb614ba0a97ed67c66b9c5310cd" - integrity sha512-XarsANVf28A7Q3KPxSnX80EkCcuOer5hTOEJWJNvbskOZ+EK3pobHarGHceyUZMxpsTHBHhlV7hiQyLZzGosYw== + version "5.52.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.52.0.tgz#88d997c2c3ebb62abcaa453d2a26e0fd917c71a3" + integrity sha512-yRZOat8jWGwBwHpco3uKQhVU7HYaNunZiJ4AkAVQkPCUGoZk/tiIXiwG+8HIy/F+qsiZvSOa+GLQOj3q5RKRYg== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -16028,16 +16087,16 @@ which-pm@2.0.0: path-exists "^4.0.0" which-typed-array@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.6.tgz#f3713d801da0720a7f26f50c596980a9f5c8b383" - integrity sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q== + version "1.1.7" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" + integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== dependencies: - available-typed-arrays "^1.0.4" + available-typed-arrays "^1.0.5" call-bind "^1.0.2" es-abstract "^1.18.5" foreach "^2.0.5" has-tostringtag "^1.0.0" - is-typed-array "^1.1.6" + is-typed-array "^1.1.7" which@^1.2.9, which@^1.3.1: version "1.3.1" @@ -16186,15 +16245,15 @@ write-pkg@^4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" -ws@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.0.tgz#0b738cd484bfc9303421914b11bb4011e07615bb" - integrity sha512-uYhVJ/m9oXwEI04iIVmgLmugh2qrZihkywG9y5FfZV2ATeLIzHf93qs+tUNqlttbQK957/VX3mtwAS+UfIwA4g== +ws@8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.1.tgz#bdd92b3c56fdb47d2379b5ae534281922cc5bd12" + integrity sha512-XkgWpJU3sHU7gX8f13NqTn6KQ85bd1WU7noBHTT8fSohx7OS1TPY8k+cyRPCzFkia7C4mM229yeHr1qK9sM4JQ== "ws@^5.2.0 || ^6.0.0 || ^7.0.0", ws@^7.3.1, ws@^7.4.6: - version "7.5.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" - integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== + version "7.5.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" + integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== ws@^6.2.1: version "6.2.2" From f6fcf9e082fe50f34a52b685853c800710ec366f Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 12:35:01 +0200 Subject: [PATCH 05/16] add missing babel plugin implementations --- .../presets/gql-tag-operations/package.json | 1 + .../presets/gql-tag-operations/src/babel.ts | 47 ++++++++++++++----- .../gql-tag-operations/tests/babel.spec.ts | 18 +++---- .../simple-lowercase-operation-name.ts | 4 +- .../simple-uppercase-operation-name.ts | 4 +- 5 files changed, 50 insertions(+), 24 deletions(-) diff --git a/packages/presets/gql-tag-operations/package.json b/packages/presets/gql-tag-operations/package.json index 9424fe19ead..4de7d6c14c1 100644 --- a/packages/presets/gql-tag-operations/package.json +++ b/packages/presets/gql-tag-operations/package.json @@ -25,6 +25,7 @@ "@graphql-codegen/typescript": "^2.2.2", "@graphql-codegen/typescript-operations": "^2.1.6", "@graphql-codegen/gql-tag-operations": "^1.1.5", + "@graphql-codegen/visitor-plugin-common": "^2.2.1", "tslib": "~2.3.0" }, "peerDependencies": { diff --git a/packages/presets/gql-tag-operations/src/babel.ts b/packages/presets/gql-tag-operations/src/babel.ts index 9b1dd4b1778..545201b3c7b 100644 --- a/packages/presets/gql-tag-operations/src/babel.ts +++ b/packages/presets/gql-tag-operations/src/babel.ts @@ -1,24 +1,29 @@ -import type { PluginObj } from '@babel/core'; +import type { PluginObj, PluginPass } from '@babel/core'; import { declare } from '@babel/helper-plugin-utils'; import template from '@babel/template'; import type { NodePath } from '@babel/traverse'; import type { Program } from '@babel/types'; -import { parse } from 'graphql'; +import { ClientSideBaseVisitor } from '@graphql-codegen/visitor-plugin-common'; +import { buildSchema, parse } from 'graphql'; +import * as path from 'path'; const gqlMagicComment = 'graphql'; -export default declare((api): PluginObj => { +const noopSchema = buildSchema(`type Query { _: Int }`); + +export default declare((api, opts): PluginObj => { + const visitor = new ClientSideBaseVisitor(noopSchema, [], {}, {}); + + const artifactDirectory = opts['artifactDirectory'] ?? ''; + let program: NodePath; return { name: 'gql-tag-operations', visitor: { Program(path) { - // TODO: load codegen config - // TODO: initialize ClientSideBaseVisitor - program = path; }, - CallExpression(path) { + CallExpression(path, state) { if (path.node.callee.type !== 'Identifier' || path.node.callee.name !== 'gql') { return; } @@ -55,17 +60,21 @@ export default declare((api): PluginObj => { return; } - // TODO: use ClientSideBaseVisitor.getFragmentVariableName or ClientSideBaseVisitor.getOperationVariableName for generating the import name - const operationOrFragmentName = firstDefinition.name.value; + const operationOrFragmentName = + firstDefinition.kind === 'OperationDefinition' + ? visitor.getOperationVariableName(firstDefinition) + : visitor.getFragmentVariableName(firstDefinition); + + const importPath = getRelativeImportPath(state, artifactDirectory); - // TODO: figure out how to get the correct "./gql/graphql" when operating within nested stuff const importDeclaration = template(` - import { %%importName%% } from "./gql/graphql" + import { %%importName%% } from %%importPath%% `); program.unshiftContainer( 'body', importDeclaration({ importName: api.types.identifier(operationOrFragmentName), + importPath: api.types.stringLiteral(importPath), }) ); path.replaceWith(api.types.identifier(operationOrFragmentName)); @@ -73,3 +82,19 @@ export default declare((api): PluginObj => { }, }; }); + +function getRelativeImportPath(state: PluginPass, artifactDirectory: string, fileToRequire = 'graphql'): string { + if (state.file == null) { + throw new Error('Babel state is missing expected file name'); + } + + const filename = state.file.opts.filename; + + const relative = path.relative(path.dirname(filename), path.resolve(artifactDirectory)); + + const relativeReference = relative.length === 0 || !relative.startsWith('.') ? './' : ''; + + const platformSpecificPath = relativeReference + path.join(relative, fileToRequire); + // ensure windows paths are written as unix paths + return platformSpecificPath.split(path.sep).join(path.posix.sep); +} diff --git a/packages/presets/gql-tag-operations/tests/babel.spec.ts b/packages/presets/gql-tag-operations/tests/babel.spec.ts index d4918c8db49..07afbcabeb4 100644 --- a/packages/presets/gql-tag-operations/tests/babel.spec.ts +++ b/packages/presets/gql-tag-operations/tests/babel.spec.ts @@ -3,27 +3,27 @@ import * as path from 'path'; import babelPlugin from '../src/babel'; describe('gql-tag-operations-preset > babelPlugin', () => { - test('can do sth', () => { + test('can rewrite imports', () => { const result = transformFileSync(path.join(__dirname, 'fixtures/simple-uppercase-operation-name.ts'), { - plugins: [[babelPlugin]], + plugins: [[babelPlugin, { artifactDirectory: path.join(__dirname, 'fixtures') }]], babelrc: false, configFile: false, }).code; // TODO: update snapshot once implementation is fixed :) expect(result).toMatchInlineSnapshot(` -"import { C } from \\"./gql/graphql\\"; -import { B } from \\"./gql/graphql\\"; -import { A } from \\"./gql/graphql\\"; +"import { CFragmentDoc } from \\"./graphql\\"; +import { BDocument } from \\"./graphql\\"; +import { ADocument } from \\"./graphql\\"; /* eslint-disable @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/ban-ts-comment */ //@ts-ignore -import gql from 'gql'; //@ts-ignore +import gql from 'gql-tag'; //@ts-ignore -const A = A; //@ts-ignore +const A = ADocument; //@ts-ignore -const B = B; //@ts-ignore +const B = BDocument; //@ts-ignore -const C = C;" +const C = CFragmentDoc;" `); }); }); diff --git a/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts b/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts index fbaa44fffbf..1889ab4b597 100644 --- a/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts +++ b/packages/presets/gql-tag-operations/tests/fixtures/simple-lowercase-operation-name.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/ban-ts-comment */ //@ts-ignore -import gql from 'gql'; +import gql from 'gql-tag'; //@ts-ignore const A = gql(/* GraphQL */ ` @@ -18,7 +18,7 @@ const B = gql(/* GraphQL */ ` //@ts-ignore const C = gql(/* GraphQL */ ` - query c { + fragment C on Query { c } `); diff --git a/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts b/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts index a1b044454f9..9af946aa526 100644 --- a/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts +++ b/packages/presets/gql-tag-operations/tests/fixtures/simple-uppercase-operation-name.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/ban-ts-comment */ //@ts-ignore -import gql from 'gql'; +import gql from 'gql-tag'; //@ts-ignore const A = gql(/* GraphQL */ ` @@ -18,7 +18,7 @@ const B = gql(/* GraphQL */ ` //@ts-ignore const C = gql(/* GraphQL */ ` - query C { + fragment C on Query { c } `); From aabc5cf2af00065a7d4b97a8762e2d9be9187e72 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 12:46:25 +0200 Subject: [PATCH 06/16] update snapshots --- .../tests/gql-tag-operations.spec.ts | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts b/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts index b780f8fe67e..e9078102b52 100644 --- a/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts +++ b/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts @@ -31,25 +31,19 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ const documents = { \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, - \\"\\\\n query C {\\\\n c\\\\n }\\\\n\\": graphql.CDocument, + \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, }; export function gql(source: \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"]; export function gql(source: \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query C {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query C {\\\\n c\\\\n }\\\\n\\"]; +export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; export function gql(source: string): unknown; export function gql(source: string) { return (documents as any)[source] ?? {}; } -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never; -" +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" `); }); @@ -80,25 +74,19 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ const documents = { \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, - \\"\\\\n query c {\\\\n c\\\\n }\\\\n\\": graphql.CDocument, + \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, }; export function gql(source: \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"]; export function gql(source: \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query c {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query c {\\\\n c\\\\n }\\\\n\\"]; +export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; export function gql(source: string): unknown; export function gql(source: string) { return (documents as any)[source] ?? {}; } -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never; -" +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" `); }); From 55d61562b043b6ffad9c1250e34d40149987c9a0 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 12:54:15 +0200 Subject: [PATCH 07/16] chore: udpate fixtures --- dev-test/gql-tag-operations-urql/gql/index.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dev-test/gql-tag-operations-urql/gql/index.ts diff --git a/dev-test/gql-tag-operations-urql/gql/index.ts b/dev-test/gql-tag-operations-urql/gql/index.ts new file mode 100644 index 00000000000..33282327f89 --- /dev/null +++ b/dev-test/gql-tag-operations-urql/gql/index.ts @@ -0,0 +1,31 @@ +/* eslint-disable */ +import * as graphql from './graphql'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + +const documents = { + '\n query Foo {\n Tweets {\n id\n }\n }\n': graphql.FooDocument, + '\n fragment Lel on Tweet {\n id\n body\n }\n': graphql.LelFragmentDoc, + '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': graphql.BarDocument, +}; + +export function gql( + source: '\n query Foo {\n Tweets {\n id\n }\n }\n' +): typeof documents['\n query Foo {\n Tweets {\n id\n }\n }\n']; +export function gql( + source: '\n fragment Lel on Tweet {\n id\n body\n }\n' +): typeof documents['\n fragment Lel on Tweet {\n id\n body\n }\n']; +export function gql( + source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' +): typeof documents['\n query Bar {\n Tweets {\n ...Lel\n }\n }\n']; + +export function gql(source: string): unknown; +export function gql(source: string) { + return (documents as any)[source] ?? {}; +} + +export type DocumentType> = TDocumentNode extends DocumentNode< + infer TType, + any +> + ? TType + : never; From d3109e1b631c6b8a075dd51b19642e5bde5b9342 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 13:07:52 +0200 Subject: [PATCH 08/16] re-export babel plugin --- packages/presets/gql-tag-operations/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/presets/gql-tag-operations/src/index.ts b/packages/presets/gql-tag-operations/src/index.ts index 6c3ffab99da..d54457a05ec 100644 --- a/packages/presets/gql-tag-operations/src/index.ts +++ b/packages/presets/gql-tag-operations/src/index.ts @@ -7,6 +7,7 @@ import * as typescriptPlugin from '@graphql-codegen/typescript'; import * as gqlTagPlugin from '@graphql-codegen/gql-tag-operations'; import { processSources } from './process-sources'; import { ClientSideBaseVisitor } from '@graphql-codegen/visitor-plugin-common'; +import babelPlugin from './babel'; export type GqlTagConfig = { /** @@ -85,3 +86,5 @@ export const preset: Types.OutputPreset = { ]; }, }; + +export { babelPlugin }; From 65548eeacf341102c283984ec5a7c13a12eb76fb Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Fri, 10 Sep 2021 13:20:50 +0200 Subject: [PATCH 09/16] make magic comment optional --- .../presets/gql-tag-operations/src/babel.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/presets/gql-tag-operations/src/babel.ts b/packages/presets/gql-tag-operations/src/babel.ts index 545201b3c7b..93a77c91278 100644 --- a/packages/presets/gql-tag-operations/src/babel.ts +++ b/packages/presets/gql-tag-operations/src/babel.ts @@ -7,7 +7,7 @@ import { ClientSideBaseVisitor } from '@graphql-codegen/visitor-plugin-common'; import { buildSchema, parse } from 'graphql'; import * as path from 'path'; -const gqlMagicComment = 'graphql'; +// const gqlMagicComment = 'graphql'; const noopSchema = buildSchema(`type Query { _: Int }`); @@ -35,17 +35,17 @@ export default declare((api, opts): PluginObj => { return; } - const [leadingComment] = argument.leadingComments; + // const [leadingComment] = argument.leadingComments; - if (leadingComment == null) { - return; - } + // if (leadingComment == null) { + // return; + // } - const leadingCommentValue = leadingComment.value.trim().toLowerCase(); + // const leadingCommentValue = leadingComment.value.trim().toLowerCase(); - if (leadingCommentValue !== gqlMagicComment) { - return; - } + // if (leadingCommentValue !== gqlMagicComment) { + // return; + // } const [content] = argument.quasis; const ast = parse(content.value.raw); From f5892c0a8b179178fbbef66f9c46f10760f0687f Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 12:37:21 +0200 Subject: [PATCH 10/16] remove unused code --- packages/presets/gql-tag-operations/src/babel.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/presets/gql-tag-operations/src/babel.ts b/packages/presets/gql-tag-operations/src/babel.ts index 93a77c91278..4de71ca0c76 100644 --- a/packages/presets/gql-tag-operations/src/babel.ts +++ b/packages/presets/gql-tag-operations/src/babel.ts @@ -7,8 +7,6 @@ import { ClientSideBaseVisitor } from '@graphql-codegen/visitor-plugin-common'; import { buildSchema, parse } from 'graphql'; import * as path from 'path'; -// const gqlMagicComment = 'graphql'; - const noopSchema = buildSchema(`type Query { _: Int }`); export default declare((api, opts): PluginObj => { @@ -35,18 +33,6 @@ export default declare((api, opts): PluginObj => { return; } - // const [leadingComment] = argument.leadingComments; - - // if (leadingComment == null) { - // return; - // } - - // const leadingCommentValue = leadingComment.value.trim().toLowerCase(); - - // if (leadingCommentValue !== gqlMagicComment) { - // return; - // } - const [content] = argument.quasis; const ast = parse(content.value.raw); From c761d3e1dc65affb8d59e7a7dba55a3c1618163a Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 13:13:27 +0200 Subject: [PATCH 11/16] add more tests for relative imports --- .../gql-tag-operations/tests/babel.spec.ts | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/presets/gql-tag-operations/tests/babel.spec.ts b/packages/presets/gql-tag-operations/tests/babel.spec.ts index 07afbcabeb4..d8fe78acd21 100644 --- a/packages/presets/gql-tag-operations/tests/babel.spec.ts +++ b/packages/presets/gql-tag-operations/tests/babel.spec.ts @@ -3,13 +3,12 @@ import * as path from 'path'; import babelPlugin from '../src/babel'; describe('gql-tag-operations-preset > babelPlugin', () => { - test('can rewrite imports', () => { + test('can imports files in the same directory', () => { const result = transformFileSync(path.join(__dirname, 'fixtures/simple-uppercase-operation-name.ts'), { plugins: [[babelPlugin, { artifactDirectory: path.join(__dirname, 'fixtures') }]], babelrc: false, configFile: false, }).code; - // TODO: update snapshot once implementation is fixed :) expect(result).toMatchInlineSnapshot(` "import { CFragmentDoc } from \\"./graphql\\"; import { BDocument } from \\"./graphql\\"; @@ -23,6 +22,28 @@ const A = ADocument; //@ts-ignore const B = BDocument; //@ts-ignore +const C = CFragmentDoc;" +`); + }); + test('can import files in another directory', () => { + const result = transformFileSync(path.join(__dirname, 'fixtures/simple-uppercase-operation-name.ts'), { + plugins: [[babelPlugin, { artifactDirectory: __dirname }]], + babelrc: false, + configFile: false, + }).code; + expect(result).toMatchInlineSnapshot(` +"import { CFragmentDoc } from \\"../graphql\\"; +import { BDocument } from \\"../graphql\\"; +import { ADocument } from \\"../graphql\\"; + +/* eslint-disable @typescript-eslint/no-unused-vars-experimental, @typescript-eslint/ban-ts-comment */ +//@ts-ignore +import gql from 'gql-tag'; //@ts-ignore + +const A = ADocument; //@ts-ignore + +const B = BDocument; //@ts-ignore + const C = CFragmentDoc;" `); }); From 3691d4156e8cf0e42a43c9da29f625b08c1bb040 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 13:42:55 +0200 Subject: [PATCH 12/16] add documentation --- website/docs/presets/gql-tag-operations.md | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/website/docs/presets/gql-tag-operations.md b/website/docs/presets/gql-tag-operations.md index 1d189bc9a2f..20f2b07a0be 100644 --- a/website/docs/presets/gql-tag-operations.md +++ b/website/docs/presets/gql-tag-operations.md @@ -145,3 +145,140 @@ const Tweets = () => { ); }; ``` + +## Improving bundle-size with the gql-tag-operations babel plugin + +Because the generated code output is a single `gql` function that looks similar to thw following code, code-splitting and tree-shaking is not easily possible. + +```ts +import * as graphql from './graphql'; + +const documents = { + '\n query Foo {\n Tweets {\n id\n }\n }\n': graphql.FooDocument, + '\n fragment Lel on Tweet {\n id\n body\n }\n': graphql.LelFragmentDoc, + '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': graphql.BarDocument, +}; + +export function gql( + source: '\n query Foo {\n Tweets {\n id\n }\n }\n' +): typeof documents['\n query Foo {\n Tweets {\n id\n }\n }\n']; +export function gql( + source: '\n fragment Lel on Tweet {\n id\n body\n }\n' +): typeof documents['\n fragment Lel on Tweet {\n id\n body\n }\n']; +export function gql( + source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' +): typeof documents['\n query Bar {\n Tweets {\n ...Lel\n }\n }\n']; + +export function gql(source: string): unknown; +export function gql(source: string) { + // OH NO gql accesses the documents object, the bundler cannot make assumption over what is actually used at runtime :( + return (documents as any)[source] ?? {}; +} +``` + +However, the `@graphql-codegen/gql-tag-operations-preset` package ships with a babel plugin for rewriting the `gql` usages to actual imports. + +This is the code that you write: + +```tsx +import { gql, DocumentType } from '../gql'; + +const TweetFragment = gql(/* GraphQL */ ` + fragment TweetFragment on Tweet { + id + body + } +`); +``` + +This is the code after the babel transformation: + +```ts +import { TweetFragmentDoc } from \\"./graphql\\"; + +const TweetFragment = TweetFragmentDoc +``` + +This will result in much smaller bundles when you code-split parts of your code. + +Applying the babel plugin is straight-forward: + +**.babelrc.mjs** + +```ts +import { babelPlugin } from '@graphql-codegen/gql-tag-operations-preset'; +export default { + plugins: [ + // your other plugins such as typescript syntax stripping etc. + + // make sure the artifactDirectory is the same as your generates path within the codegen.yml + [babelPlugin, { artifactDirectory: './src/gql' }], + ], +}; +``` + +Afterwards, you won't have to worry about bundle size anymore! + +## Using module augmentation for using an existing `gql` function from a library + +Sometimes the library you are using, let's use `urql` for this example, already exposes a `gql` function and instead of generating a new one you would prefer to just generate types that extend the type-definitions of that `gql` function. + +This can be easily achieved by running the `gql-tag-operations` plugin in module augmentation mode! + +**codegen.yml** + +```yml +schema: src/path/to/your/schema.graphql +documents: + - 'src/**/*.ts' + - '!src/gql/**/*' +generates: + src/gql/: + preset: gql-tag-operations-preset + presetConfig: + # define which module you want to import your gql function from + augmentedModuleName: '@urql/core' +``` + +When the `augmentedModuleName` option is configured instead of the `./src/gql/index.ts` file a `./src/gql/index.d.ts` file is generated. + +```ts +/* eslint-disable */ +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + +declare module '@urql/core' { + export function gql( + source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' + ): typeof import('./graphql').BarDocument; + export function gql(source: string): unknown; +} +``` + +Now you can simply use your `gql` function imported from `@url/core` in your application code for having fully typed document nodes. + +```ts +import { gql } from 'urql'; + +const FooQuery = gql(/* GraphQL */ ` + query Foo { + Tweets { + id + } + } +`); +``` + +**NOTE**: In case you are using fragments you MUST use the gql-tag-operations plugin as otherwise the `gql` calls that reference global fragments will cause runtime errors, as the `gql` operation cannot find the global fragment. + +```ts +import { gql } from 'urql'; + +// This causes an error without the babel plugin +const FooQuery = gql(/* GraphQL */ ` + query Foo { + Tweets { + ...SomeTweetFragment + } + } +`); +``` From a44c4f36106e07cee3b640ca28483d41f2156779 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 13:45:25 +0200 Subject: [PATCH 13/16] remove unused files --- dev-test/gql-tag-operations-urql/gql/index.ts | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 dev-test/gql-tag-operations-urql/gql/index.ts diff --git a/dev-test/gql-tag-operations-urql/gql/index.ts b/dev-test/gql-tag-operations-urql/gql/index.ts deleted file mode 100644 index 33282327f89..00000000000 --- a/dev-test/gql-tag-operations-urql/gql/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint-disable */ -import * as graphql from './graphql'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -const documents = { - '\n query Foo {\n Tweets {\n id\n }\n }\n': graphql.FooDocument, - '\n fragment Lel on Tweet {\n id\n body\n }\n': graphql.LelFragmentDoc, - '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n': graphql.BarDocument, -}; - -export function gql( - source: '\n query Foo {\n Tweets {\n id\n }\n }\n' -): typeof documents['\n query Foo {\n Tweets {\n id\n }\n }\n']; -export function gql( - source: '\n fragment Lel on Tweet {\n id\n body\n }\n' -): typeof documents['\n fragment Lel on Tweet {\n id\n body\n }\n']; -export function gql( - source: '\n query Bar {\n Tweets {\n ...Lel\n }\n }\n' -): typeof documents['\n query Bar {\n Tweets {\n ...Lel\n }\n }\n']; - -export function gql(source: string): unknown; -export function gql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never; From 7c68cab1108ef299a5ad1680aae4deda08071f5b Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 13:57:53 +0200 Subject: [PATCH 14/16] fix: duplicated ; --- packages/plugins/typescript/gql-tag-operations/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/typescript/gql-tag-operations/src/index.ts b/packages/plugins/typescript/gql-tag-operations/src/index.ts index 54aac5f1bcc..eead6d3471a 100644 --- a/packages/plugins/typescript/gql-tag-operations/src/index.ts +++ b/packages/plugins/typescript/gql-tag-operations/src/index.ts @@ -93,8 +93,8 @@ function getGqlOverloadChunk(sourcesWithOperations: Array, const originalString = rest.source.rawSDL!; const returnType = mode === 'lookup' - ? `(typeof documents)[${JSON.stringify(originalString)}];` - : `typeof import('./graphql').${operations[0].initialName};`; + ? `(typeof documents)[${JSON.stringify(originalString)}]` + : `typeof import('./graphql').${operations[0].initialName}`; lines.add(`export function gql(source: ${JSON.stringify(originalString)}): ${returnType};\n`); } From aee618244f54f77dbce1cfa441687e44e80d2735 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 14:04:28 +0200 Subject: [PATCH 15/16] fix typo --- website/docs/custom-codegen/contributing.md | 18 ++++++++---------- website/docs/presets/gql-tag-operations.md | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/website/docs/custom-codegen/contributing.md b/website/docs/custom-codegen/contributing.md index 5cc66363f15..dcb742277d1 100644 --- a/website/docs/custom-codegen/contributing.md +++ b/website/docs/custom-codegen/contributing.md @@ -43,7 +43,7 @@ So now that you have a local copy of the project, start by installing the depend ## 4. Make sure everything works -To test the initial scripts and verify that you have a valid development environment, start by running thw following scripts from the root directory: +To test the initial scripts and verify that you have a valid development environment, start by running the following scripts from the root directory: yarn build yarn test @@ -160,13 +160,13 @@ describe('My Plugin', () => { Now, to make sure it works, run the following in your plugin directory: - yarn test + yarn test ## 8. Integration You can also test the integration of your plugin with the codegen core and cli, the integration with other plugins and the output for some complex schemas and operations. -To do that, make sure everything is built by using `yarn build` in the root directory, then you can use it in `./dev-test/codegen.yml`, and run `yarn generate:examples` in the project root directory, to run it. +To do that, make sure everything is built by using `yarn build` in the root directory, then you can use it in `./dev-test/codegen.yml`, and run `yarn generate:examples` in the project root directory, to run it. ## 9. Documentation @@ -176,8 +176,7 @@ In order to add it to the website, do the following: 1. Add JSDoc annotations to your config object, it can also include default value, examples and type: -```ts - +````ts export type MyPluginConfig = { /** * @name name @@ -196,19 +195,19 @@ export type MyPluginConfig = { */ name: string; }; -``` +```` Now, open `./website/generate-config.js` and add a record to the mapping in that file, point the file with the configuration annotation, and the output file: ```js const mapping = { '../packages/plugins/my-plugin/src/index.ts': BASE_DIR + '/my-plugin.md', -} +}; ``` Now, navigate to the `website` directory and run `yarn generate:config-docs` -this will take a minute, and it will generate the `.md` for all plugins. You should find your `my-plugin.md` file under `website/docs/generated-config` directory. -Now, run `yarn start` to run the website. You markdown file is loaded, but it's not displayed yet, so let's create a new page for it first. +Now, run `yarn start` to run the website. You markdown file is loaded, but it's not displayed yet, so let's create a new page for it first. Create `my-plugin.md` under `website/docs/plugins/` and add the following content to it, and include the generated configuration API reference: @@ -218,12 +217,11 @@ id: my-plugin title: My Plugin --- -This is my new plugin. +This is my new plugin. Add here some custom instructions, explainations, installation guide and more. {@import ../generated-config/my-plugin.md} - ``` Your plugin page should be available in: `http://localhost:3000/docs/plugins/my-plugin` diff --git a/website/docs/presets/gql-tag-operations.md b/website/docs/presets/gql-tag-operations.md index 20f2b07a0be..f314f0b5765 100644 --- a/website/docs/presets/gql-tag-operations.md +++ b/website/docs/presets/gql-tag-operations.md @@ -148,7 +148,7 @@ const Tweets = () => { ## Improving bundle-size with the gql-tag-operations babel plugin -Because the generated code output is a single `gql` function that looks similar to thw following code, code-splitting and tree-shaking is not easily possible. +Because the generated code output is a single `gql` function that looks similar to the following code, code-splitting and tree-shaking is not easily possible. ```ts import * as graphql from './graphql'; From e65e720bc211281cb6800c8a0b1d15eb89bf4618 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 30 Sep 2021 14:08:38 +0200 Subject: [PATCH 16/16] update snapshots --- .../tests/gql-tag-operations.spec.ts | 290 +++++++++--------- 1 file changed, 137 insertions(+), 153 deletions(-) diff --git a/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts b/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts index e9078102b52..6e25c07d86a 100644 --- a/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts +++ b/packages/presets/gql-tag-operations/tests/gql-tag-operations.spec.ts @@ -24,27 +24,27 @@ describe('gql-tag-operations-preset', () => { }); expect(result[0].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import * as graphql from './graphql'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -const documents = { - \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, - \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, - \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, -}; - -export function gql(source: \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; - -export function gql(source: string): unknown; -export function gql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" -`); + "/* eslint-disable */ + import * as graphql from './graphql'; + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + + const documents = { + \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, + \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, + \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, + }; + + export function gql(source: \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; + + export function gql(source: string): unknown; + export function gql(source: string) { + return (documents as any)[source] ?? {}; + } + + export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" + `); }); it('can generate simple examples lowercase names', async () => { @@ -67,27 +67,27 @@ export type DocumentType> = TDocume }, }); expect(result[0].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import * as graphql from './graphql'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -const documents = { - \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, - \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, - \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, -}; - -export function gql(source: \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; - -export function gql(source: string): unknown; -export function gql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" -`); + "/* eslint-disable */ + import * as graphql from './graphql'; + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + + const documents = { + \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, + \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, + \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, + }; + + export function gql(source: \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query b {\\\\n b\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; + + export function gql(source: string): unknown; + export function gql(source: string) { + return (documents as any)[source] ?? {}; + } + + export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" + `); }); it("follows 'useTypeImports': true", async () => { @@ -116,76 +116,66 @@ export type DocumentType> = TDocume expect(result.length).toBe(2); expect(result[0].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import * as graphql from './graphql'; -import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -const documents = { - \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, - \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, - \\"\\\\n query C {\\\\n c\\\\n }\\\\n\\": graphql.CDocument, -}; - -export function gql(source: \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"]; -export function gql(source: \\"\\\\n query C {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query C {\\\\n c\\\\n }\\\\n\\"]; - -export function gql(source: string): unknown; -export function gql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never; -" -`); + "/* eslint-disable */ + import * as graphql from './graphql'; + import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + + const documents = { + \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, + \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\": graphql.BDocument, + \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\": graphql.CFragmentDoc, + }; + + export function gql(source: \\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query A {\\\\n a\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query B {\\\\n b\\\\n }\\\\n\\"]; + export function gql(source: \\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n fragment C on Query {\\\\n c\\\\n }\\\\n\\"]; + + export function gql(source: string): unknown; + export function gql(source: string) { + return (documents as any)[source] ?? {}; + } + + export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" + `); expect(result[1].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; -}; + "/* eslint-disable */ + import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + export type Maybe = T | null; + export type Exact = { [K in keyof T]: T[K] }; + export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; + export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; + /** All built-in and custom scalars, mapped to their actual values */ + export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + }; -export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; -}; + export type Query = { + __typename?: 'Query'; + a?: Maybe; + b?: Maybe; + c?: Maybe; + }; -export type AQueryVariables = Exact<{ [key: string]: never; }>; + export type AQueryVariables = Exact<{ [key: string]: never; }>; -export type AQuery = { __typename?: 'Query', a?: string | null | undefined }; + export type AQuery = { __typename?: 'Query', a?: string | null | undefined }; -export type BQueryVariables = Exact<{ [key: string]: never; }>; + export type BQueryVariables = Exact<{ [key: string]: never; }>; -export type BQuery = { __typename?: 'Query', b?: string | null | undefined }; + export type BQuery = { __typename?: 'Query', b?: string | null | undefined }; -export type CQueryVariables = Exact<{ [key: string]: never; }>; + export type CFragment = { __typename?: 'Query', c?: string | null | undefined }; - -export type CQuery = { __typename?: 'Query', c?: string | null | undefined }; - - -export const ADocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"A\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"}}]}}]} as unknown as DocumentNode; -export const BDocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"B\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"b\\"}}]}}]} as unknown as DocumentNode; -export const CDocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"C\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"c\\"}}]}}]} as unknown as DocumentNode;" -`); + export const CFragmentDoc = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"FragmentDefinition\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"C\\"},\\"typeCondition\\":{\\"kind\\":\\"NamedType\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"Query\\"}},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"c\\"}}]}}]} as unknown as DocumentNode; + export const ADocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"A\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"}}]}}]} as unknown as DocumentNode; + export const BDocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"B\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"b\\"}}]}}]} as unknown as DocumentNode;" + `); expect(result[0].content).toContain( "import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'" @@ -219,59 +209,53 @@ export const CDocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\ expect(result.length).toBe(2); expect(result[0].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import * as graphql from './graphql'; -import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -const documents = { - \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, -}; - -export function gql(source: \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"]; - -export function gql(source: string): unknown; -export function gql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never; -" -`); + "/* eslint-disable */ + import * as graphql from './graphql'; + import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + + const documents = { + \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\": graphql.ADocument, + }; + + export function gql(source: \\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"): (typeof documents)[\\"\\\\n query a {\\\\n a\\\\n }\\\\n\\"]; + + export function gql(source: string): unknown; + export function gql(source: string) { + return (documents as any)[source] ?? {}; + } + + export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;" + `); expect(result[1].content).toMatchInlineSnapshot(` -"/* eslint-disable */ -import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; -}; - -export type Query = { - __typename?: 'Query'; - a?: Maybe; -}; - -export type AQueryVariables = Exact<{ [key: string]: never; }>; - - -export type AQuery = { __typename?: 'Query', a?: string | null | undefined }; - - -export const ADocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"}}]}}]} as unknown as DocumentNode;" -`); + "/* eslint-disable */ + import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + export type Maybe = T | null; + export type Exact = { [K in keyof T]: T[K] }; + export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; + export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; + /** All built-in and custom scalars, mapped to their actual values */ + export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + }; + + export type Query = { + __typename?: 'Query'; + a?: Maybe; + }; + + export type AQueryVariables = Exact<{ [key: string]: never; }>; + + + export type AQuery = { __typename?: 'Query', a?: string | null | undefined }; + + + export const ADocument = {\\"kind\\":\\"Document\\",\\"definitions\\":[{\\"kind\\":\\"OperationDefinition\\",\\"operation\\":\\"query\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"},\\"selectionSet\\":{\\"kind\\":\\"SelectionSet\\",\\"selections\\":[{\\"kind\\":\\"Field\\",\\"name\\":{\\"kind\\":\\"Name\\",\\"value\\":\\"a\\"}}]}}]} as unknown as DocumentNode;" + `); expect(result[0].content.match(/query a {/g).length).toBe(3); });