From 140298a33b257a0b7958e361971b5bc97bbc01c2 Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Sun, 7 Sep 2025 12:58:09 +1000 Subject: [PATCH 1/2] Next major version feature branch (#10218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [resolvers][federation] Fix mapper being incorrectly used as the base type for reference (#10216) * [resolvers][federation] Add `__resolveReference` to applicable `Interface` entities, fix Interface types having non-meta resolver fields (#10221) * Add __resolveReference for applicable Interfaces - Deprecate generateInternalResolversIfNeeded.__resolveReference - Fix tests - Deprecate onlyResolveTypeForInterfaces - Add changeset - Cleanup - Handle __resolveReference generation in Interface - Let FieldDefinition decide whether to generate __resolveReference by checking whether parent has resolvable key * Fix test * chore(dependencies): updated changesets for modified dependencies * chore(dependencies): updated changesets for modified dependencies * [resolvers] Ensure `__isTypeof` is only generated for implementing types (of Interfaces) or Union members (#10283) * Implement logic to only generate __isTypeOf for implementing types OR union members * Remove unused types * Add changeset * Remove generateInternalResolversIfNeeded * Fix dev tests * Refactor to use parsedSchemaMeta * [resolvers][federation] Bring Federation reference selection set to ResolversParentTypes instead of each resolver (#10297) * Bring reference selection set to ResolversParentTypes * Put back old types to extractReferenceSelectionSet * Update tests for TDD * Handle parent type consistently for __resolveReference and subsequent resolvers * Update tests * chore(dependencies): updated changesets for modified dependencies * Add missing changeset * chore(dependencies): updated changesets for modified dependencies * [resolvers][federation] Fix fields or types being wrong generated when marked with @external (#10287) * Ensure @external does not generate resolver types - Handle external directive when part or whole type is marked - Add changeset - Add test cases for @provides and @external * Format and minor text updates * Add comments * Fix __resolveReference not getting generated * Fix test with __isTypeOf when not needed * Fix type cast that results in wrong type * Revert unncessary changes to FieldDefinitionPrintFn * Re-format * Convert to use AST Node instead of GraphQL Type * Update test template * Cache field nodes to generate for processed objects * Put FIXME on base-resolvers-visitor to remove Name method * Fix unit test * [resolvers][federation] Fix federation @requires type (#10366) * Update test setup * Implement @requires combination * Add changeset * Force release alpha * Fix issue with empty array, set up tests * Generate FederationReferenceTypes once * Update tests related to FederationReferenceTypes * Update dev-tests * Revert force release * Update test related to mapper * [resolvers] Refactor to remove NameNode override and simplify federation functions (#10377) * Remove NameNode override and refactor relevant references * Simplify federation utils by making functions handle nodes * Fix lint issue * CODEGEN-834 - [cli] Handle partial generation success (#10376) * Add writeOnPartialSuccess flag to partially write successful generateiong * Update config name from writeOnPartialSuccess to allowPartialOutputs * Ensure consistent experience on complete failure, update tests * Restructure code and comment * Update website schema * Update doc * Drop Node 18 support (#10392) * Drop Node 18 support * Add changeset * Drop graphql tools prisma loader (#10400) * Drop @graphql-tools/prisma-loader * Add changeset * Update yarn.lock * Update tsconfig for Node 20 (#10403) * Update tsconfig to Node 20 recommended version * Make babel allow declare TS field * Bump packages (#10404) * Bump dependency-graph to ^1.0.0 * Bump nock to 14.0.0 * Bump debounce to v2 and remove types package * Bump ESM packages - chalk - detect-indent - log-symbols - auto-bind * Revert "Bump ESM packages" This reverts commit 7b79aaa8378d2eef39f79e09156f6f96f2fc9a64. * Migrate jitit to v2 * Bump cosmiconfig to v9 * Add changesets * Use min. jiti v2.3.0 to handle default import like before * [CLI] Bump deps for next major version (#10405) * Bump listr2 * Migrate implementation and update tests for listr2 * Migrate inquirer to inquirer/prompts * Remove old resolutions & update lock file (#10407) * Remove unnecessary resolutions * Remove deprecated config options for next major version (#10408) * Remove deprecated config - watchConfig - dedupeFragments - noGraphQLTag * Add changesets * Regen website schema * CODEGEN-840 - Handle empty object type better (#10409) * Update ts-resolvers to handle {} correctly * Refactor types * Update ts-documents to handle {} better * Add changeset * Update tests * Migrate to Vitest (#10410) * Install vitest * Set up vitest config * Install tsconfigPaths * Set up root vite config * Set up vitest project for typescript-resolvers * Set up vitest for plugins-helpers and fix ESM test * Set up client preset vitest project * Prepare for vitest.setup.ts * Set up vitest for graphql-modules-preset * Set up vitest for typescript plugin * Set up vitest for typed-document-node * Set up vitest for typescript-operations * Set up vitest for gql-tag-operations * Set up vitest in typescript-document-nodes * Set up vitest for visitor-plugin-common * Set up vitest for time plugin * Set up vitest for schema-ast plugin * Set up vitest for introspection plugin * Set up vitest for fragment-matcher plugin * Set up vitest for add * Set up vitest for graphql-codegen-core * Install memfs to support fs testing * Set up test config for cli * Fix init tests * Set up vitest for graphql-codegen-testing * Update linting rules for test files * Fix cli-* specs * Handle cwd mocking for CLI command * Fix cjs vs esm issues in codegen.spec * Fix config.spec * Fix watcher.spec and trim down the mocks * Migrate rest of examples to vitest * By jest things. Not even jesting 🤡 * Fix cache jest -> vitest * Fix lint issues and unncessary disables * Fix vitest spec * Fix test and generated things in examples * Fix vitest things * Bump ESM packages (#10415) * Bump ESM packages * Add changeset * [typescript] Remove NameNode overrides (#10416) * Avoid NameNode and StringValue string conversion * Add changeset * Remove CI config used for dev * [resolvers] Report if an object can have `__isTypeOf` resolver to output meta (#10417) * Report hasIsTypeOf in meta * Add changeset * Revert "Remove CI config used for dev" This reverts commit 6d2c6e4d5d5e9450d5613e9f4208e150fb1185a1. * Revert "Bump ESM packages (#10415)" (#10423) This reverts commit 939752ce493b32d8bd68a229509cb5b0cc412ad4. * Remove branch debug * Update test setup: test once by default, and add watch flag to watch --------- Co-authored-by: github-actions[bot] --- .changeset/angry-lamps-notice.md | 7 + .changeset/brave-days-heal.md | 5 + .changeset/brave-meals-brake.md | 5 + .changeset/flat-ghosts-push.md | 7 + .changeset/kind-donkeys-retire.md | 5 + .changeset/large-glasses-jump.md | 6 + .changeset/long-dolphins-teach.md | 8 + .changeset/loud-suits-admire.md | 10 + .changeset/lovely-snails-travel.md | 7 + .changeset/many-pets-attend.md | 6 + .changeset/small-fans-cross.md | 7 + .changeset/smooth-pans-walk.md | 5 + .changeset/tall-wasps-know.md | 7 + .changeset/tame-lizards-speak.md | 5 + .changeset/tame-radios-leave.md | 9 + .changeset/thick-pianos-smoke.md | 11 + .changeset/tiny-avocados-applaud.md | 6 + .changeset/tough-apricots-bake.md | 5 + .changeset/twenty-planets-complain.md | 7 + .changeset/wicked-timers-eat.md | 22 + .eslintrc.cjs | 20 +- .github/workflows/main.yml | 22 +- .github/workflows/pr.yml | 2 - .github/workflows/release.yml | 1 - .github/workflows/website-integrity.yml | 2 - .github/workflows/website.yml | 3 - .vscode/launch.json | 2 +- babel.config.js | 2 +- dev-test/modules/types.ts | 39 +- dev-test/subpath-import/result.d.ts | 30 +- dev-test/test-schema/resolvers-federation.ts | 77 +- dev-test/test-schema/resolvers-root.ts | 38 +- dev-test/test-schema/resolvers-stitching.ts | 31 +- dev-test/test-schema/resolvers-types.ts | 33 +- dev-test/test-schema/typings.ts | 33 +- .../codegen.ts | 1 - .../jest.config.js | 3 - .../package.json | 4 +- .../src/yoga.spec.ts | 15 +- .../vitest.config.ts | 12 + examples/persisted-documents/codegen.ts | 1 - examples/persisted-documents/jest.config.js | 3 - examples/persisted-documents/package.json | 4 +- examples/persisted-documents/src/yoga.spec.ts | 15 +- examples/persisted-documents/vitest.config.ts | 12 + .../src/gql.generated.ts | 32 +- examples/react/apollo-client-defer/codegen.ts | 1 - .../apollo-client-defer/cypress.config.ts | 1 - .../react/apollo-client-defer/package.json | 1 - .../react/apollo-client-defer/vite.config.ts | 1 - .../react/apollo-client-swc-plugin/codegen.ts | 1 - .../apollo-client-swc-plugin/vite.config.mts | 1 - examples/react/apollo-client/codegen.ts | 1 - .../react/apollo-client/cypress.config.ts | 1 - examples/react/apollo-client/package.json | 1 - examples/react/apollo-client/vite.config.ts | 1 - examples/react/http-executor/codegen.ts | 1 - .../react/http-executor/cypress.config.ts | 1 - examples/react/http-executor/package.json | 1 - examples/react/http-executor/vite.config.ts | 1 - examples/react/nextjs-swr/codegen.ts | 1 - examples/react/nextjs-swr/cypress.config.ts | 1 - examples/react/nextjs-swr/hooks/use-query.ts | 1 - .../react/tanstack-react-query/codegen.ts | 1 - .../tanstack-react-query/cypress.config.ts | 1 - .../react/tanstack-react-query/package.json | 1 - .../tanstack-react-query/src/use-graphql.ts | 1 - .../react/tanstack-react-query/vite.config.ts | 1 - examples/react/urql/codegen.ts | 1 - examples/react/urql/cypress.config.ts | 1 - examples/react/urql/vite.config.ts | 1 - .../typescript-graphql-request/codegen.ts | 1 - .../typescript-graphql-request/jest.config.js | 4 - .../typescript-graphql-request/package.json | 6 +- .../src/main.spec.ts | 1 + .../vitest.config.ts | 12 + examples/typescript-resolvers/codegen.ts | 1 - .../typescript-resolvers/src/type-defs.d.ts | 36 +- examples/vite/vite-react-cts/codegen.cts | 1 - .../vite/vite-react-cts/cypress.config.ts | 1 - examples/vite/vite-react-mts/codegen.mts | 1 - .../vite/vite-react-mts/cypress.config.ts | 1 - examples/vite/vite-react-ts/codegen.ts | 1 - examples/vite/vite-react-ts/cypress.config.ts | 1 - .../vue/apollo-composable/cypress.config.ts | 1 - examples/vue/apollo-composable/vite.config.ts | 1 - examples/vue/urql/cypress.config.ts | 1 - examples/vue/urql/vite.config.ts | 1 - examples/vue/villus/cypress.config.ts | 1 - examples/vue/villus/vite.config.ts | 1 - examples/yoga-tests/codegen.ts | 1 - examples/yoga-tests/jest.config.js | 3 - examples/yoga-tests/package.json | 4 +- examples/yoga-tests/src/yoga.spec.ts | 1 + examples/yoga-tests/vitest.config.ts | 12 + jest.config.js | 11 - jest.project.js | 31 - package.json | 26 +- packages/graphql-codegen-cli/jest.config.js | 1 - packages/graphql-codegen-cli/package.json | 15 +- packages/graphql-codegen-cli/src/codegen.ts | 27 +- packages/graphql-codegen-cli/src/config.ts | 6 +- .../src/generate-and-save.ts | 24 +- .../graphql-codegen-cli/src/graphql-config.ts | 2 - .../graphql-codegen-cli/src/init/index.ts | 10 +- .../graphql-codegen-cli/src/init/questions.ts | 170 +- packages/graphql-codegen-cli/src/load.ts | 2 - .../graphql-codegen-cli/src/utils/watcher.ts | 10 +- .../tests/__mocks__/fs.cjs | 2 + .../graphql-codegen-cli/tests/__mocks__/fs.js | 28 - .../{some-fetch.js => some-fetch.cjs} | 1 - .../tests/__snapshots__/init.spec.ts.snap | 16 +- .../tests/cli-error.spec.ts | 12 +- .../tests/cli-flags.spec.ts | 6 +- .../graphql-codegen-cli/tests/codegen.spec.ts | 519 ++- .../graphql-codegen-cli/tests/config.spec.ts | 2 +- ...-loader.js => custom-documents-loader.cjs} | 1 - ... => custom-schema-loader-with-context.cjs} | 1 - ...ema-loader.js => custom-schema-loader.cjs} | 1 - .../{invalid-export.js => invalid-export.cjs} | 0 ...invalid-return-value-documents-loader.cjs} | 0 ...=> invalid-return-value-schema-loader.cjs} | 0 .../tests/generate-and-save.spec.ts | 259 +- .../graphql-codegen-cli/tests/init.spec.ts | 96 +- .../{schema-object.js => schema-object.cjs} | 0 packages/graphql-codegen-cli/tests/utils.ts | 2 +- .../assert-watcher-build-triggers.ts | 66 +- .../setup-mock-watcher.ts | 249 -- .../graphql-codegen-cli/tests/watcher.spec.ts | 661 ++-- packages/graphql-codegen-cli/vitest.config.ts | 24 + packages/graphql-codegen-cli/vitest.setup.ts | 5 + packages/graphql-codegen-core/jest.config.js | 1 - packages/graphql-codegen-core/package.json | 2 +- .../graphql-codegen-core/vitest.config.ts | 12 + packages/plugins/other/add/jest.config.js | 1 - packages/plugins/other/add/vitest.config.ts | 12 + .../other/fragment-matcher/jest.config.js | 1 - .../other/fragment-matcher/package.json | 2 +- .../other/fragment-matcher/vitest.config.ts | 12 + .../other/introspection/jest.config.js | 1 - .../plugins/other/introspection/package.json | 2 +- .../other/introspection/vitest.config.ts | 12 + .../plugins/other/schema-ast/jest.config.js | 1 - .../plugins/other/schema-ast/package.json | 2 +- .../plugins/other/schema-ast/vitest.config.ts | 12 + packages/plugins/other/time/jest.config.js | 1 - packages/plugins/other/time/vitest.config.ts | 12 + .../visitor-plugin-common/jest.config.js | 1 - .../other/visitor-plugin-common/package.json | 4 +- .../src/base-resolvers-visitor.ts | 626 ++-- .../src/base-types-visitor.ts | 64 +- .../visitor-plugin-common/src/base-visitor.ts | 11 - .../src/client-side-base-visitor.ts | 23 +- .../src/selection-set-to-object.ts | 2 +- .../other/visitor-plugin-common/src/types.ts | 5 - .../tests/create-resolvers-fields.spec.ts | 6 +- .../visitor-plugin-common/tests/utils.spec.ts | 1 - .../visitor-plugin-common/vitest.config.ts | 12 + .../typescript/document-nodes/jest.config.js | 1 - .../typescript/document-nodes/package.json | 2 +- .../tests/graphql-document-nodes.spec.ts | 23 - .../document-nodes/vitest.config.ts | 12 + .../gql-tag-operations/jest.config.js | 1 - .../gql-tag-operations/package.json | 2 +- .../gql-tag-operations/vitest.config.ts | 12 + .../typescript/operations/jest.config.js | 1 - .../typescript/operations/package.json | 2 +- .../__snapshots__/ts-documents.spec.ts.snap | 40 +- .../operations/tests/ts-documents.spec.ts | 9 +- .../typescript/operations/vitest.config.ts | 12 + .../typescript/resolvers/jest.config.js | 1 - .../plugins/typescript/resolvers/package.json | 2 +- .../plugins/typescript/resolvers/src/index.ts | 36 +- .../typescript/resolvers/src/visitor.ts | 28 +- .../__snapshots__/ts-resolvers.spec.ts.snap | 86 +- ...ts-resolvers.config.avoidOptionals.spec.ts | 1 - ...-resolvers.config.customDirectives.spec.ts | 1 - .../ts-resolvers.federation.interface.spec.ts | 213 ++ .../ts-resolvers.federation.mappers.spec.ts | 195 ++ .../tests/ts-resolvers.federation.spec.ts | 868 ++--- .../tests/ts-resolvers.interface.spec.ts | 65 +- .../tests/ts-resolvers.mapping.spec.ts | 141 +- .../resolvers/tests/ts-resolvers.meta.spec.ts | 44 +- .../resolvers/tests/ts-resolvers.spec.ts | 59 +- .../tests/ts-resolvers.union.spec.ts | 56 +- .../typescript/resolvers/tests/utils.ts | 15 + .../typescript/resolvers/vitest.config.ts | 12 + .../typed-document-node/jest.config.js | 1 - .../typed-document-node/package.json | 2 +- .../typed-document-node/vitest.config.ts | 12 + .../typescript/typescript/jest.config.js | 1 - .../typescript/typescript/package.json | 2 +- .../typescript/src/introspection-visitor.ts | 4 +- .../typescript/typescript/src/visitor.ts | 35 +- .../__snapshots__/typescript.spec.ts.snap | 4 +- .../typescript/typescript/vitest.config.ts | 12 + packages/presets/client/jest.config.js | 1 - packages/presets/client/package.json | 2 +- packages/presets/client/src/index.ts | 1 - .../tests/client-preset.nullability.spec.ts | 4 +- .../client/tests/client-preset.spec.ts | 76 +- packages/presets/client/vitest.config.ts | 12 + .../presets/graphql-modules/jest.config.js | 1 - .../tests/__snapshots__/builder.spec.ts.snap | 2 +- .../__snapshots__/integration.spec.ts.snap | 4 +- .../graphql-modules/tests/integration.spec.ts | 112 +- .../presets/graphql-modules/vitest.config.ts | 13 + .../presets/graphql-modules/vitest.setup.ts | 3 + .../graphql-codegen-testing/jest.config.js | 1 - .../graphql-codegen-testing/package.json | 2 +- .../graphql-codegen-testing/src/index.ts | 58 +- .../graphql-codegen-testing/vitest.config.ts | 12 + packages/utils/plugins-helpers/jest.config.js | 1 - packages/utils/plugins-helpers/package.json | 2 +- .../utils/plugins-helpers/src/federation.ts | 531 ++- packages/utils/plugins-helpers/src/types.ts | 17 +- .../tests/fixtures/externalModuleFn.js | 2 +- .../resolve-external-module-and-fn.spec.ts | 2 +- .../utils/plugins-helpers/vitest.config.ts | 12 + scripts/match-graphql.js | 7 +- tsconfig.json | 20 +- tsconfig.spec.json | 17 + vitest.config.ts | 21 + website/public/config.schema.json | 241 +- .../docs/config-reference/codegen-config.mdx | 6 +- .../docs/custom-codegen/contributing.mdx | 4 +- website/src/pages/docs/guides/react-vue.mdx | 1 - .../pages/plugins/presets/preset-client.mdx | 1 - yarn.lock | 3047 ++++++----------- 229 files changed, 5243 insertions(+), 4839 deletions(-) create mode 100644 .changeset/angry-lamps-notice.md create mode 100644 .changeset/brave-days-heal.md create mode 100644 .changeset/brave-meals-brake.md create mode 100644 .changeset/flat-ghosts-push.md create mode 100644 .changeset/kind-donkeys-retire.md create mode 100644 .changeset/large-glasses-jump.md create mode 100644 .changeset/long-dolphins-teach.md create mode 100644 .changeset/loud-suits-admire.md create mode 100644 .changeset/lovely-snails-travel.md create mode 100644 .changeset/many-pets-attend.md create mode 100644 .changeset/small-fans-cross.md create mode 100644 .changeset/smooth-pans-walk.md create mode 100644 .changeset/tall-wasps-know.md create mode 100644 .changeset/tame-lizards-speak.md create mode 100644 .changeset/tame-radios-leave.md create mode 100644 .changeset/thick-pianos-smoke.md create mode 100644 .changeset/tiny-avocados-applaud.md create mode 100644 .changeset/tough-apricots-bake.md create mode 100644 .changeset/twenty-planets-complain.md create mode 100644 .changeset/wicked-timers-eat.md delete mode 100644 examples/persisted-documents-string-mode/jest.config.js create mode 100644 examples/persisted-documents-string-mode/vitest.config.ts delete mode 100644 examples/persisted-documents/jest.config.js create mode 100644 examples/persisted-documents/vitest.config.ts delete mode 100644 examples/typescript-graphql-request/jest.config.js create mode 100644 examples/typescript-graphql-request/vitest.config.ts delete mode 100644 examples/yoga-tests/jest.config.js create mode 100644 examples/yoga-tests/vitest.config.ts delete mode 100644 jest.config.js delete mode 100644 jest.project.js delete mode 100644 packages/graphql-codegen-cli/jest.config.js create mode 100644 packages/graphql-codegen-cli/tests/__mocks__/fs.cjs delete mode 100644 packages/graphql-codegen-cli/tests/__mocks__/fs.js rename packages/graphql-codegen-cli/tests/__mocks__/{some-fetch.js => some-fetch.cjs} (91%) rename packages/graphql-codegen-cli/tests/custom-loaders/{custom-documents-loader.js => custom-documents-loader.cjs} (82%) rename packages/graphql-codegen-cli/tests/custom-loaders/{custom-schema-loader-with-context.js => custom-schema-loader-with-context.cjs} (83%) rename packages/graphql-codegen-cli/tests/custom-loaders/{custom-schema-loader.js => custom-schema-loader.cjs} (83%) rename packages/graphql-codegen-cli/tests/custom-loaders/{invalid-export.js => invalid-export.cjs} (100%) rename packages/graphql-codegen-cli/tests/custom-loaders/{invalid-return-value-documents-loader.js => invalid-return-value-documents-loader.cjs} (100%) rename packages/graphql-codegen-cli/tests/custom-loaders/{invalid-return-value-schema-loader.js => invalid-return-value-schema-loader.cjs} (100%) rename packages/graphql-codegen-cli/tests/test-files/schema-dir/{schema-object.js => schema-object.cjs} (100%) delete mode 100644 packages/graphql-codegen-cli/tests/watcher-test-helpers/setup-mock-watcher.ts create mode 100644 packages/graphql-codegen-cli/vitest.config.ts create mode 100644 packages/graphql-codegen-cli/vitest.setup.ts delete mode 100644 packages/graphql-codegen-core/jest.config.js create mode 100644 packages/graphql-codegen-core/vitest.config.ts delete mode 100644 packages/plugins/other/add/jest.config.js create mode 100644 packages/plugins/other/add/vitest.config.ts delete mode 100644 packages/plugins/other/fragment-matcher/jest.config.js create mode 100644 packages/plugins/other/fragment-matcher/vitest.config.ts delete mode 100644 packages/plugins/other/introspection/jest.config.js create mode 100644 packages/plugins/other/introspection/vitest.config.ts delete mode 100644 packages/plugins/other/schema-ast/jest.config.js create mode 100644 packages/plugins/other/schema-ast/vitest.config.ts delete mode 100644 packages/plugins/other/time/jest.config.js create mode 100644 packages/plugins/other/time/vitest.config.ts delete mode 100644 packages/plugins/other/visitor-plugin-common/jest.config.js create mode 100644 packages/plugins/other/visitor-plugin-common/vitest.config.ts delete mode 100644 packages/plugins/typescript/document-nodes/jest.config.js create mode 100644 packages/plugins/typescript/document-nodes/vitest.config.ts delete mode 100644 packages/plugins/typescript/gql-tag-operations/jest.config.js create mode 100644 packages/plugins/typescript/gql-tag-operations/vitest.config.ts delete mode 100644 packages/plugins/typescript/operations/jest.config.js create mode 100644 packages/plugins/typescript/operations/vitest.config.ts delete mode 100644 packages/plugins/typescript/resolvers/jest.config.js create mode 100644 packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.interface.spec.ts create mode 100644 packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.mappers.spec.ts create mode 100644 packages/plugins/typescript/resolvers/tests/utils.ts create mode 100644 packages/plugins/typescript/resolvers/vitest.config.ts delete mode 100644 packages/plugins/typescript/typed-document-node/jest.config.js create mode 100644 packages/plugins/typescript/typed-document-node/vitest.config.ts delete mode 100644 packages/plugins/typescript/typescript/jest.config.js create mode 100644 packages/plugins/typescript/typescript/vitest.config.ts delete mode 100644 packages/presets/client/jest.config.js create mode 100644 packages/presets/client/vitest.config.ts delete mode 100644 packages/presets/graphql-modules/jest.config.js create mode 100644 packages/presets/graphql-modules/vitest.config.ts create mode 100644 packages/presets/graphql-modules/vitest.setup.ts delete mode 100644 packages/utils/graphql-codegen-testing/jest.config.js create mode 100644 packages/utils/graphql-codegen-testing/vitest.config.ts delete mode 100644 packages/utils/plugins-helpers/jest.config.js create mode 100644 packages/utils/plugins-helpers/vitest.config.ts create mode 100644 tsconfig.spec.json create mode 100644 vitest.config.ts diff --git a/.changeset/angry-lamps-notice.md b/.changeset/angry-lamps-notice.md new file mode 100644 index 00000000000..857afd3b8a4 --- /dev/null +++ b/.changeset/angry-lamps-notice.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/plugin-helpers': major +--- + +BREAKING CHANGES: Do not generate \_\_isTypeOf for non-implementing types or non-union members diff --git a/.changeset/brave-days-heal.md b/.changeset/brave-days-heal.md new file mode 100644 index 00000000000..0fe1a79b45d --- /dev/null +++ b/.changeset/brave-days-heal.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/plugin-helpers': major +--- + +Remove deprecated option `watchConfig` diff --git a/.changeset/brave-meals-brake.md b/.changeset/brave-meals-brake.md new file mode 100644 index 00000000000..39ef01dec79 --- /dev/null +++ b/.changeset/brave-meals-brake.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/cli': major +--- + +Drop @graphql-tools/prisma-loader diff --git a/.changeset/flat-ghosts-push.md b/.changeset/flat-ghosts-push.md new file mode 100644 index 00000000000..acadda00c74 --- /dev/null +++ b/.changeset/flat-ghosts-push.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/testing': major +--- + +Bump depdendencies major versions: + +- nock v14 diff --git a/.changeset/kind-donkeys-retire.md b/.changeset/kind-donkeys-retire.md new file mode 100644 index 00000000000..d6ba6ebd9d7 --- /dev/null +++ b/.changeset/kind-donkeys-retire.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +--- + +Remove deprecated config option `dedupeFragments` diff --git a/.changeset/large-glasses-jump.md b/.changeset/large-glasses-jump.md new file mode 100644 index 00000000000..7329a64386a --- /dev/null +++ b/.changeset/large-glasses-jump.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript': major +--- + +Remove NameNode override diff --git a/.changeset/long-dolphins-teach.md b/.changeset/long-dolphins-teach.md new file mode 100644 index 00000000000..edb100c15cc --- /dev/null +++ b/.changeset/long-dolphins-teach.md @@ -0,0 +1,8 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-operations': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/client-preset': major +--- + +BREAKING CHANGE: Use Record instead of {} for empty object type diff --git a/.changeset/loud-suits-admire.md b/.changeset/loud-suits-admire.md new file mode 100644 index 00000000000..3ecc3cbef0e --- /dev/null +++ b/.changeset/loud-suits-admire.md @@ -0,0 +1,10 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/plugin-helpers': major +--- + +Ensure Federation Interfaces have `__resolveReference` if they are resolvable entities + +BREAKING CHANGES: Deprecate `onlyResolveTypeForInterfaces` because majority of use cases cannot implement resolvers in Interfaces. +BREAKING CHANGES: Deprecate `generateInternalResolversIfNeeded.__resolveReference` because types do not have `__resolveReference` if they are not Federation entities or are not resolvable. Users should not have to manually set this option. This option was put in to wait for this major version. diff --git a/.changeset/lovely-snails-travel.md b/.changeset/lovely-snails-travel.md new file mode 100644 index 00000000000..2fbc76e0f5a --- /dev/null +++ b/.changeset/lovely-snails-travel.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/plugin-helpers': major +--- + +BREAKING CHANGE: Improve Federation Entity's resolvers' parent param type: These types were using reference types inline. This makes it hard to handle mappers. The Parent type now all comes from ParentResolverTypes to make handling mappers and parent types simpler. diff --git a/.changeset/many-pets-attend.md b/.changeset/many-pets-attend.md new file mode 100644 index 00000000000..0ed0e00bedb --- /dev/null +++ b/.changeset/many-pets-attend.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/plugin-helpers': minor +'@graphql-codegen/cli': major +--- + +Add `allowPartialOutputs` flag to partially write successful generation to files diff --git a/.changeset/small-fans-cross.md b/.changeset/small-fans-cross.md new file mode 100644 index 00000000000..729306c52a0 --- /dev/null +++ b/.changeset/small-fans-cross.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/visitor-plugin-common': patch +'@graphql-codegen/typescript-resolvers': patch +'@graphql-codegen/plugin-helpers': patch +--- + +Update @requires type diff --git a/.changeset/smooth-pans-walk.md b/.changeset/smooth-pans-walk.md new file mode 100644 index 00000000000..74c886d511c --- /dev/null +++ b/.changeset/smooth-pans-walk.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/cli': major +--- + +Migrate inquirer to @inquirer/prompts diff --git a/.changeset/tall-wasps-know.md b/.changeset/tall-wasps-know.md new file mode 100644 index 00000000000..884c199974c --- /dev/null +++ b/.changeset/tall-wasps-know.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +--- + +Bump dependencies major versions: + +- dependency-graph to v1 diff --git a/.changeset/tame-lizards-speak.md b/.changeset/tame-lizards-speak.md new file mode 100644 index 00000000000..024bad4a95d --- /dev/null +++ b/.changeset/tame-lizards-speak.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/client-preset': major +--- + +Stop passing through the deprecated config option `dedupeFragments` diff --git a/.changeset/tame-radios-leave.md b/.changeset/tame-radios-leave.md new file mode 100644 index 00000000000..deb787058c0 --- /dev/null +++ b/.changeset/tame-radios-leave.md @@ -0,0 +1,9 @@ +--- +'@graphql-codegen/cli': major +--- + +Bump dependencies major versions: + +- cosmiconfig v9 +- debounce v2 +- jiti v2.3 diff --git a/.changeset/thick-pianos-smoke.md b/.changeset/thick-pianos-smoke.md new file mode 100644 index 00000000000..569664420a9 --- /dev/null +++ b/.changeset/thick-pianos-smoke.md @@ -0,0 +1,11 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/plugin-helpers': major +--- + +Fix `mappers` usage with Federation + +`mappers` was previously used as `__resolveReference`'s first param (usually called "reference"). However, this is incorrect because `reference` interface comes directly from `@key` and `@requires` directives. This patch fixes the issue by creating a new `FederationTypes` type and use it as the base for federation entity types when being used to type entity references. + +BREAKING CHANGES: No longer generate `UnwrappedObject` utility type, as this was used to support the wrong previously generated type. diff --git a/.changeset/tiny-avocados-applaud.md b/.changeset/tiny-avocados-applaud.md new file mode 100644 index 00000000000..f37332b6470 --- /dev/null +++ b/.changeset/tiny-avocados-applaud.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/visitor-plugin-common': minor +'@graphql-codegen/typescript-resolvers': minor +--- + +Report to meta user defined objects whether they have isTypeOf resolver diff --git a/.changeset/tough-apricots-bake.md b/.changeset/tough-apricots-bake.md new file mode 100644 index 00000000000..f85f409059a --- /dev/null +++ b/.changeset/tough-apricots-bake.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/cli': major +--- + +Bump listr2 to v9 diff --git a/.changeset/twenty-planets-complain.md b/.changeset/twenty-planets-complain.md new file mode 100644 index 00000000000..4d9a34fa45c --- /dev/null +++ b/.changeset/twenty-planets-complain.md @@ -0,0 +1,7 @@ +--- +'@graphql-codegen/visitor-plugin-common': patch +'@graphql-codegen/typescript-resolvers': patch +'@graphql-codegen/plugin-helpers': patch +--- + +Fix fields or object types marked with @external being wrongly generated diff --git a/.changeset/wicked-timers-eat.md b/.changeset/wicked-timers-eat.md new file mode 100644 index 00000000000..38674e51ce7 --- /dev/null +++ b/.changeset/wicked-timers-eat.md @@ -0,0 +1,22 @@ +--- +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/graphql-modules-preset': major +'@graphql-codegen/plugin-helpers': major +'@graphql-codegen/cli': major +'@graphql-codegen/client-preset': major +'@graphql-codegen/core': major +'@graphql-codegen/add': major +'@graphql-codegen/fragment-matcher': major +'@graphql-codegen/introspection': major +'@graphql-codegen/schema-ast': major +'@graphql-codegen/time': major +'@graphql-codegen/typescript-document-nodes': major +'@graphql-codegen/gql-tag-operations': major +'@graphql-codegen/typescript-operations': major +'@graphql-codegen/typed-document-node': major +'@graphql-codegen/typescript': major +'@graphql-codegen/testing': major +--- + +Drop Node 18 support diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2974b0a7f24..4d66de7c3cc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -14,10 +14,7 @@ module.exports = { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/ban-ts-ignore': 'off', '@typescript-eslint/ban-types': 'off', - 'import/no-extraneous-dependencies': [ - 'error', - { devDependencies: ['**/*.test.ts', '**/*.spec.ts', '**/test/**/*.ts'] }, - ], + 'import/no-extraneous-dependencies': 'error', // todo: enable 'unicorn/filename-case': 'off', @@ -36,12 +33,17 @@ module.exports = { extends: '@theguild/eslint-config/react', }, { - files: ['**/tests/**/*.{js,ts,tsx}', '**/graphql-codegen-testing/**/*.ts', '*.spec.ts'], - env: { - jest: true, - }, + files: [ + '*.spec.ts', + '**/tests/**/*.{js,ts,tsx,cjs}', + '**/graphql-codegen-testing/**/*.ts', + '**/vitest.config.ts', + '**/vitest.setup.ts', + '**/__mocks__/*', + ], rules: { 'import/no-extraneous-dependencies': 'off', + '@typescript-eslint/no-require-imports': 'off', }, }, { @@ -57,7 +59,7 @@ module.exports = { }, }, { - files: ['scripts/*.{ts,js}', 'prettier.config.cjs', 'jest.config.js', 'jest.project.js'], + files: ['scripts/*.{ts,js}', 'prettier.config.cjs'], rules: { '@typescript-eslint/no-require-imports': 'off', }, diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b337f5d2d4..cbf4b3f5e7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,8 +28,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - name: Prettier Check run: yarn prettier:check dev-tests-old: @@ -45,8 +43,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - name: Build run: yarn build env: @@ -63,8 +59,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - name: Build run: yarn build env: @@ -87,8 +81,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 with: toolchain: 1.65.0 @@ -120,8 +112,6 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - name: Build run: yarn build env: @@ -138,10 +128,10 @@ jobs: strategy: matrix: os: [ubuntu-latest] # remove windows to speed up the tests - node_version: [16, 18, 20] + node_version: [20, 22, 24] graphql_version: [15, 16] include: - - node-version: 14 + - node-version: 20 os: windows-latest graphql_version: 16 steps: @@ -155,13 +145,13 @@ jobs: run: node ./scripts/match-graphql.js ${{matrix.graphql_version}} - name: Install Dependencies run: yarn - - name: Cache Jest + - name: Cache Vitest uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 with: - path: .cache/jest - key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest-${{hashFiles('yarn.lock')}} + path: node_modules/.vite + key: ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest-${{hashFiles('yarn.lock')}} restore-keys: | - ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-jest- + ${{runner.os}}-${{matrix.node_version}}-${{matrix.graphql_version}}-vitest- - name: Build run: yarn build - name: Test diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index bf47152690b..12b77c7cc3e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,7 +17,6 @@ jobs: with: npmTag: alpha buildScript: build - nodeVersion: 18 secrets: githubToken: ${{ secrets.GITHUB_TOKEN }} npmToken: ${{ secrets.NPM_TOKEN }} @@ -29,7 +28,6 @@ jobs: npmTag: rc restoreDeletedChangesets: true buildScript: build - nodeVersion: 18 secrets: githubToken: ${{ secrets.GITHUB_TOKEN }} npmToken: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eaf8c319040..d748632279e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,6 @@ jobs: uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main with: releaseScript: release - nodeVersion: 18 secrets: # githubToken: ${{ secrets.GUILD_BOT_TOKEN }} githubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/website-integrity.yml b/.github/workflows/website-integrity.yml index 7b66eabae4c..fa3bf8a304b 100644 --- a/.github/workflows/website-integrity.yml +++ b/.github/workflows/website-integrity.yml @@ -15,8 +15,6 @@ jobs: - name: Setup env uses: the-guild-org/shared-config/setup@main - with: - nodeVersion: 18 - name: Build Packages run: yarn build diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 68d2bdc93e5..1d5400f2c2c 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -20,9 +20,6 @@ jobs: - uses: the-guild-org/shared-config/setup@main name: setup env - with: - nodeVersion: 18 - packageManager: yarn - uses: the-guild-org/shared-config/website-cf@main name: build and deploy website diff --git a/.vscode/launch.json b/.vscode/launch.json index a9d9cae09f0..5344e8b01e7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Run open test file", "type": "node", "request": "launch", - "runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${relativeFile}"], + "runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/vitest", "--runInBand", "${relativeFile}"], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen" } diff --git a/babel.config.js b/babel.config.js index 3e4899f4a74..fa522d8587c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ module.exports = { presets: [ ['@babel/preset-env', { targets: { node: process.versions.node.split('.')[0] } }], - '@babel/preset-typescript', + ['@babel/preset-typescript', { allowDeclareFields: true }], ], }; diff --git a/dev-test/modules/types.ts b/dev-test/modules/types.ts index 4a4bf594d23..f516a7e65c6 100644 --- a/dev-test/modules/types.ts +++ b/dev-test/modules/types.ts @@ -99,9 +99,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -138,17 +141,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -156,7 +165,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -181,10 +195,10 @@ export type ResolversTypes = { Float: ResolverTypeWrapper; ID: ResolverTypeWrapper; Int: ResolverTypeWrapper; - Mutation: ResolverTypeWrapper<{}>; + Mutation: ResolverTypeWrapper>; PaymentOption: ResolverTypeWrapper['PaymentOption']>; Paypal: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; User: ResolverTypeWrapper< Omit & { paymentOptions?: Maybe> } @@ -204,10 +218,10 @@ export type ResolversParentTypes = { Float: Scalars['Float']['output']; ID: Scalars['ID']['output']; Int: Scalars['Int']['output']; - Mutation: {}; + Mutation: Record; PaymentOption: ResolversUnionTypes['PaymentOption']; Paypal: Paypal; - Query: {}; + Query: Record; String: Scalars['String']['output']; User: Omit & { paymentOptions?: Maybe> }; }; @@ -220,7 +234,6 @@ export type ArticleResolvers< id?: Resolver; text?: Resolver; title?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type CreditCardResolvers< @@ -241,7 +254,6 @@ export type DonationResolvers< id?: Resolver; recipient?: Resolver; sender?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type MutationResolvers< @@ -298,7 +310,6 @@ export type UserResolvers< id?: Resolver; lastName?: Resolver; paymentOptions?: Resolver>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/dev-test/subpath-import/result.d.ts b/dev-test/subpath-import/result.d.ts index f066002aea9..e5bde7c4017 100644 --- a/dev-test/subpath-import/result.d.ts +++ b/dev-test/subpath-import/result.d.ts @@ -48,9 +48,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -87,17 +90,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -105,7 +114,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -144,7 +158,6 @@ export type UserResolvers< name?: Resolver; password?: Resolver; updatedAt?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type MutationResolvers< @@ -157,7 +170,6 @@ export type MutationResolvers< FiedContextType, RequireFields >; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/dev-test/test-schema/resolvers-federation.ts b/dev-test/test-schema/resolvers-federation.ts index d2c05ac9d13..ef01e8ea778 100644 --- a/dev-test/test-schema/resolvers-federation.ts +++ b/dev-test/test-schema/resolvers-federation.ts @@ -63,9 +63,12 @@ export type GraphQLRecursivePick = { [K in keyof T & keyof S]: ScalarCheck export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -102,17 +105,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -120,7 +129,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -128,6 +142,23 @@ export type DirectiveResolverFn TResult | Promise; +/** Mapping of federation types */ +export type FederationTypes = { + User: User; +}; + +/** Mapping of federation reference types */ +export type FederationReferenceTypes = { + User: { __typename: 'User' } & ( + | GraphQLRecursivePick + | GraphQLRecursivePick + ) & + ( + | Record + | GraphQLRecursivePick + ); +}; + /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { Address: ResolverTypeWrapper
; @@ -135,7 +166,7 @@ export type ResolversTypes = { Book: ResolverTypeWrapper; ID: ResolverTypeWrapper; Lines: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; User: ResolverTypeWrapper; Int: ResolverTypeWrapper; Boolean: ResolverTypeWrapper; @@ -148,8 +179,8 @@ export type ResolversParentTypes = { Book: Book; ID: Scalars['ID']['output']; Lines: Lines; - Query: {}; - User: User; + Query: Record; + User: User | FederationReferenceTypes['User']; Int: Scalars['Int']['output']; Boolean: Scalars['Boolean']['output']; }; @@ -161,7 +192,6 @@ export type AddressResolvers< city?: Resolver, ParentType, ContextType>; lines?: Resolver; state?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; }; export type BookResolvers< @@ -169,7 +199,6 @@ export type BookResolvers< ParentType extends ResolversParentTypes['Book'] = ResolversParentTypes['Book'] > = { id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type LinesResolvers< @@ -178,7 +207,6 @@ export type LinesResolvers< > = { line1?: Resolver; line2?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; }; export type QueryResolvers< @@ -190,28 +218,15 @@ export type QueryResolvers< export type UserResolvers< ContextType = any, - ParentType extends ResolversParentTypes['User'] = ResolversParentTypes['User'] + ParentType extends ResolversParentTypes['User'] = ResolversParentTypes['User'], + FederationReferenceType extends FederationReferenceTypes['User'] = FederationReferenceTypes['User'] > = { __resolveReference?: ReferenceResolver< - Maybe, - { __typename: 'User' } & ( - | GraphQLRecursivePick - | GraphQLRecursivePick - ), + Maybe | FederationReferenceType, + FederationReferenceType, ContextType >; - - email?: Resolver< - ResolversTypes['String'], - { __typename: 'User' } & ( - | GraphQLRecursivePick - | GraphQLRecursivePick - ) & - GraphQLRecursivePick, - ContextType - >; - - __isTypeOf?: IsTypeOfResolverFn; + email?: Resolver; }; export type Resolvers = { diff --git a/dev-test/test-schema/resolvers-root.ts b/dev-test/test-schema/resolvers-root.ts index ca4941f0f61..a3f659b2fdf 100644 --- a/dev-test/test-schema/resolvers-root.ts +++ b/dev-test/test-schema/resolvers-root.ts @@ -49,9 +49,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -88,17 +91,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -106,7 +115,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -119,9 +133,9 @@ export type ResolversTypes = { Boolean: ResolverTypeWrapper; Int: ResolverTypeWrapper; Query: ResolverTypeWrapper; - QueryRoot: ResolverTypeWrapper<{}>; + QueryRoot: ResolverTypeWrapper>; String: ResolverTypeWrapper; - SubscriptionRoot: ResolverTypeWrapper<{}>; + SubscriptionRoot: ResolverTypeWrapper>; User: ResolverTypeWrapper; }; @@ -130,9 +144,9 @@ export type ResolversParentTypes = { Boolean: Scalars['Boolean']['output']; Int: Scalars['Int']['output']; Query: Query; - QueryRoot: {}; + QueryRoot: Record; String: Scalars['String']['output']; - SubscriptionRoot: {}; + SubscriptionRoot: Record; User: User; }; @@ -141,7 +155,6 @@ export type QueryResolvers< ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'] > = { someDummyField?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type QueryRootResolvers< @@ -172,7 +185,6 @@ export type UserResolvers< email?: Resolver; id?: Resolver; name?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/dev-test/test-schema/resolvers-stitching.ts b/dev-test/test-schema/resolvers-stitching.ts index 8954a721b9a..e5e021f8d28 100644 --- a/dev-test/test-schema/resolvers-stitching.ts +++ b/dev-test/test-schema/resolvers-stitching.ts @@ -59,7 +59,12 @@ export type NewStitchingResolver = { export type StitchingResolver = | LegacyStitchingResolver | NewStitchingResolver; -export type Resolver = +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ResolverFn | ResolverWithResolve | StitchingResolver; @@ -99,17 +104,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -117,7 +128,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -129,7 +145,7 @@ export type DirectiveResolverFn; Int: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; @@ -138,7 +154,7 @@ export type ResolversTypes = { export type ResolversParentTypes = { Boolean: Scalars['Boolean']['output']; Int: Scalars['Int']['output']; - Query: {}; + Query: Record; String: Scalars['String']['output']; User: User; }; @@ -162,7 +178,6 @@ export type UserResolvers< email?: Resolver; id?: Resolver; name?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/dev-test/test-schema/resolvers-types.ts b/dev-test/test-schema/resolvers-types.ts index 6bb026ac0c8..9f44618642c 100644 --- a/dev-test/test-schema/resolvers-types.ts +++ b/dev-test/test-schema/resolvers-types.ts @@ -46,9 +46,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -85,17 +88,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -103,7 +112,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -115,7 +129,7 @@ export type DirectiveResolverFn; Int: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; @@ -124,7 +138,7 @@ export type ResolversTypes = { export type ResolversParentTypes = { Boolean: Scalars['Boolean']['output']; Int: Scalars['Int']['output']; - Query: {}; + Query: Record; String: Scalars['String']['output']; User: User; }; @@ -148,7 +162,6 @@ export type UserResolvers< email?: Resolver; id?: Resolver; name?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/dev-test/test-schema/typings.ts b/dev-test/test-schema/typings.ts index 707d55a9502..babf3b6d1b0 100644 --- a/dev-test/test-schema/typings.ts +++ b/dev-test/test-schema/typings.ts @@ -38,9 +38,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -77,17 +80,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -95,7 +104,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -107,7 +121,7 @@ export type DirectiveResolverFn; Int: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; @@ -116,7 +130,7 @@ export type ResolversTypes = { export type ResolversParentTypes = { Boolean: Scalars['Boolean']['output']; Int: Scalars['Int']['output']; - Query: {}; + Query: Record; String: Scalars['String']['output']; User: User; }; @@ -136,7 +150,6 @@ export type UserResolvers< email?: Resolver; id?: Resolver; name?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; export type Resolvers = { diff --git a/examples/persisted-documents-string-mode/codegen.ts b/examples/persisted-documents-string-mode/codegen.ts index 420c68416fa..5fe07d0a664 100644 --- a/examples/persisted-documents-string-mode/codegen.ts +++ b/examples/persisted-documents-string-mode/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/persisted-documents-string-mode/jest.config.js b/examples/persisted-documents-string-mode/jest.config.js deleted file mode 100644 index 8a54dc0d796..00000000000 --- a/examples/persisted-documents-string-mode/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - transform: { '^.+\\.ts': 'babel-jest' }, -}; diff --git a/examples/persisted-documents-string-mode/package.json b/examples/persisted-documents-string-mode/package.json index 0cdcfa58c9b..b56f48b05c5 100644 --- a/examples/persisted-documents-string-mode/package.json +++ b/examples/persisted-documents-string-mode/package.json @@ -8,15 +8,13 @@ }, "devDependencies": { "@graphql-typed-document-node/core": "3.2.0", - "jest": "28.1.3", - "babel-jest": "29.7.0", "@graphql-codegen/cli": "5.0.7", "@babel/core": "7.25.2", "@babel/preset-env": "7.25.3", "@babel/preset-typescript": "7.26.0" }, "scripts": { - "test": "jest", + "test": "vitest --no-watch", "codegen": "graphql-codegen --config codegen.ts", "build": "tsc", "test:end2end": "yarn test" diff --git a/examples/persisted-documents-string-mode/src/yoga.spec.ts b/examples/persisted-documents-string-mode/src/yoga.spec.ts index 78b71fa7806..d4570e71797 100644 --- a/examples/persisted-documents-string-mode/src/yoga.spec.ts +++ b/examples/persisted-documents-string-mode/src/yoga.spec.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import { graphql } from './gql/index'; import { makeYoga } from './yoga'; import persistedDocumentsDictionary from './gql/persisted-documents.json'; @@ -24,8 +25,8 @@ describe('Persisted Documents', () => { }), }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "hello": "Hello world!", }, } @@ -46,9 +47,9 @@ describe('Persisted Documents', () => { }), }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Object { + { + "errors": [ + { "message": "PersistedQueryOnly", }, ], @@ -75,8 +76,8 @@ describe('Persisted Documents', () => { }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "hello": "Hello world!", }, } diff --git a/examples/persisted-documents-string-mode/vitest.config.ts b/examples/persisted-documents-string-mode/vitest.config.ts new file mode 100644 index 00000000000..006dc809257 --- /dev/null +++ b/examples/persisted-documents-string-mode/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'examples-persisted-documents-string-mode', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/examples/persisted-documents/codegen.ts b/examples/persisted-documents/codegen.ts index d0b6e5d4eef..20e144e0108 100644 --- a/examples/persisted-documents/codegen.ts +++ b/examples/persisted-documents/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/persisted-documents/jest.config.js b/examples/persisted-documents/jest.config.js deleted file mode 100644 index 8a54dc0d796..00000000000 --- a/examples/persisted-documents/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - transform: { '^.+\\.ts': 'babel-jest' }, -}; diff --git a/examples/persisted-documents/package.json b/examples/persisted-documents/package.json index 98fbfb3953f..496692a87a1 100644 --- a/examples/persisted-documents/package.json +++ b/examples/persisted-documents/package.json @@ -8,15 +8,13 @@ }, "devDependencies": { "@graphql-typed-document-node/core": "3.2.0", - "jest": "28.1.3", - "babel-jest": "29.7.0", "@graphql-codegen/cli": "5.0.7", "@babel/core": "7.25.2", "@babel/preset-env": "7.25.3", "@babel/preset-typescript": "7.26.0" }, "scripts": { - "test": "jest", + "test": "vitest --no-watch", "codegen": "graphql-codegen --config codegen.ts", "build": "tsc", "test:end2end": "yarn test" diff --git a/examples/persisted-documents/src/yoga.spec.ts b/examples/persisted-documents/src/yoga.spec.ts index 37eb89dc4b3..92a50635632 100644 --- a/examples/persisted-documents/src/yoga.spec.ts +++ b/examples/persisted-documents/src/yoga.spec.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import { graphql } from './gql/index'; import { makeYoga } from './yoga'; import persistedDocumentsDictionary from './gql/persisted-documents.json'; @@ -25,8 +26,8 @@ describe('Persisted Documents', () => { }), }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "hello": "Hello world!", }, } @@ -46,9 +47,9 @@ describe('Persisted Documents', () => { }), }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Object { + { + "errors": [ + { "message": "PersistedQueryOnly", }, ], @@ -75,8 +76,8 @@ describe('Persisted Documents', () => { }); expect(await result.json()).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "hello": "Hello world!", }, } diff --git a/examples/persisted-documents/vitest.config.ts b/examples/persisted-documents/vitest.config.ts new file mode 100644 index 00000000000..770af5ef5d2 --- /dev/null +++ b/examples/persisted-documents/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'examples-persisted-documents', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/examples/programmatic-typescript/src/gql.generated.ts b/examples/programmatic-typescript/src/gql.generated.ts index d9bcbb38a64..2e0825a737c 100644 --- a/examples/programmatic-typescript/src/gql.generated.ts +++ b/examples/programmatic-typescript/src/gql.generated.ts @@ -26,9 +26,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -65,17 +68,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -83,7 +92,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -93,14 +107,14 @@ export type DirectiveResolverFn; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; Boolean: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Query: {}; + Query: Record; String: Scalars['String']['output']; Boolean: Scalars['Boolean']['output']; }; diff --git a/examples/react/apollo-client-defer/codegen.ts b/examples/react/apollo-client-defer/codegen.ts index 117250afa81..e679ef78f6e 100644 --- a/examples/react/apollo-client-defer/codegen.ts +++ b/examples/react/apollo-client-defer/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/apollo-client-defer/cypress.config.ts b/examples/react/apollo-client-defer/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/apollo-client-defer/cypress.config.ts +++ b/examples/react/apollo-client-defer/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/apollo-client-defer/package.json b/examples/react/apollo-client-defer/package.json index fd3840b2d58..22e4dc7c304 100644 --- a/examples/react/apollo-client-defer/package.json +++ b/examples/react/apollo-client-defer/package.json @@ -12,7 +12,6 @@ }, "devDependencies": { "@graphql-codegen/cli": "^5.0.7", - "@types/jest": "^27.5.2", "@types/node": "^22.0.0", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.10", diff --git a/examples/react/apollo-client-defer/vite.config.ts b/examples/react/apollo-client-defer/vite.config.ts index 779543405fa..627a3196243 100644 --- a/examples/react/apollo-client-defer/vite.config.ts +++ b/examples/react/apollo-client-defer/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/examples/react/apollo-client-swc-plugin/codegen.ts b/examples/react/apollo-client-swc-plugin/codegen.ts index e5659749776..a5888b02e0d 100644 --- a/examples/react/apollo-client-swc-plugin/codegen.ts +++ b/examples/react/apollo-client-swc-plugin/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/apollo-client-swc-plugin/vite.config.mts b/examples/react/apollo-client-swc-plugin/vite.config.mts index 1297583ee87..9f332583d14 100644 --- a/examples/react/apollo-client-swc-plugin/vite.config.mts +++ b/examples/react/apollo-client-swc-plugin/vite.config.mts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react-swc'; diff --git a/examples/react/apollo-client/codegen.ts b/examples/react/apollo-client/codegen.ts index 7b44188aa51..f2aa8f0746b 100644 --- a/examples/react/apollo-client/codegen.ts +++ b/examples/react/apollo-client/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/apollo-client/cypress.config.ts b/examples/react/apollo-client/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/apollo-client/cypress.config.ts +++ b/examples/react/apollo-client/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/apollo-client/package.json b/examples/react/apollo-client/package.json index 530ad564723..b1929ba2e14 100644 --- a/examples/react/apollo-client/package.json +++ b/examples/react/apollo-client/package.json @@ -11,7 +11,6 @@ "devDependencies": { "@graphql-codegen/cli": "^5.0.7", "@vitejs/plugin-react": "^4.0.0", - "@types/jest": "^27.5.2", "@types/node": "^22.0.0", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.10", diff --git a/examples/react/apollo-client/vite.config.ts b/examples/react/apollo-client/vite.config.ts index 779543405fa..627a3196243 100644 --- a/examples/react/apollo-client/vite.config.ts +++ b/examples/react/apollo-client/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/examples/react/http-executor/codegen.ts b/examples/react/http-executor/codegen.ts index e5c6affee72..f2aa8f0746b 100644 --- a/examples/react/http-executor/codegen.ts +++ b/examples/react/http-executor/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/http-executor/cypress.config.ts b/examples/react/http-executor/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/http-executor/cypress.config.ts +++ b/examples/react/http-executor/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/http-executor/package.json b/examples/react/http-executor/package.json index b9b7f33b60a..1b0a6581e37 100644 --- a/examples/react/http-executor/package.json +++ b/examples/react/http-executor/package.json @@ -10,7 +10,6 @@ "devDependencies": { "@graphql-codegen/cli": "^5.0.7", "@vitejs/plugin-react": "^4.0.0", - "@types/jest": "^27.5.2", "@types/node": "^22.0.0", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.10", diff --git a/examples/react/http-executor/vite.config.ts b/examples/react/http-executor/vite.config.ts index 779543405fa..627a3196243 100644 --- a/examples/react/http-executor/vite.config.ts +++ b/examples/react/http-executor/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/examples/react/nextjs-swr/codegen.ts b/examples/react/nextjs-swr/codegen.ts index 22724d9bb60..0e183d0d12b 100644 --- a/examples/react/nextjs-swr/codegen.ts +++ b/examples/react/nextjs-swr/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/nextjs-swr/cypress.config.ts b/examples/react/nextjs-swr/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/nextjs-swr/cypress.config.ts +++ b/examples/react/nextjs-swr/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/nextjs-swr/hooks/use-query.ts b/examples/react/nextjs-swr/hooks/use-query.ts index 9a1f23af082..c93a4d567dd 100644 --- a/examples/react/nextjs-swr/hooks/use-query.ts +++ b/examples/react/nextjs-swr/hooks/use-query.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { buildHTTPExecutor } from '@graphql-tools/executor-http'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { ASTNode, ExecutionResult, Kind, OperationDefinitionNode } from 'graphql'; diff --git a/examples/react/tanstack-react-query/codegen.ts b/examples/react/tanstack-react-query/codegen.ts index 9a807bb2f7b..34e1c573071 100644 --- a/examples/react/tanstack-react-query/codegen.ts +++ b/examples/react/tanstack-react-query/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/tanstack-react-query/cypress.config.ts b/examples/react/tanstack-react-query/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/tanstack-react-query/cypress.config.ts +++ b/examples/react/tanstack-react-query/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/tanstack-react-query/package.json b/examples/react/tanstack-react-query/package.json index 056e98c9fb3..2d7397bb21a 100644 --- a/examples/react/tanstack-react-query/package.json +++ b/examples/react/tanstack-react-query/package.json @@ -10,7 +10,6 @@ "devDependencies": { "@graphql-codegen/cli": "^5.0.7", "@vitejs/plugin-react": "^4.0.0", - "@types/jest": "^27.5.2", "@types/node": "^22.0.0", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.10", diff --git a/examples/react/tanstack-react-query/src/use-graphql.ts b/examples/react/tanstack-react-query/src/use-graphql.ts index 85387862f4d..0928c5e4e52 100644 --- a/examples/react/tanstack-react-query/src/use-graphql.ts +++ b/examples/react/tanstack-react-query/src/use-graphql.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { ExecutionResult } from 'graphql'; import { useQuery } from '@tanstack/react-query'; import { TypedDocumentString } from './gql/graphql'; diff --git a/examples/react/tanstack-react-query/vite.config.ts b/examples/react/tanstack-react-query/vite.config.ts index 779543405fa..627a3196243 100644 --- a/examples/react/tanstack-react-query/vite.config.ts +++ b/examples/react/tanstack-react-query/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/examples/react/urql/codegen.ts b/examples/react/urql/codegen.ts index 44d3f90219e..b94f93847d3 100644 --- a/examples/react/urql/codegen.ts +++ b/examples/react/urql/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/react/urql/cypress.config.ts b/examples/react/urql/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/react/urql/cypress.config.ts +++ b/examples/react/urql/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/react/urql/vite.config.ts b/examples/react/urql/vite.config.ts index 779543405fa..627a3196243 100644 --- a/examples/react/urql/vite.config.ts +++ b/examples/react/urql/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/examples/typescript-graphql-request/codegen.ts b/examples/typescript-graphql-request/codegen.ts index c712bf6cccc..01ea550db03 100644 --- a/examples/typescript-graphql-request/codegen.ts +++ b/examples/typescript-graphql-request/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/typescript-graphql-request/jest.config.js b/examples/typescript-graphql-request/jest.config.js deleted file mode 100644 index 05b73658e17..00000000000 --- a/examples/typescript-graphql-request/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - transform: { '^.+\\.ts': 'babel-jest' }, - testPathIgnorePatterns: ['/node_modules/', '/dist/'], -}; diff --git a/examples/typescript-graphql-request/package.json b/examples/typescript-graphql-request/package.json index a2d2fa5210c..f1860de4421 100644 --- a/examples/typescript-graphql-request/package.json +++ b/examples/typescript-graphql-request/package.json @@ -3,9 +3,7 @@ "version": "0.0.0", "private": true, "devDependencies": { - "@graphql-codegen/cli": "5.0.7", - "babel-jest": "29.7.0", - "jest": "28.1.3" + "@graphql-codegen/cli": "5.0.7" }, "dependencies": { "graphql": "16.9.0", @@ -16,7 +14,7 @@ "codegen": "graphql-codegen --config codegen.ts", "build": "tsc", "dev": "ts-node src/main.ts", - "test:end2end": "yarn jest" + "test:end2end": "vitest --no-watch" }, "type": "commonjs", "bob": false diff --git a/examples/typescript-graphql-request/src/main.spec.ts b/examples/typescript-graphql-request/src/main.spec.ts index 69d2911f21f..3f2a9d30b5a 100644 --- a/examples/typescript-graphql-request/src/main.spec.ts +++ b/examples/typescript-graphql-request/src/main.spec.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import { getPeople } from './main'; describe('TypeScript GraphQL Request tests', () => { diff --git a/examples/typescript-graphql-request/vitest.config.ts b/examples/typescript-graphql-request/vitest.config.ts new file mode 100644 index 00000000000..4cb1cdc1747 --- /dev/null +++ b/examples/typescript-graphql-request/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'examples-typescript-graphql-request', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/examples/typescript-resolvers/codegen.ts b/examples/typescript-resolvers/codegen.ts index 6e04a287c8d..0e0b9e24101 100644 --- a/examples/typescript-resolvers/codegen.ts +++ b/examples/typescript-resolvers/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/typescript-resolvers/src/type-defs.d.ts b/examples/typescript-resolvers/src/type-defs.d.ts index 7ac21289be1..e0a7559e1f0 100644 --- a/examples/typescript-resolvers/src/type-defs.d.ts +++ b/examples/typescript-resolvers/src/type-defs.d.ts @@ -45,9 +45,12 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver< + TResult, + TParent = Record, + TContext = Record, + TArgs = Record +> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -84,17 +87,23 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver< + TResult, + TKey extends string, + TParent = Record, + TContext = Record, + TArgs = Record +> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( +export type IsTypeOfResolverFn, TContext = Record> = ( obj: T, context: TContext, info: GraphQLResolveInfo @@ -102,7 +111,12 @@ export type IsTypeOfResolverFn = ( export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn< + TResult = Record, + TParent = Record, + TContext = Record, + TArgs = Record +> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -114,8 +128,8 @@ export type DirectiveResolverFn; Float: ResolverTypeWrapper; - Mutation: ResolverTypeWrapper<{}>; - Query: ResolverTypeWrapper<{}>; + Mutation: ResolverTypeWrapper>; + Query: ResolverTypeWrapper>; String: ResolverTypeWrapper; SumInput: SumInput; }; @@ -124,8 +138,8 @@ export type ResolversTypes = { export type ResolversParentTypes = { Boolean: Scalars['Boolean']['output']; Float: Scalars['Float']['output']; - Mutation: {}; - Query: {}; + Mutation: Record; + Query: Record; String: Scalars['String']['output']; SumInput: SumInput; }; diff --git a/examples/vite/vite-react-cts/codegen.cts b/examples/vite/vite-react-cts/codegen.cts index e5c6affee72..f2aa8f0746b 100644 --- a/examples/vite/vite-react-cts/codegen.cts +++ b/examples/vite/vite-react-cts/codegen.cts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/vite/vite-react-cts/cypress.config.ts b/examples/vite/vite-react-cts/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vite/vite-react-cts/cypress.config.ts +++ b/examples/vite/vite-react-cts/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vite/vite-react-mts/codegen.mts b/examples/vite/vite-react-mts/codegen.mts index e5c6affee72..f2aa8f0746b 100644 --- a/examples/vite/vite-react-mts/codegen.mts +++ b/examples/vite/vite-react-mts/codegen.mts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/vite/vite-react-mts/cypress.config.ts b/examples/vite/vite-react-mts/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vite/vite-react-mts/cypress.config.ts +++ b/examples/vite/vite-react-mts/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vite/vite-react-ts/codegen.ts b/examples/vite/vite-react-ts/codegen.ts index e5c6affee72..f2aa8f0746b 100644 --- a/examples/vite/vite-react-ts/codegen.ts +++ b/examples/vite/vite-react-ts/codegen.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/vite/vite-react-ts/cypress.config.ts b/examples/vite/vite-react-ts/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vite/vite-react-ts/cypress.config.ts +++ b/examples/vite/vite-react-ts/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vue/apollo-composable/cypress.config.ts b/examples/vue/apollo-composable/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vue/apollo-composable/cypress.config.ts +++ b/examples/vue/apollo-composable/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vue/apollo-composable/vite.config.ts b/examples/vue/apollo-composable/vite.config.ts index 9935daaf3f3..6405595ab23 100644 --- a/examples/vue/apollo-composable/vite.config.ts +++ b/examples/vue/apollo-composable/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; diff --git a/examples/vue/urql/cypress.config.ts b/examples/vue/urql/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vue/urql/cypress.config.ts +++ b/examples/vue/urql/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vue/urql/vite.config.ts b/examples/vue/urql/vite.config.ts index 9935daaf3f3..6405595ab23 100644 --- a/examples/vue/urql/vite.config.ts +++ b/examples/vue/urql/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; diff --git a/examples/vue/villus/cypress.config.ts b/examples/vue/villus/cypress.config.ts index b1c137b9e05..8e11b7ffaa6 100644 --- a/examples/vue/villus/cypress.config.ts +++ b/examples/vue/villus/cypress.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'cypress'; export default defineConfig({ diff --git a/examples/vue/villus/vite.config.ts b/examples/vue/villus/vite.config.ts index 9935daaf3f3..6405595ab23 100644 --- a/examples/vue/villus/vite.config.ts +++ b/examples/vue/villus/vite.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; diff --git a/examples/yoga-tests/codegen.ts b/examples/yoga-tests/codegen.ts index cd821c4bd3d..6b009277fc1 100644 --- a/examples/yoga-tests/codegen.ts +++ b/examples/yoga-tests/codegen.ts @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-extraneous-dependencies import { type CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { diff --git a/examples/yoga-tests/jest.config.js b/examples/yoga-tests/jest.config.js deleted file mode 100644 index 8a54dc0d796..00000000000 --- a/examples/yoga-tests/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - transform: { '^.+\\.ts': 'babel-jest' }, -}; diff --git a/examples/yoga-tests/package.json b/examples/yoga-tests/package.json index d2c7a6f14cf..b2bc0c53c76 100644 --- a/examples/yoga-tests/package.json +++ b/examples/yoga-tests/package.json @@ -7,15 +7,13 @@ }, "devDependencies": { "@graphql-typed-document-node/core": "3.2.0", - "jest": "28.1.3", - "babel-jest": "29.7.0", "@graphql-codegen/cli": "5.0.7", "@babel/core": "7.25.2", "@babel/preset-env": "7.25.3", "@babel/preset-typescript": "7.26.0" }, "scripts": { - "test": "jest", + "test": "vitest --no-watch", "codegen": "graphql-codegen --config codegen.ts", "build": "tsc", "test:end2end": "yarn test" diff --git a/examples/yoga-tests/src/yoga.spec.ts b/examples/yoga-tests/src/yoga.spec.ts index 3668e1f950f..8e3480fe1a6 100644 --- a/examples/yoga-tests/src/yoga.spec.ts +++ b/examples/yoga-tests/src/yoga.spec.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { type ExecutionResult, print } from 'graphql'; import { graphql } from './gql'; diff --git a/examples/yoga-tests/vitest.config.ts b/examples/yoga-tests/vitest.config.ts new file mode 100644 index 00000000000..aa2c5a9d468 --- /dev/null +++ b/examples/yoga-tests/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'examples-yoga-tests', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index d3c2273a357..00000000000 --- a/jest.config.js +++ /dev/null @@ -1,11 +0,0 @@ -const PROJECTS = false; -const CI = !!process.env.CI; - -module.exports = - !PROJECTS || CI - ? require('./jest.project')({ dirname: __dirname, projectMode: PROJECTS }) - : { - rootDir: __dirname, - projects: ['/packages/**/*/jest.config.js'], - resolver: 'bob-the-bundler/jest-resolver.js', - }; diff --git a/jest.project.js b/jest.project.js deleted file mode 100644 index b1fbb7999f2..00000000000 --- a/jest.project.js +++ /dev/null @@ -1,31 +0,0 @@ -const { resolve } = require('path'); -// eslint-disable-next-line import/no-extraneous-dependencies -- false positive -const { pathsToModuleNameMapper } = require('ts-jest'); - -const ROOT_DIR = __dirname; -const TSCONFIG = resolve(ROOT_DIR, 'tsconfig.json'); -const tsconfig = require(TSCONFIG); -const CI = !!process.env.CI; - -module.exports = ({ dirname, projectMode = true }) => { - const pkg = require(resolve(dirname, 'package.json')); - - return { - ...(CI || !projectMode ? {} : { displayName: pkg.name.replace('@graphql-codegen/', '') }), - transform: { '^.+\\.tsx?$': 'babel-jest' }, - testEnvironment: 'node', - rootDir: dirname, - restoreMocks: true, - reporters: ['default'], - modulePathIgnorePatterns: ['dist', '.bob'], - moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, { prefix: `${ROOT_DIR}/` }), - cacheDirectory: resolve(ROOT_DIR, `${CI ? '' : 'node_modules/'}.cache/jest`), - setupFiles: [`${ROOT_DIR}/dev-test/setup.js`], - collectCoverage: false, - testTimeout: 20_000, - resolver: './node_modules/bob-the-bundler/jest-resolver.cjs', - snapshotFormat: { - escapeString: false, - }, - }; -}; diff --git a/package.json b/package.json index fdd23cc40d2..5b8c27f97d3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "postbuild": "yarn fix-bins", "watch-build": "npx tsc-watch --project tsconfig.json --onSuccess \"bob build\"", "rebuild": "bob build --incremental", - "test": "jest --forceExit --no-watchman", + "test": "vitest", "lint": "cross-env \"ESLINT_USE_FLAT_CONFIG=false\" eslint --cache --ignore-path .gitignore .", "prettier": "prettier --cache --write --list-different .", "prettier:check": "prettier --cache --check .", @@ -50,27 +50,25 @@ "@changesets/cli": "2.27.11", "@theguild/eslint-config": "0.13.2", "@theguild/prettier-config": "0.1.1", - "@types/jest": "28.1.8", - "babel-jest": "29.7.0", "bob-the-bundler": "7.0.1", "cross-env": "7.0.3", "eslint": "9.9.0", + "eslint-plugin-tailwindcss": "npm:@hasparus/eslint-plugin-tailwindcss@3.17.5", "graphql": "16.9.0", "husky": "9.1.7", - "jest": "28.1.3", - "jest-docblock": "29.7.0", - "jest-junit": "16.0.0", + "jest-diff": "30.0.5", "lint-staged": "15.2.9", + "memfs": "4.36.3", "patch-package": "8.0.0", "prettier": "2.8.8", "prettier-plugin-svelte": "2.10.1", "rimraf": "6.0.1", - "ts-jest": "28.0.8", "ts-node": "10.9.2", "tslib": "2.6.3", "tsx": "4.17.0", "typescript": "5.5.4", - "eslint-plugin-tailwindcss": "npm:@hasparus/eslint-plugin-tailwindcss@3.17.5", + "vite-tsconfig-paths": "5.1.4", + "vitest": "3.2.4", "wrangler": "4.1.0" }, "lint-staged": { @@ -85,16 +83,8 @@ ] }, "resolutions": { - "prettier": "2.8.8", - "babel-jest": "29.7.0", - "jest-runner": "28.1.3", - "graphql": "16.9.0", - "graphql-language-service-interface": "2.10.2", - "**/apollo-language-server/graphql": "^16.0.0", - "**/@types/graphql-upload/graphql": "^16.0.0", - "ts-node": "10.9.2", "typescript": "5.5.4", - "cosmiconfig": "8.3.6", "eslint-plugin-promise": "7.1.0" - } + }, + "version": "0.0.0" } diff --git a/packages/graphql-codegen-cli/jest.config.js b/packages/graphql-codegen-cli/jest.config.js deleted file mode 100644 index 5aa9167d543..00000000000 --- a/packages/graphql-codegen-cli/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../jest.project')({ dirname: __dirname }); diff --git a/packages/graphql-codegen-cli/package.json b/packages/graphql-codegen-cli/package.json index e857f0a573e..5626279ea16 100644 --- a/packages/graphql-codegen-cli/package.json +++ b/packages/graphql-codegen-cli/package.json @@ -15,7 +15,7 @@ }, "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman" + "test": "vitest --no-watch" }, "keywords": [ "gql", @@ -53,20 +53,19 @@ "@graphql-tools/graphql-file-loader": "^8.0.0", "@graphql-tools/json-file-loader": "^8.0.0", "@graphql-tools/load": "^8.1.0", - "@graphql-tools/prisma-loader": "^8.0.0", "@graphql-tools/url-loader": "^8.0.0", "@graphql-tools/utils": "^10.0.0", + "@inquirer/prompts": "^7.8.2", "@whatwg-node/fetch": "^0.10.0", "chalk": "^4.1.0", - "cosmiconfig": "^8.1.3", - "debounce": "^1.2.0", + "cosmiconfig": "^9.0.0", + "debounce": "^2.0.0", "detect-indent": "^6.0.0", "graphql-config": "^5.1.1", - "inquirer": "^8.0.0", "is-glob": "^4.0.1", - "jiti": "^1.17.1", + "jiti": "^2.3.0", "json-to-pretty-yaml": "^1.2.2", - "listr2": "^4.0.5", + "listr2": "^9.0.0", "log-symbols": "^4.0.0", "micromatch": "^4.0.5", "shell-quote": "^1.7.3", @@ -79,8 +78,6 @@ "devDependencies": { "@graphql-tools/merge": "9.0.6", "@parcel/watcher": "^2.1.0", - "@types/debounce": "1.2.4", - "@types/inquirer": "8.2.10", "@types/is-glob": "4.0.4", "@types/js-yaml": "4.0.9", "@types/micromatch": "^4.0.2", diff --git a/packages/graphql-codegen-cli/src/codegen.ts b/packages/graphql-codegen-cli/src/codegen.ts index 10eaaa953d0..3eaffe8919e 100644 --- a/packages/graphql-codegen-cli/src/codegen.ts +++ b/packages/graphql-codegen-cli/src/codegen.ts @@ -69,7 +69,9 @@ function createCache(): (namespace: string, key: string, factory: () => Promi }; } -export async function executeCodegen(input: CodegenContext | Types.Config): Promise { +export async function executeCodegen( + input: CodegenContext | Types.Config +): Promise<{ result: Types.FileOutput[]; error: Error | null }> { const context = ensureContext(input); const config = context.getConfig(); const pluginContext = context.getPluginContext(); @@ -395,8 +397,17 @@ export async function executeCodegen(input: CodegenContext | Types.Config): Prom }, ], { - // it stops when of the tasks failed + /** + * For each `generates` task, we must do the following in order: + * + * 1. Load schema + * 2. Load documents + * 3. Generate based on the schema + documents + * + * This way, the 3rd step has all the schema and documents loaded in previous steps to work correctly + */ exitOnError: true, + concurrent: false, } ); }, @@ -412,13 +423,13 @@ export async function executeCodegen(input: CodegenContext | Types.Config): Prom { rendererOptions: { clearOutput: false, - collapse: true, + collapseSubtasks: true, formatOutput: 'wrap', removeEmptyLines: false, }, renderer: config.verbose ? 'verbose' : 'default', ctx: { errors: [] }, - rendererSilent: isTest || config.silent, + silentRendererCondition: isTest || config.silent, exitOnError: true, } ); @@ -431,13 +442,13 @@ export async function executeCodegen(input: CodegenContext | Types.Config): Prom printLogs(); } + let error: Error | null = null; if (executedContext.errors.length > 0) { const errors = executedContext.errors.map(subErr => subErr.message || subErr.toString()); - const newErr = new AggregateError(executedContext.errors, String(errors.join('\n\n'))); + error = new AggregateError(executedContext.errors, String(errors.join('\n\n'))); // Best-effort to all stack traces for debugging - newErr.stack = `${newErr.stack}\n\n${executedContext.errors.map(subErr => subErr.stack).join('\n\n')}`; - throw newErr; + error.stack = `${error.stack}\n\n${executedContext.errors.map(subErr => subErr.stack).join('\n\n')}`; } - return result; + return { result, error }; } diff --git a/packages/graphql-codegen-cli/src/config.ts b/packages/graphql-codegen-cli/src/config.ts index 514afd1afb5..913056851a1 100644 --- a/packages/graphql-codegen-cli/src/config.ts +++ b/packages/graphql-codegen-cli/src/config.ts @@ -11,7 +11,7 @@ import { Types, } from '@graphql-codegen/plugin-helpers'; import { cosmiconfig, defaultLoaders } from 'cosmiconfig'; -import jiti from 'jiti'; +import { createJiti } from 'jiti'; import { GraphQLSchema, GraphQLSchemaExtensions, print } from 'graphql'; import { GraphQLConfig } from 'graphql-config'; import { env } from 'string-env-interpolation'; @@ -75,8 +75,8 @@ function customLoader(ext: 'json' | 'yaml' | 'js' | 'ts' | 'mts' | 'cts'): Codeg } if (ext === 'ts') { - const jitiLoader = jiti('', { interopDefault: true }); - return jitiLoader(filepath); + const jitiLoader = createJiti(''); + return jitiLoader.import(filepath, { default: true }); } }; } diff --git a/packages/graphql-codegen-cli/src/generate-and-save.ts b/packages/graphql-codegen-cli/src/generate-and-save.ts index b95511219b7..384b84e3a4e 100644 --- a/packages/graphql-codegen-cli/src/generate-and-save.ts +++ b/packages/graphql-codegen-cli/src/generate-and-save.ts @@ -1,5 +1,6 @@ import { createHash } from 'crypto'; import { dirname, isAbsolute, join } from 'path'; +import logSymbols from 'log-symbols'; import { Types } from '@graphql-codegen/plugin-helpers'; import { executeCodegen } from './codegen.js'; import { CodegenContext, ensureContext } from './config.js'; @@ -7,6 +8,7 @@ import { lifecycleHooks } from './hooks.js'; import { debugLog } from './utils/debugging.js'; import { mkdirp, readFile, unlinkFile, writeFile } from './utils/file-system.js'; import { createWatcher } from './utils/watcher.js'; +import { getLogger } from './utils/logger.js'; const hash = (content: string): string => createHash('sha1').update(content).digest('base64'); @@ -133,7 +135,27 @@ export async function generate( return createWatcher(context, writeOutput).runningWatcher; } - const outputFiles = await context.profiler.run(() => executeCodegen(context), 'executeCodegen'); + const { result: outputFiles, error } = await context.profiler.run(() => executeCodegen(context), 'executeCodegen'); + + if (error) { + // If all generation failed, just throw to return non-zero code. + if (outputFiles.length === 0) { + throw error; + } + + // If partial success, but partial output is not allowed, throw to return non-zero code. + if (!config.allowPartialOutputs) { + getLogger().error( + ` ${logSymbols.error} One or more errors occurred, no files were generated. To allow output on errors, set config.allowPartialOutputs=true` + ); + throw error; + } + + // If partial success, and partial output is allowed, warn and proceed to write to files. + getLogger().warn( + ` ${logSymbols.warning} One or more errors occurred, some files were generated. To prevent any output on errors, set config.allowPartialOutputs=false` + ); + } await context.profiler.run(() => writeOutput(outputFiles), 'writeOutput'); await context.profiler.run(() => lifecycleHooks(config.hooks).beforeDone(), 'Lifecycle: beforeDone'); diff --git a/packages/graphql-codegen-cli/src/graphql-config.ts b/packages/graphql-codegen-cli/src/graphql-config.ts index 8662ba922da..b3abba587da 100644 --- a/packages/graphql-codegen-cli/src/graphql-config.ts +++ b/packages/graphql-codegen-cli/src/graphql-config.ts @@ -2,7 +2,6 @@ import { ApolloEngineLoader } from '@graphql-tools/apollo-engine-loader'; import { CodeFileLoader } from '@graphql-tools/code-file-loader'; import { GitLoader } from '@graphql-tools/git-loader'; import { GithubLoader } from '@graphql-tools/github-loader'; -import { PrismaLoader } from '@graphql-tools/prisma-loader'; import { GraphQLConfig, GraphQLExtensionDeclaration, loadConfig } from 'graphql-config'; export const CodegenExtension: GraphQLExtensionDeclaration = (api: any) => { @@ -17,7 +16,6 @@ export const CodegenExtension: GraphQLExtensionDeclaration = (api: any) => { api.loaders.schema.register(new GitLoader()); api.loaders.schema.register(new GithubLoader()); api.loaders.schema.register(new ApolloEngineLoader()); - api.loaders.schema.register(new PrismaLoader()); // Documents api.loaders.documents.register( new CodeFileLoader({ diff --git a/packages/graphql-codegen-cli/src/init/index.ts b/packages/graphql-codegen-cli/src/init/index.ts index 8cc7ee1bf62..53ce1b85a1a 100644 --- a/packages/graphql-codegen-cli/src/init/index.ts +++ b/packages/graphql-codegen-cli/src/init/index.ts @@ -1,9 +1,8 @@ -import { Types } from '@graphql-codegen/plugin-helpers'; -import inquirer from 'inquirer'; +import type { Types } from '@graphql-codegen/plugin-helpers'; import { bold, writeConfig, writePackage } from './helpers.js'; -import { getQuestions } from './questions.js'; +import { getAnswers } from './questions.js'; import { guessTargets } from './targets.js'; -import { Answers, Tags } from './types.js'; +import { Tags } from './types.js'; function log(...msgs: string[]) { // eslint-disable-next-line no-console @@ -17,8 +16,7 @@ export async function init() { `); const possibleTargets = await guessTargets(); - - const answers = await inquirer.prompt(getQuestions(possibleTargets)); + const answers = await getAnswers(possibleTargets); // define config const config: Types.Config = { diff --git a/packages/graphql-codegen-cli/src/init/questions.ts b/packages/graphql-codegen-cli/src/init/questions.ts index 9d0b2561a0e..1c0bb57a065 100644 --- a/packages/graphql-codegen-cli/src/init/questions.ts +++ b/packages/graphql-codegen-cli/src/init/questions.ts @@ -1,82 +1,58 @@ -import inquirer from 'inquirer'; +import { checkbox, input, select, confirm } from '@inquirer/prompts'; import { grey } from './helpers.js'; import { plugins } from './plugins.js'; -import { Answers, Tags } from './types.js'; +import { type Answers, type PluginOption, Tags } from './types.js'; -export function getQuestions(possibleTargets: Record): inquirer.QuestionCollection { - return [ - { - type: 'list', - name: 'targets', +export async function getAnswers(possibleTargets: Record): Promise { + try { + const targetChoices = getApplicationTypeChoices(possibleTargets); + + const targets = await select({ message: `What type of application are you building?`, - choices: getApplicationTypeChoices(possibleTargets), - validate: ((targets: any[]) => targets.length > 0) as any, - default: getApplicationTypeChoices(possibleTargets).findIndex(c => c.checked), - }, - { - type: 'input', - name: 'schema', - message: 'Where is your schema?:', - suffix: grey(' (path or url)'), + choices: targetChoices, + default: targetChoices.find(c => c.checked)?.value, + }); + const schema = await input({ + message: `Where is your schema?: ${grey('(path or url)')}`, default: 'http://localhost:4000', // matches Apollo Server's default - validate: (str: string) => str.length > 0, - }, - { - type: 'input', - name: 'documents', - message: 'Where are your operations and fragments?:', - when: answers => { - // flatten targets - // I can't find an API in Inquirer that would do that - answers.targets = normalizeTargets(answers.targets); + validate: str => str.length > 0, + }); - return ( - answers.targets.includes(Tags.client) || - answers.targets.includes(Tags.angular) || - answers.targets.includes(Tags.stencil) - ); - }, - default: getDocumentsDefaultValue, - validate: (str: string) => str.length > 0, - }, - { - type: 'checkbox', - name: 'plugins', - when: answers => { - // flatten targets - // I can't find an API in Inquirer that would do that - answers.targets = normalizeTargets(answers.targets); + let documents: string | undefined; + if (targets.includes(Tags.client) || targets.includes(Tags.angular) || targets.includes(Tags.stencil)) + documents = await input({ + message: 'Where are your operations and fragments?:', + default: getDocumentsDefaultValue(targets), + validate: str => str.length > 0, + }); - return !answers.targets.includes(Tags.client); - }, - message: 'Pick plugins:', - choices: getPluginChoices, - validate: ((plugins: any[]) => plugins.length > 0) as any, - }, - { - type: 'input', - name: 'output', + let plugins: PluginOption[]; + if (!targets.includes(Tags.client)) { + plugins = await checkbox({ + message: 'Pick plugins:', + choices: getPluginChoices(targets), + validate: plugins => plugins.length > 0, + }); + } + + const output = await input({ message: 'Where to write the output:', - default: getOutputDefaultValue, - validate: (str: string) => str.length > 0, - }, - { - type: 'confirm', - name: 'introspection', - default: false, + default: getOutputDefaultValue({ targets, plugins }), + validate: str => str.length > 0, + }); + + const introspection = await confirm({ message: 'Do you want to generate an introspection file?', - }, - { - type: 'input', - name: 'config', + default: false, + }); + + const config = await input({ message: 'How to name the config file?', - default: answers => - answers.targets.includes(Tags.client) || - answers.targets.includes(Tags.typescript) || - answers.targets.includes(Tags.angular) + default: (() => + targets.includes(Tags.client) || targets.includes(Tags.typescript) || targets.includes(Tags.angular) ? 'codegen.ts' - : 'codegen.yml', - validate: (str: string) => { + : 'codegen.yml')(), + validate: str => { const isNotEmpty = str.length > 0; const hasCorrectExtension = ['json', 'yml', 'yaml', 'js', 'ts'].some(ext => str.toLocaleLowerCase().endsWith(`.${ext}`) @@ -84,15 +60,33 @@ export function getQuestions(possibleTargets: Record): inquirer.Q return isNotEmpty && hasCorrectExtension; }, - }, - { - type: 'input', - name: 'script', + }); + + const script = await input({ default: 'codegen', message: 'What script in package.json should run the codegen?', validate: (str: string) => str.length > 0, - }, - ]; + }); + + return { + targets, + schema, + documents, + plugins, + output, + introspection, + config, + script, + }; + } catch (error) { + if (error instanceof Error && error.name === 'ExitPromptError') { + // This error because user exited using CMD+C, just exit gracefully or else user would see an ugly error message + // https://github.com/SBoudrias/Inquirer.js/blob/ee16061a1e3f99a6cc714a3d473f7cd12b06a3f1/packages/prompts/README.md#handling-ctrlc-gracefully + process.exit(); + } else { + throw error; + } + } } export function getApplicationTypeChoices(possibleTargets: Record) { @@ -154,43 +148,39 @@ export function getApplicationTypeChoices(possibleTargets: Record ]; } -export function getPluginChoices(answers: Answers) { +export function getPluginChoices(targets: Tags[]) { return plugins - .filter(p => p.available(answers.targets)) - .map>(p => { + .filter(p => p.available(targets)) + .map(p => { return { name: p.name, value: p, - checked: p.shouldBeSelected(answers.targets), + checked: p.shouldBeSelected(targets), }; }); } -function normalizeTargets(targets: Tags[] | Tags[][]): Tags[] { - return [].concat(...targets); -} - -export function getOutputDefaultValue(answers: Answers) { - if (answers.targets.includes(Tags.client)) { +function getOutputDefaultValue({ targets, plugins }: { targets: Tags[]; plugins: PluginOption[] }) { + if (targets.includes(Tags.client)) { return 'src/gql/'; } - if (answers.plugins.some(plugin => plugin.defaultExtension === '.tsx')) { + if (plugins.some(plugin => plugin.defaultExtension === '.tsx')) { return 'src/generated/graphql.tsx'; } - if (answers.plugins.some(plugin => plugin.defaultExtension === '.ts')) { + if (plugins.some(plugin => plugin.defaultExtension === '.ts')) { return 'src/generated/graphql.ts'; } return 'src/generated/graphql.js'; } -export function getDocumentsDefaultValue(answers: Answers) { - if (answers.targets.includes(Tags.vue)) { +function getDocumentsDefaultValue(targets: Tags[]): string { + if (targets.includes(Tags.vue)) { return 'src/**/*.vue'; } - if (answers.targets.includes(Tags.angular)) { + if (targets.includes(Tags.angular)) { return 'src/**/*.ts'; } - if (answers.targets.includes(Tags.client)) { + if (targets.includes(Tags.client)) { return 'src/**/*.tsx'; } return 'src/**/*.graphql'; diff --git a/packages/graphql-codegen-cli/src/load.ts b/packages/graphql-codegen-cli/src/load.ts index 74e97685a7d..8dec5e22e68 100644 --- a/packages/graphql-codegen-cli/src/load.ts +++ b/packages/graphql-codegen-cli/src/load.ts @@ -12,7 +12,6 @@ import { NoTypeDefinitionsFound, UnnormalizedTypeDefPointer, } from '@graphql-tools/load'; -import { PrismaLoader } from '@graphql-tools/prisma-loader'; import { UrlLoader } from '@graphql-tools/url-loader'; import { GraphQLError, GraphQLSchema } from 'graphql'; @@ -41,7 +40,6 @@ export async function loadSchema( new JsonFileLoader(), new UrlLoader(), new ApolloEngineLoader(), - new PrismaLoader(), ]; const schema = await loadSchemaToolkit(schemaPointers, { diff --git a/packages/graphql-codegen-cli/src/utils/watcher.ts b/packages/graphql-codegen-cli/src/utils/watcher.ts index cbe2cdaf4da..72a8039998e 100644 --- a/packages/graphql-codegen-cli/src/utils/watcher.ts +++ b/packages/graphql-codegen-cli/src/utils/watcher.ts @@ -78,7 +78,10 @@ export const createWatcher = ( const debouncedExec = debounce(() => { if (!isShutdown) { executeCodegen(initialContext) - .then(onNext, () => Promise.resolve()) + .then( + ({ result }) => onNext(result), + () => Promise.resolve() + ) .then(() => emitWatching(watchDirectory)); } }, 100); @@ -198,7 +201,10 @@ export const createWatcher = ( */ stopWatching.runningWatcher = new Promise((resolve, reject) => { executeCodegen(initialContext) - .then(onNext, () => Promise.resolve()) + .then( + ({ result }) => onNext(result), + () => Promise.resolve() + ) .then(() => runWatcher(abortController.signal)) .catch(err => { watcherSubscription.unsubscribe(); diff --git a/packages/graphql-codegen-cli/tests/__mocks__/fs.cjs b/packages/graphql-codegen-cli/tests/__mocks__/fs.cjs new file mode 100644 index 00000000000..3c1dd612960 --- /dev/null +++ b/packages/graphql-codegen-cli/tests/__mocks__/fs.cjs @@ -0,0 +1,2 @@ +const { fs } = require('memfs'); +module.exports = fs; diff --git a/packages/graphql-codegen-cli/tests/__mocks__/fs.js b/packages/graphql-codegen-cli/tests/__mocks__/fs.js deleted file mode 100644 index 6dc6ba90650..00000000000 --- a/packages/graphql-codegen-cli/tests/__mocks__/fs.js +++ /dev/null @@ -1,28 +0,0 @@ -const fs = jest.genMockFromModule('fs'); - -let mockFiles = {}; - -function __setMockFiles(file, content) { - mockFiles[file] = content; -} - -function __resetMockFiles() { - mockFiles = {}; -} - -function existsSync(path) { - const exists = mockFiles[path] !== undefined; - - return exists; -} - -function readFileSync(path) { - return mockFiles[path] || undefined; -} - -fs.__setMockFiles = __setMockFiles; -fs.__resetMockFiles = __resetMockFiles; -fs.existsSync = existsSync; -fs.readFileSync = readFileSync; - -module.exports = fs; diff --git a/packages/graphql-codegen-cli/tests/__mocks__/some-fetch.js b/packages/graphql-codegen-cli/tests/__mocks__/some-fetch.cjs similarity index 91% rename from packages/graphql-codegen-cli/tests/__mocks__/some-fetch.js rename to packages/graphql-codegen-cli/tests/__mocks__/some-fetch.cjs index 79ee5dd0d4c..27a6becf216 100644 --- a/packages/graphql-codegen-cli/tests/__mocks__/some-fetch.js +++ b/packages/graphql-codegen-cli/tests/__mocks__/some-fetch.cjs @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ const { promises: { readFile }, } = require('fs'); diff --git a/packages/graphql-codegen-cli/tests/__snapshots__/init.spec.ts.snap b/packages/graphql-codegen-cli/tests/__snapshots__/init.spec.ts.snap index 60bfd31140c..0782ac6737f 100644 --- a/packages/graphql-codegen-cli/tests/__snapshots__/init.spec.ts.snap +++ b/packages/graphql-codegen-cli/tests/__snapshots__/init.spec.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`init custom setup 1`] = ` +exports[`init > custom setup 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -23,7 +23,7 @@ export default config; " `; -exports[`init plugins suggestions for client-side setup should use angular related plugins when @angular/core is found 1`] = ` +exports[`init > plugins suggestions for client-side setup > should use angular related plugins when @angular/core is found 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -42,7 +42,7 @@ export default config; " `; -exports[`init plugins suggestions for client-side setup should use react related plugins when react is found 1`] = ` +exports[`init > plugins suggestions for client-side setup > should use react related plugins when react is found 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -62,7 +62,7 @@ export default config; " `; -exports[`init plugins suggestions for client-side setup should use stencil related plugins when @stencil/core is found 1`] = ` +exports[`init > plugins suggestions for client-side setup > should use stencil related plugins when @stencil/core is found 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -81,7 +81,7 @@ export default config; " `; -exports[`init plugins suggestions non client-side setup should use typescript related plugins when typescript is found (node) 1`] = ` +exports[`init > plugins suggestions non client-side setup > should use typescript related plugins when typescript is found (node) 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -99,7 +99,7 @@ export default config; " `; -exports[`init should have few default values 1`] = ` +exports[`init > should have few default values for Angular 1`] = ` " import type { CodegenConfig } from '@graphql-codegen/cli'; @@ -119,7 +119,7 @@ export default config; " `; -exports[`init should have few default values 2`] = ` +exports[`init > should have few default values for React 1`] = ` "overwrite: true schema: "./schema.ts" documents: "graphql/**/*.graphql" diff --git a/packages/graphql-codegen-cli/tests/cli-error.spec.ts b/packages/graphql-codegen-cli/tests/cli-error.spec.ts index 2f78327af98..49500151d1b 100644 --- a/packages/graphql-codegen-cli/tests/cli-error.spec.ts +++ b/packages/graphql-codegen-cli/tests/cli-error.spec.ts @@ -1,14 +1,14 @@ import { cliError } from '../src/utils/cli-error.js'; describe('cliError', () => { - let spyProcessExit: jest.SpyInstance; - let spyConsoleError: jest.SpyInstance; + let spyProcessExit: ReturnType; + let spyConsoleError: ReturnType; beforeEach(() => { - spyProcessExit = jest.spyOn(process, 'exit'); - spyProcessExit.mockImplementation(); - spyConsoleError = jest.spyOn(console, 'error'); - spyConsoleError.mockImplementation(); + spyProcessExit = vi.spyOn(process, 'exit'); + spyProcessExit.mockImplementation(() => {}); + spyConsoleError = vi.spyOn(console, 'error'); + spyConsoleError.mockImplementation(() => {}); }); afterEach(() => { diff --git a/packages/graphql-codegen-cli/tests/cli-flags.spec.ts b/packages/graphql-codegen-cli/tests/cli-flags.spec.ts index baea000188f..85b34b8333c 100644 --- a/packages/graphql-codegen-cli/tests/cli-flags.spec.ts +++ b/packages/graphql-codegen-cli/tests/cli-flags.spec.ts @@ -23,12 +23,12 @@ const temp = new TempDir(); describe('CLI Flags', () => { beforeEach(() => { temp.clean(); - jest.spyOn(process, 'cwd').mockImplementation(() => temp.dir); + vi.spyOn(process, 'cwd').mockImplementation(() => temp.dir); }); afterEach(() => { - jest.clearAllMocks(); - jest.restoreAllMocks(); + vi.clearAllMocks(); + vi.restoreAllMocks(); }); afterAll(() => { diff --git a/packages/graphql-codegen-cli/tests/codegen.spec.ts b/packages/graphql-codegen-cli/tests/codegen.spec.ts index 7eb7e5fe9ab..4d447a47178 100644 --- a/packages/graphql-codegen-cli/tests/codegen.spec.ts +++ b/packages/graphql-codegen-cli/tests/codegen.spec.ts @@ -1,31 +1,17 @@ import { join } from 'path'; -import { useMonorepo } from '@graphql-codegen/testing'; +import '@graphql-codegen/testing'; import { mergeTypeDefs } from '@graphql-tools/merge'; import { buildASTSchema, buildSchema, GraphQLObjectType, parse, print, OperationDefinitionNode, Kind } from 'graphql'; import { createContext, executeCodegen } from '../src/index.js'; -import { Types } from '@graphql-codegen/plugin-helpers'; +import type { Types } from '@graphql-codegen/plugin-helpers'; const SHOULD_NOT_THROW_STRING = 'SHOULD_NOT_THROW'; const SIMPLE_TEST_SCHEMA = `type MyType { f: String } type Query { f: String }`; -jest.mock('some-fetch'); - -const monorepo = useMonorepo({ - dirname: __dirname, -}); - describe('Codegen Executor', () => { - monorepo.correctCWD(); - - beforeEach(() => { - jest.useFakeTimers({ - legacyFakeTimers: true, - }); - }); - describe('Generator General Options', () => { it('Should output the correct filenames', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out1.ts': { plugins: ['typescript'] }, @@ -33,14 +19,14 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(2); - expect(output.map(f => f.filename)).toEqual(expect.arrayContaining(['out1.ts', 'out2.ts'])); + expect(result.length).toBe(2); + expect(result.map(f => f.filename)).toEqual(expect.arrayContaining(['out1.ts', 'out2.ts'])); }); it('Should load require extensions', async () => { expect((global as any).dummyWasLoaded).toBeFalsy(); - const output = await executeCodegen({ - schema: join(__dirname, './test-files/schema-dir/schema-object.js'), + const { result } = await executeCodegen({ + schema: join(__dirname, './test-files/schema-dir/schema-object.cjs'), require: join(__dirname, './dummy-require.js'), generates: { 'out1.ts': { plugins: ['typescript'] }, @@ -48,7 +34,7 @@ describe('Codegen Executor', () => { cwd: __dirname, }); - expect(output.length).toBe(1); + expect(result.length).toBe(1); expect((global as any).dummyWasLoaded).toBeTruthy(); }); @@ -70,7 +56,7 @@ describe('Codegen Executor', () => { }); it('Should accept plugins as object', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -84,12 +70,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type RootQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type RootQuery'); }); it('Should accept plugins as array of objects', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -99,8 +85,8 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type RootQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type RootQuery'); }); it('Should throw when no output files has been specified', async () => { @@ -118,7 +104,7 @@ describe('Codegen Executor', () => { }); it('Should work with just schema', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out.ts': { @@ -127,12 +113,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); + expect(result.length).toBe(1); }); it('Should not throw when every output has a schema and there is no root schema', async () => { try { - const output = await executeCodegen({ + const { result } = await executeCodegen({ generates: { 'out.ts': { schema: SIMPLE_TEST_SCHEMA, @@ -141,7 +127,7 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); + expect(result.length).toBe(1); } catch (e) { expect(e.message).not.toBe(SHOULD_NOT_THROW_STRING); expect(e.message).not.toMatch('Invalid Codegen Configuration!'); @@ -207,7 +193,7 @@ describe('Codegen Executor', () => { }); it('should handle extend keyword when GraphQLSchema is used', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: './tests/test-files/schema-dir/with-extend.js', generates: { 'out.ts': { @@ -216,15 +202,15 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].filename).toBe('out.ts'); - expect(output[0].content).toContain(`hello?: Maybe`); + expect(result.length).toBe(1); + expect(result[0].filename).toBe('out.ts'); + expect(result[0].content).toContain(`hello?: Maybe`); }); }); describe('Per-output options', () => { it('Should allow to specify schema extension for specific output', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out1.ts': { @@ -236,14 +222,14 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type Query'); - expect(output[0].content).toContain('export type MyType'); - expect(output[0].content).toContain('export type OtherType'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type Query'); + expect(result[0].content).toContain('export type MyType'); + expect(result[0].content).toContain('export type OtherType'); }); it('Should allow to specify documents extension for specific output', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out1.ts': { @@ -253,12 +239,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type QQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type QQuery'); }); it('Should extend existing documents', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -269,31 +255,26 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type QQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type QQuery'); }); - it('Should throw on duplicated names', async () => { - try { - await executeCodegen({ - schema: ` + it('Should return error on duplicated names', async () => { + const { error } = await executeCodegen({ + schema: ` type RootQuery { f: String } schema { query: RootQuery } `, - documents: [`query q { e }`, `query q { f }`], - generates: { - 'out1.ts': { plugins: ['typescript'] }, - }, - }); - throw SHOULD_NOT_THROW_STRING; - } catch (e) { - expect(e).not.toEqual(SHOULD_NOT_THROW_STRING); - expect(e.message).toContain('Not all operations have an unique name: q'); - } + documents: [`query q { e }`, `query q { f }`], + generates: { + 'out1.ts': { plugins: ['typescript'] }, + }, + }); + expect(error.message).toContain('Not all operations have an unique name: q'); }); it('should handle gql tag in ts with with nested fragment', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/my-fragment.ts', './tests/test-documents/query-with-my-fragment.ts'], generates: { @@ -307,7 +288,7 @@ describe('Codegen Executor', () => { }); it('should handle gql tag in ts with with multiple nested fragment', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/my-fragment.ts', './tests/test-documents/query-with-my-fragment.ts'], generates: { @@ -322,7 +303,7 @@ describe('Codegen Executor', () => { }); it('should handle gql tag in js with with nested fragment', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/js-query-with-my-fragment.js', './tests/test-documents/js-my-fragment.js'], generates: { @@ -337,7 +318,7 @@ describe('Codegen Executor', () => { }); it('should handle TypeScript features', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/ts-features-with-query.ts'], generates: { @@ -353,7 +334,7 @@ describe('Codegen Executor', () => { }); it('should handle multiple fragments with the same name, but one is commented out', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/query-with-commented-fragment.ts'], generates: { @@ -367,7 +348,7 @@ describe('Codegen Executor', () => { }); it('should handle graphql-tag and gatsby by default (documents)', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/gatsby-and-custom-parsers.ts'], generates: { @@ -382,7 +363,7 @@ describe('Codegen Executor', () => { }); it('should handle custom graphql string parsers (documents)', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['./tests/test-documents/schema.graphql'], documents: ['./tests/test-documents/gatsby-and-custom-parsers.ts'], generates: { @@ -446,7 +427,7 @@ describe('Codegen Executor', () => { describe('Plugin Configuration', () => { it('Should inherit root config', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, config: { @@ -459,13 +440,13 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type rootquery'); - expect(output[0].content).toContain('export type root'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type rootquery'); + expect(result[0].content).toContain('export type root'); }); it('Should accept config in per-output (override)', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -484,13 +465,13 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(2); - expect(output[0].content).toContain('export type rootquery'); - expect(output[1].content).toContain('export type ROOTQUERY'); + expect(result.length).toBe(2); + expect(result[0].content).toContain('export type rootquery'); + expect(result[1].content).toContain('export type ROOTQUERY'); }); it('Should accept config in per-plugin', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -506,13 +487,13 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type root'); - expect(output[0].content).toContain('export type rootquery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type root'); + expect(result[0].content).toContain('export type rootquery'); }); it('Should allow override of config in', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, config: { @@ -540,15 +521,15 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(2); - expect(output[0].content).toContain('export type ROOTQUERY'); - expect(output[1].content).toContain('export type RootQuery'); + expect(result.length).toBe(2); + expect(result[0].content).toContain('export type ROOTQUERY'); + expect(result[1].content).toContain('export type RootQuery'); }); }); describe('Plugin loading', () => { it('Should load custom plugin from local file', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out1.ts': { @@ -557,46 +538,36 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('plugin'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('plugin'); }); - it('Should throw when custom plugin is not valid', async () => { - try { - await executeCodegen({ - schema: SIMPLE_TEST_SCHEMA, - generates: { - 'out1.ts': { - plugins: ['./tests/custom-plugins/invalid.js'], - }, + it('Should return error when custom plugin is not valid', async () => { + const { error } = await executeCodegen({ + schema: SIMPLE_TEST_SCHEMA, + generates: { + 'out1.ts': { + plugins: ['./tests/custom-plugins/invalid.js'], }, - }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (e) { - expect(e.message).not.toBe(SHOULD_NOT_THROW_STRING); - expect(e.message).toContain('Invalid Custom Plugin'); - } + }, + }); + expect(error.message).toContain('Invalid Custom Plugin'); }); - it('Should execute custom plugin validation and throw when it fails', async () => { - try { - await executeCodegen({ - schema: SIMPLE_TEST_SCHEMA, - generates: { - 'out1.ts': { - plugins: ['./tests/custom-plugins/validation.js'], - }, + it('Should execute custom plugin validation and return error when it fails', async () => { + const { error } = await executeCodegen({ + schema: SIMPLE_TEST_SCHEMA, + generates: { + 'out1.ts': { + plugins: ['./tests/custom-plugins/validation.js'], }, - }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (e) { - expect(e.message).not.toBe(SHOULD_NOT_THROW_STRING); - expect(e.message).toContain('validation failed'); - } + }, + }); + expect(error.message).toContain('validation failed'); }); it('Should allow plugins to extend schema', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, generates: { 'out1.ts': { @@ -605,13 +576,13 @@ describe('Codegen Executor', () => { }, }); - expect(output[0].content).toContain('MyType,'); - expect(output[0].content).toContain('Extension'); - expect(output[0].content).toContain(`Should have the Extension type: 'Extension'`); + expect(result[0].content).toContain('MyType,'); + expect(result[0].content).toContain('Extension'); + expect(result[0].content).toContain(`Should have the Extension type: 'Extension'`); }); it('Should allow plugins to extend schema (using a function)', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, config: { test: 'MyType', @@ -623,7 +594,7 @@ describe('Codegen Executor', () => { }, }); - expect(output[0].content).toContain('MyType'); + expect(result[0].content).toContain('MyType'); }); }); @@ -708,7 +679,7 @@ describe('Codegen Executor', () => { } `; - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: [schemaA, schemaB], generates: { 'out1.ts': { @@ -717,8 +688,8 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toBeSimilarStringTo(`export type Scalars = { + expect(result.length).toBe(1); + expect(result[0].content).toBeSimilarStringTo(`export type Scalars = { ID: { input: string; output: string; } String: { input: string; output: string; } Boolean: { input: boolean; output: boolean; } @@ -735,7 +706,7 @@ describe('Codegen Executor', () => { schema: [ { './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/custom-schema-loader.js', + loader: './tests/custom-loaders/custom-schema-loader.cjs', }, }, ], @@ -754,7 +725,7 @@ describe('Codegen Executor', () => { schema: [ { './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/custom-schema-loader.js', + loader: './tests/custom-loaders/custom-schema-loader.cjs', }, }, ], @@ -766,72 +737,60 @@ describe('Codegen Executor', () => { expect((global as any).CUSTOM_SCHEMA_LOADER_CALLED).toBeTruthy(); }); - it('Should throw when invalid return value from loader', async () => { - try { - await executeCodegen({ - schema: [ - { - './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/invalid-return-value-schema-loader.js', - }, + it('Should return error when invalid return value from loader', async () => { + const { error } = await executeCodegen({ + schema: [ + { + './tests/test-documents/schema.graphql': { + loader: './tests/custom-loaders/invalid-return-value-schema-loader.cjs', }, - ], - generates: { - 'out1.ts': { plugins: ['typescript'] }, }, - }); + ], + generates: { + 'out1.ts': { plugins: ['typescript'] }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Failed to load schema'); - } + expect(error.message).toContain('Failed to load schema'); }); - it('Should throw when invalid module specified as loader', async () => { - try { - await executeCodegen({ - schema: [ - { - './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/non-existing.js', - }, - }, - ], - generates: { - 'out1.ts': { - plugins: ['typescript'], + it('Should return error when invalid module specified as loader', async () => { + const { error } = await executeCodegen({ + schema: [ + { + './tests/test-documents/schema.graphql': { + loader: './tests/custom-loaders/non-existing.js', }, }, - }); + ], + generates: { + 'out1.ts': { + plugins: ['typescript'], + }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Failed to load custom loader'); - } + expect(error.message).toContain('Failed to load custom loader'); }); - it('Should throw when invalid file declaration', async () => { - try { - await executeCodegen({ - schema: [ - { - './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/invalid-export.js', - }, - }, - ], - generates: { - 'out1.ts': { - plugins: ['typescript'], + it('Should return error when invalid file declaration', async () => { + const { error } = await executeCodegen({ + schema: [ + { + './tests/test-documents/schema.graphql': { + loader: './tests/custom-loaders/invalid-export.cjs', }, }, - }); + ], + generates: { + 'out1.ts': { + plugins: ['typescript'], + }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Failed to load schema'); - expect(error.message).toContain('Failed to load custom loader'); - } + expect(error.message).toContain('Failed to load schema'); + expect(error.message).toContain('Failed to load custom loader'); }); }); @@ -842,7 +801,7 @@ describe('Codegen Executor', () => { documents: [ { './tests/test-documents/valid.graphql': { - loader: './tests/custom-loaders/custom-documents-loader.js', + loader: './tests/custom-loaders/custom-documents-loader.cjs', }, }, ], @@ -876,76 +835,64 @@ describe('Codegen Executor', () => { expect((global as any).CUSTOM_DOCUMENT_LOADER_CALLED).toBeTruthy(); }); - it('Should throw when invalid return value from custom documents loader', async () => { - try { - await executeCodegen({ - schema: ['./tests/test-documents/schema.graphql'], - documents: [ - { - './tests/test-documents/valid.graphql': { - loader: './tests/custom-loaders/invalid-return-value-documents-loader.js', - }, - }, - ], - generates: { - 'out1.ts': { - plugins: ['typescript'], + it('Should return error when invalid return value from custom documents loader', async () => { + const { error } = await executeCodegen({ + schema: ['./tests/test-documents/schema.graphql'], + documents: [ + { + './tests/test-documents/valid.graphql': { + loader: './tests/custom-loaders/invalid-return-value-documents-loader.cjs', }, }, - }); + ], + generates: { + 'out1.ts': { + plugins: ['typescript'], + }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Unable to find any GraphQL type definitions for the following pointers'); - } + expect(error.message).toContain('Unable to find any GraphQL type definitions for the following pointers'); }); - it('Should throw when invalid module specified as loader', async () => { - try { - await executeCodegen({ - schema: ['./tests/test-documents/schema.graphql'], - documents: [ - { - './tests/test-documents/valid.graphql': { - loader: './tests/custom-loaders/non-existing.js', - }, - }, - ], - generates: { - 'out1.ts': { - plugins: ['typescript'], + it('Should return error when invalid module specified as loader', async () => { + const { error } = await executeCodegen({ + schema: ['./tests/test-documents/schema.graphql'], + documents: [ + { + './tests/test-documents/valid.graphql': { + loader: './tests/custom-loaders/non-existing.js', }, }, - }); + ], + generates: { + 'out1.ts': { + plugins: ['typescript'], + }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Failed to load custom loader'); - } + expect(error.message).toContain('Failed to load custom loader'); }); - it('Should throw when invalid file declaration', async () => { - try { - await executeCodegen({ - schema: ['./tests/test-documents/schema.graphql'], - documents: [ - { - './tests/test-documents/valid.graphql': { - loader: './tests/custom-loaders/invalid-export.js', - }, - }, - ], - generates: { - 'out1.ts': { - plugins: ['typescript'], + it('Should return error when invalid file declaration', async () => { + const { error } = await executeCodegen({ + schema: ['./tests/test-documents/schema.graphql'], + documents: [ + { + './tests/test-documents/valid.graphql': { + loader: './tests/custom-loaders/invalid-export.cjs', }, }, - }); + ], + generates: { + 'out1.ts': { + plugins: ['typescript'], + }, + }, + }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (error) { - expect(error.message).toContain('Failed to load custom loader'); - } + expect(error.message).toContain('Failed to load custom loader'); }); }); @@ -1016,7 +963,7 @@ describe('Codegen Executor', () => { it('Should allow plugins to extend schema with custom root', async () => { try { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: `schema { query: RootQuery } type MyType { f: String } type RootQuery { f: String }`, documents: `query root { f }`, generates: { @@ -1025,18 +972,18 @@ describe('Codegen Executor', () => { }, }, }); - expect(output.length).toBe(1); + expect(result.length).toBe(1); } catch (e) { expect(e.message).not.toBe('Query root type must be provided.'); } }); it('Should allow plugin context to be accessed and modified', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ { './tests/test-documents/schema.graphql': { - loader: './tests/custom-loaders/custom-schema-loader-with-context.js', + loader: './tests/custom-loaders/custom-schema-loader-with-context.cjs', }, }, ], @@ -1047,8 +994,8 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('Hello world!'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('Hello world!'); }); it('Should sort the input schema', async () => { @@ -1069,7 +1016,7 @@ describe('Codegen Executor', () => { b: String } `; - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: [nonSortedSchema], generates: { 'out1.graphql': { @@ -1081,8 +1028,8 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toBeSimilarStringTo(/* GraphQL */ ` + expect(result.length).toBe(1); + expect(result[0].content).toBeSimilarStringTo(/* GraphQL */ ` type A { b: String s: String @@ -1133,8 +1080,8 @@ describe('Codegen Executor', () => { watch: false, }); const config = prj1.getConfig(); - const output = await executeCodegen(config); - expect(output[0].content).toContain('DocumentNode'); + const { result } = await executeCodegen(config); + expect(result[0].content).toContain('DocumentNode'); }); describe('Document Transform', () => { @@ -1156,7 +1103,7 @@ describe('Codegen Executor', () => { return newDocuments; }; - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query foo { f }`, generates: { @@ -1167,8 +1114,8 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type BarQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type BarQuery'); }); it('Should allow users to set config', async () => { @@ -1195,7 +1142,7 @@ describe('Codegen Executor', () => { }; }; - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query foo { f }`, generates: { @@ -1206,12 +1153,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type TestQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type TestQuery'); }); it('Should transform documents when specifying files', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -1222,12 +1169,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type BarQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type BarQuery'); }); it('Should allow users to set config when specifying files', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -1244,12 +1191,12 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('export type TestQuery'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('export type TestQuery'); }); it('Should allow plugin context to be accessed and modified', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query root { f }`, generates: { @@ -1267,34 +1214,30 @@ describe('Codegen Executor', () => { }, }); - expect(output.length).toBe(1); - expect(output[0].content).toContain('Hello world!'); + expect(result.length).toBe(1); + expect(result[0].content).toContain('Hello world!'); }); - it('should throw an understandable error if it fails.', async () => { - try { - await executeCodegen({ - schema: SIMPLE_TEST_SCHEMA, - documents: `query foo { f }`, - generates: { - 'out1.ts': { - plugins: ['typescript'], - documentTransforms: [ - { - transform: () => { - throw new Error('Something Wrong!'); - }, + it('should return error an understandable error if it fails.', async () => { + const { error } = await executeCodegen({ + schema: SIMPLE_TEST_SCHEMA, + documents: `query foo { f }`, + generates: { + 'out1.ts': { + plugins: ['typescript'], + documentTransforms: [ + { + transform: () => { + throw new Error('Something Wrong!'); }, - ], - }, + }, + ], }, - }); - throw new Error(SHOULD_NOT_THROW_STRING); - } catch (e) { - expect(e.message).not.toBe(SHOULD_NOT_THROW_STRING); - expect(e.message).toContain('DocumentTransform "the element at index 0 of the documentTransforms" failed'); - expect(e.message).toContain('Something Wrong!'); - } + }, + }); + + expect(error.message).toContain('DocumentTransform "the element at index 0 of the documentTransforms" failed'); + expect(error.message).toContain('Something Wrong!'); }); it('Should transform documents with client-preset', async () => { @@ -1315,7 +1258,7 @@ describe('Codegen Executor', () => { return newDocuments; }; - const output = await executeCodegen({ + const { result } = await executeCodegen({ schema: SIMPLE_TEST_SCHEMA, documents: `query foo { f }`, generates: { @@ -1326,13 +1269,13 @@ describe('Codegen Executor', () => { }, }); - const fileOutput = output.find(file => file.filename === './src/gql/graphql.ts'); + const fileOutput = result.find(file => file.filename === './src/gql/graphql.ts'); expect(fileOutput.content).toContain('export type BarQuery'); }); }); it('should not run out of memory when generating very complex types (issue #7720)', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: ['../../dev-test/gatsby/schema.graphql'], documents: ['../../dev-test/gatsby/fragments.ts'], config: { diff --git a/packages/graphql-codegen-cli/tests/config.spec.ts b/packages/graphql-codegen-cli/tests/config.spec.ts index e1863c52991..6bd69d85588 100644 --- a/packages/graphql-codegen-cli/tests/config.spec.ts +++ b/packages/graphql-codegen-cli/tests/config.spec.ts @@ -3,7 +3,7 @@ import { createContext, ensureContext } from '../src/index.js'; describe('Codegen config - Context', () => { it('loads and merge multiple schemas when using GraphQL config', async () => { const context = await createContext({ - config: './packages/graphql-codegen-cli/tests/test-files/graphql.config.js', + config: './tests/test-files/graphql.config.js', project: 'prj1', errorsOnly: true, overwrite: true, diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.js b/packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.cjs similarity index 82% rename from packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.js rename to packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.cjs index 4980c71b235..ed0844ab492 100644 --- a/packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.js +++ b/packages/graphql-codegen-cli/tests/custom-loaders/custom-documents-loader.cjs @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ const { parse } = require('graphql'); const { readFileSync } = require('fs'); const { join } = require('path'); diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.js b/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.cjs similarity index 83% rename from packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.js rename to packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.cjs index acfd51756c7..6328525d587 100644 --- a/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.js +++ b/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader-with-context.cjs @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ const { buildSchema } = require('graphql'); const { readFileSync } = require('fs'); const { join } = require('path'); diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.js b/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.cjs similarity index 83% rename from packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.js rename to packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.cjs index 2a1a669317f..346508f3519 100644 --- a/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.js +++ b/packages/graphql-codegen-cli/tests/custom-loaders/custom-schema-loader.cjs @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ const { buildSchema } = require('graphql'); const { readFileSync } = require('fs'); const { join } = require('path'); diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/invalid-export.js b/packages/graphql-codegen-cli/tests/custom-loaders/invalid-export.cjs similarity index 100% rename from packages/graphql-codegen-cli/tests/custom-loaders/invalid-export.js rename to packages/graphql-codegen-cli/tests/custom-loaders/invalid-export.cjs diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-documents-loader.js b/packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-documents-loader.cjs similarity index 100% rename from packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-documents-loader.js rename to packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-documents-loader.cjs diff --git a/packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-schema-loader.js b/packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-schema-loader.cjs similarity index 100% rename from packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-schema-loader.js rename to packages/graphql-codegen-cli/tests/custom-loaders/invalid-return-value-schema-loader.cjs diff --git a/packages/graphql-codegen-cli/tests/generate-and-save.spec.ts b/packages/graphql-codegen-cli/tests/generate-and-save.spec.ts index 549ca460eca..63874da6190 100644 --- a/packages/graphql-codegen-cli/tests/generate-and-save.spec.ts +++ b/packages/graphql-codegen-cli/tests/generate-and-save.spec.ts @@ -1,28 +1,22 @@ import { dirname, join } from 'path'; +import logSymbols from 'log-symbols'; import { Types } from '@graphql-codegen/plugin-helpers'; -import { useMonorepo } from '@graphql-codegen/testing'; +import '@graphql-codegen/testing'; import makeDir from 'make-dir'; import { createContext } from '../src/config.js'; import { generate } from '../src/generate-and-save.js'; import * as fs from '../src/utils/file-system.js'; +import { setLogger } from '../src/utils/logger.js'; const SIMPLE_TEST_SCHEMA = `type MyType { f: String } type Query { f: String }`; const inputFile = join(__dirname, '../temp/input-graphql.tsx'); const outputFile = join(__dirname, '../temp/output-graphql.tsx'); -const monorepo = useMonorepo({ dirname: __dirname }); - describe('generate-and-save', () => { - monorepo.correctCWD(); - - afterEach(() => { - jest.resetAllMocks(); - }); - test('allow to specify overwrite for specific output (should write file)', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); const output = await generate( { @@ -48,9 +42,9 @@ describe('generate-and-save', () => { test('allow to specify overwrite for specific output (should not write file)', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); // forces file to exist - const fileReadSpy = jest.spyOn(fs, 'readFile'); + const fileReadSpy = vi.spyOn(fs, 'readFile'); fileReadSpy.mockImplementation(async () => ''); const output = await generate( @@ -79,7 +73,7 @@ describe('generate-and-save', () => { test('should use global overwrite option and write a file', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); const output = await generate( { @@ -104,9 +98,9 @@ describe('generate-and-save', () => { test('should use global overwrite option and not write a file', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); // forces file to exist - const fileReadSpy = jest.spyOn(fs, 'readFile'); + const fileReadSpy = vi.spyOn(fs, 'readFile'); fileReadSpy.mockImplementation(async () => ''); const output = await generate( @@ -134,8 +128,8 @@ describe('generate-and-save', () => { test('should overwrite a file by default', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); - const readSpy = jest.spyOn(fs, 'readFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); + const readSpy = vi.spyOn(fs, 'readFile').mockImplementation(() => Promise.resolve('')); readSpy.mockImplementation(async _f => ''); const output = await generate( @@ -161,7 +155,7 @@ describe('generate-and-save', () => { }); test('should override generated files', async () => { - jest.unmock('fs'); + vi.unmock('fs'); const fs = await import('fs'); makeDir.sync(dirname(outputFile)); @@ -195,7 +189,7 @@ describe('generate-and-save', () => { }); test('should extract a document from the gql tag (imported from apollo-server)', async () => { const filename = 'overwrite.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); const output = await generate( { @@ -216,7 +210,7 @@ describe('generate-and-save', () => { }); test('should allow to alter the content with the beforeOneFileWrite hook', async () => { const filename = 'modify.ts'; - const writeSpy = jest.spyOn(fs, 'writeFile').mockImplementation(); + const writeSpy = vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); const output = await generate( { @@ -240,31 +234,22 @@ describe('generate-and-save', () => { }); describe('Errors when loading pointers', () => { - const originalConsole = { ...console }; const originalNodeEnv = process.env.NODE_ENV; - let consoleErrorMock: jest.Mock; - beforeEach(() => { - // Mock common console functions to avoid noise in the terminal - global.console.log = jest.fn(); - global.console.warn = jest.fn(); - global.console.error = jest.fn(); - // By default, the NODE_ENV is set to 'test', and this is used to silent console errors. // For these tests below, we want to see what's being logged out to console errors. process.env.NODE_ENV = 'not_test_so_error'; - - consoleErrorMock = jest.mocked(global.console.error); + vi.spyOn(process.stdout, 'write').mockImplementation(() => true); }); afterEach(() => { - global.console = originalConsole; process.env.NODE_ENV = originalNodeEnv; }); test('Schema syntax error - should print native GraphQLError', async () => { - expect.assertions(4); + expect.assertions(1); + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); try { await generate( { @@ -279,37 +264,35 @@ describe('generate-and-save', () => { false ); } catch { - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo( - '[FAILED] Failed to load schema from ./tests/test-files/schema-dir/error-schema.graphql:' - ); - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo( - '[FAILED] Syntax Error: Expected Name, found "!".' - ); - // We can only use partial file path to the error file, because the error contains absolute path on the host machine - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo( - '/tests/test-files/schema-dir/error-schema.graphql:2:15' - ); - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo(` + const cwd = process.cwd(); // cwd is different for every machine, remember to replace local path with this after updating snapshot + expect(outputErrorMock.mock.calls[0][0]).toMatchInlineSnapshot(` + "[FAILED] Failed to load schema from ./tests/test-files/schema-dir/error-schema.graphql: + [FAILED] Syntax Error: Expected Name, found "!". + + [FAILED] ${cwd}/tests/test-files/schema-dir/error-schema.graphql:2:15 [FAILED] 1 | type Query { [FAILED] 2 | foo: String!! [FAILED] | ^ [FAILED] 3 | } - [FAILED] + [FAILED] GraphQL Code Generator supports: - [FAILED] + [FAILED] - ES Modules and CommonJS exports (export as default or named export "schema") [FAILED] - Introspection JSON File [FAILED] - URL of GraphQL endpoint [FAILED] - Multiple files with type definitions (glob expression) [FAILED] - String in config file - [FAILED] + [FAILED] Try to use one of above options and run codegen again. + + " `); } }); test('Document syntax error - should print native GraphQLError', async () => { - expect.assertions(4); + expect.assertions(1); + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); try { await generate( { @@ -325,22 +308,23 @@ describe('generate-and-save', () => { false ); } catch { - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo( - 'Failed to load documents from ./tests/test-files/error-document.graphql:' - ); - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo('Syntax Error: Expected "{", found .'); - // We can only use partial file path to the error file, because the error contains absolute path on the host machine - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo('/tests/test-files/error-document.graphql:2:1'); - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo(` + const cwd = process.cwd(); // cwd is different for every machine, remember to replace local path with this after updating snapshot + expect(outputErrorMock.mock.calls[0][0]).toMatchInlineSnapshot(` + "[FAILED] Failed to load documents from ./tests/test-files/error-document.graphql: + [FAILED] Syntax Error: Expected "{", found . + + [FAILED] ${cwd}/tests/test-files/error-document.graphql:2:1 [FAILED] 1 | query [FAILED] 2 | [FAILED] | ^ + " `); } }); test('No documents found - should throw error by default', async () => { expect.assertions(1); + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); try { await generate( { @@ -356,15 +340,17 @@ describe('generate-and-save', () => { false ); } catch { - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo(` + expect(outputErrorMock.mock.calls[0][0]).toMatchInlineSnapshot(` + " [FAILED] Unable to find any GraphQL type definitions for the following pointers: - [FAILED] [FAILED] - ./tests/test-files/document-file-does-not-exist.graphql + " `); } }); test('No documents found - should not fail if ignoreNoDocuments=true', async () => { + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); await generate( { verbose: true, @@ -379,10 +365,11 @@ describe('generate-and-save', () => { }, false ); - expect(consoleErrorMock).not.toHaveBeenCalled(); + expect(outputErrorMock).not.toHaveBeenCalled(); }); test('No documents found - GraphQL Config - should throw error by default', async () => { + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); expect.assertions(1); try { const config = await createContext({ @@ -398,17 +385,18 @@ describe('generate-and-save', () => { await generate(config, false); } catch { - expect(consoleErrorMock.mock.calls[0][0]).toBeSimilarStringTo(` - [FAILED] + expect(outputErrorMock.mock.calls[0][0]).toMatchInlineSnapshot(` + " [FAILED] Unable to find any GraphQL type definitions for the following pointers: - [FAILED] [FAILED] - ../test-documents/empty.graphql + " `); } }); test('No documents found - GraphQL Config - should not fail if ignoreNoDocuments=true', async () => { - jest.spyOn(fs, 'writeFile').mockImplementation(); + const outputErrorMock = vi.spyOn(process.stderr, 'write').mockImplementation(() => true); + vi.spyOn(fs, 'writeFile').mockImplementation(() => Promise.resolve()); const config = await createContext({ config: './tests/test-files/graphql.config.no-doc-ignored.js', project: undefined, @@ -422,7 +410,154 @@ describe('generate-and-save', () => { await generate(config, false); - expect(consoleErrorMock).not.toHaveBeenCalled(); + expect(outputErrorMock).not.toHaveBeenCalled(); + }); + }); + + describe('config.allowPartialOutputs', () => { + const mockLogger: any = { + warn: vi.fn(), + error: vi.fn(), + }; + + beforeEach(() => { + setLogger(mockLogger); + vi.resetAllMocks(); + }); + + test('when allowPartialOutputs=true - writes partial success and does not throw', async () => { + const invalidSchema = /* GraphQL */ ` + type A { + id: WRONG_TYPE! + } + `; + const validSchema = /* GraphQL */ ` + type B { + id: ID! + } + `; + const output = await generate( + { + allowPartialOutputs: true, + generates: { + 'src/a.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + 'src/b.ts': { + schema: validSchema, + plugins: ['typescript'], + }, + }, + }, + false + ); + + expect(output.length).toBe(1); + expect(output[0].filename).toBe('src/b.ts'); + expect(mockLogger.warn.mock.calls[0][0]).toBeSimilarStringTo( + `${logSymbols.warning} One or more errors occurred, some files were generated. To prevent any output on errors, set config.allowPartialOutputs=false` + ); + }); + + test('when allowPartialOutputs=true - complete failure throws', async () => { + expect.assertions(2); + + try { + const invalidSchema = /* GraphQL */ ` + type A { + id: WRONG_TYPE! + } + `; + await generate( + { + allowPartialOutputs: true, + generates: { + 'src/a.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + 'src/b.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + }, + }, + false + ); + } catch { + expect(mockLogger.warn).not.toHaveBeenCalled(); + expect(mockLogger.error).not.toHaveBeenCalled(); + } + }); + + test('when allowPartialOutputs=false - does not write partial success and throws', async () => { + expect.assertions(1); + + const invalidSchema = /* GraphQL */ ` + type A { + id: WRONG_TYPE! + } + `; + const validSchema = /* GraphQL */ ` + type B { + id: ID! + } + `; + + try { + await generate( + { + allowPartialOutputs: false, + generates: { + 'src/a.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + 'src/b.ts': { + schema: validSchema, + plugins: ['typescript'], + }, + }, + }, + false + ); + } catch { + expect(mockLogger.error.mock.calls[0][0]).toBeSimilarStringTo( + `${logSymbols.error} One or more errors occurred, no files were generated. To allow output on errors, set config.allowPartialOutputs=true` + ); + } + }); + + test('when allowPartialOutputs=false - complete failure throws', async () => { + expect.assertions(2); + + try { + const invalidSchema = /* GraphQL */ ` + type A { + id: WRONG_TYPE! + } + `; + await generate( + { + allowPartialOutputs: false, + generates: { + 'src/a.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + 'src/b.ts': { + schema: invalidSchema, + plugins: ['typescript'], + }, + }, + }, + false + ); + } catch { + expect(mockLogger.warn).not.toHaveBeenCalled(); + expect(mockLogger.error).not.toHaveBeenCalled(); + } }); }); }); diff --git a/packages/graphql-codegen-cli/tests/init.spec.ts b/packages/graphql-codegen-cli/tests/init.spec.ts index 2e2c449db03..353fd02f369 100644 --- a/packages/graphql-codegen-cli/tests/init.spec.ts +++ b/packages/graphql-codegen-cli/tests/init.spec.ts @@ -1,17 +1,17 @@ -/* eslint-disable @typescript-eslint/no-require-imports */ import { resolve } from 'path'; import bddStdin from 'bdd-stdin'; +import { fs, vol } from 'memfs'; import { bold } from '../src/init/helpers.js'; import { init } from '../src/init/index.js'; import { getApplicationTypeChoices, getPluginChoices } from '../src/init/questions.js'; import { guessTargets } from '../src/init/targets.js'; import { Tags } from '../src/init/types.js'; -jest.mock('../src/utils/get-latest-version.ts', () => { +vi.mock('../src/utils/get-latest-version.ts', () => { return { getLatestVersion: () => Promise.resolve('1.0.0') }; }); -jest.mock('fs'); +vi.mock('fs', () => require('./__mocks__/fs.cjs')); const { version } = require('../package.json'); const SELECT = ' '; // checkbox @@ -78,53 +78,53 @@ const packageJson = { describe('init', () => { beforeEach(() => { // make sure terminal don't get noisy - jest.spyOn(process.stdout, 'write').mockImplementation(); + vi.spyOn(process.stdout, 'write').mockImplementation(() => true); + vol.reset(); }); afterEach(() => { - require('fs').__resetMockFiles(); - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('guessTargets()', () => { it('should guess angular projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withAngular); + vol.fromJSON({ ['package.json']: packageJson.withAngular }, process.cwd()); const targets = await guessTargets(); expect(targets.Angular).toEqual(true); }); it('should guess typescript projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withTypescript); + vol.fromJSON({ ['package.json']: packageJson.withTypescript }, process.cwd()); const targets = await guessTargets(); expect(targets.TypeScript).toEqual(true); }); it('should guess react projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withReact); + vol.fromJSON({ ['package.json']: packageJson.withReact }, process.cwd()); const targets = await guessTargets(); expect(targets.React).toEqual(true); }); it('should guess stencil projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withStencil); + vol.fromJSON({ ['package.json']: packageJson.withStencil }, process.cwd()); const targets = await guessTargets(); expect(targets.Stencil).toEqual(true); }); it('should guess flow projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withFlow); + vol.fromJSON({ ['package.json']: packageJson.withFlow }, process.cwd()); const targets = await guessTargets(); expect(targets.Flow).toEqual(true); }); it('should guess vue projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withVue); + vol.fromJSON({ ['package.json']: packageJson.withVue }, process.cwd()); const targets = await guessTargets(); expect(targets.Vue).toEqual(true); }); it('should guess graphql-request projects', async () => { - require('fs').__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withGraphqlRequest); + vol.fromJSON({ ['package.json']: packageJson.withGraphqlRequest }, process.cwd()); const targets = await guessTargets(); expect(targets.graphqlRequest).toEqual(true); }); @@ -132,12 +132,10 @@ describe('init', () => { describe('plugins suggestions for client-side setup', () => { it('should use angular related plugins when @angular/core is found', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withAngular); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); + vol.fromJSON({ ['package.json']: packageJson.withAngular }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); // silent - jest.spyOn(console, 'log').mockImplementation(); + vi.spyOn(console, 'log').mockImplementation(() => {}); useInputs({ onTarget: [ENTER], // confirm target @@ -167,12 +165,10 @@ describe('init', () => { }); it('should use react related plugins when react is found', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withReact); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); + vol.fromJSON({ ['package.json']: packageJson.withReact }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); // silent - jest.spyOn(console, 'log').mockImplementation(); + vi.spyOn(console, 'log').mockImplementation(() => {}); useInputs({ onTarget: [ENTER], // confirm react target @@ -201,12 +197,10 @@ describe('init', () => { }); it('should use stencil related plugins when @stencil/core is found', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withStencil); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); + vol.fromJSON({ ['package.json']: packageJson.withStencil }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); // silent - jest.spyOn(console, 'log').mockImplementation(); + vi.spyOn(console, 'log').mockImplementation(() => {}); useInputs({ onTarget: [ENTER], // confirm stencil target @@ -239,12 +233,10 @@ describe('init', () => { describe('plugins suggestions non client-side setup', () => { it('should use typescript related plugins when typescript is found (node)', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withTypescript); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); + vol.fromJSON({ ['package.json']: packageJson.withTypescript }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); // silent - jest.spyOn(console, 'log').mockImplementation(); + vi.spyOn(console, 'log').mockImplementation(() => {}); useInputs({ onTarget: [SELECT, ENTER], // confirm api target @@ -273,12 +265,10 @@ describe('init', () => { }); }); - it('should have few default values', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withReact); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); - const logSpy = jest.spyOn(console, 'log').mockImplementation(); + it('should have few default values for Angular', async () => { + vol.fromJSON({ ['package.json']: packageJson.withReact }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); const defaults = { config: 'codegen.ts', }; @@ -305,12 +295,10 @@ describe('init', () => { expect(logSpy.mock.calls[2][0]).toContain(`Config file generated at ${bold(defaults.config)}`); }); - it('should have few default values', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withReact); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); - const logSpy = jest.spyOn(console, 'log').mockImplementation(); + it('should have few default values for React', async () => { + vol.fromJSON({ ['package.json']: packageJson.withReact }, process.cwd()); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); const options = { script: 'graphql', schema: './schema.ts', @@ -342,11 +330,11 @@ describe('init', () => { }); it('custom setup', async () => { - const fs = require('fs'); - fs.__setMockFiles(resolve(process.cwd(), 'package.json'), packageJson.withReact); - // make sure we don't write stuff - const writeFileSpy = jest.spyOn(fs, 'writeFileSync').mockImplementation(); - const logSpy = jest.spyOn(console, 'log').mockImplementation(); + vol.fromJSON({ ['package.json']: packageJson.withReact }, process.cwd()); + + const { init } = await import('../src/init/index.js'); + const writeFileSpy = vi.spyOn(fs, 'writeFileSync'); + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); const documents = 'graphql/*.ts'; const script = 'generate:types'; @@ -389,15 +377,11 @@ describe('init', () => { describe('plugin choices', () => { function getAvailable(tags: Tags[]): string[] { - return getPluginChoices({ - targets: tags, - } as any).map((c: any) => c.value.value); + return getPluginChoices(tags).map((c: any) => c.value.value); } function getSelected(tags: Tags[]): string[] { - return getPluginChoices({ - targets: tags, - } as any) + return getPluginChoices(tags) .filter((c: any) => c.checked) .map((c: any) => c.value.value); } diff --git a/packages/graphql-codegen-cli/tests/test-files/schema-dir/schema-object.js b/packages/graphql-codegen-cli/tests/test-files/schema-dir/schema-object.cjs similarity index 100% rename from packages/graphql-codegen-cli/tests/test-files/schema-dir/schema-object.js rename to packages/graphql-codegen-cli/tests/test-files/schema-dir/schema-object.cjs diff --git a/packages/graphql-codegen-cli/tests/utils.ts b/packages/graphql-codegen-cli/tests/utils.ts index 9ca241c4bf4..0067472543b 100644 --- a/packages/graphql-codegen-cli/tests/utils.ts +++ b/packages/graphql-codegen-cli/tests/utils.ts @@ -3,7 +3,7 @@ import { join, parse, relative, resolve } from 'path'; import makeDir from 'make-dir'; import * as rimraf from 'rimraf'; -const fs = jest.requireActual('fs'); +const fs = await vi.importActual('fs'); export class TempDir { dir: string; diff --git a/packages/graphql-codegen-cli/tests/watcher-test-helpers/assert-watcher-build-triggers.ts b/packages/graphql-codegen-cli/tests/watcher-test-helpers/assert-watcher-build-triggers.ts index 055e159f4b8..296371678f0 100644 --- a/packages/graphql-codegen-cli/tests/watcher-test-helpers/assert-watcher-build-triggers.ts +++ b/packages/graphql-codegen-cli/tests/watcher-test-helpers/assert-watcher-build-triggers.ts @@ -1,20 +1,31 @@ import { join, isAbsolute, relative, resolve, sep } from 'path'; -import ParcelWatcher from '@parcel/watcher'; +import { Options } from '@parcel/watcher'; import isGlob from 'is-glob'; +import type { Mock } from 'vitest'; -import type { setupMockWatcher } from './setup-mock-watcher.js'; import { formatBuildTriggerErrorPrelude, formatErrorGlobNotIgnoredByParcelWatcher, formatErrorPathNotIgnoredByParcelWatcher, } from './format-watcher-assertion-errors'; +interface MockWatcher { + watchDirectory: string; + subscribeOpts?: Options; + dispatchChange: (path: string) => Promise; + stopWatching: () => Promise; + subscribeCallbackMock: Mock; + subscribeMock: Mock; + onWatchTriggeredMock: Mock; + unsubscribeMock: Mock; +} + /** * Helper function for asserting that multiple paths did or did not trigger a build, * and for asserting the values of paths and globs passed to {@link ParcelWatcher.Options}`["ignore"]` */ export const assertBuildTriggers = async ( - mockWatcher: Awaited>, + mockWatcher: MockWatcher, { shouldTriggerBuild, shouldNotTriggerBuild, @@ -104,11 +115,12 @@ export const assertBuildTriggers = async ( } ) => { const { - onWatchTriggered, + onWatchTriggeredMock, dispatchChange, stopWatching, - subscribeCallbackSpy, - unsubscribeSpy, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, watchDirectory, subscribeOpts, } = mockWatcher; @@ -120,21 +132,25 @@ export const assertBuildTriggers = async ( // Wrap in a try/finally block so even if there's an error, we can stop the watcher // This way, we avoid misleading "cannot log after tests are done" error try { + expect(subscribeMock).toHaveBeenCalledTimes(1); + expect(subscribeMock.mock.calls[0][0]).toBe(watchDirectory); + expect(subscribeMock.mock.calls[0][2]).toStrictEqual(subscribeOpts); + for (const relPath of shouldTriggerBuild) { const path = join(process.cwd(), relPath); - await assertTriggeredBuild(path, { dispatchChange, subscribeCallbackSpy, onWatchTriggered }); + await assertTriggeredBuild(path, { dispatchChange, subscribeCallbackMock, onWatchTriggeredMock }); } - expect(subscribeCallbackSpy).toHaveBeenCalledTimes(shouldTriggerBuild.length); - expect(onWatchTriggered).toHaveBeenCalledTimes(shouldTriggerBuild.length); + expect(subscribeCallbackMock).toHaveBeenCalledTimes(shouldTriggerBuild.length); + expect(onWatchTriggeredMock).toHaveBeenCalledTimes(shouldTriggerBuild.length); for (const relPath of shouldNotTriggerBuild) { const path = join(process.cwd(), relPath); - await assertDidNotTriggerBuild(path, { dispatchChange, subscribeCallbackSpy, onWatchTriggered }); + await assertDidNotTriggerBuild(path, { dispatchChange, subscribeCallbackMock, onWatchTriggeredMock }); } - expect(subscribeCallbackSpy).toHaveBeenCalledTimes(shouldTriggerBuild.length + shouldNotTriggerBuild.length); - expect(onWatchTriggered).toHaveBeenCalledTimes(shouldTriggerBuild.length); + expect(subscribeCallbackMock).toHaveBeenCalledTimes(shouldTriggerBuild.length + shouldNotTriggerBuild.length); + expect(onWatchTriggeredMock).toHaveBeenCalledTimes(shouldTriggerBuild.length); const ignore = subscribeOpts.ignore ?? []; if (pathsWouldBeIgnoredByParcelWatcher) { @@ -172,22 +188,22 @@ export const assertBuildTriggers = async ( } finally { if (keepWatching !== true) { await stopWatching(); - expect(unsubscribeSpy).toHaveBeenCalled(); + expect(unsubscribeMock).toHaveBeenCalledTimes(1); } } }; /** - * Given a glob pattern, assert that {@link ParcelWatcher.options}`["ignore"]` + * Given a glob pattern, assert that {@link Options}`["ignore"]` * contains that glob pattern (exact match). * * We don't implement actual globbing logic, because Parcel Watcher does that * from C++ and it would be a leaky mock. */ const assertParcelWouldIgnoreGlob = ( - /** Glob pattern expected to exist in {@link ParcelWatcher.Options}`["ignore"]` */ + /** Glob pattern expected to exist in {@link Options}`["ignore"]` */ expectToIgnoreGlob: string, - { ignore, watchDirectory }: { watchDirectory: string; ignore: Required['ignore'] } + { ignore, watchDirectory }: { watchDirectory: string; ignore: Required['ignore'] } ) => { const parcelIgnoredGlobs = ignore.filter(pathOrGlob => isGlob(pathOrGlob)); @@ -225,7 +241,7 @@ const assertParcelWouldIgnorePath = ( ignore, }: { watchDirectory: string; - ignore: Required['ignore']; + ignore: Required['ignore']; } ) => { const parcelIgnoredPaths = ignore.filter(pathOrGlob => !isGlob(pathOrGlob)); @@ -267,8 +283,8 @@ const assertParcelWouldIgnorePath = ( }; type MockWatcherAssertionHelpers = Pick< - Awaited>, - 'dispatchChange' | 'subscribeCallbackSpy' | 'onWatchTriggered' + MockWatcher, + 'dispatchChange' | 'subscribeCallbackMock' | 'onWatchTriggeredMock' >; /** @@ -276,12 +292,12 @@ type MockWatcherAssertionHelpers = Pick< */ const assertTriggeredBuild = async ( /** Absolute path */ path: string, - { dispatchChange, subscribeCallbackSpy, onWatchTriggered }: MockWatcherAssertionHelpers + { dispatchChange, subscribeCallbackMock, onWatchTriggeredMock }: MockWatcherAssertionHelpers ) => { try { await dispatchChange(path); - expect(subscribeCallbackSpy).toHaveBeenLastCalledWith(undefined, [{ path, type: 'update' }]); - expect(onWatchTriggered).toHaveBeenLastCalledWith('update', path); + expect(subscribeCallbackMock).toHaveBeenLastCalledWith(undefined, [{ path, type: 'update' }]); + expect(onWatchTriggeredMock).toHaveBeenLastCalledWith('update', path); } catch (error) { error.message = formatBuildTriggerErrorPrelude(path, true, error.message); Error.captureStackTrace(error, assertTriggeredBuild); @@ -294,12 +310,12 @@ const assertTriggeredBuild = async ( */ const assertDidNotTriggerBuild = async ( /** Absolute path */ path: string, - { dispatchChange, subscribeCallbackSpy, onWatchTriggered }: MockWatcherAssertionHelpers + { dispatchChange, subscribeCallbackMock, onWatchTriggeredMock }: MockWatcherAssertionHelpers ) => { try { await dispatchChange(path); - expect(subscribeCallbackSpy).toHaveBeenLastCalledWith(undefined, [{ path, type: 'update' }]); - expect(onWatchTriggered).not.toHaveBeenLastCalledWith('update', path); + expect(subscribeCallbackMock).toHaveBeenLastCalledWith(undefined, [{ path, type: 'update' }]); + expect(onWatchTriggeredMock).not.toHaveBeenLastCalledWith('update', path); } catch (error) { error.message = formatBuildTriggerErrorPrelude(path, false, error.message); Error.captureStackTrace(error, assertDidNotTriggerBuild); diff --git a/packages/graphql-codegen-cli/tests/watcher-test-helpers/setup-mock-watcher.ts b/packages/graphql-codegen-cli/tests/watcher-test-helpers/setup-mock-watcher.ts deleted file mode 100644 index bf0883a3044..00000000000 --- a/packages/graphql-codegen-cli/tests/watcher-test-helpers/setup-mock-watcher.ts +++ /dev/null @@ -1,249 +0,0 @@ -import type { SubscribeCallback } from '@parcel/watcher'; -import ParcelWatcher from '@parcel/watcher'; -import { CodegenContext } from '../../src/config.js'; -import * as fs from '../../src/utils/file-system.js'; -import { createWatcher } from '../../src/utils/watcher.js'; -import { Types } from '@graphql-codegen/plugin-helpers'; - -/** - * Setup mocking infrastructure for a fake watcher. - * - * **IMPORTANT**: Make sure to call the returned {@link stopWatching `stopWatching()`} - * function at the end of each test that uses this, or Jest will complain about unterminated promises. - * If you're using the `assertBuildTriggers` helper, it will call `stopWatching` for you. - * - * @returns Various helpers and spies for making assertions about change events and rebuild triggers - */ -export const setupMockWatcher = async ( - /** - * Same argument as first parameter of {@link CodegenContext} constructor - * - * If `config.hooks.onWatchTriggered` lifecycle hook is not provided, then - * it will be set to a mocked function (which in all cases will be part of - * the return value of {@link setupMockWatcher}). - */ - contextOpts: ConstructorParameters[0] -) => { - const onWatchTriggered = createMockOnWatchTriggered(); - - contextOpts.config = { - hooks: { - onWatchTriggered, - ...contextOpts.config?.hooks, - }, - ...contextOpts.config, - }; - - const context = new CodegenContext(contextOpts); - - const deferredParcelWatcher = deferMockedParcelWatcher(); - const { stopWatching, runningWatcher } = createWatcher(context, async _ => Promise.resolve([])); - - const { dispatchChange, subscribeCallbackSpy, unsubscribeSpy, watchDirectory, subscribeOpts } = - await deferredParcelWatcher; - - return { - /** - * The {@link CodegenContext} created from the given contextOpts, which represents - * the same {@link CodegenContext} that would be created with `new CodegenContext(contextOpts)`, - * but is guaranteed to have defined lifecycle hook `Config.hooks.onWatchTriggered` - */ - context, - /** - * The function passed to `config.hooks.onWatchTriggered`. If it was not provided - * in the first parameter of {@link setupMockWatcher}, then it will be a mocked function. - * - * This lifecycle hook should only be expected to be called when a rebuild - * is triggered for the watcher, i.e. not for every event. To make assertions - * on every event, use {@link subscribeCallbackSpy} that is returned along with this function. - */ - onWatchTriggered: contextOpts.config.hooks.onWatchTriggered, - /** - * Call this functon to stop the mock watching promise (which otherwise will not terminate). - * - * This _must be called_ at the end of each test to avoid unhandled promises. - * - * Note that the assertion helper `assertBuildTriggers` will call `await stopWatching()`, - * so any test using that helper does not need to call it. - */ - stopWatching, - /** - * Promise that is pending as long as the watcher is running. - * - * There should be no need to manually await this, because `await stopWatching()` - * will also wait for this same `runningWatcher` promise to resolve. - */ - runningWatcher, - /** - * Asynchronous function for dispatching file change events, - * _which only resolves after the {@link ParcelWatcher.SubscribeCallback | subscription callback} - * has completed consuming the event._ - */ - dispatchChange, - /** - * Spy on the value of the asynchronous {@link ParcelWatcher.SubscribeCallback} - * that the implementing code provided as an argument - * to {@link ParcelWatcher.subscribe | `@parcel/watch.subscribe`} - * - * This function is called for _every_ change event, so it's a useful spy - * for making assertions about events that did _not_ call {@link onWatchTriggered} - * - * NOTE: Our mock does not implement {@link ParcelWatcher.Options}`["ignore"]` - * logic, so even if a path would be ignored, this spy will still be called. - * But it's possible to make assertions on ignored paths/globs by testing - * their values in {@link subscribeOpts} (or using the `assertBuildTriggers` helper). - */ - subscribeCallbackSpy, - /** - * Mocked function implementing {@link ParcelWatcher.AsyncSubscription}`['unsubscribe']` - * to spy on `subscription.unsubscribe()` which should be called by implementing - * code when closing the subscription - */ - unsubscribeSpy, - /** - * The argument that was provided to {@link ParcelWatcher.subscribe | @parcel/watch.subscribe} - * which indicates the directory for the Parcel Watcher to watch. - */ - watchDirectory, - /** - * The {@link ParcelWatcher.Options} argument that may have been provided to - * {@link ParcelWatcher.subscribe | @parcel/watch.subscribe}, which will - * include, for example, the `ignore` key that contains ignored paths and globs that - * should never cause the subscription callback to be called. - * - * NOTE: This mock does _not_ implement the Parcel Watcher `shouldIgnore` check, - * because that's implemented by Parcel Watcher in C++ and there is no sense - * duplicating it in JS. So if you want to make assertions about ignored paths, - * you should limit it to assertions about which paths end up in `subscribeOpts.ignore`, - * and otherwise assume that Parcel Watcher will work as expected. For making - * these assertions, see the `assertBuildTriggers` helper. - */ - subscribeOpts, - }; -}; - -/** - * Setup global mocks for [file-system.ts](../src/utils/file-system.ts) and {@link process.cwd}. - */ -export const setupMockFilesystem = ( - /** - * Optionally provide the mock implementations for any {@link fs} functions - * exported from [file-system.ts](../src/utils/file-system.ts) - * - * Default: - * * {@link fs.writeFile | `writeFile`}: no-op - * * {@link fs.readFile | `readFile`}: return blank string - * * {@link fs.access | `access` }: return `void` (indicates file is accessible, since no error is thrown) - */ - implementations?: Partial -) => { - const mockedFsSpies = { - /** Don't write any file */ - writeFile: jest.spyOn(fs, 'writeFile').mockImplementation(implementations?.writeFile), - /** Read a blank file */ - readFile: jest.spyOn(fs, 'readFile').mockImplementation(implementations?.readFile ?? (async () => '')), - /** Always accessible (void means accesible, it throws otherwise) */ - access: jest.spyOn(fs, 'access').mockImplementation(implementations?.access ?? (async () => {})), - }; - - return { - /** - * The spy functions created for the {@link fs} module, either those provided - * by {@link implementations} or {@link mockedFsSpies | the defaults}. - */ - fsSpies: mockedFsSpies, - }; -}; - -/** - * Create a mocked function for the `onWatchTriggered` lifecycle hook, which can - * be pased as a value to `Config.hooks.onWatchTriggered`, and is useful for making - * assertions about when a rebuild was triggered, since this lifecycle hook is - * only supposed to be called when a file change event triggers a rebuild. - * - * @returns Mocked function that can be passed as a lifecycle hook to `Config.hooks.onWatchTriggered` - */ -const createMockOnWatchTriggered = () => jest.fn, Parameters>(); - -/** Function to call to dispatch a change and wait for it to be processed by subscription listener */ -type DispatchChange = (path: string, eventType?: ParcelWatcher.EventType) => Promise; -/** Mocked @parcel/watcher.SubscribeCallback */ -type SubscribeCallbackMock = jest.Mock, Parameters>; -/** Convenience type alias for the unsubscribe function of ParcelWatcher subcription */ -type ParcelUnsubscribe = ParcelWatcher.AsyncSubscription['unsubscribe']; -/** Mocked ParcelUnsubscribe */ -type UnsubscribeMock = jest.Mock, Parameters>; - -/** - * Mock {@link ParcelWatcher | `@parcel/watcher`} module to override {@link ParcelWatcher.subscribe | `@parcel/watcher.subscribe`} - * with a function that intercepts the provided {@link ParcelWatcher.SubscribeCallback}, - * spies on it, and then calls the {@link mockOnSubscribed} function once it's been setup. - */ -const mockParcelWatcher = ( - /** - * Callback to execute once {@link ParcelWatcher.subscribe | `@parcel/watcher.subscribe`} has been called - * - * NOTE: Prefixed with mock to opt out of Jest warning about uninitialized mocked - * variables, since we're intentionally initializing it lazily - */ - mockOnSubscribed: (opts: { - watchDirectory: string; - subscribeOpts?: ParcelWatcher.Options; - dispatchChange: DispatchChange; - subscribeCallbackSpy: SubscribeCallbackMock; - unsubscribeSpy: UnsubscribeMock; - }) => void -) => { - let mockOnEvent: SubscribeCallbackMock; - const mockUnsubscribe: UnsubscribeMock = jest.fn, undefined>(() => Promise.resolve()); - - jest.mock('@parcel/watcher', () => ({ - subscribe: async ( - watchDirectory: string, - subscribeCallback: SubscribeCallbackMock, - subscribeOpts?: ParcelWatcher.Options - ) => { - mockOnEvent = jest.fn(subscribeCallback); - - mockOnSubscribed({ - watchDirectory, - subscribeOpts, - unsubscribeSpy: mockUnsubscribe, - subscribeCallbackSpy: mockOnEvent, - dispatchChange: async (path: string, eventType: ParcelWatcher.EventType = 'update') => { - await mockOnEvent(undefined, [ - { - type: eventType, - path, - }, - ]); - }, - }); - - return { - unsubscribe: mockUnsubscribe, - }; - }, - })); -}; - -/** - * Return a Promise that will mock the global {@link ParcelWatcher | `@parcel/watcher`} module, - * and that will only resolve once {@link ParcelWatcher.subscribe | `@parcel/watcher.subscribe`} - * has been called (presumably by the implementing code that is implicitly consuming the mock). - * - * @returns Promise that resolves after mocked @parcel/watcher.subscribe has been called - */ -const deferMockedParcelWatcher = () => { - return new Promise<{ - dispatchChange: DispatchChange; - subscribeCallbackSpy: SubscribeCallbackMock; - unsubscribeSpy: UnsubscribeMock; - watchDirectory: string; - subscribeOpts?: ParcelWatcher.Options; - }>((resolve, _reject) => { - mockParcelWatcher(opts => { - resolve(opts); - }); - }); -}; diff --git a/packages/graphql-codegen-cli/tests/watcher.spec.ts b/packages/graphql-codegen-cli/tests/watcher.spec.ts index 6d690042ddb..a89ca46e472 100644 --- a/packages/graphql-codegen-cli/tests/watcher.spec.ts +++ b/packages/graphql-codegen-cli/tests/watcher.spec.ts @@ -1,26 +1,51 @@ -import { setupMockFilesystem, setupMockWatcher } from './watcher-test-helpers/setup-mock-watcher.js'; +import * as fs from '../src/utils/file-system.js'; +import type { SubscribeCallback } from '@parcel/watcher'; import { assertBuildTriggers } from './watcher-test-helpers/assert-watcher-build-triggers.js'; import { join } from 'path'; +import { createWatcher } from '../src/utils/watcher.js'; +import { CodegenContext } from '../src/config.js'; +import type { Mock } from 'vitest'; + +const unsubscribeMock = vi.fn(); +const subscribeMock = vi.fn(); +let subscribeCallbackMock: Mock; + +vi.mock('@parcel/watcher', () => ({ + subscribe: subscribeMock.mockImplementation((watchDirectory: string, subscribeCallback: SubscribeCallback) => { + subscribeCallbackMock = vi.fn(subscribeCallback); + return { + unsubscribe: unsubscribeMock, + }; + }), +})); + +const setupMockWatcher = async (codegenContext: ConstructorParameters[0]) => { + const { stopWatching } = createWatcher(new CodegenContext(codegenContext), async () => Promise.resolve([])); + + const dispatchChange = async (path: string) => subscribeCallbackMock(undefined, [{ type: 'update', path }]); + + // createWatcher doesn't set up subscription immediately, so we wait for a tick before continuing + await new Promise(resolve => setTimeout(resolve, 10)); + + return { stopWatching, dispatchChange }; +}; describe('Watch targets', () => { beforeEach(() => { - // Silence logs - jest.spyOn(console, 'log').mockImplementation(); - jest.spyOn(console, 'info').mockImplementation(); - - setupMockFilesystem(); - }); + vi.clearAllMocks(); - afterEach(() => { - jest.resetAllMocks(); - // IMPORTANT: setupMockWatcher() mocks @parcel/watcher module, so we must reset modules - jest.resetModules(); + // Silence logs + vi.spyOn(console, 'log').mockImplementation(() => {}); + vi.spyOn(console, 'info').mockImplementation(() => {}); }); test('watches the longest common prefix directory', async () => { - const { stopWatching, watchDirectory } = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + + const { stopWatching } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: vi.fn() }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -30,14 +55,18 @@ describe('Watch targets', () => { }, }); - expect(watchDirectory).toBe(join(process.cwd(), 'foo')); + expect(subscribeMock).toHaveBeenCalledTimes(1); + expect(subscribeMock.mock.calls[0][0]).toBe(join(process.cwd(), 'foo')); await stopWatching(); }); test('ignores schema URLs when detecting common prefix directory', async () => { - const { stopWatching, watchDirectory } = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + + const { stopWatching } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: vi.fn() }, schema: 'http://localhost/graphql', generates: { ['./foo/some-output.ts']: { @@ -47,22 +76,22 @@ describe('Watch targets', () => { }, }); - expect(watchDirectory).toBe(join(process.cwd(), 'foo')); + expect(subscribeMock).toHaveBeenCalledTimes(1); + expect(subscribeMock.mock.calls[0][0]).toBe(join(process.cwd(), 'foo')); await stopWatching(); }); test('watches process.cwd() when longest common prefix directory is not accessible', async () => { - setupMockFilesystem({ - access: async path => { - if (path === join(process.cwd(), 'foo')) { - throw new Error(); - } - }, + vi.spyOn(fs, 'access').mockImplementation(async path => { + if (path === join(process.cwd(), 'foo')) { + throw new Error(); + } }); - const { stopWatching, watchDirectory } = await setupMockWatcher({ + const { stopWatching } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: vi.fn() }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -72,50 +101,61 @@ describe('Watch targets', () => { }, }); - expect(watchDirectory).toBe(join(process.cwd())); + expect(subscribeMock).toHaveBeenCalledTimes(1); + expect(subscribeMock.mock.calls[0][0]).toBe(process.cwd()); await stopWatching(); }); // This test uses manual assertions to make sure they're tested individually, // but note that `assertBuildTriggers` can do most of this work for you test('triggers a rebuild for basic case', async () => { - const { onWatchTriggered, dispatchChange, stopWatching, subscribeCallbackSpy, unsubscribeSpy, watchDirectory } = - await setupMockWatcher({ - filepath: './foo/some-config.ts', - config: { - schema: './foo/something.ts', - generates: { - ['./foo/some-output.ts']: { - documents: ['./foo/bar/*.graphql'], - }, + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ + filepath: './foo/some-config.ts', + config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, + schema: './foo/something.ts', + generates: { + ['./foo/some-output.ts']: { + documents: ['./foo/bar/*.graphql'], }, }, - }); + }, + }); - expect(watchDirectory).toBe(join(process.cwd(), 'foo')); + expect(subscribeMock).toHaveBeenCalledTimes(1); + expect(subscribeMock.mock.calls[0][0]).toBe(join(process.cwd(), 'foo')); const shouldTriggerBuild = join(process.cwd(), './foo/bar/fizzbuzz.graphql'); const shouldNotTriggerBuild = join(process.cwd(), './foo/bar/something.ts'); await dispatchChange(shouldTriggerBuild); - expect(subscribeCallbackSpy).toHaveBeenLastCalledWith(undefined, [{ path: shouldTriggerBuild, type: 'update' }]); - expect(onWatchTriggered).toHaveBeenLastCalledWith('update', shouldTriggerBuild); + expect(subscribeCallbackMock).toHaveBeenLastCalledWith(undefined, [{ path: shouldTriggerBuild, type: 'update' }]); + expect(onWatchTriggeredMock).toHaveBeenLastCalledWith('update', shouldTriggerBuild); await dispatchChange(shouldNotTriggerBuild); - expect(subscribeCallbackSpy).toHaveBeenLastCalledWith(undefined, [{ path: shouldNotTriggerBuild, type: 'update' }]); - expect(onWatchTriggered).not.toHaveBeenLastCalledWith('update', shouldNotTriggerBuild); - expect(onWatchTriggered).toHaveBeenCalledTimes(1); + expect(subscribeCallbackMock).toHaveBeenLastCalledWith(undefined, [ + { path: shouldNotTriggerBuild, type: 'update' }, + ]); + expect(onWatchTriggeredMock).not.toHaveBeenLastCalledWith('update', shouldNotTriggerBuild); + expect(onWatchTriggeredMock).toHaveBeenCalledTimes(1); - expect(subscribeCallbackSpy).toHaveBeenCalledTimes(2); + expect(subscribeCallbackMock).toHaveBeenCalledTimes(2); await stopWatching(); - expect(unsubscribeSpy).toHaveBeenCalled(); + expect(unsubscribeMock).toHaveBeenCalled(); }); test('globally included paths should be included even when a local pattern negates them', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: ['./foo/**/match-schema-everywhere.graphql'], watch: [ 'foo/**/match-watch-everywhere.graphql', @@ -140,43 +180,59 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: [ - // watch - './foo/match-watch-everywhere.graphql', - './foo/fizz/match-watch-everywhere.graphql', - './foo/fizz/buzz/match-watch-everywhere.graphql', - './foo/fizz/buzz/foobarbaz/match-watch-everywhere.graphql', - // watch-doc (matched in global watch, excluded in local doc) - './foo/match-watch-doc-everywhere.graphql', - './foo/fizz/match-watch-doc-everywhere.graphql', - './foo/fizz/buzz/match-watch-doc-everywhere.graphql', - './foo/fizz/buzz/foobarbaz/match-watch-doc-everywhere.graphql', - // watch-schema (matched in global watch, excluded in local schema) - './foo/match-watch-schema-everywhere.graphql', - './foo/fizz/match-watch-schema-everywhere.graphql', - './foo/fizz/buzz/match-watch-schema-everywhere.graphql', - './foo/fizz/buzz/foobarbaz/match-watch-schema-everywhere.graphql', - // doc - './foo/match-doc-everywhere.graphql', - './foo/fizz/match-doc-everywhere.graphql', - './foo/fizz/buzz/match-doc-everywhere.graphql', - './foo/fizz/buzz/foobarbaz/match-doc-everywhere.graphql', - // schema - './foo/match-schema-everywhere.graphql', - './foo/fizz/match-schema-everywhere.graphql', - './foo/fizz/buzz/match-schema-everywhere.graphql', - './foo/fizz/buzz/foobarbaz/match-schema-everywhere.graphql', - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'local-exclusions-dont-precede-global-inclusions.ts'], + }, + }, + { + shouldTriggerBuild: [ + // watch + './foo/match-watch-everywhere.graphql', + './foo/fizz/match-watch-everywhere.graphql', + './foo/fizz/buzz/match-watch-everywhere.graphql', + './foo/fizz/buzz/foobarbaz/match-watch-everywhere.graphql', + // watch-doc (matched in global watch, excluded in local doc) + './foo/match-watch-doc-everywhere.graphql', + './foo/fizz/match-watch-doc-everywhere.graphql', + './foo/fizz/buzz/match-watch-doc-everywhere.graphql', + './foo/fizz/buzz/foobarbaz/match-watch-doc-everywhere.graphql', + // watch-schema (matched in global watch, excluded in local schema) + './foo/match-watch-schema-everywhere.graphql', + './foo/fizz/match-watch-schema-everywhere.graphql', + './foo/fizz/buzz/match-watch-schema-everywhere.graphql', + './foo/fizz/buzz/foobarbaz/match-watch-schema-everywhere.graphql', + // doc + './foo/match-doc-everywhere.graphql', + './foo/fizz/match-doc-everywhere.graphql', + './foo/fizz/buzz/match-doc-everywhere.graphql', + './foo/fizz/buzz/foobarbaz/match-doc-everywhere.graphql', + // schema + './foo/match-schema-everywhere.graphql', + './foo/fizz/match-schema-everywhere.graphql', + './foo/fizz/buzz/match-schema-everywhere.graphql', + './foo/fizz/buzz/foobarbaz/match-schema-everywhere.graphql', + ], + } + ); }); test('globally negated paths should be excluded even when a local pattern matches them', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: ['!**/exclude-schema-everywhere.graphql'], watch: [ '!**/exclude-watch-everywhere.graphql', @@ -204,23 +260,39 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldNotTriggerBuild: [ - 'foo/global-beats-local/exclude-watch-everywhere.graphql', - 'foo/global-beats-local/exclude-doc-everywhere.graphql', - 'foo/global-beats-local/exclude-schema-everywhere.graphql', - 'foo/global-beats-local/exclude-watch-doc-everywhere.graphql', - 'foo/global-beats-local/exclude-watch-schema-everywhere.graphql', - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'local-inclusions-dont-precede-global-exclusions.ts'], + }, + }, + { + shouldNotTriggerBuild: [ + 'foo/global-beats-local/exclude-watch-everywhere.graphql', + 'foo/global-beats-local/exclude-doc-everywhere.graphql', + 'foo/global-beats-local/exclude-schema-everywhere.graphql', + 'foo/global-beats-local/exclude-watch-doc-everywhere.graphql', + 'foo/global-beats-local/exclude-watch-schema-everywhere.graphql', + ], + } + ); }); test('local watchPattern negation should override local documents match', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -231,18 +303,34 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: ['./foo/bar/okay-doc.graphql'], - shouldNotTriggerBuild: ['./foo/bar/never-watch.graphql'], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'some-output.ts'], + }, + }, + { + shouldTriggerBuild: ['./foo/bar/okay-doc.graphql'], + shouldNotTriggerBuild: ['./foo/bar/never-watch.graphql'], + } + ); }); test('local negations in documents set should override match in same documents set', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -252,18 +340,34 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: ['./foo/bar/okay.graphql'], - shouldNotTriggerBuild: ['./foo/bar/never.graphql'], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'some-output.ts'], + }, + }, + { + shouldTriggerBuild: ['./foo/bar/okay.graphql'], + shouldNotTriggerBuild: ['./foo/bar/never.graphql'], + } + ); }); test('local watchPattern negation should override local schema match', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -274,18 +378,34 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: ['./foo/bar/okay-doc.graphql'], - shouldNotTriggerBuild: ['./foo/bar/never-watch.graphql'], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'some-output.ts'], + }, + }, + { + shouldTriggerBuild: ['./foo/bar/okay-doc.graphql'], + shouldNotTriggerBuild: ['./foo/bar/never-watch.graphql'], + } + ); }); test('local negations in schema set should override match in same schema set', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: './foo/something.ts', generates: { ['./foo/some-output.ts']: { @@ -295,18 +415,34 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: ['./foo/bar/okay.graphql'], - shouldNotTriggerBuild: ['./foo/bar/never.graphql'], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'some-output.ts'], + }, + }, + { + shouldTriggerBuild: ['./foo/bar/okay.graphql'], + shouldNotTriggerBuild: ['./foo/bar/never.graphql'], + } + ); }); test('match in one local group, negated in another group, should still match', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: './foo/something.ts', generates: { // match in one local group, negation in another local group, should still match @@ -340,23 +476,39 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: [ - './foo/alphabet/docs/zeta.graphql', - './foo/alphabet/docs/sigma.graphql', - './foo/alphabet/schema/zeta.graphql', - './foo/alphabet/schema/sigma.graphql', - './foo/alphabet/schema/delta.graphql', - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'alphabet/types-no-sigma.ts', 'alphabet/types-no-zeta.ts'], + }, + }, + { + shouldTriggerBuild: [ + './foo/alphabet/docs/zeta.graphql', + './foo/alphabet/docs/sigma.graphql', + './foo/alphabet/schema/zeta.graphql', + './foo/alphabet/schema/sigma.graphql', + './foo/alphabet/schema/delta.graphql', + ], + } + ); }); test('output directories with presetConfig create glob patterns ignored by parcel watcher', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, generates: { ['./foo/some-preset-bar/']: { preset: 'near-operation-file', @@ -379,27 +531,47 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - // note: since our mock does not implement ParcelWatcher's shouldIgnore logic, - // we can't actually test shouldNotTriggerBuild, because the subscription callback - // will still be called. For that reason, we only check that the globs were passed - // to ParcelWatcher.Options["ignore"] as expected (hence _would_BeIgnoredByParcelWatcher) - shouldNotTriggerBuild: [], - globsWouldBeIgnoredByParcelWatcher: [ - // note: globs are tested for exact match with argument passed to subscribe options, - // so they should be specified relative from watchDirectory, _not_ cwd (see typedoc) - 'some-preset-bar/**/*.generated.tsx', - 'some-preset-without-trailing-slash/**/*.fizzbuzz.tsx', - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: [ + '**/.git/**', + 'some-preset-bar/**/*.generated.tsx', + 'some-preset-without-trailing-slash/**/*.fizzbuzz.tsx', + ], + }, + }, + { + // note: since our mock does not implement ParcelWatcher's shouldIgnore logic, + // we can't actually test shouldNotTriggerBuild, because the subscription callback + // will still be called. For that reason, we only check that the globs were passed + // to ParcelWatcher.Options["ignore"] as expected (hence _would_BeIgnoredByParcelWatcher) + shouldNotTriggerBuild: [], + globsWouldBeIgnoredByParcelWatcher: [ + // note: globs are tested for exact match with argument passed to subscribe options, + // so they should be specified relative from watchDirectory, _not_ cwd (see typedoc) + 'some-preset-bar/**/*.generated.tsx', + 'some-preset-without-trailing-slash/**/*.fizzbuzz.tsx', + ], + } + ); }); test('output files are ignored by parcel watcher, but would not trigger rebuild anyway', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './foo/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, generates: { ['./foo/some-output.ts']: { documents: ['./foo/bar/*.graphql', '!./foo/bar/never.graphql'], @@ -408,23 +580,35 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'foo')); - - await assertBuildTriggers(mockWatcher, { - // NOTE: Unlike the test with output _directories_, we can actually assert - // that we wouldn't build output files, even if they were _not_ passed - // to ParcelWatcher.Options[ignore], because we don't include output files - // in our pattern matching (but there is no logic for output directories) - shouldNotTriggerBuild: [ - './foo/some-output.ts', // output file (note: should be ignored by parcel anyway) - ], - pathsWouldBeIgnoredByParcelWatcher: [ - // note: expectations should be relative from cwd; assertion helper converts - // the values received by parcelWatcher to match before testing them (see typedoc) - './foo/some-output.ts', // output file - 'foo/some-output.ts', // output file - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'foo'), + subscribeOpts: { + ignore: ['**/.git/**', 'some-output.ts'], + }, + }, + { + // NOTE: Unlike the test with output _directories_, we can actually assert + // that we wouldn't build output files, even if they were _not_ passed + // to ParcelWatcher.Options[ignore], because we don't include output files + // in our pattern matching (but there is no logic for output directories) + shouldNotTriggerBuild: [ + './foo/some-output.ts', // output file (note: should be ignored by parcel anyway) + ], + pathsWouldBeIgnoredByParcelWatcher: [ + // note: expectations should be relative from cwd; assertion helper converts + // the values received by parcelWatcher to match before testing them (see typedoc) + './foo/some-output.ts', // output file + 'foo/some-output.ts', // output file + ], + } + ); }); // NOTE: Each individual aspect of this test should be covered by its own isolated test above, @@ -433,9 +617,13 @@ describe('Watch targets', () => { // However, all instances of "foo" have been changed to "fuzz", so that if a test fails, // ctrl+f for the failing expectation will be easier to find the right place test('all expectations also work in a big combined config', async () => { - const mockWatcher = await setupMockWatcher({ + vi.spyOn(fs, 'access').mockImplementation(() => Promise.resolve()); + const onWatchTriggeredMock = vi.fn(); + + const { stopWatching, dispatchChange } = await setupMockWatcher({ filepath: './fuzz/some-config.ts', config: { + hooks: { onWatchTriggered: onWatchTriggeredMock }, schema: [ './fuzz/something.ts', './fuzz/**/match-schema-everywhere.graphql', @@ -495,71 +683,92 @@ describe('Watch targets', () => { }, }); - expect(mockWatcher.watchDirectory).toBe(join(process.cwd(), 'fuzz')); - - await assertBuildTriggers(mockWatcher, { - shouldTriggerBuild: [ - './fuzz/some-config.ts', // config file - './fuzz/bar/fizzbuzz.graphql', - './fuzz/some-other-bar/schemas/fizzbuzz.graphql', // included by wildcard - // - // match in one local group, negation in another local group, should still match - './fuzz/alphabet/queries/zeta.graphql', // excluded in types-no-zeta, but included in types-no-sigma - './fuzz/alphabet/queries/sigma.graphql', // excluded in types-no-sigma, but included in types-no-sigma - // - // globally inclued paths should be included even when a local pattern negates them - // watch - './fuzz/match-watch-everywhere.graphql', - './fuzz/fizz/match-watch-everywhere.graphql', - './fuzz/fizz/buzz/match-watch-everywhere.graphql', - './fuzz/fizz/buzz/fuzzbarbaz/match-watch-everywhere.graphql', - // doc - './fuzz/match-doc-everywhere.graphql', - './fuzz/fizz/match-doc-everywhere.graphql', - './fuzz/fizz/buzz/match-doc-everywhere.graphql', - './fuzz/fizz/buzz/fuzzbarbaz/match-doc-everywhere.graphql', - // schema - './fuzz/match-schema-everywhere.graphql', - './fuzz/fizz/match-schema-everywhere.graphql', - './fuzz/fizz/buzz/match-schema-everywhere.graphql', - './fuzz/fizz/buzz/fuzzbarbaz/match-schema-everywhere.graphql', - ], - shouldNotTriggerBuild: [ - // - // paths outside of watch directory should be excluded - '.git/index.lock', // totally unrelated - 'match-watch-everywhere.graphql', // would match pattern if under fuzz - // - // pattern matching should work as expected - './fuzz/bar/something.ts', // unrelated file (non-matching extension) - './fuzz/some-other-bar/nested/directory/blah.graphql', // no greedy pattern (**/*) to match - // - // output files should be excluded - './fuzz/some-output.ts', // output file (note: should be ignored by parcel anyway) - // - // locally negated paths should be excluded even when a local pattern matches them - './fuzz/bar/never.graphql', // excluded in same document set - './fuzz/bar/never-watch.graphql', // excluded by local watchPattern, matched by local docs - './fuzz/some-other-bar/schemas/never-schema.graphql', // excluded by local schema group - './fuzz/some-other-bar/schemas/never-watch-schema.graphql', // excluded by local watchPattern group - // - // globally negated paths should be excluded even when a local pattern matches them - './fuzz/alphabet/queries/exclude-watch-everywhere.graphql', // included in types-no-sigma.ts, but globaly excluded - 'fuzz/global-beats-local/exclude-watch-everywhere.graphql', - 'fuzz/global-beats-local/exclude-doc-everywhere.graphql', - 'fuzz/global-beats-local/exclude-schema-everywhere.graphql', - ], - pathsWouldBeIgnoredByParcelWatcher: [ - // note: expectations should be relative from cwd; assertion helper converts - // the values received by parcelWatcher to match before testing them (see typedoc) - './fuzz/some-output.ts', // output file - 'fuzz/some-output.ts', // output file - ], - globsWouldBeIgnoredByParcelWatcher: [ - // note: globs are tested for exact match with argument passed to subscribe options, - // so they should be specified relative from watchDirectory, _not_ cwd (see typedoc) - 'some-preset-bar/**/*.generated.tsx', // output of preset - ], - }); + await assertBuildTriggers( + { + onWatchTriggeredMock, + dispatchChange, + stopWatching, + subscribeCallbackMock, + subscribeMock, + unsubscribeMock, + watchDirectory: join(process.cwd(), 'fuzz'), + subscribeOpts: { + ignore: [ + '**/.git/**', + 'local-exclusions-dont-precede-global-inclusions.ts', + 'local-inclusions-dont-precede-global-exclusions.ts', + 'some-output.ts', + 'some-other-output.ts', + 'alphabet/types-no-sigma.ts', + 'alphabet/types-no-zeta.ts', + 'some-preset-bar/**/*.generated.tsx', + ], + }, + }, + { + shouldTriggerBuild: [ + './fuzz/some-config.ts', // config file + './fuzz/bar/fizzbuzz.graphql', + './fuzz/some-other-bar/schemas/fizzbuzz.graphql', // included by wildcard + // + // match in one local group, negation in another local group, should still match + './fuzz/alphabet/queries/zeta.graphql', // excluded in types-no-zeta, but included in types-no-sigma + './fuzz/alphabet/queries/sigma.graphql', // excluded in types-no-sigma, but included in types-no-sigma + // + // globally inclued paths should be included even when a local pattern negates them + // watch + './fuzz/match-watch-everywhere.graphql', + './fuzz/fizz/match-watch-everywhere.graphql', + './fuzz/fizz/buzz/match-watch-everywhere.graphql', + './fuzz/fizz/buzz/fuzzbarbaz/match-watch-everywhere.graphql', + // doc + './fuzz/match-doc-everywhere.graphql', + './fuzz/fizz/match-doc-everywhere.graphql', + './fuzz/fizz/buzz/match-doc-everywhere.graphql', + './fuzz/fizz/buzz/fuzzbarbaz/match-doc-everywhere.graphql', + // schema + './fuzz/match-schema-everywhere.graphql', + './fuzz/fizz/match-schema-everywhere.graphql', + './fuzz/fizz/buzz/match-schema-everywhere.graphql', + './fuzz/fizz/buzz/fuzzbarbaz/match-schema-everywhere.graphql', + ], + shouldNotTriggerBuild: [ + // + // paths outside of watch directory should be excluded + '.git/index.lock', // totally unrelated + 'match-watch-everywhere.graphql', // would match pattern if under fuzz + // + // pattern matching should work as expected + './fuzz/bar/something.ts', // unrelated file (non-matching extension) + './fuzz/some-other-bar/nested/directory/blah.graphql', // no greedy pattern (**/*) to match + // + // output files should be excluded + './fuzz/some-output.ts', // output file (note: should be ignored by parcel anyway) + // + // locally negated paths should be excluded even when a local pattern matches them + './fuzz/bar/never.graphql', // excluded in same document set + './fuzz/bar/never-watch.graphql', // excluded by local watchPattern, matched by local docs + './fuzz/some-other-bar/schemas/never-schema.graphql', // excluded by local schema group + './fuzz/some-other-bar/schemas/never-watch-schema.graphql', // excluded by local watchPattern group + // + // globally negated paths should be excluded even when a local pattern matches them + './fuzz/alphabet/queries/exclude-watch-everywhere.graphql', // included in types-no-sigma.ts, but globaly excluded + 'fuzz/global-beats-local/exclude-watch-everywhere.graphql', + 'fuzz/global-beats-local/exclude-doc-everywhere.graphql', + 'fuzz/global-beats-local/exclude-schema-everywhere.graphql', + ], + pathsWouldBeIgnoredByParcelWatcher: [ + // note: expectations should be relative from cwd; assertion helper converts + // the values received by parcelWatcher to match before testing them (see typedoc) + './fuzz/some-output.ts', // output file + 'fuzz/some-output.ts', // output file + ], + globsWouldBeIgnoredByParcelWatcher: [ + // note: globs are tested for exact match with argument passed to subscribe options, + // so they should be specified relative from watchDirectory, _not_ cwd (see typedoc) + 'some-preset-bar/**/*.generated.tsx', // output of preset + ], + } + ); }); }); diff --git a/packages/graphql-codegen-cli/vitest.config.ts b/packages/graphql-codegen-cli/vitest.config.ts new file mode 100644 index 00000000000..33aed4fb579 --- /dev/null +++ b/packages/graphql-codegen-cli/vitest.config.ts @@ -0,0 +1,24 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'cli', + setupFiles: './vitest.setup.ts', + include: ['**/*.spec.ts'], + server: { + deps: { + inline: [ + // `@graphql-tools/url-loader` needs to be inlined + // because there is a test that triggers dynamically importing `some-fetch` mocked package + // Without this, `@graphql-tools/url-loader` acts outside of Vitest mocking + // i.e. does not know about the `some-fetch` mocked package + '@graphql-tools/url-loader', + ], + }, + }, + }, + }) +); diff --git a/packages/graphql-codegen-cli/vitest.setup.ts b/packages/graphql-codegen-cli/vitest.setup.ts new file mode 100644 index 00000000000..214bf45518a --- /dev/null +++ b/packages/graphql-codegen-cli/vitest.setup.ts @@ -0,0 +1,5 @@ +import { vi } from 'vitest'; + +process.env.NO_COLOR = '1'; // When running listr2 tests in generate-and-save.spec.ts, do not add colors to avoid failure in CI as different OS may treat colours differently +vi.spyOn(process, 'cwd').mockImplementation(() => __dirname); +vi.mock('some-fetch', () => require('./tests/__mocks__/some-fetch.cjs')); diff --git a/packages/graphql-codegen-core/jest.config.js b/packages/graphql-codegen-core/jest.config.js deleted file mode 100644 index 5aa9167d543..00000000000 --- a/packages/graphql-codegen-core/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../jest.project')({ dirname: __dirname }); diff --git a/packages/graphql-codegen-core/package.json b/packages/graphql-codegen-core/package.json index ce6c8dadf6b..658169509de 100644 --- a/packages/graphql-codegen-core/package.json +++ b/packages/graphql-codegen-core/package.json @@ -9,7 +9,7 @@ }, "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../jest.config.js" + "test": "vitest --no-watch" }, "keywords": [ "gql", diff --git a/packages/graphql-codegen-core/vitest.config.ts b/packages/graphql-codegen-core/vitest.config.ts new file mode 100644 index 00000000000..c8e51560848 --- /dev/null +++ b/packages/graphql-codegen-core/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'core', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/add/jest.config.js b/packages/plugins/other/add/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/add/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/add/vitest.config.ts b/packages/plugins/other/add/vitest.config.ts new file mode 100644 index 00000000000..5e50a002b78 --- /dev/null +++ b/packages/plugins/other/add/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'add', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/fragment-matcher/jest.config.js b/packages/plugins/other/fragment-matcher/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/fragment-matcher/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/fragment-matcher/package.json b/packages/plugins/other/fragment-matcher/package.json index 4fa6e3ef518..e5425c9b341 100644 --- a/packages/plugins/other/fragment-matcher/package.json +++ b/packages/plugins/other/fragment-matcher/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.0.3", diff --git a/packages/plugins/other/fragment-matcher/vitest.config.ts b/packages/plugins/other/fragment-matcher/vitest.config.ts new file mode 100644 index 00000000000..674fa22a2b9 --- /dev/null +++ b/packages/plugins/other/fragment-matcher/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'fragment-matcher', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/introspection/jest.config.js b/packages/plugins/other/introspection/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/introspection/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/introspection/package.json b/packages/plugins/other/introspection/package.json index e9393401079..114fd0ca724 100644 --- a/packages/plugins/other/introspection/package.json +++ b/packages/plugins/other/introspection/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.0.3", diff --git a/packages/plugins/other/introspection/vitest.config.ts b/packages/plugins/other/introspection/vitest.config.ts new file mode 100644 index 00000000000..9a0f860614f --- /dev/null +++ b/packages/plugins/other/introspection/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'introspection', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/schema-ast/jest.config.js b/packages/plugins/other/schema-ast/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/schema-ast/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/schema-ast/package.json b/packages/plugins/other/schema-ast/package.json index b2aaad6dbfe..d33c4457561 100644 --- a/packages/plugins/other/schema-ast/package.json +++ b/packages/plugins/other/schema-ast/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.0.3", diff --git a/packages/plugins/other/schema-ast/vitest.config.ts b/packages/plugins/other/schema-ast/vitest.config.ts new file mode 100644 index 00000000000..6487c88ed22 --- /dev/null +++ b/packages/plugins/other/schema-ast/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'schema-ast', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/time/jest.config.js b/packages/plugins/other/time/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/time/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/time/vitest.config.ts b/packages/plugins/other/time/vitest.config.ts new file mode 100644 index 00000000000..4cdb4a627b8 --- /dev/null +++ b/packages/plugins/other/time/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'time', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/other/visitor-plugin-common/jest.config.js b/packages/plugins/other/visitor-plugin-common/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/other/visitor-plugin-common/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/other/visitor-plugin-common/package.json b/packages/plugins/other/visitor-plugin-common/package.json index b2b34a798c6..8b6dc997550 100644 --- a/packages/plugins/other/visitor-plugin-common/package.json +++ b/packages/plugins/other/visitor-plugin-common/package.json @@ -9,7 +9,7 @@ }, "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-tools/optimize": "^2.0.0", @@ -17,7 +17,7 @@ "@graphql-tools/relay-operation-optimizer": "^7.0.0", "@graphql-tools/utils": "^10.0.0", "auto-bind": "~4.0.0", - "dependency-graph": "^0.11.0", + "dependency-graph": "^1.0.0", "graphql-tag": "^2.11.0", "parse-filepath": "^1.0.2", "change-case-all": "1.0.15", diff --git a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts index 1f883822077..43725b8e367 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts @@ -1,4 +1,4 @@ -import { ApolloFederation, checkObjectTypeFederationDetails, getBaseType } from '@graphql-codegen/plugin-helpers'; +import { ApolloFederation, type FederationMeta, getBaseType } from '@graphql-codegen/plugin-helpers'; import { getRootTypeNames } from '@graphql-tools/utils'; import autoBind from 'auto-bind'; import { @@ -6,9 +6,11 @@ import { DirectiveDefinitionNode, EnumTypeDefinitionNode, FieldDefinitionNode, + GraphQLInterfaceType, GraphQLNamedType, GraphQLObjectType, GraphQLSchema, + GraphQLUnionType, InputValueDefinitionNode, InterfaceTypeDefinitionNode, isEnumType, @@ -18,7 +20,6 @@ import { isUnionType, ListTypeNode, NamedTypeNode, - NameNode, NonNullTypeNode, ObjectTypeDefinitionNode, ScalarTypeDefinitionNode, @@ -33,8 +34,6 @@ import { ConvertOptions, DeclarationKind, EnumValuesMap, - type NormalizedGenerateInternalResolversIfNeededConfig, - type GenerateInternalResolversIfNeededConfig, NormalizedAvoidOptionalsConfig, NormalizedScalarsMap, ParsedEnumValuesMap, @@ -77,19 +76,32 @@ export interface ParsedResolversConfig extends ParsedConfig { resolverTypeSuffix: string; allResolversTypeName: string; internalResolversPrefix: string; - generateInternalResolversIfNeeded: NormalizedGenerateInternalResolversIfNeededConfig; - onlyResolveTypeForInterfaces: boolean; directiveResolverMappings: Record; resolversNonOptionalTypename: ResolversNonOptionalTypenameConfig; avoidCheckingAbstractTypesRecursively: boolean; } -type FieldDefinitionPrintFn = (parentName: string, avoidResolverOptionals: boolean) => string | null; +export interface FieldDefinitionResult { + node: FieldDefinitionNode; + printContent: FieldDefinitionPrintFn; +} + +type FieldDefinitionPrintFn = ( + parentNode: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, + avoidResolverOptionals: boolean +) => { value: string | null; meta: { federation?: { isResolveReference: boolean } } }; export interface RootResolver { content: string; generatedResolverTypes: { resolversMap: { name: string }; - userDefined: Record; + userDefined: Record< + string, + { + name: string; + hasIsTypeOf: boolean; + federation?: { hasResolveReference: boolean }; + } + >; }; } @@ -616,22 +628,6 @@ export interface RawResolversConfig extends RawConfig { * If you are using `mercurius-js`, please set this field to empty string for better compatibility. */ internalResolversPrefix?: string; - /** - * @type object - * @default { __resolveReference: false } - * @description If relevant internal resolvers are set to `true`, the resolver type will only be generated if the right conditions are met. - * Enabling this allows a more correct type generation for the resolvers. - * For example: - * - `__isTypeOf` is generated for implementing types and union members - * - `__resolveReference` is generated for federation types that have at least one resolvable `@key` directive - */ - generateInternalResolversIfNeeded?: GenerateInternalResolversIfNeededConfig; - /** - * @type boolean - * @default false - * @description Turning this flag to `true` will generate resolver signature that has only `resolveType` for interfaces, forcing developers to write inherited type resolvers in the type itself. - */ - onlyResolveTypeForInterfaces?: boolean; /** * @description Makes `__typename` of resolver mappings non-optional without affecting the base types. * @default false @@ -702,7 +698,7 @@ export class BaseResolversVisitor< TRawConfig extends RawResolversConfig = RawResolversConfig, TPluginConfig extends ParsedResolversConfig = ParsedResolversConfig > extends BaseVisitor { - protected _parsedConfig: TPluginConfig; + protected declare _parsedConfig: TPluginConfig; protected _declarationBlockConfig: DeclarationBlockConfig = {}; protected _collectedResolvers: { [key: string]: { @@ -710,6 +706,31 @@ export class BaseResolversVisitor< baseGeneratedTypename?: string; }; } = {}; + protected _parsedSchemaMeta: { + types: { + interface: Record< + string, + { + type: GraphQLInterfaceType; + implementingTypes: Record; + } + >; + union: Record< + string, + { + type: GraphQLUnionType; + unionMembers: Record; + } + >; + }; + typesWithIsTypeOf: Record; + } = { + types: { + interface: {}, + union: {}, + }, + typesWithIsTypeOf: {}, + }; protected _collectedDirectiveResolvers: { [key: string]: string } = {}; protected _variablesTransformer: OperationVariablesToObject; protected _usedMappers: { [key: string]: boolean } = {}; @@ -718,7 +739,6 @@ export class BaseResolversVisitor< protected _hasReferencedResolversUnionTypes = false; protected _hasReferencedResolversInterfaceTypes = false; protected _resolversUnionTypes: Record = {}; - protected _resolversUnionParentTypes: Record = {}; protected _resolversInterfaceTypes: Record = {}; protected _rootTypeNames = new Set(); protected _globalDeclarations = new Set(); @@ -734,7 +754,8 @@ export class BaseResolversVisitor< rawConfig: TRawConfig, additionalConfig: TPluginConfig, private _schema: GraphQLSchema, - defaultScalars: NormalizedScalarsMap = DEFAULT_SCALARS + defaultScalars: NormalizedScalarsMap = DEFAULT_SCALARS, + federationMeta: FederationMeta = {} ) { super(rawConfig, { immutableTypes: getConfigValue(rawConfig.immutableTypes, false), @@ -748,13 +769,12 @@ export class BaseResolversVisitor< mapOrStr: rawConfig.enumValues, }), addUnderscoreToArgsType: getConfigValue(rawConfig.addUnderscoreToArgsType, false), - onlyResolveTypeForInterfaces: getConfigValue(rawConfig.onlyResolveTypeForInterfaces, false), contextType: parseMapper(rawConfig.contextType || 'any', 'ContextType'), fieldContextTypes: getConfigValue(rawConfig.fieldContextTypes, []), directiveContextTypes: getConfigValue(rawConfig.directiveContextTypes, []), resolverTypeSuffix: getConfigValue(rawConfig.resolverTypeSuffix, 'Resolvers'), allResolversTypeName: getConfigValue(rawConfig.allResolversTypeName, 'Resolvers'), - rootValueType: parseMapper(rawConfig.rootValueType || '{}', 'RootValueType'), + rootValueType: parseMapper(rawConfig.rootValueType || 'Record', 'RootValueType'), namespacedImportName: getConfigValue(rawConfig.namespacedImportName, ''), avoidOptionals: normalizeAvoidOptionals(rawConfig.avoidOptionals), defaultMapper: rawConfig.defaultMapper @@ -763,9 +783,7 @@ export class BaseResolversVisitor< mappers: transformMappers(rawConfig.mappers || {}, rawConfig.mapperTypeSuffix), scalars: buildScalarsFromConfig(_schema, rawConfig, defaultScalars), internalResolversPrefix: getConfigValue(rawConfig.internalResolversPrefix, '__'), - generateInternalResolversIfNeeded: { - __resolveReference: rawConfig.generateInternalResolversIfNeeded?.__resolveReference ?? false, - }, + generateInternalResolversIfNeeded: {}, resolversNonOptionalTypename: normalizeResolversNonOptionalTypename( getConfigValue(rawConfig.resolversNonOptionalTypename, false) ), @@ -774,7 +792,11 @@ export class BaseResolversVisitor< } as TPluginConfig); autoBind(this); - this._federation = new ApolloFederation({ enabled: this.config.federation, schema: this.schema }); + this._federation = new ApolloFederation({ + enabled: this.config.federation, + schema: this.schema, + meta: federationMeta, + }); this._rootTypeNames = getRootTypeNames(_schema); this._variablesTransformer = new OperationVariablesToObject( this.scalars, @@ -782,11 +804,17 @@ export class BaseResolversVisitor< this.config.namespacedImportName ); + // 1. Parse schema meta at the start once, + // so we can use it in subsequent generate functions + this.parseSchemaMeta(); + + // 2. Generate types for resolvers this._resolversTypes = this.createResolversFields({ applyWrapper: type => this.applyResolverTypeWrapper(type), clearWrapper: type => this.clearResolverTypeWrapper(type), getTypeToUse: name => this.getTypeToUse(name), currentType: 'ResolversTypes', + onNotMappedObjectType: ({ initialType }) => initialType, }); this._resolversParentTypes = this.createResolversFields({ applyWrapper: type => type, @@ -794,6 +822,13 @@ export class BaseResolversVisitor< getTypeToUse: name => this.getParentTypeToUse(name), currentType: 'ResolversParentTypes', shouldInclude: namedType => !isEnumType(namedType), + onNotMappedObjectType: ({ typeName, initialType }) => { + let result = initialType; + if (this._federation.getMeta()[typeName]?.referenceSelectionSetsString) { + result += ` | ${this.convertName('FederationReferenceTypes')}['${typeName}']`; + } + return result; + }, }); this._resolversUnionTypes = this.createResolversUnionTypes(); this._resolversInterfaceTypes = this.createResolversInterfaceTypes(); @@ -866,12 +901,14 @@ export class BaseResolversVisitor< getTypeToUse, currentType, shouldInclude, + onNotMappedObjectType, }: { applyWrapper: (str: string) => string; clearWrapper: (str: string) => string; getTypeToUse: (str: string) => string; currentType: 'ResolversTypes' | 'ResolversParentTypes'; shouldInclude?: (type: GraphQLNamedType) => boolean; + onNotMappedObjectType: (params: { initialType: string; typeName: string }) => string; }): ResolverTypes { const allSchemaTypes = this._schema.getTypeMap(); const typeNames = this._federation.filterTypeNames(Object.keys(allSchemaTypes)); @@ -886,7 +923,7 @@ export class BaseResolversVisitor< } } - return typeNames.reduce((prev: ResolverTypes, typeName: string) => { + return typeNames.reduce((prev, typeName) => { const schemaType = allSchemaTypes[typeName]; if (typeName.startsWith('__') || (shouldInclude && !shouldInclude(schemaType))) { @@ -960,6 +997,11 @@ export class BaseResolversVisitor< if (this.config.mappers[typeName].type && hasPlaceholder(this.config.mappers[typeName].type)) { internalType = replacePlaceholder(this.config.mappers[typeName].type, internalType); } + } else { + internalType = onNotMappedObjectType({ + typeName, + initialType: internalType, + }); } prev[typeName] = applyWrapper(internalType); @@ -980,7 +1022,7 @@ export class BaseResolversVisitor< } return prev; - }, {} as ResolverTypes); + }, {}); } protected replaceFieldsInType( @@ -1033,22 +1075,20 @@ export class BaseResolversVisitor< return {}; } - const allSchemaTypes = this._schema.getTypeMap(); - const typeNames = this._federation.filterTypeNames(Object.keys(allSchemaTypes)); - - const unionTypes = typeNames.reduce>((res, typeName) => { - const schemaType = allSchemaTypes[typeName]; - - if (isUnionType(schemaType)) { - const { unionMember, excludeTypes } = this.config.resolversNonOptionalTypename; - res[typeName] = this.getAbstractMembersType({ - typeName, - memberTypes: schemaType.getTypes(), - isTypenameNonOptional: unionMember && !excludeTypes?.includes(typeName), - }); - } - return res; - }, {}); + const unionTypes = Object.entries(this._parsedSchemaMeta.types.union).reduce>( + (res, [typeName, { type: schemaType, unionMembers }]) => { + if (isUnionType(schemaType)) { + const { unionMember, excludeTypes } = this.config.resolversNonOptionalTypename; + res[typeName] = this.getAbstractMembersType({ + typeName, + memberTypes: Object.values(unionMembers), + isTypenameNonOptional: unionMember && !excludeTypes?.includes(typeName), + }); + } + return res; + }, + {} + ); return unionTypes; } @@ -1058,37 +1098,22 @@ export class BaseResolversVisitor< return {}; } - const allSchemaTypes = this._schema.getTypeMap(); - const typeNames = this._federation.filterTypeNames(Object.keys(allSchemaTypes)); - - const interfaceTypes = typeNames.reduce>((res, typeName) => { - const schemaType = allSchemaTypes[typeName]; - - if (isInterfaceType(schemaType)) { - const allTypesMap = this._schema.getTypeMap(); - const implementingTypes: GraphQLObjectType[] = []; + const interfaceTypes = Object.entries(this._parsedSchemaMeta.types.interface).reduce>( + (res, [typeName, { type: schemaType, implementingTypes }]) => { + if (isInterfaceType(schemaType)) { + const { interfaceImplementingType, excludeTypes } = this.config.resolversNonOptionalTypename; - for (const graphqlType of Object.values(allTypesMap)) { - if (graphqlType instanceof GraphQLObjectType) { - const allInterfaces = graphqlType.getInterfaces(); - - if (allInterfaces.some(int => int.name === schemaType.name)) { - implementingTypes.push(graphqlType); - } - } + res[typeName] = this.getAbstractMembersType({ + typeName, + memberTypes: Object.values(implementingTypes), + isTypenameNonOptional: interfaceImplementingType && !excludeTypes?.includes(typeName), + }); } - const { interfaceImplementingType, excludeTypes } = this.config.resolversNonOptionalTypename; - - res[typeName] = this.getAbstractMembersType({ - typeName, - memberTypes: implementingTypes, - isTypenameNonOptional: interfaceImplementingType && !excludeTypes?.includes(typeName), - }); - } - - return res; - }, {}); + return res; + }, + {} + ); return interfaceTypes; } @@ -1261,6 +1286,55 @@ export class BaseResolversVisitor< ).string; } + public buildFederationTypes(): string { + const federationMeta = this._federation.getMeta(); + + if (Object.keys(federationMeta).length === 0) { + return ''; + } + + const declarationKind = 'type'; + return new DeclarationBlock(this._declarationBlockConfig) + .export() + .asKind(declarationKind) + .withName(this.convertName('FederationTypes')) + .withComment('Mapping of federation types') + .withBlock( + Object.keys(federationMeta) + .map(typeName => { + return indent(`${typeName}: ${this.convertName(typeName)}${this.getPunctuation(declarationKind)}`); + }) + .join('\n') + ).string; + } + + public buildFederationReferenceTypes(): string { + const federationMeta = this._federation.getMeta(); + + if (Object.keys(federationMeta).length === 0) { + return ''; + } + + const declarationKind = 'type'; + return new DeclarationBlock(this._declarationBlockConfig) + .export() + .asKind(declarationKind) + .withName(this.convertName('FederationReferenceTypes')) + .withComment('Mapping of federation reference types') + .withBlock( + Object.entries(federationMeta) + .map(([typeName, { referenceSelectionSetsString }]) => { + if (!referenceSelectionSetsString) { + return undefined; + } + + return indent(`${typeName}: ${referenceSelectionSetsString}${this.getPunctuation(declarationKind)}`); + }) + .filter(v => v) + .join('\n') + ).string; + } + public get schema(): GraphQLSchema { return this._schema; } @@ -1370,11 +1444,14 @@ export class BaseResolversVisitor< if (resolverType.baseGeneratedTypename) { userDefinedTypes[schemaTypeName] = { name: resolverType.baseGeneratedTypename, + hasIsTypeOf: this._parsedSchemaMeta.typesWithIsTypeOf[schemaTypeName] || false, }; const federationMeta = this._federation.getMeta()[schemaTypeName]; if (federationMeta) { - userDefinedTypes[schemaTypeName].federation = federationMeta; + userDefinedTypes[schemaTypeName].federation = { + hasResolveReference: federationMeta.hasResolveReference, + }; } } @@ -1425,10 +1502,6 @@ export class BaseResolversVisitor< return ''; } - Name(node: NameNode): string { - return node.value; - } - ListType(node: ListTypeNode): string { const asString = node.type as any as string; @@ -1442,7 +1515,7 @@ export class BaseResolversVisitor< } NamedType(node: NamedTypeNode): string { - const nameStr = node.name as any as string; + const nameStr = node.name.value; if (this.config.scalars[nameStr]) { return this._getScalar(nameStr); @@ -1481,133 +1554,135 @@ export class BaseResolversVisitor< return `ParentType extends ${parentType} = ${parentType}`; } - FieldDefinition(node: FieldDefinitionNode, key: string | number, parent: any): FieldDefinitionPrintFn { + FieldDefinition(node: FieldDefinitionNode, key: string | number, parent: any): FieldDefinitionResult { const hasArguments = node.arguments && node.arguments.length > 0; const declarationKind = 'type'; - return (parentName, avoidResolverOptionals) => { - const original: FieldDefinitionNode = parent[key]; - const parentType = this.schema.getType(parentName); - - if (this._federation.skipField({ fieldNode: original, parentType })) { - return null; - } - - const contextType = this.getContextType(parentName, node); - - let argsType = hasArguments - ? this.convertName( - parentName + - (this.config.addUnderscoreToArgsType ? '_' : '') + - this.convertName(node.name, { - useTypesPrefix: false, - useTypesSuffix: false, - }) + - 'Args', - { - useTypesPrefix: true, - }, - true - ) - : null; + const original: FieldDefinitionNode = parent[key]; - const avoidInputsOptionals = this.config.avoidOptionals.inputValue; + return { + node: original, + printContent: (parentNode, avoidResolverOptionals) => { + const parentName = parentNode.name.value; + const parentType = this.schema.getType(parentName); + const meta: ReturnType['meta'] = {}; + const typeName = node.name.value; + + const fieldsToGenerate = this._federation.findFieldNodesToGenerate({ node: parentNode }); + const shouldGenerateField = + fieldsToGenerate.some(field => field.name.value === typeName) || + this._federation.isResolveReferenceField(node); + + if (!shouldGenerateField) { + return { value: null, meta }; + } - if (argsType !== null) { - const argsToForceRequire = original.arguments.filter( - arg => !!arg.defaultValue || arg.type.kind === 'NonNullType' - ); + const contextType = this.getContextType(parentName, node); + + let argsType = hasArguments + ? this.convertName( + parentName + + (this.config.addUnderscoreToArgsType ? '_' : '') + + this.convertName(typeName, { + useTypesPrefix: false, + useTypesSuffix: false, + }) + + 'Args', + { + useTypesPrefix: true, + }, + true + ) + : null; + + const avoidInputsOptionals = this.config.avoidOptionals.inputValue; + + if (argsType !== null) { + const argsToForceRequire = original.arguments.filter( + arg => !!arg.defaultValue || arg.type.kind === 'NonNullType' + ); - if (argsToForceRequire.length > 0) { - argsType = this.applyRequireFields(argsType, argsToForceRequire); - } else if (original.arguments.length > 0 && avoidInputsOptionals !== true) { - argsType = this.applyOptionalFields(argsType, original.arguments); + if (argsToForceRequire.length > 0) { + argsType = this.applyRequireFields(argsType, argsToForceRequire); + } else if (original.arguments.length > 0 && avoidInputsOptionals !== true) { + argsType = this.applyOptionalFields(argsType, original.arguments); + } } - } - const parentTypeSignature = this._federation.transformParentType({ - fieldNode: original, - parentType, - parentTypeSignature: this.getParentTypeForSignature(node), - }); + const { mappedTypeKey, resolverType } = ((): { mappedTypeKey: string; resolverType: string } => { + const baseType = getBaseTypeNode(original.type); + const realType = baseType.name.value; + const typeToUse = this.getTypeToUse(realType); + /** + * Turns GraphQL type to TypeScript types (`mappedType`) e.g. + * - String! -> ResolversTypes['String']> + * - String -> Maybe + * - [String] -> Maybe>> + * - [String!]! -> Array + */ + const mappedType = this._variablesTransformer.wrapAstTypeWithModifiers(typeToUse, original.type); + + const subscriptionType = this._schema.getSubscriptionType(); + const isSubscriptionType = subscriptionType && subscriptionType.name === parentName; + + if (isSubscriptionType) { + return { + mappedTypeKey: `${mappedType}, "${typeName}"`, + resolverType: 'SubscriptionResolver', + }; + } + + const directiveMappings = + node.directives + ?.map(directive => this._directiveResolverMappings[directive.name.value]) + .filter(Boolean) + .reverse() ?? []; - const { mappedTypeKey, resolverType } = ((): { mappedTypeKey: string; resolverType: string } => { - const baseType = getBaseTypeNode(original.type); - const realType = baseType.name.value; - const typeToUse = this.getTypeToUse(realType); - /** - * Turns GraphQL type to TypeScript types (`mappedType`) e.g. - * - String! -> ResolversTypes['String']> - * - String -> Maybe - * - [String] -> Maybe>> - * - [String!]! -> Array - */ - const mappedType = this._variablesTransformer.wrapAstTypeWithModifiers(typeToUse, original.type); - - const subscriptionType = this._schema.getSubscriptionType(); - const isSubscriptionType = subscriptionType && subscriptionType.name === parentName; - - if (isSubscriptionType) { return { - mappedTypeKey: `${mappedType}, "${node.name}"`, - resolverType: 'SubscriptionResolver', + mappedTypeKey: mappedType, + resolverType: directiveMappings[0] ?? 'Resolver', }; - } - - const directiveMappings = - node.directives - ?.map(directive => this._directiveResolverMappings[directive.name as any]) - .filter(Boolean) - .reverse() ?? []; - - return { - mappedTypeKey: mappedType, - resolverType: directiveMappings[0] ?? 'Resolver', + })(); + + const signature: { + name: string; + modifier: string; + type: string; + genericTypes: string[]; + } = { + name: typeName, + modifier: avoidResolverOptionals ? '' : '?', + type: resolverType, + genericTypes: [mappedTypeKey, this.getParentTypeForSignature(node), contextType, argsType].filter(f => f), }; - })(); - - const signature: { - name: string; - modifier: string; - type: string; - genericTypes: string[]; - } = { - name: node.name as any, - modifier: avoidResolverOptionals ? '' : '?', - type: resolverType, - genericTypes: [mappedTypeKey, parentTypeSignature, contextType, argsType].filter(f => f), - }; - - if (this._federation.isResolveReferenceField(node)) { - if (this.config.generateInternalResolversIfNeeded.__resolveReference) { - const federationDetails = checkObjectTypeFederationDetails( - parentType.astNode as ObjectTypeDefinitionNode, - this._schema - ); - if (!federationDetails || federationDetails.resolvableKeyDirectives.length === 0) { - return ''; + if (this._federation.isResolveReferenceField(node)) { + if (!this._federation.getMeta()[parentType.name].hasResolveReference) { + return { value: '', meta }; } - } + const resultType = `${mappedTypeKey} | FederationReferenceType`; + const referenceType = 'FederationReferenceType'; - this._federation.setMeta(parentType.name, { hasResolveReference: true }); - signature.type = 'ReferenceResolver'; - if (signature.genericTypes.length >= 3) { - signature.genericTypes = signature.genericTypes.slice(0, 3); + signature.type = 'ReferenceResolver'; + signature.genericTypes = [resultType, referenceType, contextType]; + meta.federation = { isResolveReference: true }; } - } - return indent( - `${signature.name}${signature.modifier}: ${signature.type}<${signature.genericTypes.join( - ', ' - )}>${this.getPunctuation(declarationKind)}` - ); + return { + value: indent( + `${signature.name}${signature.modifier}: ${signature.type}<${signature.genericTypes.join( + ', ' + )}>${this.getPunctuation(declarationKind)}` + ), + meta, + }; + }, }; } private getFieldContextType(parentName: string, node: FieldDefinitionNode): string { - if (this._fieldContextTypeMap[`${parentName}.${node.name}`]) { - return this._fieldContextTypeMap[`${parentName}.${node.name}`].type; + if (this._fieldContextTypeMap[`${parentName}.${node.name.value}`]) { + return this._fieldContextTypeMap[`${parentName}.${node.name.value}`].type; } return 'ContextType'; } @@ -1616,7 +1691,7 @@ export class BaseResolversVisitor< let contextType = this.getFieldContextType(parentName, node); for (const directive of node.directives) { - const name = directive.name as unknown as string; + const name = directive.name.value; const directiveMap = this._directiveContextTypesMap[name]; if (directiveMap) { contextType = `${directiveMap.type}<${contextType}>`; @@ -1625,6 +1700,46 @@ export class BaseResolversVisitor< return contextType; } + private parseSchemaMeta(): void { + const allSchemaTypes = this._schema.getTypeMap(); + const typeNames = this._federation.filterTypeNames(Object.keys(allSchemaTypes)); + + for (const typeName of typeNames) { + const schemaType = allSchemaTypes[typeName]; + + if (isUnionType(schemaType)) { + this._parsedSchemaMeta.types.union[schemaType.name] = { + type: schemaType, + unionMembers: {}, + }; + + const unionMemberTypes = schemaType.getTypes(); + for (const type of unionMemberTypes) { + this._parsedSchemaMeta.types.union[schemaType.name].unionMembers[type.name] = type; + this._parsedSchemaMeta.typesWithIsTypeOf[type.name] = true; + } + } + + if (isInterfaceType(schemaType)) { + this._parsedSchemaMeta.types.interface[schemaType.name] = { + type: schemaType, + implementingTypes: {}, + }; + + for (const graphqlType of Object.values(allSchemaTypes)) { + if (graphqlType instanceof GraphQLObjectType) { + const allInterfaces = graphqlType.getInterfaces(); + + if (allInterfaces.some(int => int.name === schemaType.name)) { + this._parsedSchemaMeta.types.interface[schemaType.name].implementingTypes[graphqlType.name] = graphqlType; + this._parsedSchemaMeta.typesWithIsTypeOf[graphqlType.name] = true; + } + } + } + } + } + } + protected applyRequireFields(argsType: string, fields: InputValueDefinitionNode[]): string { this._globalDeclarations.add(REQUIRE_FIELDS_TYPE); return `RequireFields<${argsType}, ${fields.map(f => `'${f.name.value}'`).join(' | ')}>`; @@ -1634,12 +1749,17 @@ export class BaseResolversVisitor< return `Partial<${argsType}>`; } - ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string { + ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string | null { + const typeName = node.name.value; + const fieldsToGenerate = this._federation.findFieldNodesToGenerate({ node }); + if (fieldsToGenerate.length === 0) { + return null; + } + const declarationKind = 'type'; const name = this.convertName(node, { suffix: this.config.resolverTypeSuffix, }); - const typeName = node.name as any as string; const parentType = this.getParentTypeToUse(typeName); const rootType = ((): false | 'query' | 'mutation' | 'subscription' => { @@ -1655,17 +1775,19 @@ export class BaseResolversVisitor< return false; })(); - const fieldsContent = (node.fields as unknown as FieldDefinitionPrintFn[]).map(f => { - return f( - typeName, - (rootType === 'query' && this.config.avoidOptionals.query) || - (rootType === 'mutation' && this.config.avoidOptionals.mutation) || - (rootType === 'subscription' && this.config.avoidOptionals.subscription) || - (rootType === false && this.config.avoidOptionals.resolvers) - ); - }); + const fieldsContent = (node.fields as unknown as FieldDefinitionResult[]) + .map(({ printContent }) => { + return printContent( + node, + (rootType === 'query' && this.config.avoidOptionals.query) || + (rootType === 'mutation' && this.config.avoidOptionals.mutation) || + (rootType === 'subscription' && this.config.avoidOptionals.subscription) || + (rootType === false && this.config.avoidOptionals.resolvers) + ).value; + }) + .filter(v => v); - if (!rootType) { + if (!rootType && this._parsedSchemaMeta.typesWithIsTypeOf[typeName]) { fieldsContent.push( indent( `${ @@ -1675,13 +1797,27 @@ export class BaseResolversVisitor< ); } + if (fieldsContent.length === 0) { + return null; + } + + const genericTypes: string[] = [ + `ContextType = ${this.config.contextType.type}`, + this.transformParentGenericType(parentType), + ]; + this._federation.addFederationTypeGenericIfApplicable({ + genericTypes, + federationTypesType: this.convertName('FederationReferenceTypes'), + typeName, + }); + const block = new DeclarationBlock(this._declarationBlockConfig) .export() .asKind(declarationKind) - .withName(name, ``) + .withName(name, `<${genericTypes.join(', ')}>`) .withBlock(fieldsContent.join('\n')); - this._collectedResolvers[node.name as any] = { + this._collectedResolvers[node.name.value] = { typename: name + '', baseGeneratedTypename: name, }; @@ -1700,11 +1836,11 @@ export class BaseResolversVisitor< .map(f => `'${f}'`) .join(' | '); - this._collectedResolvers[node.name as any] = { + this._collectedResolvers[node.name.value] = { typename: name + '', baseGeneratedTypename: name, }; - const parentType = this.getParentTypeToUse(node.name as any as string); + const parentType = this.getParentTypeToUse(node.name.value); return new DeclarationBlock(this._declarationBlockConfig) .export() @@ -1720,7 +1856,7 @@ export class BaseResolversVisitor< } ScalarTypeDefinition(node: ScalarTypeDefinitionNode): string { - const nameAsString = node.name as any as string; + const nameAsString = node.name.value; const baseName = this.getTypeToUse(nameAsString); if (this._federation.skipScalar(nameAsString)) { @@ -1728,7 +1864,7 @@ export class BaseResolversVisitor< } this._hasScalars = true; - this._collectedResolvers[node.name as any] = { + this._collectedResolvers[node.name.value] = { typename: 'GraphQLScalarType', }; @@ -1746,11 +1882,11 @@ export class BaseResolversVisitor< }), ` extends GraphQLScalarTypeConfig<${baseName}, any>` ) - .withBlock(indent(`name: '${node.name}'${this.getPunctuation('interface')}`)).string; + .withBlock(indent(`name: '${node.name.value}'${this.getPunctuation('interface')}`)).string; } DirectiveDefinition(node: DirectiveDefinitionNode, key: string | number, parent: any): string { - if (this._federation.skipDirective(node.name as any)) { + if (this._federation.skipDirective(node.name.value)) { return null; } @@ -1760,7 +1896,7 @@ export class BaseResolversVisitor< const sourceNode = parent[key] as DirectiveDefinitionNode; const hasArguments = sourceNode.arguments && sourceNode.arguments.length > 0; - this._collectedDirectiveResolvers[node.name as any] = directiveName + ''; + this._collectedDirectiveResolvers[node.name.value] = directiveName + ''; const directiveArgsTypeName = this.convertName(node, { suffix: 'DirectiveArgs', @@ -1809,7 +1945,7 @@ export class BaseResolversVisitor< } EnumTypeDefinition(node: EnumTypeDefinitionNode): string { - const rawTypeName = node.name as any; + const rawTypeName = node.name.value; // If we have enumValues set, and it's point to an external enum - we need to allow internal values resolvers // In case we have enumValues set but as explicit values, no need to to do mapping since it's already @@ -1842,45 +1978,53 @@ export class BaseResolversVisitor< suffix: this.config.resolverTypeSuffix, }); const declarationKind = 'type'; - const allTypesMap = this._schema.getTypeMap(); - const implementingTypes: string[] = []; - - const typeName = node.name as any as string; + const typeName = node.name.value; + const implementingTypes = Object.keys(this._parsedSchemaMeta.types.interface[typeName].implementingTypes); this._collectedResolvers[typeName] = { typename: name + '', baseGeneratedTypename: name, }; - for (const graphqlType of Object.values(allTypesMap)) { - if (graphqlType instanceof GraphQLObjectType) { - const allInterfaces = graphqlType.getInterfaces(); - if (allInterfaces.find(int => int.name === typeName)) { - implementingTypes.push(graphqlType.name); - } - } - } - const parentType = this.getParentTypeToUse(typeName); + + const genericTypes: string[] = [ + `ContextType = ${this.config.contextType.type}`, + this.transformParentGenericType(parentType), + ]; + this._federation.addFederationTypeGenericIfApplicable({ + genericTypes, + federationTypesType: this.convertName('FederationReferenceTypes'), + typeName, + }); + const possibleTypes = implementingTypes.map(name => `'${name}'`).join(' | ') || 'null'; - const fields = this.config.onlyResolveTypeForInterfaces ? [] : node.fields || []; + + // An Interface has __resolveType resolver, and no other fields. + const blockFields: string[] = [ + indent( + `${this.config.internalResolversPrefix}resolveType${ + this.config.optionalResolveType ? '?' : '' + }: TypeResolveFn<${possibleTypes}, ParentType, ContextType>${this.getPunctuation(declarationKind)}` + ), + ]; + + // An Interface in Federation may have the additional __resolveReference resolver, if resolvable. + // So, we filter out the normal fields declared on the Interface and add the __resolveReference resolver. + const fields = (node.fields as unknown as FieldDefinitionResult[]).map(({ printContent }) => + printContent(node, this.config.avoidOptionals.resolvers) + ); + for (const field of fields) { + if (field.meta.federation?.isResolveReference) { + blockFields.push(field.value); + } + } return new DeclarationBlock(this._declarationBlockConfig) .export() .asKind(declarationKind) - .withName(name, ``) - .withBlock( - [ - indent( - `${this.config.internalResolversPrefix}resolveType${ - this.config.optionalResolveType ? '?' : '' - }: TypeResolveFn<${possibleTypes}, ParentType, ContextType>${this.getPunctuation(declarationKind)}` - ), - ...(fields as unknown as FieldDefinitionPrintFn[]).map(f => - f(typeName, this.config.avoidOptionals.resolvers) - ), - ].join('\n') - ).string; + .withName(name, `<${genericTypes.join(', ')}>`) + .withBlock(blockFields.join('\n')).string; } SchemaDefinition() { diff --git a/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts index 92e75e63bd5..5c0fdac5bd5 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts @@ -13,11 +13,9 @@ import { Kind, ListTypeNode, NamedTypeNode, - NameNode, NonNullTypeNode, ObjectTypeDefinitionNode, ScalarTypeDefinitionNode, - StringValueNode, UnionTypeDefinitionNode, } from 'graphql'; import { BaseVisitor, ParsedConfig, RawConfig } from './base-visitor.js'; @@ -658,7 +656,7 @@ export class BaseTypesVisitor< .export() .asKind(this._parsedConfig.declarationKind.input) .withName(this.convertName(node)) - .withComment(node.description as any as string) + .withComment(node.description?.value) .withBlock(node.fields.join('\n')); } @@ -670,15 +668,14 @@ export class BaseTypesVisitor< .export() .asKind(declarationKind) .withName(this.convertName(node)) - .withComment(node.description as any as string) + .withComment(node.description?.value) .withContent(`\n` + node.fields.join('\n |')); } InputObjectTypeDefinition(node: InputObjectTypeDefinitionNode): string { if (this.config.onlyEnums) return ''; - // Why the heck is node.name a string and not { value: string } at runtime ?! - if (isOneOfInputObjectType(this._schema.getType(node.name as unknown as string))) { + if (isOneOfInputObjectType(this._schema.getType(node.name.value))) { return this.getInputObjectOneOfDeclarationBlock(node).string; } @@ -688,7 +685,7 @@ export class BaseTypesVisitor< InputValueDefinition(node: InputValueDefinitionNode): string { if (this.config.onlyEnums) return ''; - const comment = transformComment(node.description as any as string, 1); + const comment = transformComment(node.description.value, 1); const { input } = this._parsedConfig.declarationKind; let type: string = node.type as any as string; @@ -696,11 +693,7 @@ export class BaseTypesVisitor< type = this._getDirectiveOverrideType(node.directives) || type; } - return comment + indent(`${node.name}: ${type}${this.getPunctuation(input)}`); - } - - Name(node: NameNode): string { - return node.value; + return comment + indent(`${node.name.value}: ${type}${this.getPunctuation(input)}`); } FieldDefinition(node: FieldDefinitionNode): string { @@ -710,7 +703,7 @@ export class BaseTypesVisitor< const { type } = this._parsedConfig.declarationKind; const comment = this.getNodeComment(node); - return comment + indent(`${node.name}: ${typeString}${this.getPunctuation(type)}`); + return comment + indent(`${node.name.value}: ${typeString}${this.getPunctuation(type)}`); } UnionTypeDefinition(node: UnionTypeDefinitionNode, key: string | number | undefined, parent: any): string { @@ -724,7 +717,7 @@ export class BaseTypesVisitor< .export() .asKind('type') .withName(this.convertName(node)) - .withComment(node.description as any as string) + .withComment(node.description.value) .withContent(possibleTypes).string; } @@ -747,9 +740,9 @@ export class BaseTypesVisitor< ...(this.config.addTypename ? [ indent( - `${this.config.immutableTypes ? 'readonly ' : ''}${optionalTypename}: '${node.name}'${this.getPunctuation( - type - )}` + `${this.config.immutableTypes ? 'readonly ' : ''}${optionalTypename}: '${ + node.name.value + }'${this.getPunctuation(type)}` ), ] : []), @@ -761,7 +754,7 @@ export class BaseTypesVisitor< .export() .asKind(type) .withName(this.convertName(node)) - .withComment(node.description as any as string); + .withComment(node.description?.value); if (type === 'interface' || type === 'class') { if (interfacesNames.length > 0) { @@ -799,7 +792,7 @@ export class BaseTypesVisitor< .export() .asKind(this._parsedConfig.declarationKind.interface) .withName(this.convertName(node)) - .withComment(node.description as any as string); + .withComment(node.description?.value); return declarationBlock.withBlock(node.fields.join('\n')); } @@ -873,7 +866,7 @@ export class BaseTypesVisitor< } EnumTypeDefinition(node: EnumTypeDefinitionNode): string { - const enumName = node.name as any as string; + const enumName = node.name.value; // In case of mapped external enum string if (this.config.enumValues[enumName]?.sourceFile) { @@ -889,15 +882,10 @@ export class BaseTypesVisitor< useTypesSuffix: this.config.enumSuffix, }) ) - .withComment(node.description as any as string) + .withComment(node.description.value) .withBlock(this.buildEnumValuesBlock(enumName, node.values)).string; } - // We are using it in order to transform "description" field - StringValue(node: StringValueNode): string { - return node.value; - } - protected makeValidEnumIdentifier(identifier: string): string { if (/^[0-9]/.exec(identifier)) { return wrapWithSingleQuotes(identifier, true); @@ -921,10 +909,10 @@ export class BaseTypesVisitor< const comment = this.getNodeComment(enumOption); const schemaEnumValue = schemaEnumType && !this.config.ignoreEnumValuesFromSchema - ? schemaEnumType.getValue(enumOption.name as any).value + ? schemaEnumType.getValue(enumOption.name.value).value : undefined; let enumValue: string | number = - typeof schemaEnumValue === 'undefined' ? (enumOption.name as any) : schemaEnumValue; + typeof schemaEnumValue === 'undefined' ? enumOption.name.value : schemaEnumValue; if (typeof this.config.enumValues[typeName]?.mappedValues?.[enumValue] !== 'undefined') { enumValue = this.config.enumValues[typeName].mappedValues[enumValue]; @@ -956,7 +944,7 @@ export class BaseTypesVisitor< .export() .asKind(this._parsedConfig.declarationKind.arguments) .withName(this.convertName(name)) - .withComment(node.description) + .withComment(node.description?.value) .withBlock(this._argumentsTransformer.transform(field.arguments)); } @@ -998,7 +986,7 @@ export class BaseTypesVisitor< protected _getDirectiveOverrideType(directives: ReadonlyArray): string | null { const type = directives .map(directive => { - const directiveName = directive.name as any as string; + const directiveName = directive.name.value; if (this.config.directiveArgumentAndInputFieldMappings[directiveName]) { return this._getDirectiveArgumentNadInputFieldMapping(directiveName); } @@ -1011,7 +999,7 @@ export class BaseTypesVisitor< } protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string { - const typeAsString = node.name as any as string; + const typeAsString = node.name.value; if (this.scalars[typeAsString]) { return this._getScalar(typeAsString, isVisitingInputType ? 'input' : 'output'); @@ -1020,7 +1008,7 @@ export class BaseTypesVisitor< return this.config.enumValues[typeAsString].typeIdentifier; } - const schemaType = this._schema.getType(node.name as any); + const schemaType = this._schema.getType(typeAsString); if (schemaType && isEnumType(schemaType)) { return this.convertName(node, { @@ -1055,8 +1043,8 @@ export class BaseTypesVisitor< } getNodeComment(node: FieldDefinitionNode | EnumValueDefinitionNode | InputValueDefinitionNode): string { - let commentText: string = node.description as any; - const deprecationDirective = node.directives.find((v: any) => v.name === 'deprecated'); + let commentText = node.description?.value; + const deprecationDirective = node.directives.find(v => v.name.value === 'deprecated'); if (deprecationDirective) { const deprecationReason = this.getDeprecationReason(deprecationDirective); commentText = `${commentText ? `${commentText}\n` : ''}@deprecated ${deprecationReason}`; @@ -1066,11 +1054,11 @@ export class BaseTypesVisitor< } protected getDeprecationReason(directive: DirectiveNode): string | void { - if ((directive.name as any) === 'deprecated') { - const hasArguments = directive.arguments.length > 0; + if (directive.name.value === 'deprecated') { let reason = 'Field no longer supported'; - if (hasArguments) { - reason = directive.arguments[0].value as any; + const deprecatedReason = directive.arguments[0]; + if (deprecatedReason && deprecatedReason.value.kind === Kind.STRING) { + reason = deprecatedReason.value.value; } return reason; } diff --git a/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts index 1f44bde2759..5f83d587e6c 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts @@ -33,7 +33,6 @@ export interface ParsedConfig { fragmentImports: ImportDeclaration[]; immutableTypes: boolean; useTypeImports: boolean; - dedupeFragments: boolean; allowEnumStringTypes: boolean; inlineFragmentTypes: InlineFragmentTypeOptions; emitLegacyCommonJSImports: boolean; @@ -346,15 +345,6 @@ export interface RawConfig { * @ignore */ globalNamespace?: boolean; - /** - * @description Removes fragment duplicates for reducing data transfer. - * It is done by removing sub-fragments imports from fragment definition - * Instead - all of them are imported to the Operation node. - * @type boolean - * @default false - * @deprecated This option is no longer needed. It will be removed in the next major version. - */ - dedupeFragments?: boolean; /** * @ignore */ @@ -416,7 +406,6 @@ export class BaseVisitor { - if (typeof rawConfig.noGraphQLTag === 'boolean') { - return rawConfig.noGraphQLTag ? DocumentMode.documentNode : DocumentMode.graphQLTag; - } - return getConfigValue(rawConfig.documentMode, DocumentMode.graphQLTag); - })(rawConfig), + documentMode: getConfigValue(rawConfig.documentMode, DocumentMode.graphQLTag), importDocumentNodeExternallyFrom: getConfigValue(rawConfig.importDocumentNodeExternallyFrom, ''), pureMagicComment: getConfigValue(rawConfig.pureMagicComment, false), experimentalFragmentVariables: getConfigValue(rawConfig.experimentalFragmentVariables, false), @@ -333,7 +323,7 @@ export class ClientSideBaseVisitor< return fragmentNames.map(document => this.getFragmentVariableName(document)); } - protected _includeFragments(fragments: string[], nodeKind: 'FragmentDefinition' | 'OperationDefinition'): string { + protected _includeFragments(fragments: string[]): string { if (fragments && fragments.length > 0) { if (this.config.documentMode === DocumentMode.documentNode || this.config.documentMode === DocumentMode.string) { return Array.from(this._fragments.values()) @@ -344,9 +334,6 @@ export class ClientSideBaseVisitor< if (this.config.documentMode === DocumentMode.documentNodeImportFragments) { return ''; } - if (this.config.dedupeFragments && nodeKind !== 'OperationDefinition') { - return ''; - } return String(fragments.map(name => '${' + name + '}').join('\n')); } @@ -359,15 +346,13 @@ export class ClientSideBaseVisitor< protected _gql(node: FragmentDefinitionNode | OperationDefinitionNode): string { const includeNestedFragments = - this.config.documentMode === DocumentMode.documentNode || - this.config.documentMode === DocumentMode.string || - (this.config.dedupeFragments && node.kind === 'OperationDefinition'); + this.config.documentMode === DocumentMode.documentNode || this.config.documentMode === DocumentMode.string; const fragmentNames = this._extractFragments(node, includeNestedFragments); const fragments = this._transformFragments(fragmentNames); const doc = this._prepareDocument(` ${print(node).split('\\').join('\\\\') /* Re-escape escaped values in GraphQL syntax */} - ${this._includeFragments(fragments, node.kind)}`); + ${this._includeFragments(fragments)}`); if (this.config.documentMode === DocumentMode.documentNode) { let gqlObj = gqlTag([doc]); diff --git a/packages/plugins/other/visitor-plugin-common/src/selection-set-to-object.ts b/packages/plugins/other/visitor-plugin-common/src/selection-set-to-object.ts index 36ef21d659b..db91a42a2bf 100644 --- a/packages/plugins/other/visitor-plugin-common/src/selection-set-to-object.ts +++ b/packages/plugins/other/visitor-plugin-common/src/selection-set-to-object.ts @@ -764,7 +764,7 @@ export class SelectionSetToObject'; } private getEmptyObjectTypeString(mustAddEmptyObject: boolean): string { diff --git a/packages/plugins/other/visitor-plugin-common/src/types.ts b/packages/plugins/other/visitor-plugin-common/src/types.ts index 16f64e0f029..88f01fe14ed 100644 --- a/packages/plugins/other/visitor-plugin-common/src/types.ts +++ b/packages/plugins/other/visitor-plugin-common/src/types.ts @@ -138,8 +138,3 @@ export interface CustomDirectivesConfig { */ apolloUnmask?: boolean; } - -export interface GenerateInternalResolversIfNeededConfig { - __resolveReference?: boolean; -} -export type NormalizedGenerateInternalResolversIfNeededConfig = Required; diff --git a/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts b/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts index 5d376dbf181..bd107296951 100644 --- a/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts +++ b/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts @@ -40,7 +40,7 @@ describe('BaseResolversVisitor.createResolversFields', () => { expect(visitor.buildResolversParentTypes()).toEqual( `/** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Query: {} + Query: Record A: A Boolean: Scalars['Boolean']['output'] String: Scalars['String']['output'] @@ -75,7 +75,7 @@ export type ResolversParentTypes = { expect(visitor.buildResolversParentTypes()).toEqual( `/** Mapping between all available schema types and the resolvers parents */ export type IResolversParentTypes = { - Query: {} + Query: Record A: IA Boolean: Scalars['Boolean']['output'] String: Scalars['String']['output'] @@ -100,7 +100,7 @@ export type IResolversParentTypes = { expect(visitor.buildResolversParentTypes()).toEqual( `/** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypesI = { - Query: {} + Query: Record A: AI Boolean: Scalars['Boolean']['output'] String: Scalars['String']['output'] diff --git a/packages/plugins/other/visitor-plugin-common/tests/utils.spec.ts b/packages/plugins/other/visitor-plugin-common/tests/utils.spec.ts index 2e65ee65e55..916553eeade 100644 --- a/packages/plugins/other/visitor-plugin-common/tests/utils.spec.ts +++ b/packages/plugins/other/visitor-plugin-common/tests/utils.spec.ts @@ -1,4 +1,3 @@ -import { describe, expect, it } from '@jest/globals'; import { flatten, groupBy, unique } from '../src/utils'; describe('utils', () => { diff --git a/packages/plugins/other/visitor-plugin-common/vitest.config.ts b/packages/plugins/other/visitor-plugin-common/vitest.config.ts new file mode 100644 index 00000000000..b3915cc2be6 --- /dev/null +++ b/packages/plugins/other/visitor-plugin-common/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'visitor-plugin-common', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/document-nodes/jest.config.js b/packages/plugins/typescript/document-nodes/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/document-nodes/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/document-nodes/package.json b/packages/plugins/typescript/document-nodes/package.json index fbf97380ccb..cb9382509ff 100644 --- a/packages/plugins/typescript/document-nodes/package.json +++ b/packages/plugins/typescript/document-nodes/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.1.0", diff --git a/packages/plugins/typescript/document-nodes/tests/graphql-document-nodes.spec.ts b/packages/plugins/typescript/document-nodes/tests/graphql-document-nodes.spec.ts index b66d80348a9..196ed1edec2 100644 --- a/packages/plugins/typescript/document-nodes/tests/graphql-document-nodes.spec.ts +++ b/packages/plugins/typescript/document-nodes/tests/graphql-document-nodes.spec.ts @@ -297,29 +297,6 @@ describe('graphql-codegen typescript-graphql-document-nodes', () => { validateTs(mergeOutputs([result])); }); - it('Should generate simple module without graphql-tag', async () => { - const result = plugin( - null, - [ - { - location: 'some/file/my-query.graphql', - document: parse(/* GraphQL */ ` - query MyQuery { - field - } - `), - }, - ], - { noGraphQLTag: true }, - { outputFile: '' } - ) as Types.ComplexPluginOutput; - - expect(result.content).toBeSimilarStringTo(` - export const MyQuery = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}}]}}]} as unknown as DocumentNode; - `); - validateTs(mergeOutputs([result])); - }); - it('should contain fragment definitions', async () => { const result = plugin( null, diff --git a/packages/plugins/typescript/document-nodes/vitest.config.ts b/packages/plugins/typescript/document-nodes/vitest.config.ts new file mode 100644 index 00000000000..ea58fa230f5 --- /dev/null +++ b/packages/plugins/typescript/document-nodes/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'typescript-document-nodes', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/gql-tag-operations/jest.config.js b/packages/plugins/typescript/gql-tag-operations/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/gql-tag-operations/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/gql-tag-operations/package.json b/packages/plugins/typescript/gql-tag-operations/package.json index 58c913fe467..b3baae47b00 100644 --- a/packages/plugins/typescript/gql-tag-operations/package.json +++ b/packages/plugins/typescript/gql-tag-operations/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "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 || ^16.0.0" diff --git a/packages/plugins/typescript/gql-tag-operations/vitest.config.ts b/packages/plugins/typescript/gql-tag-operations/vitest.config.ts new file mode 100644 index 00000000000..bf1e26937b4 --- /dev/null +++ b/packages/plugins/typescript/gql-tag-operations/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'gql-tag-operations', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/operations/jest.config.js b/packages/plugins/typescript/operations/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/operations/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/operations/package.json b/packages/plugins/typescript/operations/package.json index 442a1fc89d2..5a3e35c414b 100644 --- a/packages/plugins/typescript/operations/package.json +++ b/packages/plugins/typescript/operations/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.1.0", diff --git a/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap b/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap index c1e43a77b5d..3bdd6ab1a15 100644 --- a/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap +++ b/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`TypeScript Operations Plugin Config should include fragment variable definitions when experimentalFragmentVariables is set 1`] = ` +exports[`TypeScript Operations Plugin > Config > should include fragment variable definitions when experimentalFragmentVariables is set 1`] = ` "export type TextNotificationFragmentFragment = { __typename?: 'TextNotification', text?: string }; @@ -10,7 +10,7 @@ export type TextNotificationFragmentFragmentVariables = Exact<{ " `; -exports[`TypeScript Operations Plugin Issues #2699 - Issues with multiple interfaces and unions 1`] = ` +exports[`TypeScript Operations Plugin > Issues > #2699 - Issues with multiple interfaces and unions 1`] = ` "export type GetEntityBrandDataQueryVariables = Exact<{ gid: Scalars['ID']['input']; brand: Scalars['ID']['input']; @@ -56,7 +56,7 @@ export type ElementMetadataFragment = " `; -exports[`TypeScript Operations Plugin Issues #2916 - Missing import prefix with preResolveTypes: true and near-operation-file preset 1`] = ` +exports[`TypeScript Operations Plugin > Issues > #2916 - Missing import prefix with preResolveTypes: true and near-operation-file preset 1`] = ` "export type UserQueryVariables = Types.Exact<{ [key: string]: never; }>; @@ -64,7 +64,7 @@ export type UserQuery = { user: { id: string, username: string, email: string, d " `; -exports[`TypeScript Operations Plugin Issues #3064 - fragments over interfaces causes issues with fields 1`] = ` +exports[`TypeScript Operations Plugin > Issues > #3064 - fragments over interfaces causes issues with fields 1`] = ` "type Venue_Hotel_Fragment = { __typename?: 'Hotel', id: string, gpsPosition: { __typename?: 'GPSPosition', lat: number, lng: number } }; type Venue_Transport_Fragment = { __typename?: 'Transport', id: string }; @@ -81,7 +81,7 @@ export type QQuery = { __typename?: 'Query', hotel: { __typename?: 'Hotel', id: " `; -exports[`TypeScript Operations Plugin Issues #3064 - fragments over interfaces causes issues with fields 2`] = ` +exports[`TypeScript Operations Plugin > Issues > #3064 - fragments over interfaces causes issues with fields 2`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -156,7 +156,7 @@ function test(q: QQuery) { }" `; -exports[`TypeScript Operations Plugin Issues #6874 - generates types when parent type differs from spread fragment member types and preResolveTypes=true 1`] = ` +exports[`TypeScript Operations Plugin > Issues > #6874 - generates types when parent type differs from spread fragment member types and preResolveTypes=true 1`] = ` "export type SnakeQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -176,7 +176,7 @@ export type AnimalFragmentFragment = " `; -exports[`TypeScript Operations Plugin Issues #8793 selecting __typename should not be optional 1`] = ` +exports[`TypeScript Operations Plugin > Issues > #8793 selecting __typename should not be optional 1`] = ` "export type SnakeQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -187,7 +187,7 @@ export type SnakeQueryQuery = { __typename: 'Query', snake: " `; -exports[`TypeScript Operations Plugin Selection Set Should generate the correct __typename when using both inline fragment and spread over type 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should generate the correct __typename when using both inline fragment and spread over type 1`] = ` "export type UserQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -206,7 +206,7 @@ export type UserFragment = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should generate the correct __typename when using fragment over type 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should generate the correct __typename when using fragment over type 1`] = ` "export type UserQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -220,7 +220,7 @@ export type UserQueryQuery = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should generate the correct __typename when using fragment spread over type 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should generate the correct __typename when using fragment spread over type 1`] = ` "export type UserQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -239,7 +239,7 @@ export type UserFragment = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should generate the correct __typename when using fragment spread over union 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should generate the correct __typename when using fragment spread over union 1`] = ` "export type UserFragmentFragment = ( { __typename?: 'User' } & Pick @@ -261,7 +261,7 @@ export type AaaQuery = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should generate the correct intersection for fragments when using with interfaces with same type 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should generate the correct intersection for fragments when using with interfaces with same type 1`] = ` "export type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; @@ -288,7 +288,7 @@ export type BFragment = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should have valid __typename usage and split types according to that (with usage) 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should have valid __typename usage and split types according to that (with usage) 1`] = ` "type NetRoute_Ipv4Route_Fragment = ( { __typename: 'IPV4Route' } & { @@ -335,7 +335,7 @@ export type QqQuery = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should have valid __typename usage and split types according to that (with usage) 2`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should have valid __typename usage and split types according to that (with usage) 2`] = ` "type NetRoute_Ipv4Route_Fragment = ( { __typename: 'IPV4Route' } & { @@ -390,7 +390,7 @@ export type QqQuery = ( " `; -exports[`TypeScript Operations Plugin Selection Set Should have valid fragments intersection on different types (with usage) #2498 1`] = ` +exports[`TypeScript Operations Plugin > Selection Set > Should have valid fragments intersection on different types (with usage) #2498 1`] = ` "export type TomFragment = ( { __typename?: 'Tom' } & Pick @@ -435,7 +435,7 @@ export type UserQueryQuery = ( " `; -exports[`TypeScript Operations Plugin Union & Interfaces #4216 - handle fragments against unions and interfaces with flattenGeneratedTypes 1`] = ` +exports[`TypeScript Operations Plugin > Union & Interfaces > #4216 - handle fragments against unions and interfaces with flattenGeneratedTypes 1`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -496,7 +496,7 @@ export type SearchPopularQuery = ( " `; -exports[`TypeScript Operations Plugin Union & Interfaces Should handle union selection sets with both FragmentSpreads and InlineFragments 1`] = ` +exports[`TypeScript Operations Plugin > Union & Interfaces > Should handle union selection sets with both FragmentSpreads and InlineFragments 1`] = ` "export type UserQueryQueryVariables = Exact<{ [key: string]: never; }>; @@ -568,7 +568,7 @@ export type UserResultFragment = " `; -exports[`TypeScript Operations Plugin Union & Interfaces Should handle union selection sets with both FragmentSpreads and InlineFragments with flattenGeneratedTypes 1`] = ` +exports[`TypeScript Operations Plugin > Union & Interfaces > Should handle union selection sets with both FragmentSpreads and InlineFragments with flattenGeneratedTypes 1`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -667,7 +667,7 @@ export type UserQueryQuery = ( }" `; -exports[`TypeScript Operations Plugin Union & Interfaces Should handle union selection sets with both FragmentSpreads and InlineFragments with flattenGeneratedTypes and directives 1`] = ` +exports[`TypeScript Operations Plugin > Union & Interfaces > Should handle union selection sets with both FragmentSpreads and InlineFragments with flattenGeneratedTypes and directives 1`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; diff --git a/packages/plugins/typescript/operations/tests/ts-documents.spec.ts b/packages/plugins/typescript/operations/tests/ts-documents.spec.ts index 2185d59d425..89945dcc0a9 100644 --- a/packages/plugins/typescript/operations/tests/ts-documents.spec.ts +++ b/packages/plugins/typescript/operations/tests/ts-documents.spec.ts @@ -6,7 +6,6 @@ import { plugin } from '../src/index.js'; import { schema } from './shared/schema.js'; describe('TypeScript Operations Plugin', () => { - // eslint-disable-next-line @typescript-eslint/no-require-imports const gitHuntSchema = buildClientSchema(require('../../../../../dev-test/githunt/schema.json')); const validate = async ( @@ -5332,13 +5331,13 @@ function test(q: GetEntityBrandDataQuery): void { ); expect(content).toMatchInlineSnapshot(` - "type CatFragment_Duck_Fragment = {}; + "type CatFragment_Duck_Fragment = Record; type CatFragment_Lion_Fragment = { id: string }; type CatFragment_Puma_Fragment = { id: string }; - type CatFragment_Wolf_Fragment = {}; + type CatFragment_Wolf_Fragment = Record; export type CatFragmentFragment = | CatFragment_Duck_Fragment @@ -5353,7 +5352,7 @@ function test(q: GetEntityBrandDataQuery): void { export type KittyQuery = { animals: Array< | { id: string } | { id: string } - | {} + | Record > }; " `); @@ -5481,7 +5480,7 @@ function test(q: GetEntityBrandDataQuery): void { ); expect(content).toBeSimilarStringTo(` - export type UserQuery = { user: Pick | {} }; + export type UserQuery = { user: Pick | Record }; `); }); diff --git a/packages/plugins/typescript/operations/vitest.config.ts b/packages/plugins/typescript/operations/vitest.config.ts new file mode 100644 index 00000000000..715e46b0019 --- /dev/null +++ b/packages/plugins/typescript/operations/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'typescript-operations', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/resolvers/jest.config.js b/packages/plugins/typescript/resolvers/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/resolvers/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/resolvers/package.json b/packages/plugins/typescript/resolvers/package.json index a8e4ba2b0c9..a48cf8f43f4 100644 --- a/packages/plugins/typescript/resolvers/package.json +++ b/packages/plugins/typescript/resolvers/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.1.0", diff --git a/packages/plugins/typescript/resolvers/src/index.ts b/packages/plugins/typescript/resolvers/src/index.ts index 0dbe840d1cd..1782e75ee8c 100644 --- a/packages/plugins/typescript/resolvers/src/index.ts +++ b/packages/plugins/typescript/resolvers/src/index.ts @@ -32,6 +32,7 @@ export const plugin: PluginFunction< ].join('\n') : ''; const importType = config.useTypeImports ? 'import type' : 'import'; + const emptyObjectType = `Record`; const prepend: string[] = []; const defsToInclude: string[] = []; const directiveResolverMappings = {} as Record; @@ -48,7 +49,7 @@ export type Resolver${capitalizedDirectiveName}WithResolve; };`; const resolverTypeName = `Resolver${capitalizedDirectiveName}`; - const resolverType = `export type ${resolverTypeName} =`; + const resolverType = `export type ${resolverTypeName} =`; if (parsedMapper.isExternal) { if (parsedMapper.default) { @@ -75,12 +76,20 @@ export type Resolver${capitalizedDirectiveName}WithResolve = { export type ResolverWithResolve = { resolve: ResolverFn; };`; - const resolverType = `export type Resolver =`; + const resolverType = `export type Resolver =`; const resolverFnUsage = `ResolverFn`; const resolverWithResolveUsage = `ResolverWithResolve`; const stitchingResolverUsage = `StitchingResolver`; if (visitor.hasFederation()) { - if (visitor.config.wrapFieldDefinitions) { - defsToInclude.push(`export type UnwrappedObject = { - [P in keyof T]: T[P] extends infer R | Promise | (() => infer R2 | Promise) - ? R & R2 : T[P] - };`); - } - defsToInclude.push( `export type ReferenceResolver = ( reference: TReference, @@ -225,21 +227,21 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn = ( parent: TParent, context: TContext, info${optionalSignForInfoArg}: GraphQLResolveInfo ) => ${namespacedImportPrefix}Maybe | Promise<${namespacedImportPrefix}Maybe>; -export type IsTypeOfResolverFn = (obj: T, context: TContext, info${optionalSignForInfoArg}: GraphQLResolveInfo) => boolean | Promise; +export type IsTypeOfResolverFn = (obj: T, context: TContext, info${optionalSignForInfoArg}: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -248,6 +250,8 @@ export type DirectiveResolverFn TResult | Promise; `; + const federationTypes = visitor.buildFederationTypes(); + const federationReferenceTypes = visitor.buildFederationReferenceTypes(); const resolversTypeMapping = visitor.buildResolversTypes(); const resolversParentTypeMapping = visitor.buildResolversParentTypes(); const resolversUnionTypesMapping = visitor.buildResolversUnionTypes(); @@ -291,6 +295,8 @@ export type DirectiveResolverFn { - constructor(pluginConfig: TypeScriptResolversPluginConfig, schema: GraphQLSchema) { + constructor(pluginConfig: TypeScriptResolversPluginConfig, schema: GraphQLSchema, federationMeta: FederationMeta) { super( pluginConfig, { @@ -41,7 +36,9 @@ export class TypeScriptResolversVisitor extends BaseResolversVisitor< allowParentTypeOverride: getConfigValue(pluginConfig.allowParentTypeOverride, false), optionalInfoArgument: getConfigValue(pluginConfig.optionalInfoArgument, false), } as ParsedTypeScriptResolversConfig, - schema + schema, + DEFAULT_SCALARS, + federationMeta ); autoBind(this); this.setVariablesTransformer( @@ -96,13 +93,6 @@ export class TypeScriptResolversVisitor extends BaseResolversVisitor< return `${this.config.immutableTypes ? 'ReadonlyArray' : 'Array'}<${str}>`; } - protected getParentTypeForSignature(node: FieldDefinitionNode) { - if (this._federation.isResolveReferenceField(node) && this.config.wrapFieldDefinitions) { - return 'UnwrappedObject'; - } - return 'ParentType'; - } - NamedType(node: NamedTypeNode): string { return `Maybe<${super.NamedType(node)}>`; } @@ -119,7 +109,7 @@ export class TypeScriptResolversVisitor extends BaseResolversVisitor< protected buildEnumResolverContentBlock(node: EnumTypeDefinitionNode, mappedEnumType: string): string { const valuesMap = `{ ${(node.values || []) - .map(v => `${v.name as any as string}${this.config.avoidOptionals.resolvers ? '' : '?'}: any`) + .map(v => `${v.name.value}${this.config.avoidOptionals.resolvers ? '' : '?'}: any`) .join(', ')} }`; this._globalDeclarations.add(ENUM_RESOLVERS_SIGNATURE); @@ -133,7 +123,7 @@ export class TypeScriptResolversVisitor extends BaseResolversVisitor< ): string { return `{ ${(node.values || []) .map(v => { - const valueName = v.name as any as string; + const valueName = v.name.value; const mappedValue = valuesMapping[valueName] ?? valueName; const hasMapping = !!valuesMapping[valueName]; diff --git a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap index 77135b282ba..3838c3a15da 100644 --- a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap +++ b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`TypeScript Resolvers Plugin Config allowParentTypeOverride - should allow to have less strict resolvers by overrding parent type 1`] = ` +exports[`TypeScript Resolvers Plugin > Config > allowParentTypeOverride - should allow to have less strict resolvers by overrding parent type 1`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -107,7 +107,7 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = ResolverFn | ResolverWithResolve; +export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -144,21 +144,21 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver, TContext = Record, TArgs = Record> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; +export type IsTypeOfResolverFn, TContext = Record> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn, TParent = Record, TContext = Record, TArgs = Record> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -166,6 +166,8 @@ export type DirectiveResolverFn TResult | Promise; + + /** Mapping of union types */ export type ResolversUnionTypes<_RefType extends Record> = ResolversObject<{ ChildUnion: @@ -199,8 +201,8 @@ export type ResolversTypes = ResolversObject<{ Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -222,8 +224,8 @@ export type ResolversParentTypes = ResolversObject<{ Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -283,7 +285,6 @@ export type SubscriptionResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }>; export type SomeNodeResolvers = ResolversObject<{ @@ -293,19 +294,14 @@ export type SomeNodeResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - id?: Resolver; }>; export type WithChildResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - unionChild?: Resolver, ParentType, ContextType>; - node?: Resolver, ParentType, ContextType>; }>; export type WithChildrenResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithAll', ParentType, ContextType>; - unionChildren?: Resolver, ParentType, ContextType>; - nodes?: Resolver, ParentType, ContextType>; }>; export type AnotherNodeWithChildResolvers = ResolversObject<{ @@ -365,7 +361,7 @@ export type DirectiveResolvers = ResolversObject<{ " `; -exports[`TypeScript Resolvers Plugin Config namespacedImportName - should work correctly with imported namespaced type 1`] = ` +exports[`TypeScript Resolvers Plugin > Config > namespacedImportName - should work correctly with imported namespaced type 1`] = ` "import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; export type Omit = Pick>; export type RequireFields = Omit & { [P in K]-?: NonNullable }; @@ -378,7 +374,7 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = ResolverFn | ResolverWithResolve; +export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -415,21 +411,21 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver, TContext = Record, TArgs = Record> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Types.Maybe | Promise>; -export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; +export type IsTypeOfResolverFn, TContext = Record> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn, TParent = Record, TContext = Record, TArgs = Record> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -437,6 +433,8 @@ export type DirectiveResolverFn TResult | Promise; + + /** Mapping of union types */ export type ResolversUnionTypes<_RefType extends Record> = ResolversObject<{ ChildUnion: @@ -470,8 +468,8 @@ export type ResolversTypes = ResolversObject<{ Child: ResolverTypeWrapper & { parent?: Types.Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -493,8 +491,8 @@ export type ResolversParentTypes = ResolversObject<{ Child: Omit & { parent?: Types.Maybe }; MyOtherType: Types.MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Types.Scalars['ID']['output']; SomeNode: Types.SomeNode; @@ -554,7 +552,6 @@ export type SubscriptionResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }>; export type SomeNodeResolvers = ResolversObject<{ @@ -564,19 +561,14 @@ export type SomeNodeResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - id?: Resolver; }>; export type WithChildResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - unionChild?: Resolver, ParentType, ContextType>; - node?: Resolver, ParentType, ContextType>; }>; export type WithChildrenResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithAll', ParentType, ContextType>; - unionChildren?: Resolver, ParentType, ContextType>; - nodes?: Resolver, ParentType, ContextType>; }>; export type AnotherNodeWithChildResolvers = ResolversObject<{ @@ -628,7 +620,7 @@ export type DirectiveResolvers = ResolversObject<{ " `; -exports[`TypeScript Resolvers Plugin Config optionalInfoArgument - should allow to have optional info argument 1`] = ` +exports[`TypeScript Resolvers Plugin > Config > optionalInfoArgument - should allow to have optional info argument 1`] = ` "export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -735,7 +727,7 @@ export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = ResolverFn | ResolverWithResolve; +export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, @@ -772,21 +764,21 @@ export type SubscriptionObject | SubscriptionResolverObject; -export type SubscriptionResolver = +export type SubscriptionResolver, TContext = Record, TArgs = Record> = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; -export type TypeResolveFn = ( +export type TypeResolveFn, TContext = Record> = ( parent: TParent, context: TContext, info?: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = (obj: T, context: TContext, info?: GraphQLResolveInfo) => boolean | Promise; +export type IsTypeOfResolverFn, TContext = Record> = (obj: T, context: TContext, info?: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; -export type DirectiveResolverFn = ( +export type DirectiveResolverFn, TParent = Record, TContext = Record, TArgs = Record> = ( next: NextResolverFn, parent: TParent, args: TArgs, @@ -794,6 +786,8 @@ export type DirectiveResolverFn TResult | Promise; + + /** Mapping of union types */ export type ResolversUnionTypes<_RefType extends Record> = ResolversObject<{ ChildUnion: @@ -827,8 +821,8 @@ export type ResolversTypes = ResolversObject<{ Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -850,8 +844,8 @@ export type ResolversParentTypes = ResolversObject<{ Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -911,7 +905,6 @@ export type SubscriptionResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }>; export type SomeNodeResolvers = ResolversObject<{ @@ -921,19 +914,14 @@ export type SomeNodeResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - id?: Resolver; }>; export type WithChildResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithChild' | 'AnotherNodeWithAll', ParentType, ContextType>; - unionChild?: Resolver, ParentType, ContextType>; - node?: Resolver, ParentType, ContextType>; }>; export type WithChildrenResolvers = ResolversObject<{ __resolveType: TypeResolveFn<'AnotherNodeWithAll', ParentType, ContextType>; - unionChildren?: Resolver, ParentType, ContextType>; - nodes?: Resolver, ParentType, ContextType>; }>; export type AnotherNodeWithChildResolvers = ResolversObject<{ diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.avoidOptionals.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.avoidOptionals.spec.ts index ff7b7730a36..42918d7b710 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.avoidOptionals.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.avoidOptionals.spec.ts @@ -53,7 +53,6 @@ describe('TypeScript Resolvers Plugin - config.avoidOptionals', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id: Resolver; }; `); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.customDirectives.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.customDirectives.spec.ts index c7ceeb86040..49f221c71ac 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.customDirectives.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.config.customDirectives.spec.ts @@ -62,7 +62,6 @@ describe('customDirectives.sematicNonNull', () => { nonNullableListWithNonNullableItemLevel0?: Resolver, ParentType, ContextType>; nonNullableListWithNonNullableItemLevel1?: Resolver, ParentType, ContextType>; nonNullableListWithNonNullableItemBothLevels?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; }; `); }); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.interface.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.interface.spec.ts new file mode 100644 index 00000000000..8757ecfdd89 --- /dev/null +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.interface.spec.ts @@ -0,0 +1,213 @@ +import '@graphql-codegen/testing'; +import { generate } from './utils'; + +describe('TypeScript Resolvers Plugin + Apollo Federation - Interface', () => { + it('generates __resolveReference for Interfaces with @key', async () => { + const federatedSchema = /* GraphQL */ ` + type Query { + me: Person + } + + interface Person @key(fields: "id") { + id: ID! + name: PersonName! + } + + type User implements Person @key(fields: "id") { + id: ID! + name: PersonName! + } + + type Admin implements Person @key(fields: "id") { + id: ID! + name: PersonName! + canImpersonate: Boolean! + } + + type PersonName { + first: String! + last: String! + } + `; + + const content = await generate({ + schema: federatedSchema, + config: { + federation: true, + }, + }); + + expect(content).toMatchInlineSnapshot(` + "import { GraphQLResolveInfo } from 'graphql'; + + + export type ResolverTypeWrapper = Promise | T; + + export type ReferenceResolver = ( + reference: TReference, + context: TContext, + info: GraphQLResolveInfo + ) => Promise | TResult; + + type ScalarCheck = S extends true ? T : NullableCheck; + type NullableCheck = Maybe extends T ? Maybe, S>> : ListCheck; + type ListCheck = T extends (infer U)[] ? NullableCheck[] : GraphQLRecursivePick; + export type GraphQLRecursivePick = { [K in keyof T & keyof S]: ScalarCheck }; + + + export type ResolverWithResolve = { + resolve: ResolverFn; + }; + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; + + export type ResolverFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => Promise | TResult; + + export type SubscriptionSubscribeFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => AsyncIterable | Promise>; + + export type SubscriptionResolveFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => TResult | Promise; + + export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; + } + + export interface SubscriptionResolverObject { + subscribe: SubscriptionSubscribeFn; + resolve: SubscriptionResolveFn; + } + + export type SubscriptionObject = + | SubscriptionSubscriberObject + | SubscriptionResolverObject; + + export type SubscriptionResolver, TContext = Record, TArgs = Record> = + | ((...args: any[]) => SubscriptionObject) + | SubscriptionObject; + + export type TypeResolveFn, TContext = Record> = ( + parent: TParent, + context: TContext, + info: GraphQLResolveInfo + ) => Maybe | Promise>; + + export type IsTypeOfResolverFn, TContext = Record> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; + + export type NextResolverFn = () => Promise; + + export type DirectiveResolverFn, TParent = Record, TContext = Record, TArgs = Record> = ( + next: NextResolverFn, + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => TResult | Promise; + + /** Mapping of federation types */ + export type FederationTypes = { + Person: Person; + User: User; + Admin: Admin; + }; + + /** Mapping of federation reference types */ + export type FederationReferenceTypes = { + Person: + ( { __typename: 'Person' } + & GraphQLRecursivePick ); + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + Admin: + ( { __typename: 'Admin' } + & GraphQLRecursivePick ); + }; + + + /** Mapping of interface types */ + export type ResolversInterfaceTypes<_RefType extends Record> = { + Person: + | ( User ) + | ( Admin ) + ; + }; + + /** Mapping between all available schema types and the resolvers types */ + export type ResolversTypes = { + Query: ResolverTypeWrapper>; + Person: ResolverTypeWrapper['Person']>; + ID: ResolverTypeWrapper; + User: ResolverTypeWrapper; + Admin: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + PersonName: ResolverTypeWrapper; + String: ResolverTypeWrapper; + }; + + /** Mapping between all available schema types and the resolvers parents */ + export type ResolversParentTypes = { + Query: Record; + Person: ResolversInterfaceTypes['Person']; + ID: Scalars['ID']['output']; + User: User | FederationReferenceTypes['User']; + Admin: Admin | FederationReferenceTypes['Admin']; + Boolean: Scalars['Boolean']['output']; + PersonName: PersonName; + String: Scalars['String']['output']; + }; + + export type QueryResolvers = { + me?: Resolver, ParentType, ContextType>; + }; + + export type PersonResolvers = { + __resolveType: TypeResolveFn<'User' | 'Admin', ParentType, ContextType>; + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + }; + + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + }; + + export type AdminResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver; + canImpersonate?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + }; + + export type PersonNameResolvers = { + first?: Resolver; + last?: Resolver; + }; + + export type Resolvers = { + Query?: QueryResolvers; + Person?: PersonResolvers; + User?: UserResolvers; + Admin?: AdminResolvers; + PersonName?: PersonNameResolvers; + }; + + " + `); + }); +}); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.mappers.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.mappers.spec.ts new file mode 100644 index 00000000000..411e2f272f1 --- /dev/null +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.mappers.spec.ts @@ -0,0 +1,195 @@ +import '@graphql-codegen/testing'; +import { generate } from './utils'; + +describe('TypeScript Resolvers Plugin + Apollo Federation - mappers', () => { + it('generates FederationTypes and use it for reference type', async () => { + const federatedSchema = /* GraphQL */ ` + type Query { + me: User + } + + type User @key(fields: "id") { + id: ID! + name: String + } + + type UserProfile { + id: ID! + user: User! + } + + type Account @key(fields: "id") { + id: ID! + name: String! @external + displayName: String! @requires(fields: "name") + } + `; + + const content = await generate({ + schema: federatedSchema, + config: { + federation: true, + mappers: { + User: './mappers#UserMapper', + Account: './mappers#AccountMapper', + }, + }, + }); + + // User should have it + expect(content).toMatchInlineSnapshot(` + "import { GraphQLResolveInfo } from 'graphql'; + import { UserMapper, AccountMapper } from './mappers'; + export type Omit = Pick>; + + + export type ResolverTypeWrapper = Promise | T; + + export type ReferenceResolver = ( + reference: TReference, + context: TContext, + info: GraphQLResolveInfo + ) => Promise | TResult; + + type ScalarCheck = S extends true ? T : NullableCheck; + type NullableCheck = Maybe extends T ? Maybe, S>> : ListCheck; + type ListCheck = T extends (infer U)[] ? NullableCheck[] : GraphQLRecursivePick; + export type GraphQLRecursivePick = { [K in keyof T & keyof S]: ScalarCheck }; + + + export type ResolverWithResolve = { + resolve: ResolverFn; + }; + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; + + export type ResolverFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => Promise | TResult; + + export type SubscriptionSubscribeFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => AsyncIterable | Promise>; + + export type SubscriptionResolveFn = ( + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => TResult | Promise; + + export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; + } + + export interface SubscriptionResolverObject { + subscribe: SubscriptionSubscribeFn; + resolve: SubscriptionResolveFn; + } + + export type SubscriptionObject = + | SubscriptionSubscriberObject + | SubscriptionResolverObject; + + export type SubscriptionResolver, TContext = Record, TArgs = Record> = + | ((...args: any[]) => SubscriptionObject) + | SubscriptionObject; + + export type TypeResolveFn, TContext = Record> = ( + parent: TParent, + context: TContext, + info: GraphQLResolveInfo + ) => Maybe | Promise>; + + export type IsTypeOfResolverFn, TContext = Record> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; + + export type NextResolverFn = () => Promise; + + export type DirectiveResolverFn, TParent = Record, TContext = Record, TArgs = Record> = ( + next: NextResolverFn, + parent: TParent, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo + ) => TResult | Promise; + + /** Mapping of federation types */ + export type FederationTypes = { + User: User; + Account: Account; + }; + + /** Mapping of federation reference types */ + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + Account: + ( { __typename: 'Account' } + & GraphQLRecursivePick + & ( Record + | GraphQLRecursivePick ) ); + }; + + + + /** Mapping between all available schema types and the resolvers types */ + export type ResolversTypes = { + Query: ResolverTypeWrapper>; + User: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + String: ResolverTypeWrapper; + UserProfile: ResolverTypeWrapper & { user: ResolversTypes['User'] }>; + Account: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + }; + + /** Mapping between all available schema types and the resolvers parents */ + export type ResolversParentTypes = { + Query: Record; + User: UserMapper; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; + UserProfile: Omit & { user: ResolversParentTypes['User'] }; + Account: AccountMapper; + Boolean: Scalars['Boolean']['output']; + }; + + export type QueryResolvers = { + me?: Resolver, ParentType, ContextType>; + }; + + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver, ParentType, ContextType>; + }; + + export type UserProfileResolvers = { + id?: Resolver; + user?: Resolver; + }; + + export type AccountResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + displayName?: Resolver; + }; + + export type Resolvers = { + Query?: QueryResolvers; + User?: UserResolvers; + UserProfile?: UserProfileResolvers; + Account?: AccountResolvers; + }; + + " + `); + }); +}); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.spec.ts index 1cae62b4c31..d8f3be6a19d 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.spec.ts @@ -24,7 +24,7 @@ function generate({ schema, config }: { schema: string; config: TypeScriptResolv } describe('TypeScript Resolvers Plugin + Apollo Federation', () => { - describe('adds __resolveReference', () => { + it('generates __resolveReference for object types with resolvable @key', async () => { const federatedSchema = /* GraphQL */ ` type Query { allUsers: [User] @@ -76,207 +76,116 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { } `; - it('when generateInternalResolversIfNeeded.__resolveReference = false, generates optional __resolveReference for object types with @key', async () => { - const content = await generate({ - schema: federatedSchema, - config: { - federation: true, - }, - }); - - expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - name?: Resolver, ParentType, ContextType>; - username?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - expect(content).toBeSimilarStringTo(` - export type SingleResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'SingleResolvable' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - expect(content).toBeSimilarStringTo(` - export type SingleNonResolvableResolvers = { - __resolveReference?: ReferenceResolver, ParentType, ContextType>; - id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - expect(content).toBeSimilarStringTo(` - export type AtLeastOneResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'AtLeastOneResolvable' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - id2?: Resolver; - id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - expect(content).toBeSimilarStringTo(` - export type MixedResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'MixedResolvable' } & (GraphQLRecursivePick | GraphQLRecursivePick), ContextType>; - id?: Resolver; - id2?: Resolver; - id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - expect(content).toBeSimilarStringTo(` - export type MultipleNonResolvableResolvers = { - __resolveReference?: ReferenceResolver, ParentType, ContextType>; - id?: Resolver; - id2?: Resolver; - id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); - - // Book does NOT have __resolveReference because it doesn't have @key - expect(content).toBeSimilarStringTo(` - export type BookResolvers = { - id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); + const content = await generate({ + schema: federatedSchema, + config: { + federation: true, + }, }); - it('when generateInternalResolversIfNeeded.__resolveReference = true, generates required __resolveReference for object types with resolvable @key', async () => { - const federatedSchema = /* GraphQL */ ` - type Query { - allUsers: [User] - } - - type User @key(fields: "id") { - id: ID! - name: String - username: String - } - - type Book { - id: ID! - } - - type SingleResolvable @key(fields: "id", resolvable: true) { - id: ID! - } - - type SingleNonResolvable @key(fields: "id", resolvable: false) { - id: ID! - } - - type AtLeastOneResolvable - @key(fields: "id", resolvable: false) - @key(fields: "id2", resolvable: true) - @key(fields: "id3", resolvable: false) { - id: ID! - id2: ID! - id3: ID! - } - - type MixedResolvable - @key(fields: "id") - @key(fields: "id2", resolvable: true) - @key(fields: "id3", resolvable: false) { - id: ID! - id2: ID! - id3: ID! - } + expect(content).toBeSimilarStringTo(` + export type FederationTypes = { + User: User; + SingleResolvable: SingleResolvable; + AtLeastOneResolvable: AtLeastOneResolvable; + MixedResolvable: MixedResolvable; + }; + `); - type MultipleNonResolvable - @key(fields: "id", resolvable: false) - @key(fields: "id2", resolvable: false) - @key(fields: "id3", resolvable: false) { - id: ID! - id2: ID! - id3: ID! - } - `; + expect(content).toBeSimilarStringTo(` + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + SingleResolvable: + ( { __typename: 'SingleResolvable' } + & GraphQLRecursivePick ); + AtLeastOneResolvable: + ( { __typename: 'AtLeastOneResolvable' } + & GraphQLRecursivePick ); + MixedResolvable: + ( { __typename: 'MixedResolvable' } + & ( GraphQLRecursivePick + | GraphQLRecursivePick ) ); + }; + `); - const content = await generate({ - schema: federatedSchema, - config: { - federation: true, - generateInternalResolversIfNeeded: { __resolveReference: true }, - }, - }); + expect(content).toBeSimilarStringTo(` + export type ResolversParentTypes = { + Query: Record; + User: User | FederationReferenceTypes['User']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; + Book: Book; + SingleResolvable: SingleResolvable | FederationReferenceTypes['SingleResolvable']; + SingleNonResolvable: SingleNonResolvable; + AtLeastOneResolvable: AtLeastOneResolvable | FederationReferenceTypes['AtLeastOneResolvable']; + MixedResolvable: MixedResolvable | FederationReferenceTypes['MixedResolvable']; + MultipleNonResolvable: MultipleNonResolvable; + Boolean: Scalars['Boolean']['output']; + }; + `); - // User should have __resolveReference because it has resolvable @key (by default) - expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - name?: Resolver, ParentType, ContextType>; - username?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); + // User should have __resolveReference because it has resolvable @key (by default) + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver, ParentType, ContextType>; + username?: Resolver, ParentType, ContextType>; + }; + `); - // SingleResolvable has __resolveReference because it has resolvable: true - expect(content).toBeSimilarStringTo(` - export type SingleResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'SingleResolvable' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); + // SingleResolvable has __resolveReference because it has resolvable: true + expect(content).toBeSimilarStringTo(` + export type SingleResolvableResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + }; + `); - // SingleNonResolvable does NOT have __resolveReference because it has resolvable: false - expect(content).toBeSimilarStringTo(` + // SingleNonResolvable does NOT have __resolveReference because it has resolvable: false + expect(content).toBeSimilarStringTo(` export type SingleNonResolvableResolvers = { id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; `); - // AtLeastOneResolvable has __resolveReference because it at least one resolvable - expect(content).toBeSimilarStringTo(` - export type AtLeastOneResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'AtLeastOneResolvable' } & GraphQLRecursivePick, ContextType>; - id?: Resolver; - id2?: Resolver; - id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); + // AtLeastOneResolvable has __resolveReference because it at least one resolvable + expect(content).toBeSimilarStringTo(` + export type AtLeastOneResolvableResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + id2?: Resolver; + id3?: Resolver; + }; + `); - // MixedResolvable has __resolveReference and references for resolvable keys - expect(content).toBeSimilarStringTo(` - export type MixedResolvableResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'MixedResolvable' } & (GraphQLRecursivePick | GraphQLRecursivePick), ContextType>; - id?: Resolver; - id2?: Resolver; - id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; - }; - `); + // MixedResolvable has __resolveReference and references for resolvable keys + expect(content).toBeSimilarStringTo(` + export type MixedResolvableResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + id2?: Resolver; + id3?: Resolver; + }; + `); - // MultipleNonResolvableResolvers does NOT have __resolveReference because all keys are non-resolvable - expect(content).toBeSimilarStringTo(` + // MultipleNonResolvableResolvers does NOT have __resolveReference because all keys are non-resolvable + expect(content).toBeSimilarStringTo(` export type MultipleNonResolvableResolvers = { id?: Resolver; id2?: Resolver; id3?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; `); - // Book does NOT have __resolveReference because it doesn't have @key - expect(content).toBeSimilarStringTo(` + // Book does NOT have __resolveReference because it doesn't have @key + expect(content).toBeSimilarStringTo(` export type BookResolvers = { id?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; }; `); - }); }); it('should support extend keyword', async () => { @@ -303,13 +212,21 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }, }); + expect(content).toBeSimilarStringTo(` + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + }; + `); + // User should have it expect(content).toBeSimilarStringTo(` - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; `); // Foo shouldn't because it doesn't have @key expect(content).not.toBeSimilarStringTo(` - __resolveReference?: ReferenceResolver, { __typename: 'Book' } & GraphQLRecursivePick, ContextType>; + __resolveReference?: ReferenceResolver, FederationReferenceType, ContextType>; `); }); @@ -345,21 +262,30 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }); expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - id?: Resolver, ContextType>; - name?: Resolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; - } + export type FederationReferenceTypes = { + Name: + ( { __typename: 'Name' } + & GraphQLRecursivePick ); + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + }; `); expect(content).toBeSimilarStringTo(` - export type NameResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'Name' } & GraphQLRecursivePick, ContextType>; - first?: Resolver, ContextType>; - last?: Resolver, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; - } + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver, ParentType, ContextType>; + }; + `); + + expect(content).toBeSimilarStringTo(` + export type NameResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + first?: Resolver; + last?: Resolver; + }; `); }); @@ -369,11 +295,25 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { users: [User] } + type Account @key(fields: "id") { + id: ID! + key: String! + } + type User @key(fields: "id") { id: ID! - name: String @external - age: Int! @external - username: String @requires(fields: "name age") + + a: String @external + aRequires: String @requires(fields: "a") + + b: String! @external + bRequires: String! @requires(fields: "b") + + c: String! @external + cRequires: String! @requires(fields: "c") + + d: String! @external + dRequires: String! @requires(fields: "d") } `; @@ -384,13 +324,52 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }, }); + expect(content).toBeSimilarStringTo(` + export type ResolversParentTypes = { + Query: Record; + Account: Account | FederationReferenceTypes['Account']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; + User: User | FederationReferenceTypes['User']; + Boolean: Scalars['Boolean']['output']; + }; + `); + + expect(content).toBeSimilarStringTo(` + export type FederationReferenceTypes = { + Account: + ( { __typename: 'Account' } + & GraphQLRecursivePick ); + User: + ( { __typename: 'User' } + & GraphQLRecursivePick + & ( Record + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick ) ); + }; + `); + // User should have it expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - id?: Resolver, ContextType>; - username?: Resolver, { __typename: 'User' } & GraphQLRecursivePick & GraphQLRecursivePick, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + aRequires?: Resolver, ParentType, ContextType>; + bRequires?: Resolver; + cRequires?: Resolver; + dRequires?: Resolver; }; `); }); @@ -403,6 +382,10 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { extend type User @key(fields: "id") { id: ID! @external + + favouriteColor: String! @external + favouriteColorHex: String! @requires(fields: "favouriteColor") + name: String @external age: Int! @external address: Address! @external @@ -423,10 +406,34 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }); expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - username?: Resolver, { __typename: 'User' } & GraphQLRecursivePick & GraphQLRecursivePick, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick + & ( Record + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick ) ); + }; + `); + + expect(content).toBeSimilarStringTo(` + export type ResolversParentTypes = { + Query: Record; + User: User | FederationReferenceTypes['User']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; + Int: Scalars['Int']['output']; + Address: Address; + Boolean: Scalars['Boolean']['output']; + }; + `); + + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + favouriteColorHex?: Resolver; + username?: Resolver, ParentType, ContextType>; }; `); }); @@ -456,28 +463,49 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }); expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - username?: Resolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + }; + `); + + expect(content).toBeSimilarStringTo(` + export type ResolversParentTypes = { + Query: Record; + User: User | FederationReferenceTypes['User']; + String: Scalars['String']['output']; + Name: Name; + Boolean: Scalars['Boolean']['output']; + }; + `); + + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + username?: Resolver, ParentType, ContextType>; }; `); }); - it('should not apply key/requires fields restriction for base federated types', async () => { + it('handles a mix of @key and @requires directives', async () => { const federatedSchema = /* GraphQL */ ` type Query { users: [User] } - type User @key(fields: "name { first last }") { - name: Name! - username: String + type User @key(fields: "id") @key(fields: "uuid") @key(fields: "legacyId { oldId1 oldId2 }") { + id: ID! + uuid: ID! + legacyId: LegacyId! @external + name: String! @external + username: String! @requires(fields: "id name") + usernameLegacy: String! @requires(fields: "legacyId { oldId1 } name") } - type Name { - first: String! - last: String! + type LegacyId { + oldId1: ID! @external + oldId2: ID! @external } `; @@ -489,41 +517,55 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }); expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - name?: Resolver; - username?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & ( GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick ) + & ( Record + | GraphQLRecursivePick + | GraphQLRecursivePick + | GraphQLRecursivePick ) ); + }; + `); + + expect(content).toBeSimilarStringTo(` + export type ResolversParentTypes = { + Query: Record; + User: User | FederationReferenceTypes['User']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; + LegacyId: LegacyId; + Boolean: Scalars['Boolean']['output']; + }; + `); + + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + uuid?: Resolver; + username?: Resolver; + usernameLegacy?: Resolver; }; `); }); - it.skip('should handle interface types', async () => { + it('should not apply key/requires fields restriction for base federated types', async () => { const federatedSchema = /* GraphQL */ ` type Query { - people: [Person] - } - - extend interface Person @key(fields: "name { first last }") { - name: Name! @external - age: Int @requires(fields: "name") + users: [User] } - extend type User implements Person @key(fields: "name { first last }") { - name: Name! @external - age: Int @requires(fields: "name { first last }") + type User @key(fields: "name { first last }") { + name: Name! username: String } - type Admin implements Person @key(fields: "name { first last }") { - name: Name! @external - age: Int @requires(fields: "name { first last }") - permissions: [String!]! - } - - extend type Name { - first: String! @external - last: String! @external + type Name { + first: String! + last: String! } `; @@ -535,14 +577,23 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }); expect(content).toBeSimilarStringTo(` - export type PersonResolvers = { - __resolveType: TypeResolveFn<'User' | 'Admin', ParentType, ContextType>; - age?: Resolver, { __typename: 'User' | 'Admin' } & GraphQLRecursivePick, ContextType>; - }; + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); + }; + `); + + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + name?: Resolver; + username?: Resolver, ParentType, ContextType>; + }; `); }); - it('should skip to generate resolvers of fields with @external directive', async () => { + it('should skip to generate resolvers of fields or object types with @external directive', async () => { const federatedSchema = /* GraphQL */ ` type Query { users: [User] @@ -550,12 +601,38 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { type Book { author: User @provides(fields: "name") + editor: User @provides(fields: "company { taxCode }") } type User @key(fields: "id") { id: ID! name: String @external username: String @external + address: Address + dateOfBirth: DateOfBirth + placeOfBirth: PlaceOfBirth + company: Company + } + + type Address { + street: String! @external + zip: String! + } + + type DateOfBirth { + day: Int! @external + month: Int! @external + year: Int! @external + } + + type PlaceOfBirth @external { + city: String! + country: String! + } + + type Company @external { + name: String! + taxCode: String! } `; @@ -566,15 +643,47 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }, }); - // UserResolver should not have a resolver function of name field expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - id?: Resolver, ContextType>; - name?: Resolver, { __typename: 'User' } & GraphQLRecursivePick, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & GraphQLRecursivePick ); }; `); + + // `UserResolvers` should not have `username` resolver because it is marked with `@external` + // `UserResolvers` should have `name` resolver because whilst it is marked with `@external`, it is provided by `Book.author` + expect(content).toBeSimilarStringTo(` + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + id?: Resolver; + name?: Resolver, ParentType, ContextType>; + address?: Resolver, ParentType, ContextType>; + dateOfBirth?: Resolver, ParentType, ContextType>; + placeOfBirth?: Resolver, ParentType, ContextType>; + company?: Resolver, ParentType, ContextType>; + }; + `); + + // `AddressResolvers` should only have fields not marked with @external + expect(content).toBeSimilarStringTo(` + export type AddressResolvers = { + zip?: Resolver; + }; + `); + + // `DateOfBirthResolvers` should not be generated because every field is marked with @external + expect(content).not.toBeSimilarStringTo('export type DateOfBirthResolvers'); + + // `PlaceOfBirthResolvers` should not be generated because the type is marked with @external, even if `User.placeOfBirth` is not marked with @external + expect(content).not.toBeSimilarStringTo('export type PlaceOfBirthResolvers'); + + // FIXME: `CompanyResolvers` should only have taxCode resolver because it is part of the `@provides` directive in `Book.editor`, even if the whole `Company` type is marked with @external + // expect(content).toBeSimilarStringTo(` + // export type CompanyResolvers = { + // taxCode?: Resolver; + // }; + // `); }); it('should not include _FieldSet scalar', async () => { @@ -693,13 +802,21 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { }, }); + expect(content).toBeSimilarStringTo(` + export type FederationReferenceTypes = { + User: + ( { __typename: 'User' } + & ( GraphQLRecursivePick + | GraphQLRecursivePick ) ); + }; + `); + // User should have it expect(content).toBeSimilarStringTo(` - export type UserResolvers = { - __resolveReference?: ReferenceResolver, { __typename: 'User' } & (GraphQLRecursivePick | GraphQLRecursivePick), ContextType>; - name?: Resolver, { __typename: 'User' } & (GraphQLRecursivePick | GraphQLRecursivePick), ContextType>; - username?: Resolver, { __typename: 'User' } & (GraphQLRecursivePick | GraphQLRecursivePick), ContextType>; - __isTypeOf?: IsTypeOfResolverFn; + export type UserResolvers = { + __resolveReference?: ReferenceResolver | FederationReferenceType, FederationReferenceType, ContextType>; + name?: Resolver, ParentType, ContextType>; + username?: Resolver, ParentType, ContextType>; }; `); }); @@ -763,219 +880,122 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => { expect(content).not.toContain('GraphQLScalarType'); }); - describe('When field definition wrapping is enabled', () => { - it('should add the UnwrappedObject type', async () => { + describe('meta', () => { + it('generates federation meta correctly', async () => { const federatedSchema = /* GraphQL */ ` - type User @key(fields: "id") { - id: ID! - } - `; + scalar _FieldSet + directive @key(fields: _FieldSet!, resolvable: Boolean) repeatable on OBJECT | INTERFACE - const content = await generate({ - schema: federatedSchema, - config: { - federation: true, - wrapFieldDefinitions: true, - }, - }); - - expect(content).toBeSimilarStringTo(`type UnwrappedObject = {`); - }); + type Query { + user: UserPayload! + allUsers: [User] + } - it('should add UnwrappedObject around ParentType for __resloveReference', async () => { - const federatedSchema = /* GraphQL */ ` type User @key(fields: "id") { id: ID! + name: String + username: String } - `; - - const content = await generate({ - schema: federatedSchema, - config: { - federation: true, - wrapFieldDefinitions: true, - }, - }); - - // __resolveReference should be unwrapped - expect(content).toBeSimilarStringTo(` - __resolveReference?: ReferenceResolver, { __typename: 'User' } & GraphQLRecursivePick, {"id":true}>, ContextType>; - `); - // but ID should not - expect(content).toBeSimilarStringTo(`id?: Resolver`); - }); - }); - - describe('meta - generates federation meta correctly', () => { - const federatedSchema = /* GraphQL */ ` - scalar _FieldSet - directive @key(fields: _FieldSet!, resolvable: Boolean) repeatable on OBJECT | INTERFACE - - type Query { - user: UserPayload! - allUsers: [User] - } - - type User @key(fields: "id") { - id: ID! - name: String - username: String - } - - interface Node { - id: ID! - } - type UserOk { - id: ID! - } - type UserError { - message: String! - } - union UserPayload = UserOk | UserError - - enum Country { - FR - US - } + interface Node { + id: ID! + } - type NotResolvable @key(fields: "id", resolvable: false) { - id: ID! - } + type UserOk { + id: ID! + } + type UserError { + message: String! + } + union UserPayload = UserOk | UserError - type Resolvable @key(fields: "id", resolvable: true) { - id: ID! - } + enum Country { + FR + US + } - type MultipleResolvable - @key(fields: "id") - @key(fields: "id2", resolvable: true) - @key(fields: "id3", resolvable: false) { - id: ID! - id2: ID! - id3: ID! - } + type NotResolvable @key(fields: "id", resolvable: false) { + id: ID! + } - type MultipleNonResolvable - @key(fields: "id", resolvable: false) - @key(fields: "id2", resolvable: false) - @key(fields: "id3", resolvable: false) { - id: ID! - id2: ID! - id3: ID! - } - `; + type Resolvable @key(fields: "id", resolvable: true) { + id: ID! + } - it('when generateInternalResolversIfNeeded.__resolveReference = false', async () => { - const result = await plugin(buildSchema(federatedSchema), [], { federation: true }, { outputFile: '' }); + type MultipleResolvable + @key(fields: "id") + @key(fields: "id2", resolvable: true) + @key(fields: "id3", resolvable: false) { + id: ID! + id2: ID! + id3: ID! + } - expect(result.meta?.generatedResolverTypes).toMatchInlineSnapshot(` - Object { - "resolversMap": Object { - "name": "Resolvers", - }, - "userDefined": Object { - "MultipleNonResolvable": Object { - "federation": Object { - "hasResolveReference": true, - }, - "name": "MultipleNonResolvableResolvers", - }, - "MultipleResolvable": Object { - "federation": Object { - "hasResolveReference": true, - }, - "name": "MultipleResolvableResolvers", - }, - "Node": Object { - "name": "NodeResolvers", - }, - "NotResolvable": Object { - "federation": Object { - "hasResolveReference": true, - }, - "name": "NotResolvableResolvers", - }, - "Query": Object { - "name": "QueryResolvers", - }, - "Resolvable": Object { - "federation": Object { - "hasResolveReference": true, - }, - "name": "ResolvableResolvers", - }, - "User": Object { - "federation": Object { - "hasResolveReference": true, - }, - "name": "UserResolvers", - }, - "UserError": Object { - "name": "UserErrorResolvers", - }, - "UserOk": Object { - "name": "UserOkResolvers", - }, - "UserPayload": Object { - "name": "UserPayloadResolvers", - }, - }, + type MultipleNonResolvable + @key(fields: "id", resolvable: false) + @key(fields: "id2", resolvable: false) + @key(fields: "id3", resolvable: false) { + id: ID! + id2: ID! + id3: ID! } - `); - }); + `; - it('when generateInternalResolversIfNeeded.__resolveReference = true', async () => { - const result = await plugin( - buildSchema(federatedSchema), - [], - { federation: true, generateInternalResolversIfNeeded: { __resolveReference: true } }, - { outputFile: '' } - ); + const result = await plugin(buildSchema(federatedSchema), [], { federation: true }, { outputFile: '' }); expect(result.meta?.generatedResolverTypes).toMatchInlineSnapshot(` - Object { - "resolversMap": Object { + { + "resolversMap": { "name": "Resolvers", }, - "userDefined": Object { - "MultipleNonResolvable": Object { + "userDefined": { + "MultipleNonResolvable": { + "hasIsTypeOf": false, "name": "MultipleNonResolvableResolvers", }, - "MultipleResolvable": Object { - "federation": Object { + "MultipleResolvable": { + "federation": { "hasResolveReference": true, }, + "hasIsTypeOf": false, "name": "MultipleResolvableResolvers", }, - "Node": Object { + "Node": { + "hasIsTypeOf": false, "name": "NodeResolvers", }, - "NotResolvable": Object { + "NotResolvable": { + "hasIsTypeOf": false, "name": "NotResolvableResolvers", }, - "Query": Object { + "Query": { + "hasIsTypeOf": false, "name": "QueryResolvers", }, - "Resolvable": Object { - "federation": Object { + "Resolvable": { + "federation": { "hasResolveReference": true, }, + "hasIsTypeOf": false, "name": "ResolvableResolvers", }, - "User": Object { - "federation": Object { + "User": { + "federation": { "hasResolveReference": true, }, + "hasIsTypeOf": false, "name": "UserResolvers", }, - "UserError": Object { + "UserError": { + "hasIsTypeOf": true, "name": "UserErrorResolvers", }, - "UserOk": Object { + "UserOk": { + "hasIsTypeOf": true, "name": "UserOkResolvers", }, - "UserPayload": Object { + "UserPayload": { + "hasIsTypeOf": false, "name": "UserPayloadResolvers", }, }, diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.interface.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.interface.spec.ts index 332216111f6..8f4907e0b1c 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.interface.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.interface.spec.ts @@ -22,8 +22,8 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -46,8 +46,8 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -88,8 +88,8 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -112,8 +112,8 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { Child: Omit & { parent?: Maybe }; MyOtherType: I_MyOtherType_Types; ChildUnion: I_ResolversUnionTypes_Types['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: I_ResolversInterfaceTypes_Types['Node']; ID: Scalars['ID']['output']; SomeNode: I_SomeNode_Types; @@ -162,7 +162,6 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn; - id?: Resolver; }; `); }); @@ -270,7 +269,7 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { T_WithNoAbstractFieldLevel1: ResolverTypeWrapper; T_WithNoAbstractFieldLevel2: ResolverTypeWrapper; T_WithNoAbstractFieldLevel3: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; }; `); @@ -292,7 +291,7 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { T_WithNoAbstractFieldLevel1: T_WithNoAbstractFieldLevel1; T_WithNoAbstractFieldLevel2: T_WithNoAbstractFieldLevel2; T_WithNoAbstractFieldLevel3: T_WithNoAbstractFieldLevel3; - Query: {}; + Query: Record; }; `); }); @@ -461,4 +460,48 @@ describe('TypeScript Resolvers Plugin - Interfaces', () => { }; `); }); + + it('generates __isTypeOf for only implementing object types', async () => { + const schema = buildSchema(/* GraphQL */ ` + interface Node { + id: ID! + } + type Cat implements Node { + id: ID! + name: String! + } + type Dog implements Node { + id: ID! + isGoodBoy: Boolean! + } + type Human { + _id: ID! + } + `); + + const result = await plugin(schema, [], {}, { outputFile: '' }); + + expect(result.content).toBeSimilarStringTo(` + export type CatResolvers = { + id?: Resolver; + name?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + } + `); + + expect(result.content).toBeSimilarStringTo(` + export type DogResolvers = { + id?: Resolver; + isGoodBoy?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + }; + `); + + // Human does not implement Node, so it does not have __isTypeOf + expect(result.content).toBeSimilarStringTo(` + export type HumanResolvers = { + _id?: Resolver; + }; + `); + }); }); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.mapping.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.mapping.spec.ts index c595ebe7041..0bb0e14f3c9 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.mapping.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.mapping.spec.ts @@ -28,8 +28,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -51,8 +51,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -104,8 +104,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { bar: ResolversTypes['String'], parent?: Maybe }>; MyOtherType: ResolverTypeWrapper & { bar: ResolversTypes['String'] }>; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -127,8 +127,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { bar: ResolversParentTypes['String'], parent?: Maybe }; MyOtherType: Omit & { bar: ResolversParentTypes['String'] }; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -411,8 +411,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>>; MyOtherType: ResolverTypeWrapper>; ChildUnion: Partial['ChildUnion']>>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; @@ -433,8 +433,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Partial & { parent?: Maybe }>; MyOtherType: Partial; ChildUnion: Partial['ChildUnion']>; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Partial; SomeNode: Partial; @@ -484,8 +484,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>>; MyOtherType: ResolverTypeWrapper>; ChildUnion: CustomPartial['ChildUnion']>>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; @@ -506,8 +506,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: CustomPartial & { parent?: Maybe }>; MyOtherType: CustomPartial; ChildUnion: CustomPartial['ChildUnion']>; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: CustomPartial; SomeNode: CustomPartial; @@ -560,8 +560,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -582,8 +582,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -636,7 +636,7 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { ID: ResolverTypeWrapper>; String: ResolverTypeWrapper>; Chat: ResolverTypeWrapper & { owner: ResolversTypes['User'], members?: Maybe> }>>; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; Boolean: ResolverTypeWrapper>; }; `); @@ -712,8 +712,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -734,8 +734,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -790,8 +790,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -812,8 +812,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: DatabaseMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -874,8 +874,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -896,8 +896,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: DatabaseMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -938,8 +938,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -960,8 +960,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: any; MyOtherType: any; ChildUnion: any; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: any; ID: any; SomeNode: any; @@ -1014,8 +1014,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1036,8 +1036,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: CustomMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -1089,8 +1089,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1113,8 +1113,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -1132,7 +1132,7 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { }); it('should warn about unused mappers by default', async () => { - const spy = jest.spyOn(console, 'warn').mockImplementation(); + const spy = vi.spyOn(console, 'warn').mockImplementation(() => {}); const testSchema = buildSchema(/* GraphQL */ ` type Query { comments: [Comment!]! @@ -1170,7 +1170,7 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { }); it('should be able not to warn about unused mappers', async () => { - const spy = jest.spyOn(console, 'warn').mockImplementation(); + const spy = vi.spyOn(console, 'warn').mockImplementation(() => {}); const testSchema = buildSchema(/* GraphQL */ ` type Query { comments: [Comment!]! @@ -1265,7 +1265,6 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1348,7 +1347,6 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1374,7 +1372,7 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { }); it('Should generate the correct resolvers when used with mappers with interfaces', async () => { - const spy = jest.spyOn(console, 'warn').mockImplementation(); + const spy = vi.spyOn(console, 'warn').mockImplementation(() => {}); const result = (await plugin( resolversTestingSchema, [], @@ -1429,7 +1427,6 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1499,7 +1496,6 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1569,7 +1565,6 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1628,8 +1623,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1650,8 +1645,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherTypeCustom; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -1704,8 +1699,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1726,8 +1721,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherTypeCustom; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -1782,8 +1777,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1806,8 +1801,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: Omit & { parent?: Maybe }; MyOtherType: MyNamespace.MyCustomOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: Scalars['ID']['output']; SomeNode: SomeNode; @@ -1863,8 +1858,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper; ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; @@ -1887,8 +1882,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: MyNamespace.MyDefaultMapper; MyOtherType: MyNamespace.MyDefaultMapper; ChildUnion: MyNamespace.MyDefaultMapper; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: MyNamespace.MyDefaultMapper; ID: MyNamespace.MyDefaultMapper; SomeNode: MyNamespace.MyDefaultMapper; @@ -2016,8 +2011,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: ResolverTypeWrapper & { parent?: Maybe }>>; MyOtherType: ResolverTypeWrapper>; ChildUnion: MyNamespace.MyDefaultMapper['ChildUnion']>>; - Query: ResolverTypeWrapper<{}>; - Subscription: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; + Subscription: ResolverTypeWrapper>; Node: ResolverTypeWrapper['Node']>; ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; @@ -2039,8 +2034,8 @@ describe('TypeScript Resolvers Plugin - Mapping', () => { Child: MyNamespace.MyDefaultMapper & { parent?: Maybe }>; MyOtherType: MyNamespace.MyDefaultMapper; ChildUnion: MyNamespace.MyDefaultMapper['ChildUnion']>; - Query: {}; - Subscription: {}; + Query: Record; + Subscription: Record; Node: ResolversInterfaceTypes['Node']; ID: MyNamespace.MyDefaultMapper; SomeNode: MyNamespace.MyDefaultMapper; diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.meta.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.meta.spec.ts index 7bae3a0178f..b4beed28e1d 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.meta.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.meta.spec.ts @@ -41,6 +41,10 @@ describe('TypeScript Resolvers Plugin - Meta', () => { FORBIDDEN_ERROR INTERNAL_ERROR } + + type TypeWithoutInterfaceOrUnion { + id: ID! + } `), [], { @@ -66,6 +70,7 @@ describe('TypeScript Resolvers Plugin - Meta', () => { CreateUserError?: create_user_error_resolvers; CreateUserPayload?: create_user_payload_resolvers; ErrorType?: error_type_resolvers; + TypeWithoutInterfaceOrUnion?: type_without_interface_or_union_resolvers; };`); expect(result.content).toContain(`export type create_user_error_resolvers`); expect(result.content).toContain(`export type create_user_ok_resolvers`); @@ -78,37 +83,50 @@ describe('TypeScript Resolvers Plugin - Meta', () => { expect(result.content).toContain(`export type user_resolvers`); expect(result.meta).toMatchInlineSnapshot(` - Object { - "generatedResolverTypes": Object { - "resolversMap": Object { + { + "generatedResolverTypes": { + "resolversMap": { "name": "resolvers", }, - "userDefined": Object { - "CreateUserError": Object { + "userDefined": { + "CreateUserError": { + "hasIsTypeOf": true, "name": "create_user_error_resolvers", }, - "CreateUserOk": Object { + "CreateUserOk": { + "hasIsTypeOf": true, "name": "create_user_ok_resolvers", }, - "CreateUserPayload": Object { + "CreateUserPayload": { + "hasIsTypeOf": false, "name": "create_user_payload_resolvers", }, - "ErrorType": Object { + "ErrorType": { + "hasIsTypeOf": false, "name": "error_type_resolvers", }, - "Mutation": Object { + "Mutation": { + "hasIsTypeOf": false, "name": "mutation_resolvers", }, - "Node": Object { + "Node": { + "hasIsTypeOf": false, "name": "node_resolvers", }, - "Post": Object { + "Post": { + "hasIsTypeOf": true, "name": "post_resolvers", }, - "Query": Object { + "Query": { + "hasIsTypeOf": false, "name": "query_resolvers", }, - "User": Object { + "TypeWithoutInterfaceOrUnion": { + "hasIsTypeOf": false, + "name": "type_without_interface_or_union_resolvers", + }, + "User": { + "hasIsTypeOf": true, "name": "user_resolvers", }, }, diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts index 05d08638850..b7e2e26b348 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts @@ -75,7 +75,7 @@ describe('TypeScript Resolvers Plugin', () => { expect(result.content).toBeSimilarStringTo(`export type StitchingResolver`); expect(result.content).toBeSimilarStringTo(` - export type Resolver = + export type Resolver, TContext = Record, TArgs = Record> = | ResolverFn | ResolverWithResolve | StitchingResolver; @@ -85,19 +85,6 @@ describe('TypeScript Resolvers Plugin', () => { }); describe('Config', () => { - it('onlyResolveTypeForInterfaces - should allow to have only resolveType for interfaces', async () => { - const config = { - onlyResolveTypeForInterfaces: true, - }; - const result = await plugin(resolversTestingSchema, [], config, { outputFile: '' }); - const content = await resolversTestingValidate(result, config, resolversTestingSchema); - - expect(content).toBeSimilarStringTo(` - export type NodeResolvers = { - __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - };`); - }); - it('optionalInfoArgument - should allow to have optional info argument', async () => { const config = { noSchemaStitching: true, @@ -178,7 +165,7 @@ export type ResolverFnAuthenticated = export type ResolverAuthenticatedWithResolve = { resolve: ResolverFnAuthenticated; }; -export type ResolverAuthenticated = ResolverFnAuthenticated | ResolverAuthenticatedWithResolve; +export type ResolverAuthenticated, TContext = Record, TArgs = Record> = ResolverFnAuthenticated | ResolverAuthenticatedWithResolve; `); expect(result.content).toBeSimilarStringTo(` export type MyTypeResolvers = { @@ -195,12 +182,12 @@ export type MyTypeResolvers = + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn; `); expect(result.content).not.toBeSimilarStringTo(` - export type Resolver = + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; `); @@ -212,12 +199,12 @@ export type MyTypeResolvers = + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn; `); expect(result.content).toBeSimilarStringTo(` - export type Resolver = + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; `); @@ -242,7 +229,7 @@ export type MyTypeResolvers = { resolve: ResolverFnAuthenticated; }; -export type ResolverAuthenticated = ResolverFnAuthenticated | ResolverAuthenticatedWithResolve; +export type ResolverAuthenticated, TContext = Record, TArgs = Record> = ResolverFnAuthenticated | ResolverAuthenticatedWithResolve; `); expect(result.content).toBeSimilarStringTo(` export type MyTypeResolvers = { @@ -566,7 +553,7 @@ __isTypeOf?: IsTypeOfResolverFn; }); it('Should not warn when noSchemaStitching is not defined', async () => { - const spy = jest.spyOn(console, 'warn').mockImplementation(); + const spy = vi.spyOn(console, 'warn').mockImplementation(() => {}); const result = await plugin(resolversTestingSchema, [], {}, { outputFile: '' }); expect(spy).not.toHaveBeenCalled(); @@ -593,14 +580,14 @@ __isTypeOf?: IsTypeOfResolverFn; }; `); expect(result.content).not.toBeSimilarStringTo(` - export type Resolver = + export type Resolver, TContext = Record, TArgs = Record> = | ResolverFn | ResolverWithResolve | StitchingResolver; `); expect(result.content).toBeSimilarStringTo(` - export type Resolver = + export type Resolver, TContext = Record, TArgs = Record> = ResolverFn | ResolverWithResolve; `); @@ -703,7 +690,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType?: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); }); @@ -753,7 +739,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -826,7 +811,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -917,7 +901,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -992,7 +975,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1066,7 +1048,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1141,7 +1122,6 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { __resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); @@ -1437,7 +1417,7 @@ export type ResolverFn = ( CCCFoo: ResolverTypeWrapper; String: ResolverTypeWrapper; CCCBar: ResolverTypeWrapper; - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; CCCUnion: ResolverTypeWrapper['CCCUnion']>; Boolean: ResolverTypeWrapper; }; @@ -1447,7 +1427,7 @@ export type ResolverFn = ( CCCFoo: CccFoo; String: Scalars['String']['output']; CCCBar: CccBar; - Query: {}; + Query: Record; CCCUnion: ResolversUnionTypes['CCCUnion']; Boolean: Scalars['Boolean']['output']; }; @@ -1699,9 +1679,9 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type ResolversTypes = { - Subscription: ResolverTypeWrapper<{}>; - Query: ResolverTypeWrapper<{}>; - Mutation: ResolverTypeWrapper<{}>; + Subscription: ResolverTypeWrapper>; + Query: ResolverTypeWrapper>; + Mutation: ResolverTypeWrapper>; String: ResolverTypeWrapper; Post: ResolverTypeWrapper; Boolean: ResolverTypeWrapper; @@ -1732,9 +1712,9 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type ResolversParentTypes = { - Subscription: {}; - Query: {}; - Mutation: {}; + Subscription: Record; + Query: Record; + Mutation: Record; String: Scalars['String']['output']; Post: Post; Boolean: Scalars['Boolean']['output']; @@ -2282,7 +2262,7 @@ export type ResolverFn = ( };`); expect(o).toBeSimilarStringTo(` export type IResolversTypes = { - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; Test: Test; Boolean: ResolverTypeWrapper; String: ResolverTypeWrapper; @@ -2408,7 +2388,6 @@ export type ResolverFn = ( expect(result.content).toBeSimilarStringTo(` export type NodeResolvers = { resolveType: TypeResolveFn<'SomeNode', ParentType, ContextType>; - id?: Resolver; }; `); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.union.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.union.spec.ts index 72580745c32..d35aee217ff 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.union.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.union.spec.ts @@ -47,7 +47,7 @@ describe('TypeScript Resolvers Plugin - Union', () => { expect(content.content).toBeSimilarStringTo(` export type ResolversTypes = { - Query: ResolverTypeWrapper<{}>; + Query: ResolverTypeWrapper>; ID: ResolverTypeWrapper; StandardError: ResolverTypeWrapper; String: ResolverTypeWrapper; @@ -63,7 +63,7 @@ describe('TypeScript Resolvers Plugin - Union', () => { expect(content.content).toBeSimilarStringTo(` export type ResolversParentTypes = { - Query: {}; + Query: Record; ID: Scalars['ID']['output']; StandardError: StandardError; String: Scalars['String']['output']; @@ -236,4 +236,56 @@ describe('TypeScript Resolvers Plugin - Union', () => { }; `); }); + + it('generates __isTypeOf for only union members', async () => { + const schema = buildSchema(/* GraphQL */ ` + type MemberOne { + id: ID! + } + type MemberTwo { + id: ID! + name: String! + } + type MemberThree { + id: ID! + isMember: Boolean! + } + union Union = MemberOne | MemberTwo | MemberThree + type Normal { + id: ID! + } + `); + + const result = await plugin(schema, [], {}, { outputFile: '' }); + + expect(result.content).toBeSimilarStringTo(` + export type MemberOneResolvers = { + id?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + } + `); + + expect(result.content).toBeSimilarStringTo(` + export type MemberTwoResolvers = { + id?: Resolver; + name?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + }; + `); + + expect(result.content).toBeSimilarStringTo(` + export type MemberThreeResolvers = { + id?: Resolver; + isMember?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; + }; + `); + + // Normal type is not a union member, so it does not have __isTypeOf + expect(result.content).toBeSimilarStringTo(` + export type NormalResolvers = { + id?: Resolver; + }; + `); + }); }); diff --git a/packages/plugins/typescript/resolvers/tests/utils.ts b/packages/plugins/typescript/resolvers/tests/utils.ts new file mode 100644 index 00000000000..20f77f1ac05 --- /dev/null +++ b/packages/plugins/typescript/resolvers/tests/utils.ts @@ -0,0 +1,15 @@ +import { codegen } from '@graphql-codegen/core'; +import { parse } from 'graphql'; +import { TypeScriptResolversPluginConfig } from '../src/config.js'; +import { plugin } from '../src/index.js'; + +export function generate({ schema, config }: { schema: string; config: TypeScriptResolversPluginConfig }) { + return codegen({ + filename: 'graphql.ts', + schema: parse(schema), + documents: [], + plugins: [{ 'typescript-resolvers': {} }], + config, + pluginMap: { 'typescript-resolvers': { plugin } }, + }); +} diff --git a/packages/plugins/typescript/resolvers/vitest.config.ts b/packages/plugins/typescript/resolvers/vitest.config.ts new file mode 100644 index 00000000000..c2e7af8c1f4 --- /dev/null +++ b/packages/plugins/typescript/resolvers/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'typescript-resolvers', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/typed-document-node/jest.config.js b/packages/plugins/typescript/typed-document-node/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/typed-document-node/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/typed-document-node/package.json b/packages/plugins/typescript/typed-document-node/package.json index 08c7fef532c..e3c45b7cf59 100644 --- a/packages/plugins/typescript/typed-document-node/package.json +++ b/packages/plugins/typescript/typed-document-node/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "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 || ^16.0.0" diff --git a/packages/plugins/typescript/typed-document-node/vitest.config.ts b/packages/plugins/typescript/typed-document-node/vitest.config.ts new file mode 100644 index 00000000000..7f2aae92232 --- /dev/null +++ b/packages/plugins/typescript/typed-document-node/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'typed-document-node', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/plugins/typescript/typescript/jest.config.js b/packages/plugins/typescript/typescript/jest.config.js deleted file mode 100644 index 54863375ca9..00000000000 --- a/packages/plugins/typescript/typescript/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../../jest.project')({ dirname: __dirname }); diff --git a/packages/plugins/typescript/typescript/package.json b/packages/plugins/typescript/typescript/package.json index 78e679d1c46..117dbe48f0e 100644 --- a/packages/plugins/typescript/typescript/package.json +++ b/packages/plugins/typescript/typescript/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" }, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.1.0", diff --git a/packages/plugins/typescript/typescript/src/introspection-visitor.ts b/packages/plugins/typescript/typescript/src/introspection-visitor.ts index 691a87a6796..c88b763e311 100644 --- a/packages/plugins/typescript/typescript/src/introspection-visitor.ts +++ b/packages/plugins/typescript/typescript/src/introspection-visitor.ts @@ -18,7 +18,7 @@ export class TsIntrospectionVisitor extends TsVisitor { } ObjectTypeDefinition(node: ObjectTypeDefinitionNode, key: string | number, parent: any) { - const name: string = node.name as any; + const name: string = node.name.value; if (this.typesToInclude.some(type => type.name === name)) { return super.ObjectTypeDefinition(node, key, parent); @@ -28,7 +28,7 @@ export class TsIntrospectionVisitor extends TsVisitor { } EnumTypeDefinition(node: EnumTypeDefinitionNode): string { - const name: string = node.name as any; + const name: string = node.name.value; if (this.typesToInclude.some(type => type.name === name)) { return super.EnumTypeDefinition(node); diff --git a/packages/plugins/typescript/typescript/src/visitor.ts b/packages/plugins/typescript/typescript/src/visitor.ts index 55c4ebd33c9..d306c7156c0 100644 --- a/packages/plugins/typescript/typescript/src/visitor.ts +++ b/packages/plugins/typescript/typescript/src/visitor.ts @@ -107,7 +107,7 @@ export class TsVisitor< } protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string { - const typeAsString = node.name as any as string; + const typeAsString = node.name.value; if (this.config.useImplementingTypes) { const allTypesMap = this._schema.getTypeMap(); @@ -130,7 +130,7 @@ export class TsVisitor< } const typeString = super._getTypeForNode(node, isVisitingInputType); - const schemaType = this._schema.getType(node.name as any as string); + const schemaType = this._schema.getType(node.name.value); if (isEnumType(schemaType)) { // futureProofEnums + enumsAsTypes combination adds the future value to the enum type itself @@ -261,7 +261,7 @@ export class TsVisitor< .export() .asKind('type') .withName(this.convertName(node)) - .withComment(node.description as any as string) + .withComment(node.description?.value) .withContent(possibleTypes).string; // return super.UnionTypeDefinition(node, key, parent).concat(withFutureAddedValue).join(""); } @@ -288,7 +288,7 @@ export class TsVisitor< return ( comment + indent( - `${this.config.immutableTypes ? 'readonly ' : ''}${node.name}${ + `${this.config.immutableTypes ? 'readonly ' : ''}${node.name.value}${ addOptionalSign ? '?' : '' }: ${typeString}${this.getPunctuation(type)}` ) @@ -319,7 +319,7 @@ export class TsVisitor< const readonlyPrefix = this.config.immutableTypes ? 'readonly ' : ''; const buildFieldDefinition = (isOneOf = false) => { - return `${readonlyPrefix}${node.name}${addOptionalSign && !isOneOf ? '?' : ''}: ${ + return `${readonlyPrefix}${node.name.value}${addOptionalSign && !isOneOf ? '?' : ''}: ${ isOneOf ? this.clearOptional(type) : type }${this.getPunctuation(declarationKind)}`; }; @@ -336,8 +336,7 @@ export class TsVisitor< } const fieldParts: Array = []; for (const fieldName of Object.keys(parentType.getFields())) { - // Why the heck is node.name a string and not { value: string } at runtime ?! - if (fieldName === (node.name as any as string)) { + if (fieldName === node.name.value) { fieldParts.push(buildFieldDefinition(true)); continue; } @@ -351,7 +350,7 @@ export class TsVisitor< } EnumTypeDefinition(node: EnumTypeDefinitionNode): string { - const enumName = node.name as any as string; + const enumName = node.name.value; // In case of mapped external enum string if (this.config.enumValues[enumName]?.sourceFile) { @@ -378,15 +377,15 @@ export class TsVisitor< return new DeclarationBlock(this._declarationBlockConfig) .export() .asKind('type') - .withComment(node.description as any as string) + .withComment(node.description?.value) .withName(enumTypeName) .withContent( '\n' + node.values .map(enumOption => { - const name = enumOption.name as unknown as string; + const name = enumOption.name.value; const enumValue: string | number = getValueFromConfig(name) ?? name; - const comment = transformComment(enumOption.description as any as string, 1); + const comment = transformComment(enumOption.description?.value, 1); return comment + indent('| ' + wrapWithSingleQuotes(enumValue)); }) @@ -398,15 +397,15 @@ export class TsVisitor< if (this.config.numericEnums) { const block = new DeclarationBlock(this._declarationBlockConfig) .export() - .withComment(node.description as any as string) + .withComment(node.description?.value) .withName(enumTypeName) .asKind('enum') .withBlock( node.values .map((enumOption, i) => { - const valueFromConfig = getValueFromConfig(enumOption.name as unknown as string); + const valueFromConfig = getValueFromConfig(enumOption.name.value); const enumValue: string | number = valueFromConfig ?? i; - const comment = transformComment(enumOption.description as any as string, 1); + const comment = transformComment(enumOption.description?.value, 1); const optionName = this.makeValidEnumIdentifier( this.convertName(enumOption, { useTypesPrefix: false, @@ -433,7 +432,7 @@ export class TsVisitor< .export() .asKind('const') .withName(enumTypeName) - .withComment(node.description as any as string) + .withComment(node.description?.value) .withBlock( node.values .map(enumOption => { @@ -443,8 +442,8 @@ export class TsVisitor< transformUnderscore: true, }) ); - const comment = transformComment(enumOption.description as any as string, 1); - const name = enumOption.name as unknown as string; + const comment = transformComment(enumOption.description?.value, 1); + const name = enumOption.name.value; const enumValue: string | number = getValueFromConfig(name) ?? name; return comment + indent(`${optionName}: ${wrapWithSingleQuotes(enumValue)}`); @@ -459,7 +458,7 @@ export class TsVisitor< .export() .asKind(this.config.constEnums ? 'const enum' : 'enum') .withName(enumTypeName) - .withComment(node.description as any as string) + .withComment(node.description?.value) .withBlock(this.buildEnumValuesBlock(enumName, node.values)).string; } diff --git a/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap b/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap index d617ff6338c..e7f850054b7 100644 --- a/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap +++ b/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`TypeScript should use implementing types as node type - issue #5126 1`] = ` +exports[`TypeScript > should use implementing types as node type - issue #5126 1`] = ` "/** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string; } diff --git a/packages/plugins/typescript/typescript/vitest.config.ts b/packages/plugins/typescript/typescript/vitest.config.ts new file mode 100644 index 00000000000..2c24708dfd6 --- /dev/null +++ b/packages/plugins/typescript/typescript/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'typescript', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/presets/client/jest.config.js b/packages/presets/client/jest.config.js deleted file mode 100644 index 7191c6796d0..00000000000 --- a/packages/presets/client/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../jest.project')({ dirname: __dirname }); diff --git a/packages/presets/client/package.json b/packages/presets/client/package.json index c163ad424c8..e1dd96e8f05 100644 --- a/packages/presets/client/package.json +++ b/packages/presets/client/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../jest.config.js" + "test": "vitest --no-watch" }, "devDependencies": { "@types/babel__helper-plugin-utils": "7.10.3", diff --git a/packages/presets/client/src/index.ts b/packages/presets/client/src/index.ts index f11d189cd5a..7ad87178ec2 100644 --- a/packages/presets/client/src/index.ts +++ b/packages/presets/client/src/index.ts @@ -134,7 +134,6 @@ export const preset: Types.OutputPreset = { enumsAsConst: options.config.enumsAsConst, enumValues: options.config.enumValues, futureProofEnums: options.config.futureProofEnums, - dedupeFragments: options.config.dedupeFragments, nonOptionalTypename: options.config.nonOptionalTypename, avoidOptionals: options.config.avoidOptionals, documentMode: options.config.documentMode, diff --git a/packages/presets/client/tests/client-preset.nullability.spec.ts b/packages/presets/client/tests/client-preset.nullability.spec.ts index 26ddb962b63..ad1f9834dce 100644 --- a/packages/presets/client/tests/client-preset.nullability.spec.ts +++ b/packages/presets/client/tests/client-preset.nullability.spec.ts @@ -63,7 +63,7 @@ const document = /* GraphQL */ ` describe('client-preset - nullability', () => { it('converts semanticNonNull to non-null when nullability.errorHandlingClient=true', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema, documents: [document], generates: { @@ -112,7 +112,7 @@ describe('client-preset - nullability', () => { }); it('leave semanticNonNull as null when nullability.errorHandlingClient=false', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema, documents: [document], generates: { diff --git a/packages/presets/client/tests/client-preset.spec.ts b/packages/presets/client/tests/client-preset.spec.ts index b68d8d17939..c68625ca056 100644 --- a/packages/presets/client/tests/client-preset.spec.ts +++ b/packages/presets/client/tests/client-preset.spec.ts @@ -9,7 +9,7 @@ import { addTypenameSelectionDocumentTransform, preset } from '../src/index.js'; describe('client-preset', () => { it('can generate simple examples uppercase names', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -102,7 +102,7 @@ export * from "./gql";`); }); it('can generate simple examples lowercase names', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -195,7 +195,7 @@ export * from "./gql";`); }); it('generates \\n regardless of whether the source contains LF or CRLF', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -276,7 +276,7 @@ export * from "./gql";`); }); it("follows 'useTypeImports': true", async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -412,7 +412,7 @@ export * from "./gql";`); }); it("follows 'nonOptionalTypename': true", async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -543,7 +543,7 @@ export * from "./gql";`); }); it('supports Apollo fragment masking', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: /* GraphQL */ ` type Query { me: User @@ -632,7 +632,7 @@ export * from "./gql";`); }); it('prevent duplicate operations', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -740,7 +740,7 @@ export * from "./gql";`); describe('fragment masking', () => { it('fragmentMasking: false', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -833,7 +833,7 @@ export * from "./gql";`); }); it('fragmentMasking: {}', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -858,7 +858,7 @@ export * from "./gql";`); }); it('fragmentMasking.unmaskFunctionName', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -977,7 +977,7 @@ export * from "./gql";`); it('can accept null in useFragment', async () => { const docPath = path.join(__dirname, 'fixtures/with-fragment.ts'); - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1016,7 +1016,7 @@ export * from "./gql";`); it('can accept list in useFragment', async () => { const docPath = path.join(__dirname, 'fixtures/with-fragment.ts'); - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1056,7 +1056,7 @@ export * from "./gql";`); it('useFragment preserves ReadonlyArray type', async () => { const docPath = path.join(__dirname, 'fixtures/with-fragment.ts'); - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1096,7 +1096,7 @@ export * from "./gql";`); }); it('generates correct named imports for ESM', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1196,7 +1196,7 @@ export * from "./gql.js";`); }; const docPath = path.join(__dirname, 'fixtures/reused-fragment.ts'); - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1250,13 +1250,13 @@ export * from "./gql.js";`); }); it('should dedupe fragments in a "string" document mode', async () => { - const dir = path.join(__dirname, 'tmp/duplicate-fragments'); + const dir = path.join(__dirname, 'tmp/duplicate-fragments-string'); const cleanUp = async () => { await fs.promises.rm(dir, { recursive: true, force: true }); }; const docPath = path.join(__dirname, 'fixtures/reused-fragment.ts'); - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1312,7 +1312,7 @@ export * from "./gql.js";`); describe('when no operations are found', () => { it('still generates the helper `graphql()` (or under another `presetConfig.gqlTagName` name) function', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1371,7 +1371,7 @@ export * from "./gql.js";`); }); it('embed metadata in executable document node', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1452,7 +1452,7 @@ export * from "./gql.js";`); describe('persisted operations', () => { it('apply default settings', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1531,7 +1531,7 @@ export * from "./gql.js";`); }); it('mode="replaceDocumentWithHash"', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1612,7 +1612,7 @@ export * from "./gql.js";`); }); it('hashPropertyName="custom_property_name"', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1693,7 +1693,7 @@ export * from "./gql.js";`); }); it('embed metadata in executable document node', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1774,7 +1774,7 @@ export * from "./gql.js";`); }); it('hashAlgorithm="sha256"', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1857,7 +1857,7 @@ export * from "./gql.js";`); // This test serves to demonstrate that the custom hash function can perform arbitrary logic // Removing whitespace has no real-world application but clearly shows the custom hash function is being used it('custom hash remove whitespace', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -1941,7 +1941,7 @@ export * from "./gql.js";`); // Tests that the custom hash function can replicate the logic and behavior by re-implementing the existing hash function (for sha256) it('custom hash sha256', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2027,7 +2027,7 @@ export * from "./gql.js";`); // Custom hash example used in `preset-client.mdx` docs it('custom hash docs sha512', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2113,7 +2113,7 @@ export * from "./gql.js";`); }); it('correctly handle fragment references', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: /* GraphQL */ ` type Query { a: A! @@ -2215,7 +2215,7 @@ export * from "./gql.js";`); describe('handles @defer directive', () => { it('generates correct types and metadata', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2297,7 +2297,7 @@ export * from "./gql.js";`); }); it('works with persisted documents', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2382,7 +2382,7 @@ export * from "./gql.js";`); }); it('works with documentMode: string', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2524,7 +2524,7 @@ export * from "./gql.js";`); }); it('works with documentMode: string and persisted documents', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2671,7 +2671,7 @@ export * from "./gql.js";`); describe('documentMode: "string"', () => { it('generates correct types', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2789,7 +2789,7 @@ export * from "./gql.js";`); }); it('graphql overloads have a nice result type', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -2864,7 +2864,7 @@ export * from "./gql.js";`); }); it('correctly resolves nested fragments', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` scalar Date @@ -2953,7 +2953,7 @@ export * from "./gql.js";`); }); it('correctly skips the typename addition for the root node for subscriptions', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` schema { @@ -3076,7 +3076,7 @@ export * from "./gql.js";`); }); it('support enumsAsConst option', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` type Query { @@ -3148,7 +3148,7 @@ export * from "./gql.js";`); }); it('support enumValues option', async () => { - const result = await executeCodegen({ + const { result } = await executeCodegen({ schema: [ /* GraphQL */ ` enum Color { diff --git a/packages/presets/client/vitest.config.ts b/packages/presets/client/vitest.config.ts new file mode 100644 index 00000000000..35ed0a4f73d --- /dev/null +++ b/packages/presets/client/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'client-preset', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/presets/graphql-modules/jest.config.js b/packages/presets/graphql-modules/jest.config.js deleted file mode 100644 index 7191c6796d0..00000000000 --- a/packages/presets/graphql-modules/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../jest.project')({ dirname: __dirname }); diff --git a/packages/presets/graphql-modules/tests/__snapshots__/builder.spec.ts.snap b/packages/presets/graphql-modules/tests/__snapshots__/builder.spec.ts.snap index a7f93187757..6966d68621a 100644 --- a/packages/presets/graphql-modules/tests/__snapshots__/builder.spec.ts.snap +++ b/packages/presets/graphql-modules/tests/__snapshots__/builder.spec.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`encapsulate: should wrap correctly with namespace 1`] = ` "import * as core from "../types"; diff --git a/packages/presets/graphql-modules/tests/__snapshots__/integration.spec.ts.snap b/packages/presets/graphql-modules/tests/__snapshots__/integration.spec.ts.snap index 4cc69568c82..fc8c0fbeb7b 100644 --- a/packages/presets/graphql-modules/tests/__snapshots__/integration.spec.ts.snap +++ b/packages/presets/graphql-modules/tests/__snapshots__/integration.spec.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Integration dotanions module should export DefinedFields, Schema Types with Picks and resolvers 1`] = ` +exports[`Integration > dotanions module should export DefinedFields, Schema Types with Picks and resolvers 1`] = ` "import * as Types from "../global-types"; import * as gm from "graphql-modules"; interface DefinedFields { diff --git a/packages/presets/graphql-modules/tests/integration.spec.ts b/packages/presets/graphql-modules/tests/integration.spec.ts index 8a9c13d3dc4..2626da08a14 100644 --- a/packages/presets/graphql-modules/tests/integration.spec.ts +++ b/packages/presets/graphql-modules/tests/integration.spec.ts @@ -1,10 +1,6 @@ +import '@graphql-codegen/testing'; import { normalize } from 'path'; import { executeCodegen } from '@graphql-codegen/cli'; -import { useMonorepo } from '@graphql-codegen/testing'; - -const monorepo = useMonorepo({ - dirname: __dirname, -}); const options = { generates: { @@ -22,38 +18,30 @@ const options = { }; describe('Integration', () => { - monorepo.correctCWD(); - - beforeEach(() => { - jest.useFakeTimers({ - legacyFakeTimers: true, - }); - }); - // In this test, we make sure executeCodegen passes on a list of Sources as an extension // This is very important test('should generate a base output and 4 for modules', async () => { - const output = await executeCodegen(options); - - expect(output.length).toBe(5); - expect(normalize(output[0].filename)).toMatch(normalize(`/modules/global-types.ts`)); - expect(normalize(output[1].filename)).toMatch(normalize(`/modules/blog/module-types.ts`)); - expect(normalize(output[2].filename)).toMatch(normalize(`/modules/common/module-types.ts`)); - expect(normalize(output[3].filename)).toMatch(normalize(`/modules/dotanions/module-types.ts`)); - expect(normalize(output[4].filename)).toMatch(normalize(`/modules/users/module-types.ts`)); + const { result } = await executeCodegen(options); + + expect(result.length).toBe(5); + expect(normalize(result[0].filename)).toMatch(normalize(`/modules/global-types.ts`)); + expect(normalize(result[1].filename)).toMatch(normalize(`/modules/blog/module-types.ts`)); + expect(normalize(result[2].filename)).toMatch(normalize(`/modules/common/module-types.ts`)); + expect(normalize(result[3].filename)).toMatch(normalize(`/modules/dotanions/module-types.ts`)); + expect(normalize(result[4].filename)).toMatch(normalize(`/modules/users/module-types.ts`)); }); test('should not duplicate type even if type and extend type are in the same module', async () => { - const output = await executeCodegen(options); + const { result } = await executeCodegen(options); const userResolversStr = `export type UserResolvers = Pick;`; - const nbOfTimeUserResolverFound = output[4].content.split(userResolversStr).length - 1; + const nbOfTimeUserResolverFound = result[4].content.split(userResolversStr).length - 1; expect(nbOfTimeUserResolverFound).toBe(1); }); test('should allow to override importBaseTypesFrom correctly', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ generates: { './tests/test-files/modules': { schema: './tests/test-files/modules/*/types/*.graphql', @@ -70,15 +58,15 @@ describe('Integration', () => { }); const importStatement = `import * as Types from "@types";`; - expect(output.length).toBe(5); - expect(output[1].content).toMatch(importStatement); - expect(output[2].content).toMatch(importStatement); - expect(output[3].content).toMatch(importStatement); - expect(output[4].content).toMatch(importStatement); + expect(result.length).toBe(5); + expect(result[1].content).toMatch(importStatement); + expect(result[2].content).toMatch(importStatement); + expect(result[3].content).toMatch(importStatement); + expect(result[4].content).toMatch(importStatement); }); test('should import with respect of useTypeImports config correctly', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ generates: { './tests/test-files/modules': { schema: './tests/test-files/modules/*/types/*.graphql', @@ -99,15 +87,15 @@ describe('Integration', () => { const importStatement = `import type * as Types from "@types";`; - expect(output.length).toBe(5); - expect(output[1].content).toMatch(importStatement); - expect(output[2].content).toMatch(importStatement); - expect(output[3].content).toMatch(importStatement); - expect(output[4].content).toMatch(importStatement); + expect(result.length).toBe(5); + expect(result[1].content).toMatch(importStatement); + expect(result[2].content).toMatch(importStatement); + expect(result[3].content).toMatch(importStatement); + expect(result[4].content).toMatch(importStatement); }); test('should allow to disable graphql-modules', async () => { - const output = await executeCodegen({ + const { result } = await executeCodegen({ generates: { './tests/test-files/modules': { schema: './tests/test-files/modules/*/types/*.graphql', @@ -124,45 +112,45 @@ describe('Integration', () => { }, }); - for (const record of output) { + for (const record of result) { expect(record).not.toContain(`graphql-modules`); expect(record).not.toContain(`gm.`); } }); test('each module-types should include a relative import to glob-types module', async () => { - const output = await executeCodegen(options); + const { result } = await executeCodegen(options); const importStatement = `import * as Types from "../global-types";`; - expect(output.length).toBe(5); - expect(output[1].content).toMatch(importStatement); - expect(output[2].content).toMatch(importStatement); - expect(output[3].content).toMatch(importStatement); - expect(output[4].content).toMatch(importStatement); + expect(result.length).toBe(5); + expect(result[1].content).toMatch(importStatement); + expect(result[2].content).toMatch(importStatement); + expect(result[3].content).toMatch(importStatement); + expect(result[4].content).toMatch(importStatement); }); test('each module-types should export Resolvers', async () => { - const output = await executeCodegen(options); + const { result } = await executeCodegen(options); const exportStatemment = `export interface Resolvers `; - expect(output.length).toBe(5); - expect(output[1].content).toMatch(exportStatemment); - expect(output[2].content).toMatch(exportStatemment); - expect(output[3].content).toMatch(exportStatemment); - expect(output[4].content).toMatch(exportStatemment); + expect(result.length).toBe(5); + expect(result[1].content).toMatch(exportStatemment); + expect(result[2].content).toMatch(exportStatemment); + expect(result[3].content).toMatch(exportStatemment); + expect(result[4].content).toMatch(exportStatemment); }); test('dotanions module should export DefinedFields, Schema Types with Picks and resolvers', async () => { - const output = await executeCodegen(options); + const { result } = await executeCodegen(options); - expect(output.length).toBe(5); - expect(output[3].content).toMatchSnapshot(); + expect(result.length).toBe(5); + expect(result[3].content).toMatchSnapshot(); }); test('should NOT produce required root-level resolvers in Resolvers interface by default', async () => { - const output = await executeCodegen(options); + const { result } = await executeCodegen(options); - const usersModuleOutput = output.find(o => o.filename.includes('users'))!; + const usersModuleOutput = result.find(o => o.filename.includes('users'))!; expect(usersModuleOutput).toBeDefined(); expect(usersModuleOutput.content).toContain( @@ -180,9 +168,9 @@ describe('Integration', () => { useGraphQLModules: false, }; - const output = await executeCodegen(optionsCopy); + const { result } = await executeCodegen(optionsCopy); - const usersModuleOutput = output.find(o => o.filename.includes('users'))!; + const usersModuleOutput = result.find(o => o.filename.includes('users'))!; expect(usersModuleOutput).toBeDefined(); @@ -204,13 +192,13 @@ describe('Integration', () => { ...options, emitLegacyCommonJSImports: false, }; - const output = await executeCodegen(emitLegacyCommonJSImports); + const { result } = await executeCodegen(emitLegacyCommonJSImports); const esmImportStatement = `import * as Types from "../global-types.js";`; - expect(output.length).toBe(5); - expect(output[1].content).toMatch(esmImportStatement); - expect(output[2].content).toMatch(esmImportStatement); - expect(output[3].content).toMatch(esmImportStatement); - expect(output[4].content).toMatch(esmImportStatement); + expect(result.length).toBe(5); + expect(result[1].content).toMatch(esmImportStatement); + expect(result[2].content).toMatch(esmImportStatement); + expect(result[3].content).toMatch(esmImportStatement); + expect(result[4].content).toMatch(esmImportStatement); }); }); diff --git a/packages/presets/graphql-modules/vitest.config.ts b/packages/presets/graphql-modules/vitest.config.ts new file mode 100644 index 00000000000..6fda2bdf109 --- /dev/null +++ b/packages/presets/graphql-modules/vitest.config.ts @@ -0,0 +1,13 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'graphql-modules-preset', + setupFiles: './vitest.setup.ts', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/presets/graphql-modules/vitest.setup.ts b/packages/presets/graphql-modules/vitest.setup.ts new file mode 100644 index 00000000000..c0360bc51e6 --- /dev/null +++ b/packages/presets/graphql-modules/vitest.setup.ts @@ -0,0 +1,3 @@ +import { vi } from 'vitest'; + +vi.spyOn(process, 'cwd').mockImplementation(() => __dirname); diff --git a/packages/utils/graphql-codegen-testing/jest.config.js b/packages/utils/graphql-codegen-testing/jest.config.js deleted file mode 100644 index 7191c6796d0..00000000000 --- a/packages/utils/graphql-codegen-testing/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../jest.project')({ dirname: __dirname }); diff --git a/packages/utils/graphql-codegen-testing/package.json b/packages/utils/graphql-codegen-testing/package.json index 8509b0f5dc6..9b781146974 100644 --- a/packages/utils/graphql-codegen-testing/package.json +++ b/packages/utils/graphql-codegen-testing/package.json @@ -44,7 +44,7 @@ "common-tags": "^1.8.0", "lz-string": "^1.4.4", "graphql-helix": "1.13.0", - "nock": "13.5.4", + "nock": "^14.0.0", "tslib": "~2.6.0" }, "devDependencies": { diff --git a/packages/utils/graphql-codegen-testing/src/index.ts b/packages/utils/graphql-codegen-testing/src/index.ts index ee35813675e..f840aa6735c 100644 --- a/packages/utils/graphql-codegen-testing/src/index.ts +++ b/packages/utils/graphql-codegen-testing/src/index.ts @@ -1,18 +1,16 @@ -import { existsSync } from 'fs'; -import { resolve } from 'path'; -import { expect } from '@jest/globals'; +import { expect } from 'vitest'; import { oneLine, stripIndent } from 'common-tags'; import { diff } from 'jest-diff'; -declare global { - namespace jest { - interface Matchers { - /** - * Normalizes whitespace and performs string comparisons - */ - toBeSimilarStringTo(expected: string): R; - } - } +interface CustomMatchers { + /** + * Normalizes whitespace and performs string comparisons + */ + toBeSimilarStringTo(expected: string): R; +} +declare module 'vitest' { + // eslint-disable-next-line @typescript-eslint/no-empty-object-type + interface Matchers extends CustomMatchers {} } function compareStrings(a: string, b: string): boolean { @@ -68,42 +66,6 @@ expect.extend({ }, }); -function findProjectDir(dirname: string): string | never { - const originalDirname = dirname; - const cwd = process.cwd(); - const stopDir = resolve(cwd, '..'); - - while (dirname !== stopDir) { - try { - if (existsSync(resolve(dirname, 'package.json'))) { - return dirname; - } - - dirname = resolve(dirname, '..'); - } catch { - // ignore - } - } - - throw new Error(`Coudn't find project's root from: ${originalDirname}`); -} - -export function useMonorepo({ dirname }: { dirname: string }) { - const cwd = findProjectDir(dirname); - - return { - correctCWD() { - let spyProcessCwd: jest.SpyInstance; - beforeEach(() => { - spyProcessCwd = jest.spyOn(process, 'cwd').mockReturnValue(cwd); - }); - afterEach(() => { - spyProcessCwd.mockRestore(); - }); - }, - }; -} - export * from './mock-graphql-server.js'; export * from './resolvers-common.js'; export * from './typescript.js'; diff --git a/packages/utils/graphql-codegen-testing/vitest.config.ts b/packages/utils/graphql-codegen-testing/vitest.config.ts new file mode 100644 index 00000000000..bc8ea1f59dd --- /dev/null +++ b/packages/utils/graphql-codegen-testing/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'graphql-codegen-testing', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/packages/utils/plugins-helpers/jest.config.js b/packages/utils/plugins-helpers/jest.config.js deleted file mode 100644 index 7191c6796d0..00000000000 --- a/packages/utils/plugins-helpers/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../jest.project')({ dirname: __dirname }); diff --git a/packages/utils/plugins-helpers/package.json b/packages/utils/plugins-helpers/package.json index f3120c541e4..ff247db7fa1 100644 --- a/packages/utils/plugins-helpers/package.json +++ b/packages/utils/plugins-helpers/package.json @@ -10,7 +10,7 @@ "license": "MIT", "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../jest.config.js" + "test": "vitest --no-watch" }, "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 || ^16.0.0" diff --git a/packages/utils/plugins-helpers/src/federation.ts b/packages/utils/plugins-helpers/src/federation.ts index d77277629e7..b2e087d62d6 100644 --- a/packages/utils/plugins-helpers/src/federation.ts +++ b/packages/utils/plugins-helpers/src/federation.ts @@ -1,18 +1,20 @@ -import { astFromObjectType, getRootTypeNames, MapperKind, mapSchema } from '@graphql-tools/utils'; +import { astFromInterfaceType, astFromObjectType, getRootTypeNames, MapperKind, mapSchema } from '@graphql-tools/utils'; +import type { FieldDefinitionResult } from '@graphql-codegen/visitor-plugin-common'; import { DefinitionNode, DirectiveNode, FieldDefinitionNode, - GraphQLNamedType, + GraphQLFieldConfigMap, + GraphQLInterfaceType, GraphQLObjectType, GraphQLSchema, + InterfaceTypeDefinitionNode, isObjectType, ObjectTypeDefinitionNode, OperationDefinitionNode, parse, StringValueNode, } from 'graphql'; -import merge from 'lodash/merge.js'; import { oldVisit } from './index.js'; import { getBaseType } from './utils.js'; @@ -29,14 +31,262 @@ export const federationSpec = parse(/* GraphQL */ ` `); /** - * Adds `__resolveReference` in each ObjectType involved in Federation. + * ReferenceSelectionSet + * @description Each is a collection of fields that are available in a reference payload (originated from the Router) + * @example + * - resolvable fields marked with `@key` + * - fields declared in `@provides` + * - fields declared in `@requires` + */ +interface DirectiveSelectionSet { + name: string; + selection: boolean | DirectiveSelectionSet[]; +} + +type ReferenceSelectionSet = Record; // TODO: handle nested + +interface TypeMeta { + hasResolveReference: boolean; + resolvableKeyDirectives: readonly DirectiveNode[]; + /** + * referenceSelectionSets + * @description Each element can be `ReferenceSelectionSet[]`. + * Elements at the root level are combined with `&` and nested elements are combined with `|`. + * + * @example: + * - [[A, B], [C], [D]] -> (A | B) & C & D + * - [[A, B], [C, D], [E]] -> (A | B) & (C | D) & E + */ + referenceSelectionSets: { directive: '@key' | '@requires'; selectionSets: ReferenceSelectionSet[] }[]; + referenceSelectionSetsString: string; +} + +export type FederationMeta = { [typeName: string]: TypeMeta }; + +/** + * Adds `__resolveReference` in each ObjectType and InterfaceType involved in Federation. + * We do this to utilise the existing FieldDefinition logic of the plugin, which includes many logic: + * - mapper + * - return type * @param schema */ -export function addFederationReferencesToSchema(schema: GraphQLSchema): GraphQLSchema { - return mapSchema(schema, { +export function addFederationReferencesToSchema(schema: GraphQLSchema): { + transformedSchema: GraphQLSchema; + federationMeta: FederationMeta; +} { + const setFederationMeta = ({ + meta, + typeName, + update, + }: { + meta: FederationMeta; + typeName: string; + update: TypeMeta; + }): void => { + meta[typeName] = { + ...(meta[typeName] || + ({ + hasResolveReference: false, + resolvableKeyDirectives: [], + referenceSelectionSets: [], + referenceSelectionSetsString: '', + } satisfies TypeMeta)), + ...update, + }; + }; + + const getReferenceSelectionSets = ({ + resolvableKeyDirectives, + fields, + }: { + resolvableKeyDirectives: readonly DirectiveNode[]; + fields: GraphQLFieldConfigMap; + }): TypeMeta['referenceSelectionSets'] => { + const referenceSelectionSets: TypeMeta['referenceSelectionSets'] = []; + + // @key() @key() - "primary keys" in Federation + // A reference may receive one primary key combination at a time, so they will be combined with `|` + const primaryKeys = resolvableKeyDirectives.map(extractReferenceSelectionSet); + referenceSelectionSets.push({ directive: '@key', selectionSets: [...primaryKeys] }); + + const requiresPossibleTypes: ReferenceSelectionSet[] = []; + for (const fieldNode of Object.values(fields)) { + // Look for @requires and see what the service needs and gets + const directives = getDirectivesByName('requires', fieldNode.astNode); + for (const directive of directives) { + const requires = extractReferenceSelectionSet(directive); + requiresPossibleTypes.push(requires); + } + } + referenceSelectionSets.push({ directive: '@requires', selectionSets: requiresPossibleTypes }); + + return referenceSelectionSets; + }; + + /** + * Function to find all combinations of selection sets and push them into the `result` + * This is used for `@requires` directive because depending on the operation selection set, different + * combination of fields are sent from the router. + * + * @example + * Input: [ + * { a: true }, + * { b: true }, + * { c: true }, + * { d: true}, + * ] + * Output: [ + * { a: true }, + * { a: true, b: true }, + * { a: true, c: true }, + * { a: true, d: true }, + * { a: true, b: true, c: true }, + * { a: true, b: true, d: true }, + * { a: true, c: true, d: true }, + * { a: true, b: true, c: true, d: true } + * + * { b: true }, + * { b: true, c: true }, + * { b: true, d: true }, + * { b: true, c: true, d: true } + * + * { c: true }, + * { c: true, d: true }, + * + * { d: true }, + * ] + * ``` + */ + function findAllSelectionSetCombinations( + selectionSets: ReferenceSelectionSet[], + result: ReferenceSelectionSet[] + ): void { + if (selectionSets.length === 0) { + return; + } + + for (let baseIndex = 0; baseIndex < selectionSets.length; baseIndex++) { + const base = selectionSets.slice(0, baseIndex + 1); + const rest = selectionSets.slice(baseIndex + 1, selectionSets.length); + + const currentSelectionSet = base.reduce((acc, selectionSet) => { + acc = { ...acc, ...selectionSet }; + return acc; + }, {}); + + if (baseIndex === 0) { + result.push(currentSelectionSet); + } + + for (const selectionSet of rest) { + result.push({ ...currentSelectionSet, ...selectionSet }); + } + } + + const next = selectionSets.slice(1, selectionSets.length); + + if (next.length > 0) { + findAllSelectionSetCombinations(next, result); + } + } + + const printReferenceSelectionSets = ({ + typeName, + baseFederationType, + referenceSelectionSets, + }: { + typeName: string; + baseFederationType: string; + referenceSelectionSets: TypeMeta['referenceSelectionSets']; + }): string => { + const referenceSelectionSetStrings = referenceSelectionSets.reduce( + (acc, { directive, selectionSets: originalSelectionSets }) => { + const result: string[] = []; + + let selectionSets = originalSelectionSets; + if (directive === '@requires') { + selectionSets = []; + findAllSelectionSetCombinations(originalSelectionSets, selectionSets); + if (selectionSets.length > 0) { + result.push('Record'); + } + } + + for (const referenceSelectionSet of selectionSets) { + result.push(`GraphQLRecursivePick<${baseFederationType}, ${JSON.stringify(referenceSelectionSet)}>`); + } + + if (result.length === 0) { + return acc; + } + + if (result.length === 1) { + acc.push(result.join(' | ')); + return acc; + } + + acc.push(`( ${result.join('\n | ')} )`); + return acc; + }, + [] + ); + + return `\n ( { __typename: '${typeName}' }\n & ${referenceSelectionSetStrings.join('\n & ')} )`; + }; + + const federationMeta: FederationMeta = {}; + + const transformedSchema = mapSchema(schema, { + [MapperKind.INTERFACE_TYPE]: type => { + const node = astFromInterfaceType(type, schema); + const federationDetails = checkTypeFederationDetails(node, schema); + if (federationDetails && federationDetails.resolvableKeyDirectives.length > 0) { + const typeConfig = type.toConfig(); + typeConfig.fields = { + [resolveReferenceFieldName]: { + type, + }, + ...typeConfig.fields, + }; + + const referenceSelectionSets = getReferenceSelectionSets({ + resolvableKeyDirectives: federationDetails.resolvableKeyDirectives, + fields: typeConfig.fields, + }); + + const referenceSelectionSetsString = printReferenceSelectionSets({ + typeName: type.name, + baseFederationType: `FederationTypes['${type.name}']`, // FIXME: run convertName on FederationTypes + referenceSelectionSets, + }); + + setFederationMeta({ + meta: federationMeta, + typeName: type.name, + update: { + hasResolveReference: true, + resolvableKeyDirectives: federationDetails.resolvableKeyDirectives, + referenceSelectionSets, + referenceSelectionSetsString, + }, + }); + + return new GraphQLInterfaceType(typeConfig); + } + + return type; + }, [MapperKind.OBJECT_TYPE]: type => { - if (checkObjectTypeFederationDetails(type, schema)) { + const node = astFromObjectType(type, schema); + const federationDetails = checkTypeFederationDetails(node, schema); + if (federationDetails && federationDetails.resolvableKeyDirectives.length > 0) { const typeConfig = type.toConfig(); + + const referenceSelectionSets = getReferenceSelectionSets({ + resolvableKeyDirectives: federationDetails.resolvableKeyDirectives, + fields: typeConfig.fields, + }); + typeConfig.fields = { [resolveReferenceFieldName]: { type, @@ -44,11 +294,33 @@ export function addFederationReferencesToSchema(schema: GraphQLSchema): GraphQLS ...typeConfig.fields, }; + const referenceSelectionSetsString = printReferenceSelectionSets({ + typeName: type.name, + baseFederationType: `FederationTypes['${type.name}']`, // FIXME: run convertName on FederationTypes + referenceSelectionSets, + }); + + setFederationMeta({ + meta: federationMeta, + typeName: type.name, + update: { + hasResolveReference: true, + resolvableKeyDirectives: federationDetails.resolvableKeyDirectives, + referenceSelectionSets, + referenceSelectionSetsString, + }, + }); + return new GraphQLObjectType(typeConfig); } return type; }, }); + + return { + transformedSchema, + federationMeta, + }; } /** @@ -82,20 +354,23 @@ export function removeFederation(schema: GraphQLSchema): GraphQLSchema { const resolveReferenceFieldName = '__resolveReference'; -interface TypeMeta { - hasResolveReference: boolean; -} - export class ApolloFederation { private enabled = false; private schema: GraphQLSchema; private providesMap: Record; - protected meta: { [typename: string]: TypeMeta } = {}; + /** + * `fieldsToGenerate` is a meta object where the keys are object type names + * and the values are fields that must be generated for that object. + */ + private fieldsToGenerate: Record; + protected meta: FederationMeta = {}; - constructor({ enabled, schema }: { enabled: boolean; schema: GraphQLSchema }) { + constructor({ enabled, schema, meta }: { enabled: boolean; schema: GraphQLSchema; meta: FederationMeta }) { this.enabled = enabled; this.schema = schema; this.providesMap = this.createMapOfProvides(); + this.fieldsToGenerate = {}; + this.meta = meta; } /** @@ -131,138 +406,106 @@ export class ApolloFederation { } /** - * Decides if field should not be generated - * @param data + * findFieldNodesToGenerate + * @description Function to find field nodes to generate. + * In a normal setup, all fields must be generated. + * However, in a Federatin setup, a field should not be generated if: + * - The field is marked as `@external` and there is no `@provides` path to the field + * - The parent object is marked as `@external` and there is no `@provides` path to the field */ - skipField({ fieldNode, parentType }: { fieldNode: FieldDefinitionNode; parentType: GraphQLNamedType }): boolean { - if (!this.enabled || !isObjectType(parentType) || !checkObjectTypeFederationDetails(parentType, this.schema)) { - return false; + findFieldNodesToGenerate({ + node, + }: { + node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode; + }): readonly FieldDefinitionNode[] { + const nodeName = node.name.value; + if (this.fieldsToGenerate[nodeName]) { + return this.fieldsToGenerate[nodeName]; } - return this.isExternalAndNotProvided(fieldNode, parentType); - } + const fieldNodes = ((node.fields || []) as unknown as FieldDefinitionResult[]).map(field => field.node); - isResolveReferenceField(fieldNode: FieldDefinitionNode): boolean { - const name = typeof fieldNode.name === 'string' ? fieldNode.name : fieldNode.name.value; - return this.enabled && name === resolveReferenceFieldName; - } + if (!this.enabled) { + return fieldNodes; + } - /** - * Transforms ParentType signature in ObjectTypes involved in Federation - * @param data - */ - transformParentType({ - fieldNode, - parentType, - parentTypeSignature, - }: { - fieldNode: FieldDefinitionNode; - parentType: GraphQLNamedType; - parentTypeSignature: string; - }) { - if ( - this.enabled && - isObjectType(parentType) && - (isTypeExtension(parentType, this.schema) || fieldNode.name.value === resolveReferenceFieldName) - ) { - const objectTypeFederationDetails = checkObjectTypeFederationDetails(parentType, this.schema); - if (!objectTypeFederationDetails) { - return parentTypeSignature; - } + // If the object is marked with `@external`, fields to generate are those with `@provides` + if (this.isExternal(node)) { + const fieldNodesWithProvides = fieldNodes.reduce((acc, fieldNode) => { + if (this.hasProvides(node, fieldNode.name.value)) { + acc.push(fieldNode); + return acc; + } + return acc; + }, []); - const { resolvableKeyDirectives } = objectTypeFederationDetails; + this.fieldsToGenerate[nodeName] = fieldNodesWithProvides; - if (resolvableKeyDirectives.length) { - const outputs: string[] = [`{ __typename: '${parentType.name}' } &`]; + return fieldNodesWithProvides; + } - // Look for @requires and see what the service needs and gets - const requires = getDirectivesByName('requires', fieldNode).map(this.extractFieldSet); - const requiredFields = this.translateFieldSet(merge({}, ...requires), parentTypeSignature); + // If the object is not marked with `@external`, fields to generate are: + // - the fields without `@external` + // - the `@external` fields with `@provides` + const fieldNodesWithoutExternalOrHasProvides = fieldNodes.reduce((acc, fieldNode) => { + if (!this.isExternal(fieldNode)) { + acc.push(fieldNode); + return acc; + } - // @key() @key() - "primary keys" in Federation - const primaryKeys = resolvableKeyDirectives.map(def => { - const fields = this.extractFieldSet(def); - return this.translateFieldSet(fields, parentTypeSignature); - }); + if (this.isExternal(fieldNode) && this.hasProvides(node, fieldNode.name.value)) { + acc.push(fieldNode); + return acc; + } - const [open, close] = primaryKeys.length > 1 ? ['(', ')'] : ['', '']; + return acc; + }, []); - outputs.push([open, primaryKeys.join(' | '), close].join('')); + this.fieldsToGenerate[nodeName] = fieldNodesWithoutExternalOrHasProvides; - // include required fields - if (requires.length) { - outputs.push(`& ${requiredFields}`); - } + return fieldNodesWithoutExternalOrHasProvides; + } - return outputs.join(' '); - } + isResolveReferenceField(fieldNode: FieldDefinitionNode): boolean { + const name = typeof fieldNode.name === 'string' ? fieldNode.name : fieldNode.name.value; + return this.enabled && name === resolveReferenceFieldName; + } + + addFederationTypeGenericIfApplicable({ + genericTypes, + typeName, + federationTypesType, + }: { + genericTypes: string[]; + typeName: string; + federationTypesType: string; + }): void { + if (!this.getMeta()[typeName]) { + return; } - return parentTypeSignature; + const typeRef = `${federationTypesType}['${typeName}']`; + genericTypes.push(`FederationReferenceType extends ${typeRef} = ${typeRef}`); } - setMeta(typename: string, update: Partial): void { - this.meta[typename] = { ...(this.meta[typename] || { hasResolveReference: false }), ...update }; - } getMeta() { return this.meta; } - private isExternalAndNotProvided(fieldNode: FieldDefinitionNode, objectType: GraphQLObjectType): boolean { - return this.isExternal(fieldNode) && !this.hasProvides(objectType, fieldNode); - } - - private isExternal(node: FieldDefinitionNode): boolean { + private isExternal(node: FieldDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): boolean { return getDirectivesByName('external', node).length > 0; } - private hasProvides(objectType: ObjectTypeDefinitionNode | GraphQLObjectType, node: FieldDefinitionNode): boolean { - const fields = this.providesMap[isObjectType(objectType) ? objectType.name : objectType.name.value]; + private hasProvides(node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, fieldName: string): boolean { + const fields = this.providesMap[node.name.value]; if (fields?.length) { - return fields.includes(node.name.value); + return fields.includes(fieldName); } return false; } - private translateFieldSet(fields: any, parentTypeRef: string): string { - return `GraphQLRecursivePick<${parentTypeRef}, ${JSON.stringify(fields)}>`; - } - - private extractFieldSet(directive: DirectiveNode): any { - const arg = directive.arguments.find(arg => arg.name.value === 'fields'); - const { value } = arg.value as StringValueNode; - - type SelectionSetField = { - name: string; - selection: boolean | SelectionSetField[]; - }; - - return oldVisit(parse(`{${value}}`), { - leave: { - SelectionSet(node) { - return (node.selections as any as SelectionSetField[]).reduce((accum, field) => { - accum[field.name] = field.selection; - return accum; - }, {}); - }, - Field(node) { - return { - name: node.name.value, - selection: node.selectionSet || true, - } as SelectionSetField; - }, - Document(node) { - return node.definitions.find( - (def: DefinitionNode): def is OperationDefinitionNode => - def.kind === 'OperationDefinition' && def.operation === 'query' - ).selectionSet; - }, - }, - }); - } - private createMapOfProvides() { const providesMap: Record = {}; @@ -272,8 +515,8 @@ export class ApolloFederation { if (isObjectType(objectType)) { for (const field of Object.values(objectType.getFields())) { const provides = getDirectivesByName('provides', field.astNode) - .map(this.extractFieldSet) - .reduce((prev, curr) => [...prev, ...Object.keys(curr)], []); + .map(extractReferenceSelectionSet) + .reduce((prev, curr) => [...prev, ...Object.keys(curr)], []); // FIXME: this is not taking into account nested selection sets e.g. `company { taxCode }` const ofType = getBaseType(field.type); providesMap[ofType.name] ||= []; @@ -291,14 +534,12 @@ export class ApolloFederation { * Checks if Object Type is involved in Federation. Based on `@key` directive * @param node Type */ -export function checkObjectTypeFederationDetails( - node: ObjectTypeDefinitionNode | GraphQLObjectType, +function checkTypeFederationDetails( + node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, schema: GraphQLSchema ): { resolvableKeyDirectives: readonly DirectiveNode[] } | false { - const { - name: { value: name }, - directives, - } = isObjectType(node) ? astFromObjectType(node, schema) : node; + const name = node.name.value; + const directives = node.directives; const rootTypeNames = getRootTypeNames(schema); const isNotRoot = !rootTypeNames.has(name); @@ -330,25 +571,35 @@ export function checkObjectTypeFederationDetails( */ function getDirectivesByName( name: string, - node: ObjectTypeDefinitionNode | GraphQLObjectType | FieldDefinitionNode + node: ObjectTypeDefinitionNode | FieldDefinitionNode | InterfaceTypeDefinitionNode ): readonly DirectiveNode[] { - let astNode: ObjectTypeDefinitionNode | FieldDefinitionNode; - - if (isObjectType(node)) { - astNode = node.astNode; - } else { - astNode = node; - } - - return astNode?.directives?.filter(d => d.name.value === name) || []; + return node?.directives?.filter(d => d.name.value === name) || []; } -/** - * Checks if the Object Type extends a federated type from a remote schema. - * Based on if any of its fields contain the `@external` directive - * @param node Type - */ -function isTypeExtension(node: ObjectTypeDefinitionNode | GraphQLObjectType, schema: GraphQLSchema): boolean { - const definition = isObjectType(node) ? node.astNode || astFromObjectType(node, schema) : node; - return definition.fields?.some(field => getDirectivesByName('external', field).length); +function extractReferenceSelectionSet(directive: DirectiveNode): ReferenceSelectionSet { + const arg = directive.arguments.find(arg => arg.name.value === 'fields'); + const { value } = arg.value as StringValueNode; + + return oldVisit(parse(`{${value}}`), { + leave: { + SelectionSet(node) { + return (node.selections as any as DirectiveSelectionSet[]).reduce((accum, field) => { + accum[field.name] = field.selection; + return accum; + }, {}); + }, + Field(node) { + return { + name: node.name.value, + selection: node.selectionSet || true, + } as DirectiveSelectionSet; + }, + Document(node) { + return node.definitions.find( + (def: DefinitionNode): def is OperationDefinitionNode => + def.kind === 'OperationDefinition' && def.operation === 'query' + ).selectionSet; + }, + }, + }); } diff --git a/packages/utils/plugins-helpers/src/types.ts b/packages/utils/plugins-helpers/src/types.ts index 4b993aefc95..87bcedc15dd 100644 --- a/packages/utils/plugins-helpers/src/types.ts +++ b/packages/utils/plugins-helpers/src/types.ts @@ -464,19 +464,6 @@ export namespace Types { * For more details: https://graphql-code-generator.com/docs/getting-started/development-workflow#watch-mode */ watch?: boolean | string | string[]; - /** - * @deprecated this is not necessary since we are using `@parcel/watcher` instead of `chockidar`. - * - * @description Allows overriding the behavior of watch to use stat polling over native file watching support. - * - * Config fields have the same defaults and sematics as the identically named ones for chokidar. - * - * For more details: https://graphql-code-generator.com/docs/getting-started/development-workflow#watch-mode - */ - watchConfig?: { - usePolling: boolean; - interval?: number; - }; /** * @description A flag to suppress non-zero exit code when there are no documents to generate. */ @@ -552,6 +539,10 @@ export namespace Types { * @description Alows to raise errors if any matched files are not valid GraphQL. Default: false. */ noSilentErrors?: boolean; + /** + * @description If `true`, write to files whichever `generates` block succeeds. If `false`, one failed `generates` means no output is written to files. Default: false + */ + allowPartialOutputs?: boolean; } export type ComplexPluginOutput> = { diff --git a/packages/utils/plugins-helpers/tests/fixtures/externalModuleFn.js b/packages/utils/plugins-helpers/tests/fixtures/externalModuleFn.js index f16888b6acc..e6588ce2981 100644 --- a/packages/utils/plugins-helpers/tests/fixtures/externalModuleFn.js +++ b/packages/utils/plugins-helpers/tests/fixtures/externalModuleFn.js @@ -1 +1 @@ -exports.test = 'foobar'; +export const test = 'foobar'; diff --git a/packages/utils/plugins-helpers/tests/resolve-external-module-and-fn.spec.ts b/packages/utils/plugins-helpers/tests/resolve-external-module-and-fn.spec.ts index bf013b0fd1e..e28080bf6ba 100644 --- a/packages/utils/plugins-helpers/tests/resolve-external-module-and-fn.spec.ts +++ b/packages/utils/plugins-helpers/tests/resolve-external-module-and-fn.spec.ts @@ -1,7 +1,7 @@ import path from 'path'; import { resolveExternalModuleAndFn } from '../src/resolve-external-module-and-fn.js'; -describe.only('resolveExternalModuleAndFn', () => { +describe('resolveExternalModuleAndFn', () => { describe('Issues', () => { it('#6553 - Cannot find module', () => { const relativePathToSelf = path.relative(process.cwd(), path.join(__dirname, './fixtures/externalModuleFn.js')); diff --git a/packages/utils/plugins-helpers/vitest.config.ts b/packages/utils/plugins-helpers/vitest.config.ts new file mode 100644 index 00000000000..974319d43aa --- /dev/null +++ b/packages/utils/plugins-helpers/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineProject, mergeConfig } from 'vitest/config'; +import { sharedConfig } from '../../../vitest.config.js'; + +export default mergeConfig( + sharedConfig, + defineProject({ + test: { + name: 'plugin-helpers', + include: ['**/*.spec.ts'], + }, + }) +); diff --git a/scripts/match-graphql.js b/scripts/match-graphql.js index eb8c2922b8f..23087c79eb8 100644 --- a/scripts/match-graphql.js +++ b/scripts/match-graphql.js @@ -8,9 +8,8 @@ const pkg = require(pkgPath); const version = argv[2]; -// eslint-disable-next-line logical-assignment-operators -- can be removed after drop support of Node.js 12 -pkg.resolutions = pkg.resolutions || {}; -if (pkg.resolutions.graphql.startsWith(version)) { +pkg.resolutions ||= {}; +if (pkg.devDependencies.graphql?.startsWith(version)) { // eslint-disable-next-line no-console console.info(`GraphQL v${version} is match! Skipping.`); return; @@ -19,7 +18,5 @@ if (pkg.resolutions.graphql.startsWith(version)) { const npmVersion = version.includes('-') ? version : `^${version}`; pkg.devDependencies.graphql = npmVersion; pkg.resolutions.graphql = npmVersion; -pkg.resolutions['**/apollo-language-server/graphql'] = npmVersion; -pkg.resolutions['**/@types/graphql-upload/graphql'] = npmVersion; writeFileSync(pkgPath, JSON.stringify(pkg, null, 2), 'utf8'); diff --git a/tsconfig.json b/tsconfig.json index 6379f114723..84312936a25 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,8 +9,8 @@ "importHelpers": true, "experimentalDecorators": true, "module": "esnext", - "target": "es2021", - "lib": ["es6", "esnext", "es2021", "dom"], + "target": "es2022", + "lib": ["es6", "esnext", "es2023", "dom"], "moduleResolution": "node", "emitDecoratorMetadata": true, "sourceMap": true, @@ -41,5 +41,19 @@ } }, "include": ["packages"], - "exclude": ["**/tests/test-files", "**/tests/test-documents", "**/dist", "**/temp"] + "exclude": [ + "**/dist", + "**/temp", + "**/vitest.config.ts", + "**/vitest.setup.ts", + "**/*.spec.ts", + "**/tests/**/*.ts", + "**/tests/test-files", + "**/tests/test-documents" + ], + "references": [ + { + "path": "./tsconfig.spec.json" + } + ] } diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 00000000000..633551e9fd7 --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "composite": true, + "types": ["vitest/globals"] + }, + "exclude": [], + "include": [ + "**/vitest.config.ts", + "**/vitest.setup.ts", + "**/*.spec.ts", + "**/tests/**/*.ts", + "**/tests/test-files", + "**/tests/test-documents" + ] +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000000..70989e8a928 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from 'vitest/config'; +import tsconfigPaths from 'vite-tsconfig-paths'; + +export const sharedConfig = defineConfig({ + plugins: [tsconfigPaths() as any], + resolve: { + alias: { + graphql: 'graphql/index.js', + }, + }, + test: { + globals: true, + }, +}); + +export default defineConfig({ + test: { + projects: ['packages/**/vitest.config.ts', 'examples/**/vitest.config.ts'], + watch: false, + }, +}); diff --git a/website/public/config.schema.json b/website/public/config.schema.json index 9478ddf73f2..c105a545acc 100644 --- a/website/public/config.schema.json +++ b/website/public/config.schema.json @@ -15,8 +15,14 @@ "description": "A path to a file which defines custom Node.JS require() handlers for custom file extensions.\nThis is essential if the code generator has to go through files which require other files in an unsupported format (by default).\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/require-field\nSee more information about require.extensions: https://gist.github.com/jamestalmage/df922691475cff66c7e6.\n\nNote: values that specified in your .yml file will get loaded after loading the config .yml file." }, "customFetch": { - "description": "Name for a library that implements `fetch`.\nUse this to tell codegen to use that to fetch schemas in a custom way.", - "type": "string" + "description": "Specify a Node module name, a custom file, or a function, to be used instead of a standard `fetch`.", + "anyOf": [ + { + "$ref": "#/definitions/Types.CustomSchemaFetcher", + "description": "A function to use for fetching the schema." + }, + { "type": "string" } + ] }, "documents": { "$ref": "#/definitions/Types.InstanceOrArray_1", @@ -25,7 +31,7 @@ "config": { "type": "object", "additionalProperties": true, - "description": "Configuration object containing key => value that will be passes to the plugins.\nSpecifying configuration in this level of your configuration file will pass it to all plugins, in all outputs.\n\nThe options may vary depends on what plugins you are using.\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/config-field" + "description": "Configuration object containing key => value that will be passed to the plugins.\nSpecifying configuration in this level of your configuration file will pass it to all plugins, in all outputs.\n\nThe options may vary depends on what plugins you are using.\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/config-field" }, "generates": { "description": "A map where the key represents an output path for the generated code and the value represents a set of options which are relevant for that specific file.\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/codegen-config", @@ -45,11 +51,6 @@ "description": "A flag to trigger codegen when there are changes in the specified GraphQL schemas.\n\nYou can either specify a boolean to turn it on/off or specify an array of glob patterns to add custom files to the watch.\n\nFor more details: https://graphql-code-generator.com/docs/getting-started/development-workflow#watch-mode", "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": ["string", "boolean"] }] }, - "watchConfig": { - "description": "Allows overriding the behavior of watch to use stat polling over native file watching support.\n\nConfig fields have the same defaults and sematics as the identically named ones for chokidar.\n\nFor more details: https://graphql-code-generator.com/docs/getting-started/development-workflow#watch-mode", - "type": "object", - "properties": { "usePolling": { "type": "boolean" }, "interval": { "type": "number" } } - }, "ignoreNoDocuments": { "description": "A flag to suppress non-zero exit code when there are no documents to generate.", "type": "boolean" @@ -100,6 +101,10 @@ "noSilentErrors": { "description": "Alows to raise errors if any matched files are not valid GraphQL. Default: false.", "type": "boolean" + }, + "allowPartialOutputs": { + "description": "If `true`, write to files whichever `generates` block succeeds. If `false`, one failed `generates` means no output is written to files. Default: false", + "type": "boolean" } } }, @@ -282,10 +287,6 @@ "description": "Automatically adds `__typename` field to the generated types, even when they are not specified\nin the selection set, and makes it non-optional\nDefault value: \"false\"", "type": "boolean" }, - "dedupeFragments": { - "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", - "type": "boolean" - }, "inlineFragmentTypes": { "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\nDefault value: \"inline\"", "type": "string" @@ -305,6 +306,10 @@ "skipTypename": { "description": "Does not add `__typename` to the generated types, unless it was specified in the selection set.\nDefault value: \"false\"", "type": "boolean" + }, + "dedupeFragments": { + "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", + "type": "boolean" } } }, @@ -643,17 +648,25 @@ "type": "boolean", "description": "Will use `import type {}` rather than `import {}` when importing only types. This gives\ncompatibility with TypeScript's \"importsNotUsedAsValues\": \"error\" option\nDefault value: \"false\"" }, - "dedupeFragments": { - "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", - "type": "boolean" - }, "inlineFragmentTypes": { - "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\nDefault value: \"inline\"", + "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\n\"mask\" transforms the types for use with fragment masking. Useful when masked types are needed when not using the \"client\" preset e.g. such as combining it with Apollo Client's data masking feature.\nDefault value: \"inline\"", "type": "string" }, "emitLegacyCommonJSImports": { "description": "Emit legacy common js imports.\nDefault it will be `true` this way it ensure that generated code works with [non-compliant bundlers](https://github.com/dotansimha/graphql-code-generator/issues/8065).\nDefault value: \"true\"", "type": "boolean" + }, + "extractAllFieldsToTypes": { + "description": "Extract all field types to their own types, instead of inlining them.\nThis helps to reduce type duplication, and makes type errors more readable.\nIt can also significantly reduce the size of the generated code, the generation time,\nand the typechecking time.\nDefault value: \"false\"", + "type": "boolean" + }, + "printFieldsOnNewLines": { + "description": "If you prefer to have each field in generated types printed on a new line, set this to true.\nThis can be useful for improving readability of the resulting types,\nwithout resorting to running tools like Prettier on the output.\nDefault value: \"false\"", + "type": "boolean" + }, + "includeExternalFragments": { + "description": "Whether to include external fragments in the generated code. External fragments are not defined\nin the same location as the operation definition.\nDefault value: \"false\"", + "type": "boolean" } } }, @@ -698,6 +711,11 @@ "description": "Adds undefined as a possible type for query variables\nDefault value: \"false\"", "type": "boolean" }, + "nullability": { + "description": "Options related to handling nullability", + "type": "object", + "properties": { "errorHandlingClient": { "type": "boolean" } } + }, "preResolveTypes": { "description": "Uses primitive types where possible.\nSet to `false` in order to use `Pick` and take use the types generated by `typescript` plugin.\nDefault value: \"true\"", "type": "boolean" @@ -730,6 +748,10 @@ "description": "If set to true, merge equal fragment interfaces.\nDefault value: \"false\"", "type": "boolean" }, + "customDirectives": { + "$ref": "#/definitions/CustomDirectivesConfig", + "description": "Configures behavior for use with custom directives from\nvarious GraphQL libraries." + }, "addUnderscoreToArgsType": { "description": "Adds `_` to generated `Args` types in order to avoid duplicate identifiers.", "type": "boolean" @@ -819,17 +841,25 @@ "type": "boolean", "description": "Will use `import type {}` rather than `import {}` when importing only types. This gives\ncompatibility with TypeScript's \"importsNotUsedAsValues\": \"error\" option\nDefault value: \"false\"" }, - "dedupeFragments": { - "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", - "type": "boolean" - }, "inlineFragmentTypes": { - "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\nDefault value: \"inline\"", + "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\n\"mask\" transforms the types for use with fragment masking. Useful when masked types are needed when not using the \"client\" preset e.g. such as combining it with Apollo Client's data masking feature.\nDefault value: \"inline\"", "type": "string" }, "emitLegacyCommonJSImports": { "description": "Emit legacy common js imports.\nDefault it will be `true` this way it ensure that generated code works with [non-compliant bundlers](https://github.com/dotansimha/graphql-code-generator/issues/8065).\nDefault value: \"true\"", "type": "boolean" + }, + "extractAllFieldsToTypes": { + "description": "Extract all field types to their own types, instead of inlining them.\nThis helps to reduce type duplication, and makes type errors more readable.\nIt can also significantly reduce the size of the generated code, the generation time,\nand the typechecking time.\nDefault value: \"false\"", + "type": "boolean" + }, + "printFieldsOnNewLines": { + "description": "If you prefer to have each field in generated types printed on a new line, set this to true.\nThis can be useful for improving readability of the resulting types,\nwithout resorting to running tools like Prettier on the output.\nDefault value: \"false\"", + "type": "boolean" + }, + "includeExternalFragments": { + "description": "Whether to include external fragments in the generated code. External fragments are not defined\nin the same location as the operation definition.\nDefault value: \"false\"", + "type": "boolean" } } }, @@ -1559,6 +1589,11 @@ "description": "Allow you to disable suffixing for generated enums, works in combination with `typesSuffix`.\nDefault value: \"true\"", "type": "boolean" }, + "customDirectives": { + "description": "Configures behavior for custom directives from various GraphQL libraries.", + "type": "object", + "properties": { "semanticNonNull": { "type": "boolean" } } + }, "optionalResolveType": { "description": "Sets the `__resolveType` field as optional field.\nDefault value: \"false\"", "type": "boolean" @@ -1583,14 +1618,14 @@ "type": "string", "description": "Defines the prefix value used for `__resolveType` and `__isTypeOf` resolvers.\nIf you are using `mercurius-js`, please set this field to empty string for better compatibility.\nDefault value: \"'__'\"" }, - "onlyResolveTypeForInterfaces": { - "type": "boolean", - "description": "Turning this flag to `true` will generate resolver signature that has only `resolveType` for interfaces, forcing developers to write inherited type resolvers in the type itself.\nDefault value: \"false\"" - }, "resolversNonOptionalTypename": { "description": "Makes `__typename` of resolver mappings non-optional without affecting the base types.\nDefault value: \"false\"", "anyOf": [{ "$ref": "#/definitions/ResolversNonOptionalTypenameConfig" }, { "type": "boolean" }] }, + "avoidCheckingAbstractTypesRecursively": { + "type": "boolean", + "description": "If true, recursively goes through all object type's fields, checks if they have abstract types and generates expected types correctly.\nThis may not work for cases where provided default mapper types are also nested e.g. `defaultMapper: DeepPartial<{T}>` or `defaultMapper: Partial<{T}>`.\nDefault value: \"false\"" + }, "strictScalars": { "description": "Makes scalars strict.\n\nIf scalars are found in the schema that are not defined in `scalars`\nan error will be thrown during codegen.\nDefault value: \"false\"", "type": "boolean" @@ -1621,17 +1656,25 @@ "type": "boolean", "description": "Will use `import type {}` rather than `import {}` when importing only types. This gives\ncompatibility with TypeScript's \"importsNotUsedAsValues\": \"error\" option\nDefault value: \"false\"" }, - "dedupeFragments": { - "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", - "type": "boolean" - }, "inlineFragmentTypes": { - "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\nDefault value: \"inline\"", + "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\n\"mask\" transforms the types for use with fragment masking. Useful when masked types are needed when not using the \"client\" preset e.g. such as combining it with Apollo Client's data masking feature.\nDefault value: \"inline\"", "type": "string" }, "emitLegacyCommonJSImports": { "description": "Emit legacy common js imports.\nDefault it will be `true` this way it ensure that generated code works with [non-compliant bundlers](https://github.com/dotansimha/graphql-code-generator/issues/8065).\nDefault value: \"true\"", "type": "boolean" + }, + "extractAllFieldsToTypes": { + "description": "Extract all field types to their own types, instead of inlining them.\nThis helps to reduce type duplication, and makes type errors more readable.\nIt can also significantly reduce the size of the generated code, the generation time,\nand the typechecking time.\nDefault value: \"false\"", + "type": "boolean" + }, + "printFieldsOnNewLines": { + "description": "If you prefer to have each field in generated types printed on a new line, set this to true.\nThis can be useful for improving readability of the resulting types,\nwithout resorting to running tools like Prettier on the output.\nDefault value: \"false\"", + "type": "boolean" + }, + "includeExternalFragments": { + "description": "Whether to include external fragments in the generated code. External fragments are not defined\nin the same location as the operation definition.\nDefault value: \"false\"", + "type": "boolean" } } }, @@ -2648,10 +2691,6 @@ "description": "Adds suffix to the fragment variable\nDefault value: \"\"", "type": "string" }, - "noGraphQLTag": { - "description": "Deprecated. Changes the documentMode to `documentNode`.\nDefault value: \"false\"", - "type": "boolean" - }, "gqlImport": { "description": "Customize from which module will `gql` be imported from.\nThis is useful if you want to use modules other than `graphql-tag`, e.g. `graphql.macro`.\nDefault value: \"graphql-tag#gql\"", "type": "string" @@ -2697,7 +2736,7 @@ "description": "Declares how DocumentNode are created:\n\n- `graphQLTag`: `graphql-tag` or other modules (check `gqlImport`) will be used to generate document nodes. If this is used, document nodes are generated on client side i.e. the module used to generate this will be shipped to the client\n- `documentNode`: document nodes will be generated as objects when we generate the templates.\n- `documentNodeImportFragments`: Similar to documentNode except it imports external fragments instead of embedding them.\n- `external`: document nodes are imported from an external file. To be used with `importDocumentNodeExternallyFrom`\n\nNote that some plugins (like `typescript-graphql-request`) also supports `string` for this parameter.\nDefault value: \"graphQLTag\"" }, "optimizeDocumentNode": { - "description": "If you are using `documentNode: documentMode | documentNodeImportFragments`, you can set this to `true` to apply document optimizations for your GraphQL document.\nThis will remove all \"loc\" and \"description\" fields from the compiled document, and will remove all empty arrays (such as `directives`, `arguments` and `variableDefinitions`).\nDefault value: \"true\"", + "description": "If you are using `documentMode: documentNode | documentNodeImportFragments`, you can set this to `true` to apply document optimizations for your GraphQL document.\nThis will remove all \"loc\" and \"description\" fields from the compiled document, and will remove all empty arrays (such as `directives`, `arguments` and `variableDefinitions`).\nDefault value: \"true\"", "type": "boolean" }, "importOperationTypesFrom": { @@ -2742,17 +2781,25 @@ "type": "boolean", "description": "Will use `import type {}` rather than `import {}` when importing only types. This gives\ncompatibility with TypeScript's \"importsNotUsedAsValues\": \"error\" option\nDefault value: \"false\"" }, - "dedupeFragments": { - "description": "Removes fragment duplicates for reducing data transfer.\nIt is done by removing sub-fragments imports from fragment definition\nInstead - all of them are imported to the Operation node.\nDefault value: \"false\"", - "type": "boolean" - }, "inlineFragmentTypes": { - "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\nDefault value: \"inline\"", + "description": "Whether fragment types should be inlined into other operations.\n\"inline\" is the default behavior and will perform deep inlining fragment types within operation type definitions.\n\"combine\" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types).\n\"mask\" transforms the types for use with fragment masking. Useful when masked types are needed when not using the \"client\" preset e.g. such as combining it with Apollo Client's data masking feature.\nDefault value: \"inline\"", "type": "string" }, "emitLegacyCommonJSImports": { "description": "Emit legacy common js imports.\nDefault it will be `true` this way it ensure that generated code works with [non-compliant bundlers](https://github.com/dotansimha/graphql-code-generator/issues/8065).\nDefault value: \"true\"", "type": "boolean" + }, + "extractAllFieldsToTypes": { + "description": "Extract all field types to their own types, instead of inlining them.\nThis helps to reduce type duplication, and makes type errors more readable.\nIt can also significantly reduce the size of the generated code, the generation time,\nand the typechecking time.\nDefault value: \"false\"", + "type": "boolean" + }, + "printFieldsOnNewLines": { + "description": "If you prefer to have each field in generated types printed on a new line, set this to true.\nThis can be useful for improving readability of the resulting types,\nwithout resorting to running tools like Prettier on the output.\nDefault value: \"false\"", + "type": "boolean" + }, + "includeExternalFragments": { + "description": "Whether to include external fragments in the generated code. External fragments are not defined\nin the same location as the operation definition.\nDefault value: \"false\"", + "type": "boolean" } } }, @@ -3404,7 +3451,11 @@ "description": "Create an explicit type based on your schema. This can help IDEs autofill your fragment matcher. This is mostly useful if you do more with your fragment matcher than just pass it to an Apollo-Client.\nDefault value: \"false\"", "type": "boolean" }, - "federation": { "type": "boolean" } + "federation": { "type": "boolean" }, + "deterministic": { + "description": "When enabled sorts the fragment types lexicographically. This is useful for deterministic output.\nDefault value: \"false\"", + "type": "boolean" + } } }, "UrqlIntrospectionConfig": { @@ -3601,8 +3652,14 @@ "additionalProperties": { "type": "string" } }, "customFetch": { - "description": "Specify a Node module name, or a custom file, to be used instead of standard `fetch`", - "type": "string" + "description": "Specify a Node module name, a custom file, or a function, to be used instead of a standard `fetch`.", + "anyOf": [ + { + "$ref": "#/definitions/Types.CustomSchemaFetcher", + "description": "A function to use for fetching the schema." + }, + { "type": "string" } + ] }, "method": { "description": "HTTP Method to use, either POST (default) or GET.", "type": "string" }, "handleAsSDL": { @@ -3611,6 +3668,8 @@ } } }, + "__type": { "description": "A function to use for fetching the schema.", "type": "object" }, + "Types.CustomSchemaFetcher": { "$ref": "#/definitions/__type" }, "Types.LocalSchemaPathWithOptions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Types.LocalSchemaPathOptions" } @@ -3686,8 +3745,8 @@ "includeSources": { "type": "boolean" } } }, - "__type": { "type": "object" }, - "Record": { "$ref": "#/definitions/__type" }, + "__type_1": { "type": "object" }, + "Record": { "$ref": "#/definitions/__type_1" }, "Types.GitHubSchemaOptions": { "type": "object", "additionalProperties": { "type": "object", "properties": { "token": { "type": "string" } } } @@ -4027,14 +4086,14 @@ } ] }, - "__type_1": { + "__type_2": { "type": "object", "properties": { "buildGeneratesSection": { "type": "object" }, "prepareDocuments": { "type": "object" } } }, - "Types.OutputPreset": { "$ref": "#/definitions/__type_1" }, - "__type_2": { "type": "object", "additionalProperties": { "$ref": "#/definitions/T" } }, - "Types.PluginConfig": { "$ref": "#/definitions/__type_2" }, - "__type_3": { + "Types.OutputPreset": { "$ref": "#/definitions/__type_2" }, + "__type_3": { "type": "object", "additionalProperties": { "$ref": "#/definitions/T" } }, + "Types.PluginConfig": { "$ref": "#/definitions/__type_3" }, + "__type_4": { "type": "object", "properties": { "afterStart": { @@ -4081,8 +4140,8 @@ { "type": "string" } ] }, - "__type_4": { "type": "object" }, - "Types.HookFunction": { "$ref": "#/definitions/__type_4" }, + "__type_5": { "type": "object" }, + "Types.HookFunction": { "$ref": "#/definitions/__type_5" }, "Types.LifeCycleAlterHookValue": { "anyOf": [ { "$ref": "#/definitions/Types.HookFunction" }, @@ -4100,9 +4159,9 @@ { "type": "string" } ] }, - "__type_5": { "type": "object" }, - "Types.HookAlterFunction": { "$ref": "#/definitions/__type_5" }, - "Partial": { "$ref": "#/definitions/__type_3" }, + "__type_6": { "type": "object" }, + "Types.HookAlterFunction": { "$ref": "#/definitions/__type_6" }, + "Partial": { "$ref": "#/definitions/__type_4" }, "Types.OutputDocumentTransform": { "anyOf": [ { "$ref": "#/definitions/Types.DocumentTransformObject" }, @@ -4110,18 +4169,18 @@ { "type": "string" } ] }, - "__type_6": { + "__type_7": { "type": "object", "properties": { "transform": { "$ref": "#/definitions/Types.DocumentTransformFunction" } } }, - "__type_7": { "type": "object" }, - "Types.DocumentTransformFunction": { "$ref": "#/definitions/__type_7" }, - "Types.DocumentTransformObject": { "$ref": "#/definitions/__type_6" }, - "__type_8": { "type": "object", "additionalProperties": { "$ref": "#/definitions/T_1" } }, + "__type_8": { "type": "object" }, + "Types.DocumentTransformFunction": { "$ref": "#/definitions/__type_8" }, + "Types.DocumentTransformObject": { "$ref": "#/definitions/__type_7" }, + "__type_9": { "type": "object", "additionalProperties": { "$ref": "#/definitions/T_1" } }, "T_1": { "type": "object" }, - "Types.DocumentTransformFileConfig": { "$ref": "#/definitions/__type_8" }, - "__type_9": { "type": "object" }, - "Types.PackageLoaderFn": { "$ref": "#/definitions/__type_9" }, + "Types.DocumentTransformFileConfig": { "$ref": "#/definitions/__type_9" }, + "__type_10": { "type": "object" }, + "Types.PackageLoaderFn": { "$ref": "#/definitions/__type_10" }, "Array": { "type": "array", "items": { @@ -4143,16 +4202,16 @@ "type": "object", "properties": { "_value": {}, "value": { "type": "string" } } }, - "__type_10": { + "__type_11": { "type": "object", "properties": { "endpoint": { "type": "string" }, "fetchParams": { "anyOf": [{ "$ref": "#/definitions/Record_1" }, { "type": "string" }] } } }, - "__type_11": { "type": "object" }, - "Record_1": { "$ref": "#/definitions/__type_11" }, - "HardcodedFetch": { "$ref": "#/definitions/__type_10" }, + "__type_12": { "type": "object" }, + "Record_1": { "$ref": "#/definitions/__type_12" }, + "HardcodedFetch": { "$ref": "#/definitions/__type_11" }, "NamingConvention": { "anyOf": [ { "$ref": "#/definitions/NamingConventionFn" }, @@ -4160,8 +4219,8 @@ { "type": "string" } ] }, - "__type_12": { "type": "object" }, - "NamingConventionFn": { "$ref": "#/definitions/__type_12" }, + "__type_13": { "type": "object" }, + "NamingConventionFn": { "$ref": "#/definitions/__type_13" }, "NamingConventionMap": { "additionalProperties": false, "type": "object", @@ -4186,7 +4245,10 @@ "object": { "type": "boolean" }, "inputValue": { "type": "boolean" }, "defaultValue": { "type": "boolean" }, - "resolvers": { "type": "boolean" } + "resolvers": { "type": "boolean" }, + "query": { "type": "boolean" }, + "mutation": { "type": "boolean" }, + "subscription": { "type": "boolean" } } }, "EnumValuesMap": { @@ -4222,12 +4284,12 @@ } }, "DeclarationKind": { "enum": ["abstract class", "class", "interface", "type"], "type": "string" }, - "__type_13": { + "__type_14": { "description": "A map between the GraphQL directive name and the identifier that should be used", "type": "object", "additionalProperties": { "type": "string" } }, - "DirectiveArgumentAndInputFieldMappings": { "$ref": "#/definitions/__type_13" }, + "DirectiveArgumentAndInputFieldMappings": { "$ref": "#/definitions/__type_14" }, "ScalarsMap_1": { "description": "Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used", "anyOf": [ @@ -4250,8 +4312,8 @@ { "type": "string" } ] }, - "__type_14": { "type": "object" }, - "NamingConventionFn_1": { "$ref": "#/definitions/__type_14" }, + "__type_15": { "type": "object" }, + "NamingConventionFn_1": { "$ref": "#/definitions/__type_15" }, "NamingConventionMap_1": { "additionalProperties": false, "type": "object", @@ -4261,6 +4323,15 @@ "transformUnderscore": { "type": "boolean" } } }, + "CustomDirectivesConfig": { + "type": "object", + "properties": { + "apolloUnmask": { + "description": "Adds integration with Apollo Client's `@unmask` directive\nwhen using Apollo Client's data masking feature. `@unmask` ensures fields\nmarked by `@unmask` are available in the type definition.\nDefault value: \"false\"", + "type": "boolean" + } + } + }, "EnumValuesMap_1": { "description": "A raw configuration for enumValues map - can be represented with a single string value for a file path,\na map between enum name and a file path, or a map between enum name and an object with explicit enum values.", "anyOf": [ @@ -4294,8 +4365,8 @@ { "type": "string" } ] }, - "__type_15": { "type": "object" }, - "NamingConventionFn_2": { "$ref": "#/definitions/__type_15" }, + "__type_16": { "type": "object" }, + "NamingConventionFn_2": { "$ref": "#/definitions/__type_16" }, "NamingConventionMap_2": { "additionalProperties": false, "type": "object", @@ -4309,7 +4380,7 @@ "enum": ["documentNode", "documentNodeImportFragments", "external", "graphQLTag", "string"], "type": "string" }, - "__type_16": { + "__type_17": { "type": "object", "properties": { "type": { "type": "string" }, @@ -4319,7 +4390,7 @@ "arguments": { "type": "string" } } }, - "Partial_1": { "$ref": "#/definitions/__type_16" }, + "Partial_1": { "$ref": "#/definitions/__type_17" }, "AvoidOptionalsConfig_1": { "type": "object", "properties": { @@ -4342,12 +4413,12 @@ } }, "DeclarationKind_1": { "enum": ["abstract class", "class", "interface", "type"], "type": "string" }, - "__type_17": { + "__type_18": { "description": "A map between the GraphQL directive name and the identifier that should be used", "type": "object", "additionalProperties": { "type": "string" } }, - "DirectiveArgumentAndInputFieldMappings_1": { "$ref": "#/definitions/__type_17" }, + "DirectiveArgumentAndInputFieldMappings_1": { "$ref": "#/definitions/__type_18" }, "Array_1": { "type": "array", "items": { "type": "string" } }, "ResolversNonOptionalTypenameConfig": { "type": "object", @@ -4400,12 +4471,12 @@ } }, "DeclarationKind_2": { "enum": ["abstract class", "class", "interface", "type"], "type": "string" }, - "__type_18": { + "__type_19": { "description": "A map between the GraphQL directive name and the identifier that should be used", "type": "object", "additionalProperties": { "type": "string" } }, - "DirectiveArgumentAndInputFieldMappings_2": { "$ref": "#/definitions/__type_18" }, + "DirectiveArgumentAndInputFieldMappings_2": { "$ref": "#/definitions/__type_19" }, "AvoidOptionalsConfig_2": { "type": "object", "properties": { @@ -4416,8 +4487,8 @@ "resolvers": { "type": "boolean" } } }, - "__type_19": { "type": "object" }, - "FragmentImportFromFn": { "$ref": "#/definitions/__type_19" }, + "__type_20": { "type": "object" }, + "FragmentImportFromFn": { "$ref": "#/definitions/__type_20" }, "GeneratedPluginsMap": { "anyOf": [ { diff --git a/website/src/pages/docs/config-reference/codegen-config.mdx b/website/src/pages/docs/config-reference/codegen-config.mdx index d48b11824d8..68348da2b57 100644 --- a/website/src/pages/docs/config-reference/codegen-config.mdx +++ b/website/src/pages/docs/config-reference/codegen-config.mdx @@ -40,7 +40,7 @@ export default config ## Configuration options -Here are the supported options that you can define in the config file (see [source code](https://github.com/dotansimha/graphql-code-generator/blob/master/packages/utils/plugins-helpers/src/types.ts#L92)): +Here are the supported options that you can define in the config file (see [source code](https://github.com/dotansimha/graphql-code-generator/blob/master/packages/utils/plugins-helpers/src/types.ts#L388)): - [**`schema` (required)**](./schema-field#root-level) - A URL to your GraphQL endpoint, a local path to `.graphql` file, a glob pattern to your GraphQL schema files, or a JavaScript file that exports the schema to generate code from. This can also be an array that specifies multiple schemas to generate code from. You can read more about the supported formats [here](./schema-field#available-formats) @@ -66,7 +66,7 @@ Here are the supported options that you can define in the config file (see [sour - **`overwrite`** - A flag to overwrite files if they already exist when generating code (`true` by default) -- **`watch`** - A flag to trigger codegen when there are changes in the specified GraphQL schemas. You can either specify a boolean to turn it on/off or specify an array of glob patterns to add custom files to the watch +- **`watch`** - A flag to trigger codegen when there are changes in the specified GraphQL schemas. You can either specify a boolean to turn it on/off or specify an array of glob patterns to add custom files to the watch. When in watch mode, partial success still writes to files. - **`silent`** - A flag to suppress printing errors when they occur @@ -102,6 +102,8 @@ Here are the supported options that you can define in the config file (see [sour - **`skipDocumentsValidation.skipDuplicateValidation`** - A flag to disable the validation for duplicate documents +- **`allowPartialOutputs`** - Allows partial outputs to be written to files if one or more `generates` blocks have errors. Default is `false`. + ## Environment Variables You can use environment variables in your `codegen.ts` file: diff --git a/website/src/pages/docs/custom-codegen/contributing.mdx b/website/src/pages/docs/custom-codegen/contributing.mdx index e1ada29ff9b..b11cdafc389 100644 --- a/website/src/pages/docs/custom-codegen/contributing.mdx +++ b/website/src/pages/docs/custom-codegen/contributing.mdx @@ -29,7 +29,7 @@ GraphQL Code Generator uses the following stack to manage the source code: 1. [TypeScript](https://typescriptlang.org) - for writing the code 2. [Bob](https://github.com/kamilkisiela/bob) - for building, bundling, and development workflow -3. [Jest](https://jestjs.io) - for running tests +3. [Vitest](https://vitest.dev/) - for running tests ## 2. Fork and Clone @@ -100,7 +100,7 @@ Make sure to follow the following instructions: { "scripts": { "lint": "eslint **/*.ts", - "test": "jest --no-watchman --config ../../../../jest.config.js" + "test": "vitest --no-watch" } } ``` diff --git a/website/src/pages/docs/guides/react-vue.mdx b/website/src/pages/docs/guides/react-vue.mdx index 5b3e97ec91a..327ace9608a 100644 --- a/website/src/pages/docs/guides/react-vue.mdx +++ b/website/src/pages/docs/guides/react-vue.mdx @@ -510,7 +510,6 @@ The `client` preset allows the following `config` options: - [`enumsAsTypes`](/plugins/typescript/typescript#enumsastypes): Generates enum as TypeScript string union `type` instead of an `enum`. Useful if you wish to generate `.d.ts` declaration file instead of `.ts`, or if you want to avoid using TypeScript enums due to bundle size concerns. - [`enumsAsConst`](/plugins/typescript/typescript#enumsasconst): Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct. - [`enumValues`](/plugins/typescript/typescript#enumvalues): Overrides the default value of enum values declared in your GraphQL schema. You can also map the entire enum to an external type by providing a string that of module#type. -- [`dedupeFragments`](/plugins/typescript/typescript#dedupefragments): Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition. - [`nonOptionalTypename`](/plugins/typescript/typescript#nonoptionaltypename): Automatically adds `__typename` field to the generated types, even when they are not specified in the selection set, and makes it non-optional. - [`avoidOptionals`](/plugins/typescript/typescript#avoidoptionals): This will cause the generator to avoid using TypeScript optionals (`?`) on types. diff --git a/website/src/pages/plugins/presets/preset-client.mdx b/website/src/pages/plugins/presets/preset-client.mdx index fe3951e2962..19a145a7968 100644 --- a/website/src/pages/plugins/presets/preset-client.mdx +++ b/website/src/pages/plugins/presets/preset-client.mdx @@ -55,7 +55,6 @@ The `client` preset allows the following `config` options: - [`enumsAsConst`](/plugins/typescript/typescript#enumsasconst): Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct. - [`enumValues`](/plugins/typescript/typescript#enumvalues): Overrides the default value of enum values declared in your GraphQL schema. You can also map the entire enum to an external type by providing a string that of module#type. - [`futureProofEnums`](/plugins/typescript/typescript#futureproofenums): Adds a catch-all entry to enum type definitions for values that may be added in the future. -- [`dedupeFragments`](/plugins/typescript/typescript#dedupefragments): Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition. - [`nonOptionalTypename`](/plugins/typescript/typescript#nonoptionaltypename): Automatically adds `__typename` field to the generated types, even when they are not specified in the selection set, and makes it non-optional. - [`avoidOptionals`](/plugins/typescript/typescript#avoidoptionals): This will cause the generator to avoid using TypeScript optionals (`?`) on types. - [`documentMode`](#documentmode): Allows you to control how the documents are generated. diff --git a/yarn.lock b/yarn.lock index 23d920d8a04..e118c44901b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -83,7 +83,7 @@ dependencies: node-fetch "^2.6.1" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.21.4", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.21.4", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.7", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -118,7 +118,7 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/core@7.26.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.14.0", "@babel/core@^7.22.9", "@babel/core@^7.24.5": +"@babel/core@7.26.0", "@babel/core@^7.14.0", "@babel/core@^7.22.9", "@babel/core@^7.24.5": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== @@ -148,7 +148,7 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.1" -"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.25.0", "@babel/generator@^7.25.9", "@babel/generator@^7.26.0", "@babel/generator@^7.7.2": +"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.25.0", "@babel/generator@^7.25.9", "@babel/generator@^7.26.0": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== @@ -305,7 +305,7 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.8", "@babel/parser@^7.20.7", "@babel/parser@^7.24.7", "@babel/parser@^7.25.0", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.20.7", "@babel/parser@^7.24.7", "@babel/parser@^7.25.0", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.5": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.5.tgz#6fec9aebddef25ca57a935c86dbb915ae2da3e1f" integrity sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw== @@ -391,14 +391,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -454,7 +447,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -475,7 +468,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -489,7 +482,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -524,14 +517,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.25.9", "@babel/plugin-syntax-typescript@^7.7.2": +"@babel/plugin-syntax-typescript@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== @@ -1211,7 +1204,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.25.0", "@babel/template@^7.25.9", "@babel/template@^7.3.3": +"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.25.0", "@babel/template@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== @@ -1220,7 +1213,7 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.9", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.9.tgz#a50f8fe49e7f69f53de5bea7e413cd35c5e13c84" integrity sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw== @@ -1233,7 +1226,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.20.7", "@babel/types@^7.25.2", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.20.7", "@babel/types@^7.25.2", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4": version "7.26.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.5.tgz#7a1e1c01d28e26d1fe7f8ec9567b3b92b9d07747" integrity sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg== @@ -1241,11 +1234,6 @@ "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - "@braintree/sanitize-url@^7.0.1": version "7.1.0" resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz#048e48aab4f1460e3121e22aa62459d16653dc85" @@ -1729,6 +1717,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz#38848d3e25afe842a7943643cbcd387cc6e13461" integrity sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA== +"@esbuild/aix-ppc64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9" + integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA== + "@esbuild/android-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" @@ -1739,6 +1732,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz#f592957ae8b5643129fa889c79e69cd8669bb894" integrity sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg== +"@esbuild/android-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c" + integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg== + "@esbuild/android-arm@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" @@ -1749,6 +1747,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.2.tgz#72d8a2063aa630308af486a7e5cbcd1e134335b3" integrity sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q== +"@esbuild/android-arm@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419" + integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ== + "@esbuild/android-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" @@ -1759,6 +1762,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.2.tgz#9a7713504d5f04792f33be9c197a882b2d88febb" integrity sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw== +"@esbuild/android-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683" + integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw== + "@esbuild/darwin-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" @@ -1769,6 +1777,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz#02ae04ad8ebffd6e2ea096181b3366816b2b5936" integrity sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA== +"@esbuild/darwin-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae" + integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg== + "@esbuild/darwin-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" @@ -1779,6 +1792,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz#9ec312bc29c60e1b6cecadc82bd504d8adaa19e9" integrity sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA== +"@esbuild/darwin-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be" + integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ== + "@esbuild/freebsd-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" @@ -1789,6 +1807,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz#5e82f44cb4906d6aebf24497d6a068cfc152fa00" integrity sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg== +"@esbuild/freebsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca" + integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q== + "@esbuild/freebsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" @@ -1799,6 +1822,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz#3fb1ce92f276168b75074b4e51aa0d8141ecce7f" integrity sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q== +"@esbuild/freebsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab" + integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg== + "@esbuild/linux-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" @@ -1809,6 +1837,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz#856b632d79eb80aec0864381efd29de8fd0b1f43" integrity sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg== +"@esbuild/linux-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b" + integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw== + "@esbuild/linux-arm@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" @@ -1819,6 +1852,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz#c846b4694dc5a75d1444f52257ccc5659021b736" integrity sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA== +"@esbuild/linux-arm@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37" + integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw== + "@esbuild/linux-ia32@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" @@ -1829,6 +1867,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz#f8a16615a78826ccbb6566fab9a9606cfd4a37d5" integrity sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw== +"@esbuild/linux-ia32@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4" + integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A== + "@esbuild/linux-loong64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" @@ -1839,6 +1882,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz#1c451538c765bf14913512c76ed8a351e18b09fc" integrity sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ== +"@esbuild/linux-loong64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0" + integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ== + "@esbuild/linux-mips64el@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" @@ -1849,6 +1897,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz#0846edeefbc3d8d50645c51869cc64401d9239cb" integrity sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw== +"@esbuild/linux-mips64el@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5" + integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA== + "@esbuild/linux-ppc64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" @@ -1859,6 +1912,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz#8e3fc54505671d193337a36dfd4c1a23b8a41412" integrity sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw== +"@esbuild/linux-ppc64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db" + integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w== + "@esbuild/linux-riscv64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" @@ -1869,6 +1927,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz#6a1e92096d5e68f7bb10a0d64bb5b6d1daf9a694" integrity sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q== +"@esbuild/linux-riscv64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547" + integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg== + "@esbuild/linux-s390x@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" @@ -1879,6 +1942,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz#ab18e56e66f7a3c49cb97d337cd0a6fea28a8577" integrity sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw== +"@esbuild/linux-s390x@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830" + integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA== + "@esbuild/linux-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" @@ -1889,11 +1957,21 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz#8140c9b40da634d380b0b29c837a0b4267aff38f" integrity sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q== +"@esbuild/linux-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz#831fe0b0e1a80a8b8391224ea2377d5520e1527f" + integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg== + "@esbuild/netbsd-arm64@0.24.2": version "0.24.2" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz#65f19161432bafb3981f5f20a7ff45abb2e708e6" integrity sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw== +"@esbuild/netbsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548" + integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q== + "@esbuild/netbsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" @@ -1904,6 +1982,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz#7a3a97d77abfd11765a72f1c6f9b18f5396bcc40" integrity sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw== +"@esbuild/netbsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52" + integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g== + "@esbuild/openbsd-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" @@ -1914,6 +1997,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz#58b00238dd8f123bfff68d3acc53a6ee369af89f" integrity sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A== +"@esbuild/openbsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935" + integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ== + "@esbuild/openbsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" @@ -1924,6 +2012,16 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz#0ac843fda0feb85a93e288842936c21a00a8a205" integrity sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA== +"@esbuild/openbsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf" + integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA== + +"@esbuild/openharmony-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314" + integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg== + "@esbuild/sunos-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" @@ -1934,6 +2032,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz#8b7aa895e07828d36c422a4404cc2ecf27fb15c6" integrity sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig== +"@esbuild/sunos-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e" + integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw== + "@esbuild/win32-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" @@ -1944,6 +2047,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz#c023afb647cabf0c3ed13f0eddfc4f1d61c66a85" integrity sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ== +"@esbuild/win32-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b" + integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ== + "@esbuild/win32-ia32@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" @@ -1954,6 +2062,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz#96c356132d2dda990098c8b8b951209c3cd743c2" integrity sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA== +"@esbuild/win32-ia32@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3" + integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww== + "@esbuild/win32-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" @@ -1964,6 +2077,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz#34aa0b52d0fbb1a654b596acfa595f0c7b77a77b" integrity sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg== +"@esbuild/win32-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f" + integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ== + "@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.4.1": version "4.4.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" @@ -2625,16 +2743,6 @@ "@whatwg-node/fetch" "^0.9.0" tslib "^2.4.0" -"@graphql-tools/batch-execute@^8.5.22": - version "8.5.22" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.5.22.tgz#a742aa9d138fe794e786d8fb6429665dc7df5455" - integrity sha512-hcV1JaY6NJQFQEwCKrYhpfLK8frSXDbtNMoTur98u10Cmecy1zrqNKSqhEyGetpgHxaJRqszGzKeI3RuroDN6A== - dependencies: - "@graphql-tools/utils" "^9.2.1" - dataloader "^2.2.2" - tslib "^2.4.0" - value-or-promise "^1.0.12" - "@graphql-tools/batch-execute@^9.0.4": version "9.0.4" resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-9.0.4.tgz#11601409c0c33491971fc82592de12390ec58be2" @@ -2668,19 +2776,6 @@ dataloader "^2.2.2" tslib "^2.5.0" -"@graphql-tools/delegate@^9.0.31": - version "9.0.35" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-9.0.35.tgz#94683f4bcec63520b4a6c8b2abf2e2e9324ea4f1" - integrity sha512-jwPu8NJbzRRMqi4Vp/5QX1vIUeUPpWmlQpOkXQD2r1X45YsVceyUUBnktCrlJlDB4jPRVy7JQGwmYo3KFiOBMA== - dependencies: - "@graphql-tools/batch-execute" "^8.5.22" - "@graphql-tools/executor" "^0.0.20" - "@graphql-tools/schema" "^9.0.19" - "@graphql-tools/utils" "^9.2.1" - dataloader "^2.2.2" - tslib "^2.5.0" - value-or-promise "^1.0.12" - "@graphql-tools/documents@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@graphql-tools/documents/-/documents-1.0.1.tgz#ae19cd5667d22c23b331d3a1429443ed7130faee" @@ -2697,19 +2792,6 @@ "@envelop/core" "^5.3.0" "@graphql-tools/utils" "^10.9.1" -"@graphql-tools/executor-graphql-ws@^0.0.14": - version "0.0.14" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-0.0.14.tgz#e0f53fc4cfc8a06cc461b2bc1edb4bb9a8e837ed" - integrity sha512-P2nlkAsPZKLIXImFhj0YTtny5NQVGSsKnhi7PzXiaHSXc6KkzqbWZHKvikD4PObanqg+7IO58rKFpGXP7eeO+w== - dependencies: - "@graphql-tools/utils" "^9.2.1" - "@repeaterjs/repeater" "3.0.4" - "@types/ws" "^8.0.0" - graphql-ws "5.12.1" - isomorphic-ws "5.0.0" - tslib "^2.4.0" - ws "8.13.0" - "@graphql-tools/executor-graphql-ws@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.2.tgz#2bf959d2319692460b39400c0fe1515dfbb9f034" @@ -2722,20 +2804,6 @@ tslib "^2.4.0" ws "^8.13.0" -"@graphql-tools/executor-http@^0.1.7": - version "0.1.10" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-0.1.10.tgz#faf48e18e62a925796c9653c2f50cf2095bc8e6f" - integrity sha512-hnAfbKv0/lb9s31LhWzawQ5hghBfHS+gYWtqxME6Rl0Aufq9GltiiLBcl7OVVOnkLF0KhwgbYP1mB5VKmgTGpg== - dependencies: - "@graphql-tools/utils" "^9.2.1" - "@repeaterjs/repeater" "^3.0.4" - "@whatwg-node/fetch" "^0.8.1" - dset "^3.1.2" - extract-files "^11.0.0" - meros "^1.2.1" - tslib "^2.4.0" - value-or-promise "^1.0.12" - "@graphql-tools/executor-http@^1.0.9": version "1.1.5" resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-1.1.5.tgz#c47f9bac1168b5e87e3b313e9a64da1f47874868" @@ -2764,17 +2832,6 @@ meros "^1.3.1" tslib "^2.8.1" -"@graphql-tools/executor-legacy-ws@^0.0.11": - version "0.0.11" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.11.tgz#a1e12be8279e92a363a23d4105461a34cd9e389e" - integrity sha512-4ai+NnxlNfvIQ4c70hWFvOZlSUN8lt7yc+ZsrwtNFbFPH/EroIzFMapAxM9zwyv9bH38AdO3TQxZ5zNxgBdvUw== - dependencies: - "@graphql-tools/utils" "^9.2.1" - "@types/ws" "^8.0.0" - isomorphic-ws "5.0.0" - tslib "^2.4.0" - ws "8.13.0" - "@graphql-tools/executor-legacy-ws@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-1.0.6.tgz#4ed311b731db8fd5c99e66a66361afbf9c2109fc" @@ -2786,17 +2843,6 @@ tslib "^2.4.0" ws "^8.15.0" -"@graphql-tools/executor@^0.0.20": - version "0.0.20" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor/-/executor-0.0.20.tgz#d51d159696e839522dd49d936636af251670e425" - integrity sha512-GdvNc4vszmfeGvUqlcaH1FjBoguvMYzxAfT6tDd4/LgwymepHhinqLNA5otqwVLW+JETcDaK7xGENzFomuE6TA== - dependencies: - "@graphql-tools/utils" "^9.2.1" - "@graphql-typed-document-node/core" "3.2.0" - "@repeaterjs/repeater" "^3.0.4" - tslib "^2.4.0" - value-or-promise "^1.0.12" - "@graphql-tools/executor@^1.2.1", "@graphql-tools/executor@^1.3.0": version "1.4.7" resolved "https://registry.yarnpkg.com/@graphql-tools/executor/-/executor-1.4.7.tgz#86bf0b26f2add5b686ec96e866ee22d1b81f9b6b" @@ -2845,17 +2891,6 @@ tslib "^2.4.0" unixify "^1.0.0" -"@graphql-tools/graphql-file-loader@^7.3.7": - version "7.5.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.17.tgz#7c281617ea3ab4db4d42a2bdb49850f2b937f0f9" - integrity sha512-hVwwxPf41zOYgm4gdaZILCYnKB9Zap7Ys9OhY1hbwuAuC4MMNY9GpUjoTU3CQc3zUiPoYStyRtUGkHSJZ3HxBw== - dependencies: - "@graphql-tools/import" "6.7.18" - "@graphql-tools/utils" "^9.2.1" - globby "^11.0.3" - tslib "^2.4.0" - unixify "^1.0.0" - "@graphql-tools/graphql-tag-pluck@8.3.2", "@graphql-tools/graphql-tag-pluck@^8.0.0": version "8.3.2" resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.3.2.tgz#c97cc117e0179941da8eddf8a5655aff2244aa58" @@ -2869,15 +2904,6 @@ "@graphql-tools/utils" "^10.0.13" tslib "^2.4.0" -"@graphql-tools/import@6.7.18": - version "6.7.18" - resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.7.18.tgz#ad092d8a4546bb6ffc3e871e499eec7ac368680b" - integrity sha512-XQDdyZTp+FYmT7as3xRWH/x8dx0QZA2WZqfMF5EWb36a0PiH7WwlRQYIdyYXj8YCLpiWkeBXgBRHmMnwEYR8iQ== - dependencies: - "@graphql-tools/utils" "^9.2.1" - resolve-from "5.0.0" - tslib "^2.4.0" - "@graphql-tools/import@7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-7.0.1.tgz#4e0d181c63350b1c926ae91b84a4cbaf03713c2c" @@ -2887,16 +2913,6 @@ resolve-from "5.0.0" tslib "^2.4.0" -"@graphql-tools/json-file-loader@^7.3.7": - version "7.4.18" - resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.4.18.tgz#d78ae40979bde51cfc59717757354afc9e35fba2" - integrity sha512-AJ1b6Y1wiVgkwsxT5dELXhIVUPs/u3VZ8/0/oOtpcoyO/vAeM5rOvvWegzicOOnQw8G45fgBRMkkRfeuwVt6+w== - dependencies: - "@graphql-tools/utils" "^9.2.1" - globby "^11.0.3" - tslib "^2.4.0" - unixify "^1.0.0" - "@graphql-tools/json-file-loader@^8.0.0": version "8.0.1" resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-8.0.1.tgz#3fcfe869f22d8129a74369da69bf491c0bff7c2d" @@ -2917,16 +2933,6 @@ p-limit "3.1.0" tslib "^2.4.0" -"@graphql-tools/load@^7.5.5": - version "7.8.14" - resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.8.14.tgz#f2356f9a5f658a42e33934ae036e4b2cadf2d1e9" - integrity sha512-ASQvP+snHMYm+FhIaLxxFgVdRaM0vrN9wW2BKInQpktwWTXVyk+yP5nQUCEGmn0RTdlPKrffBaigxepkEAJPrg== - dependencies: - "@graphql-tools/schema" "^9.0.18" - "@graphql-tools/utils" "^9.2.1" - p-limit "3.1.0" - tslib "^2.4.0" - "@graphql-tools/merge@9.0.6": version "9.0.6" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-9.0.6.tgz#06d3268a46f268b380665fd6a73da609c1854ca3" @@ -2935,14 +2941,6 @@ "@graphql-tools/utils" "^10.5.4" tslib "^2.4.0" -"@graphql-tools/merge@^8.2.6", "@graphql-tools/merge@^8.4.1": - version "8.4.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.4.2.tgz#95778bbe26b635e8d2f60ce9856b388f11fe8288" - integrity sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw== - dependencies: - "@graphql-tools/utils" "^9.2.1" - tslib "^2.4.0" - "@graphql-tools/merge@^9.0.0", "@graphql-tools/merge@^9.0.24", "@graphql-tools/merge@^9.0.6": version "9.0.24" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-9.0.24.tgz#1f366e85588894cb496bd1c332be7665db143df2" @@ -2965,28 +2963,6 @@ dependencies: tslib "^2.4.0" -"@graphql-tools/prisma-loader@^8.0.0": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/prisma-loader/-/prisma-loader-8.0.4.tgz#542be5567b93f1b6147ef85819eb5874969486b2" - integrity sha512-hqKPlw8bOu/GRqtYr0+dINAI13HinTVYBDqhwGAPIFmLr5s+qKskzgCiwbsckdrb5LWVFmVZc+UXn80OGiyBzg== - dependencies: - "@graphql-tools/url-loader" "^8.0.2" - "@graphql-tools/utils" "^10.0.13" - "@types/js-yaml" "^4.0.0" - "@whatwg-node/fetch" "^0.9.0" - chalk "^4.1.0" - debug "^4.3.1" - dotenv "^16.0.0" - graphql-request "^6.0.0" - http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.0" - jose "^5.0.0" - js-yaml "^4.0.0" - lodash "^4.17.20" - scuid "^1.1.0" - tslib "^2.4.0" - yaml-ast-parser "^0.0.43" - "@graphql-tools/relay-operation-optimizer@^6.5.0": version "6.5.18" resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" @@ -3024,36 +3000,7 @@ "@graphql-tools/utils" "^10.8.6" tslib "^2.4.0" -"@graphql-tools/schema@^9.0.18", "@graphql-tools/schema@^9.0.19": - version "9.0.19" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-9.0.19.tgz#c4ad373b5e1b8a0cf365163435b7d236ebdd06e7" - integrity sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w== - dependencies: - "@graphql-tools/merge" "^8.4.1" - "@graphql-tools/utils" "^9.2.1" - tslib "^2.4.0" - value-or-promise "^1.0.12" - -"@graphql-tools/url-loader@^7.9.7": - version "7.17.18" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.17.18.tgz#3e253594d23483e4c0dd3a4c3dd2ad5cd0141192" - integrity sha512-ear0CiyTj04jCVAxi7TvgbnGDIN2HgqzXzwsfcqiVg9cvjT40NcMlZ2P1lZDgqMkZ9oyLTV8Bw6j+SyG6A+xPw== - dependencies: - "@ardatan/sync-fetch" "^0.0.1" - "@graphql-tools/delegate" "^9.0.31" - "@graphql-tools/executor-graphql-ws" "^0.0.14" - "@graphql-tools/executor-http" "^0.1.7" - "@graphql-tools/executor-legacy-ws" "^0.0.11" - "@graphql-tools/utils" "^9.2.1" - "@graphql-tools/wrap" "^9.4.2" - "@types/ws" "^8.0.0" - "@whatwg-node/fetch" "^0.8.0" - isomorphic-ws "^5.0.0" - tslib "^2.4.0" - value-or-promise "^1.0.11" - ws "^8.12.0" - -"@graphql-tools/url-loader@^8.0.0", "@graphql-tools/url-loader@^8.0.2": +"@graphql-tools/url-loader@^8.0.0": version "8.0.2" resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-8.0.2.tgz#ee8e10a85d82c72662f6bc6bbc7b408510a36ebd" integrity sha512-1dKp2K8UuFn7DFo1qX5c1cyazQv2h2ICwA9esHblEqCYrgf69Nk8N7SODmsfWg94OEaI74IqMoM12t7eIGwFzQ== @@ -3109,17 +3056,6 @@ tslib "^2.4.0" value-or-promise "^1.0.12" -"@graphql-tools/wrap@^9.4.2": - version "9.4.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-9.4.2.tgz#30835587c4c73be1780908a7cb077d8013aa2703" - integrity sha512-DFcd9r51lmcEKn0JW43CWkkI2D6T9XI1juW/Yo86i04v43O9w2/k4/nx2XTJv4Yv+iXwUw7Ok81PGltwGJSDSA== - dependencies: - "@graphql-tools/delegate" "^9.0.31" - "@graphql-tools/schema" "^9.0.18" - "@graphql-tools/utils" "^9.2.1" - tslib "^2.4.0" - value-or-promise "^1.0.12" - "@graphql-typed-document-node/core@3.2.0", "@graphql-typed-document-node/core@^3.1.1", "@graphql-typed-document-node/core@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" @@ -3325,266 +3261,174 @@ resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz#56f00962ff0c4e0eb93d34a047d29fa995e3e342" integrity sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg== -"@isaacs/cliui@^8.0.2": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" - integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - dependencies: - string-width "^5.1.2" - string-width-cjs "npm:string-width@^4.2.0" - strip-ansi "^7.0.1" - strip-ansi-cjs "npm:strip-ansi@^6.0.1" - wrap-ansi "^8.1.0" - wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" - integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== - dependencies: - "@jest/types" "^28.1.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - slash "^3.0.0" +"@inquirer/checkbox@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.2.1.tgz#45125a32f27c5cfd82a23d5ecf49b4dc137e1247" + integrity sha512-bevKGO6kX1eM/N+pdh9leS5L7TBF4ICrzi9a+cbWkrxeAeIcwlo/7OfWGCDERdRCI2/Q6tjltX4bt07ALHDwFw== + dependencies: + "@inquirer/core" "^10.1.15" + "@inquirer/figures" "^1.0.13" + "@inquirer/type" "^3.0.8" + ansi-escapes "^4.3.2" + yoctocolors-cjs "^2.1.2" + +"@inquirer/confirm@^5.1.14": + version "5.1.14" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.14.tgz#e6321edf51a3a5f54dc548b80ef6ba89891351ad" + integrity sha512-5yR4IBfe0kXe59r1YCTG8WXkUbl7Z35HK87Sw+WUyGD8wNUx7JvY7laahzeytyE1oLn74bQnL7hstctQxisQ8Q== + dependencies: + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + +"@inquirer/core@^10.1.15": + version "10.1.15" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.15.tgz#8feb69fd536786181a2b6bfb84d8674faa9d2e59" + integrity sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA== + dependencies: + "@inquirer/figures" "^1.0.13" + "@inquirer/type" "^3.0.8" + ansi-escapes "^4.3.2" + cli-width "^4.1.0" + mute-stream "^2.0.0" + signal-exit "^4.1.0" + wrap-ansi "^6.2.0" + yoctocolors-cjs "^2.1.2" -"@jest/core@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" - integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== +"@inquirer/editor@^4.2.17": + version "4.2.17" + resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.17.tgz#5af16f6f24f62f552feb05c7bec2dc0743230584" + integrity sha512-r6bQLsyPSzbWrZZ9ufoWL+CztkSatnJ6uSxqd6N+o41EZC51sQeWOzI6s5jLb+xxTWxl7PlUppqm8/sow241gg== dependencies: - "@jest/console" "^28.1.3" - "@jest/reporters" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^28.1.3" - jest-config "^28.1.3" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-resolve-dependencies "^28.1.3" - jest-runner "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - jest-watcher "^28.1.3" - micromatch "^4.0.4" - pretty-format "^28.1.3" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" + "@inquirer/core" "^10.1.15" + "@inquirer/external-editor" "^1.0.1" + "@inquirer/type" "^3.0.8" -"@jest/environment@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" - integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== +"@inquirer/expand@^4.0.17": + version "4.0.17" + resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.17.tgz#b688f4a1a65daf2bf77a11de7734766769cce343" + integrity sha512-PSqy9VmJx/VbE3CT453yOfNa+PykpKg/0SYP7odez1/NWBGuDXgPhp4AeGYYKjhLn5lUUavVS/JbeYMPdH50Mw== dependencies: - "@jest/fake-timers" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - jest-mock "^28.1.3" + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + yoctocolors-cjs "^2.1.2" -"@jest/expect-utils@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" - integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== +"@inquirer/external-editor@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@inquirer/external-editor/-/external-editor-1.0.1.tgz#ab0a82c5719a963fb469021cde5cd2b74fea30f8" + integrity sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q== dependencies: - jest-get-type "^28.0.2" + chardet "^2.1.0" + iconv-lite "^0.6.3" -"@jest/expect@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" - integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== - dependencies: - expect "^28.1.3" - jest-snapshot "^28.1.3" +"@inquirer/figures@^1.0.13": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.13.tgz#ad0afd62baab1c23175115a9b62f511b6a751e45" + integrity sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw== -"@jest/fake-timers@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" - integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== +"@inquirer/input@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.2.1.tgz#c174654eb1ab34dfd42a9cf6095a7e735a4db130" + integrity sha512-tVC+O1rBl0lJpoUZv4xY+WGWY8V5b0zxU1XDsMsIHYregdh7bN5X5QnIONNBAl0K765FYlAfNHS2Bhn7SSOVow== + dependencies: + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + +"@inquirer/number@^3.0.17": + version "3.0.17" + resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.17.tgz#32a66136ce35cad9f40ceb5f82a8cfac4f306517" + integrity sha512-GcvGHkyIgfZgVnnimURdOueMk0CztycfC8NZTiIY9arIAkeOgt6zG57G+7vC59Jns3UX27LMkPKnKWAOF5xEYg== + dependencies: + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + +"@inquirer/password@^4.0.17": + version "4.0.17" + resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.17.tgz#45480c8ace688ebf071e350536ea746792b3eeba" + integrity sha512-DJolTnNeZ00E1+1TW+8614F7rOJJCM4y4BAGQ3Gq6kQIG+OJ4zr3GLjIjVVJCbKsk2jmkmv6v2kQuN/vriHdZA== + dependencies: + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + ansi-escapes "^4.3.2" + +"@inquirer/prompts@^7.8.2": + version "7.8.2" + resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.8.2.tgz#5d9d8d7273831bd512e9cfaf3d827cce0f2eae0f" + integrity sha512-nqhDw2ZcAUrKNPwhjinJny903bRhI0rQhiDz1LksjeRxqa36i3l75+4iXbOy0rlDpLJGxqtgoPavQjmmyS5UJw== + dependencies: + "@inquirer/checkbox" "^4.2.1" + "@inquirer/confirm" "^5.1.14" + "@inquirer/editor" "^4.2.17" + "@inquirer/expand" "^4.0.17" + "@inquirer/input" "^4.2.1" + "@inquirer/number" "^3.0.17" + "@inquirer/password" "^4.0.17" + "@inquirer/rawlist" "^4.1.5" + "@inquirer/search" "^3.1.0" + "@inquirer/select" "^4.3.1" + +"@inquirer/rawlist@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.1.5.tgz#e3664e3da3fba93f34ee25813faa7957aa717991" + integrity sha512-R5qMyGJqtDdi4Ht521iAkNqyB6p2UPuZUbMifakg1sWtu24gc2Z8CJuw8rP081OckNDMgtDCuLe42Q2Kr3BolA== dependencies: - "@jest/types" "^28.1.3" - "@sinonjs/fake-timers" "^9.1.2" - "@types/node" "*" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-util "^28.1.3" - -"@jest/globals@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" - integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== - dependencies: - "@jest/environment" "^28.1.3" - "@jest/expect" "^28.1.3" - "@jest/types" "^28.1.3" - -"@jest/reporters@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" - integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - "@jridgewell/trace-mapping" "^0.3.13" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - jest-worker "^28.1.3" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - terminal-link "^2.0.0" - v8-to-istanbul "^9.0.1" + "@inquirer/core" "^10.1.15" + "@inquirer/type" "^3.0.8" + yoctocolors-cjs "^2.1.2" -"@jest/schemas@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" - integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== +"@inquirer/search@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.1.0.tgz#22f1373938eef7b98c3c30f604aac8fbe9baf27a" + integrity sha512-PMk1+O/WBcYJDq2H7foV0aAZSmDdkzZB9Mw2v/DmONRJopwA/128cS9M/TXWLKKdEQKZnKwBzqu2G4x/2Nqx8Q== dependencies: - "@sinclair/typebox" "^0.24.1" + "@inquirer/core" "^10.1.15" + "@inquirer/figures" "^1.0.13" + "@inquirer/type" "^3.0.8" + yoctocolors-cjs "^2.1.2" -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== +"@inquirer/select@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.3.1.tgz#b49e76dab47f7c729e4e1e520fedc268e5b88cdc" + integrity sha512-Gfl/5sqOF5vS/LIrSndFgOh7jgoe0UXEizDqahFRkq5aJBLegZ6WjuMh/hVEJwlFQjyLq1z9fRtvUMkb7jM1LA== dependencies: - "@sinclair/typebox" "^0.27.8" + "@inquirer/core" "^10.1.15" + "@inquirer/figures" "^1.0.13" + "@inquirer/type" "^3.0.8" + ansi-escapes "^4.3.2" + yoctocolors-cjs "^2.1.2" -"@jest/source-map@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" - integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== - dependencies: - "@jridgewell/trace-mapping" "^0.3.13" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" - integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== - dependencies: - "@jest/console" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" - integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== - dependencies: - "@jest/test-result" "^28.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - slash "^3.0.0" +"@inquirer/type@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.8.tgz#efc293ba0ed91e90e6267f1aacc1c70d20b8b4e8" + integrity sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw== -"@jest/transform@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" - integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^28.1.3" - "@jridgewell/trace-mapping" "^0.3.13" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.1" + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" +"@jest/diff-sequences@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz#0ededeae4d071f5c8ffe3678d15f3a1be09156be" + integrity sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw== -"@jest/types@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" - integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== - dependencies: - "@jest/schemas" "^28.1.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" +"@jest/get-type@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/get-type/-/get-type-30.0.1.tgz#0d32f1bbfba511948ad247ab01b9007724fc9f52" + integrity sha512-AyYdemXCptSRFirI5EPazNxyPwAL0jXt3zceFjaj8NFiKP9pOi0bfXonf6qkf82z2t3QWPeLCWWw4stPBzctLw== -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== +"@jest/schemas@30.0.5": + version "30.0.5" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-30.0.5.tgz#7bdf69fc5a368a5abdb49fd91036c55225846473" + integrity sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA== dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" + "@sinclair/typebox" "^0.34.0" "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" @@ -3626,7 +3470,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.9": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -3634,6 +3478,49 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsonjoy.com/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.2.tgz#cf8ea9dcb849b81c95f14fc0aaa151c6b54d2578" + integrity sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA== + +"@jsonjoy.com/buffers@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz#ade6895b7d3883d70f87b5743efaa12c71dfef7a" + integrity sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q== + +"@jsonjoy.com/codegen@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz#5c23f796c47675f166d23b948cdb889184b93207" + integrity sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g== + +"@jsonjoy.com/json-pack@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.11.0.tgz#3d40d3d8042f5e9eeb005658a76b788e8ca84ac0" + integrity sha512-nLqSTAYwpk+5ZQIoVp7pfd/oSKNWlEdvTq2LzVA4r2wtWZg6v+5u0VgBOaDJuUfNOuw/4Ysq6glN5QKSrOCgrA== + dependencies: + "@jsonjoy.com/base64" "^1.1.2" + "@jsonjoy.com/buffers" "^1.0.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@jsonjoy.com/json-pointer" "^1.0.1" + "@jsonjoy.com/util" "^1.9.0" + hyperdyperid "^1.2.0" + thingies "^2.5.0" + +"@jsonjoy.com/json-pointer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pointer/-/json-pointer-1.0.1.tgz#3b710158e8a212708a2886ea5e38d92e2ea4f4a0" + integrity sha512-tJpwQfuBuxqZlyoJOSZcqf7OUmiYQ6MiPNmOv4KbZdXE/DdvBSSAwhos0zIlJU/AXxC8XpuO8p08bh2fIl+RKA== + dependencies: + "@jsonjoy.com/util" "^1.3.0" + +"@jsonjoy.com/util@^1.3.0", "@jsonjoy.com/util@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.9.0.tgz#7ee95586aed0a766b746cd8d8363e336c3c47c46" + integrity sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ== + dependencies: + "@jsonjoy.com/buffers" "^1.0.0" + "@jsonjoy.com/codegen" "^1.0.0" + "@kamilkisiela/fast-url-parser@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz#9d68877a489107411b953c54ea65d0658b515809" @@ -3740,6 +3627,18 @@ dependencies: "@monaco-editor/loader" "^1.4.0" +"@mswjs/interceptors@^0.39.5": + version "0.39.6" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.6.tgz#44094a578f20da4749d1a0eaf3cdb7973604004b" + integrity sha512-bndDP83naYYkfayr/qhBHMhk0YGwS1iv6vaEGcr0SQbO0IZtbOPqjKjds/WcG+bJA+1T5vCx6kprKOzn5Bg+Vw== + dependencies: + "@open-draft/deferred-promise" "^2.2.0" + "@open-draft/logger" "^0.3.0" + "@open-draft/until" "^2.0.0" + is-node-process "^1.2.0" + outvariant "^1.4.3" + strict-event-emitter "^0.5.1" + "@napi-rs/simple-git-android-arm-eabi@0.1.9": version "0.1.9" resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.9.tgz#0326fbc4ffafb678bda3474018e2a24a8d2a21b6" @@ -3993,6 +3892,24 @@ resolved "https://registry.yarnpkg.com/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz#c44d3a7c6d5c184bb6036f4d5995eee298945815" integrity sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg== +"@open-draft/deferred-promise@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz#4a822d10f6f0e316be4d67b4d4f8c9a124b073bd" + integrity sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA== + +"@open-draft/logger@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@open-draft/logger/-/logger-0.3.0.tgz#2b3ab1242b360aa0adb28b85f5d7da1c133a0954" + integrity sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ== + dependencies: + is-node-process "^1.2.0" + outvariant "^1.4.0" + +"@open-draft/until@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" + integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== + "@parcel/watcher-android-arm64@2.4.1": version "2.4.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" @@ -4076,33 +3993,6 @@ "@parcel/watcher-win32-ia32" "2.4.1" "@parcel/watcher-win32-x64" "2.4.1" -"@peculiar/asn1-schema@^2.3.13", "@peculiar/asn1-schema@^2.3.8": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.15.tgz#e926bfdeed51945a06f38be703499e7d8341a5d3" - integrity sha512-QPeD8UA8axQREpgR5UTAfu2mqQmm97oUqahDtNdBcfj3qAnoXzFdQW+aNf/tD2WVXF8Fhmftxoj0eMIT++gX2w== - dependencies: - asn1js "^3.0.5" - pvtsutils "^1.3.6" - tslib "^2.8.1" - -"@peculiar/json-schema@^1.1.12": - version "1.1.12" - resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" - integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== - dependencies: - tslib "^2.0.0" - -"@peculiar/webcrypto@^1.4.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz#9e57174c02c1291051c553600347e12b81469e10" - integrity sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg== - dependencies: - "@peculiar/asn1-schema" "^2.3.8" - "@peculiar/json-schema" "^1.1.12" - pvtsutils "^1.3.5" - tslib "^2.6.2" - webcrypto-core "^1.8.0" - "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -4346,105 +4236,110 @@ resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.25.0.tgz#7223baf72256e918a3c29081bb1ecc6fad4fbf58" integrity sha512-OZSyhzU6vTdW3eV/mz5i6hQwQUhkRs7xwY2d1aqPvTdMe0+2cY7Fwp45PAiwYLEj73i9ro2FxF9qC4DvHGSCgQ== -"@repeaterjs/repeater@3.0.4", "@repeaterjs/repeater@^3.0.4": +"@repeaterjs/repeater@^3.0.4": version "3.0.4" resolved "https://registry.yarnpkg.com/@repeaterjs/repeater/-/repeater-3.0.4.tgz#a04d63f4d1bf5540a41b01a921c9a7fddc3bd1ca" integrity sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA== -"@rollup/rollup-android-arm-eabi@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.31.0.tgz#d4dd60da0075a6ce9a6c76d71b8204f3e1822285" - integrity sha512-9NrR4033uCbUBRgvLcBrJofa2KY9DzxL2UKZ1/4xA/mnTNyhZCWBuD8X3tPm1n4KxcgaraOYgrFKSgwjASfmlA== - -"@rollup/rollup-android-arm64@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.31.0.tgz#25c4d33259a7a2ccd2f52a5ffcc0bb3ab3f0729d" - integrity sha512-iBbODqT86YBFHajxxF8ebj2hwKm1k8PTBQSojSt3d1FFt1gN+xf4CowE47iN0vOSdnd+5ierMHBbu/rHc7nq5g== - -"@rollup/rollup-darwin-arm64@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.31.0.tgz#d137dff254b19163a6b52ac083a71cd055dae844" - integrity sha512-WHIZfXgVBX30SWuTMhlHPXTyN20AXrLH4TEeH/D0Bolvx9PjgZnn4H677PlSGvU6MKNsjCQJYczkpvBbrBnG6g== - -"@rollup/rollup-darwin-x64@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.31.0.tgz#58ff20b5dacb797d3adca19f02a21c532f9d55bf" - integrity sha512-hrWL7uQacTEF8gdrQAqcDy9xllQ0w0zuL1wk1HV8wKGSGbKPVjVUv/DEwT2+Asabf8Dh/As+IvfdU+H8hhzrQQ== - -"@rollup/rollup-freebsd-arm64@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.31.0.tgz#96ce1a241c591ec3e068f4af765d94eddb24e60c" - integrity sha512-S2oCsZ4hJviG1QjPY1h6sVJLBI6ekBeAEssYKad1soRFv3SocsQCzX6cwnk6fID6UQQACTjeIMB+hyYrFacRew== - -"@rollup/rollup-freebsd-x64@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.31.0.tgz#e59e7ede505be41f0b4311b0b943f8eb44938467" - integrity sha512-pCANqpynRS4Jirn4IKZH4tnm2+2CqCNLKD7gAdEjzdLGbH1iO0zouHz4mxqg0uEMpO030ejJ0aA6e1PJo2xrPA== - -"@rollup/rollup-linux-arm-gnueabihf@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.31.0.tgz#e455ca6e4ff35bd46d62201c153352e717000a7b" - integrity sha512-0O8ViX+QcBd3ZmGlcFTnYXZKGbFu09EhgD27tgTdGnkcYXLat4KIsBBQeKLR2xZDCXdIBAlWLkiXE1+rJpCxFw== - -"@rollup/rollup-linux-arm-musleabihf@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.31.0.tgz#bc1a93d807d19e70b1e343a5bfea43723bcd6327" - integrity sha512-w5IzG0wTVv7B0/SwDnMYmbr2uERQp999q8FMkKG1I+j8hpPX2BYFjWe69xbhbP6J9h2gId/7ogesl9hwblFwwg== - -"@rollup/rollup-linux-arm64-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.31.0.tgz#f38bf843f1dc3d5de680caf31084008846e3efae" - integrity sha512-JyFFshbN5xwy6fulZ8B/8qOqENRmDdEkcIMF0Zz+RsfamEW+Zabl5jAb0IozP/8UKnJ7g2FtZZPEUIAlUSX8cA== - -"@rollup/rollup-linux-arm64-musl@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.31.0.tgz#b3987a96c18b7287129cf735be2dbf83e94d9d05" - integrity sha512-kpQXQ0UPFeMPmPYksiBL9WS/BDiQEjRGMfklVIsA0Sng347H8W2iexch+IEwaR7OVSKtr2ZFxggt11zVIlZ25g== - -"@rollup/rollup-linux-loongarch64-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.31.0.tgz#0f0324044e71c4f02e9f49e7ec4e347b655b34ee" - integrity sha512-pMlxLjt60iQTzt9iBb3jZphFIl55a70wexvo8p+vVFK+7ifTRookdoXX3bOsRdmfD+OKnMozKO6XM4zR0sHRrQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.31.0.tgz#809479f27f1fd5b4eecd2aa732132ad952d454ba" - integrity sha512-D7TXT7I/uKEuWiRkEFbed1UUYZwcJDU4vZQdPTcepK7ecPhzKOYk4Er2YR4uHKme4qDeIh6N3XrLfpuM7vzRWQ== - -"@rollup/rollup-linux-riscv64-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.31.0.tgz#7bc75c4f22db04d3c972f83431739cfa41c6a36e" - integrity sha512-wal2Tc8O5lMBtoePLBYRKj2CImUCJ4UNGJlLwspx7QApYny7K1cUYlzQ/4IGQBLmm+y0RS7dwc3TDO/pmcneTw== - -"@rollup/rollup-linux-s390x-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.31.0.tgz#cfe8052345c55864d83ae343362cf1912480170e" - integrity sha512-O1o5EUI0+RRMkK9wiTVpk2tyzXdXefHtRTIjBbmFREmNMy7pFeYXCFGbhKFwISA3UOExlo5GGUuuj3oMKdK6JQ== - -"@rollup/rollup-linux-x64-gnu@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.31.0.tgz#c6b048f1e25f3fea5b4bd246232f4d07a159c5a0" - integrity sha512-zSoHl356vKnNxwOWnLd60ixHNPRBglxpv2g7q0Cd3Pmr561gf0HiAcUBRL3S1vPqRC17Zo2CX/9cPkqTIiai1g== - -"@rollup/rollup-linux-x64-musl@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.31.0.tgz#615273ac52d1a201f4de191cbd3389016a9d7d80" - integrity sha512-ypB/HMtcSGhKUQNiFwqgdclWNRrAYDH8iMYH4etw/ZlGwiTVxBz2tDrGRrPlfZu6QjXwtd+C3Zib5pFqID97ZA== - -"@rollup/rollup-win32-arm64-msvc@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.31.0.tgz#32ed85810c1b831c648eca999d68f01255b30691" - integrity sha512-JuhN2xdI/m8Hr+aVO3vspO7OQfUFO6bKLIRTAy0U15vmWjnZDLrEgCZ2s6+scAYaQVpYSh9tZtRijApw9IXyMw== - -"@rollup/rollup-win32-ia32-msvc@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.31.0.tgz#d47effada68bcbfdccd30c4a788d42e4542ff4d3" - integrity sha512-U1xZZXYkvdf5MIWmftU8wrM5PPXzyaY1nGCI4KI4BFfoZxHamsIe+BtnPLIvvPykvQWlVbqUXdLa4aJUuilwLQ== - -"@rollup/rollup-win32-x64-msvc@4.31.0": - version "4.31.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.31.0.tgz#7a2d89a82cf0388d60304964217dd7beac6de645" - integrity sha512-ul8rnCsUumNln5YWwz0ted2ZHFhzhRRnkpBZ+YRuHoRAlUji9KChpOUOndY7uykrPEPXVbHLlsdo6v5yXo/TXw== +"@rollup/rollup-android-arm-eabi@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.3.tgz#8d8afcc5a79a3f190c5f855facde6e0da6a5b7ea" + integrity sha512-UmTdvXnLlqQNOCJnyksjPs1G4GqXNGW1LrzCe8+8QoaLhhDeTXYBgJ3k6x61WIhlHX2U+VzEJ55TtIjR/HTySA== + +"@rollup/rollup-android-arm64@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.3.tgz#bed8ee4c2b31fd255fb91c2f52949dffef16ecf1" + integrity sha512-8NoxqLpXm7VyeI0ocidh335D6OKT0UJ6fHdnIxf3+6oOerZZc+O7r+UhvROji6OspyPm+rrIdb1gTXtVIqn+Sg== + +"@rollup/rollup-darwin-arm64@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.3.tgz#ee2a75deb8786b394c7f1777cc0c2ae2c3680469" + integrity sha512-csnNavqZVs1+7/hUKtgjMECsNG2cdB8F7XBHP6FfQjqhjF8rzMzb3SLyy/1BG7YSfQ+bG75Ph7DyedbUqwq1rA== + +"@rollup/rollup-darwin-x64@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.3.tgz#f5a01577c40830c423855492ecd8d3a7ae1b4836" + integrity sha512-r2MXNjbuYabSIX5yQqnT8SGSQ26XQc8fmp6UhlYJd95PZJkQD1u82fWP7HqvGUf33IsOC6qsiV+vcuD4SDP6iw== + +"@rollup/rollup-freebsd-arm64@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.3.tgz#d272eed9c14efc149bab316de364c04f236c544f" + integrity sha512-uluObTmgPJDuJh9xqxyr7MV61Imq+0IvVsAlWyvxAaBSNzCcmZlhfYcRhCdMaCsy46ccZa7vtDDripgs9Jkqsw== + +"@rollup/rollup-freebsd-x64@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.3.tgz#4c793f86e2dc64e725370daa2bec103f5869b5a6" + integrity sha512-AVJXEq9RVHQnejdbFvh1eWEoobohUYN3nqJIPI4mNTMpsyYN01VvcAClxflyk2HIxvLpRcRggpX1m9hkXkpC/A== + +"@rollup/rollup-linux-arm-gnueabihf@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.3.tgz#28da78d3709262f0b7ef0ba7e8e6f77c1b2f30a6" + integrity sha512-byyflM+huiwHlKi7VHLAYTKr67X199+V+mt1iRgJenAI594vcmGGddWlu6eHujmcdl6TqSNnvqaXJqZdnEWRGA== + +"@rollup/rollup-linux-arm-musleabihf@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.3.tgz#7e3309e6519eca1459038761aad44863e86fc497" + integrity sha512-aLm3NMIjr4Y9LklrH5cu7yybBqoVCdr4Nvnm8WB7PKCn34fMCGypVNpGK0JQWdPAzR/FnoEoFtlRqZbBBLhVoQ== + +"@rollup/rollup-linux-arm64-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.3.tgz#bc18efe81022baac97566cc0ace04b359eb7cd16" + integrity sha512-VtilE6eznJRDIoFOzaagQodUksTEfLIsvXymS+UdJiSXrPW7Ai+WG4uapAc3F7Hgs791TwdGh4xyOzbuzIZrnw== + +"@rollup/rollup-linux-arm64-musl@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.3.tgz#3ac849b6c42591014b0cb8e25c9ba1ace8fe19ec" + integrity sha512-dG3JuS6+cRAL0GQ925Vppafi0qwZnkHdPeuZIxIPXqkCLP02l7ka+OCyBoDEv8S+nKHxfjvjW4OZ7hTdHkx8/w== + +"@rollup/rollup-linux-loongarch64-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.3.tgz#10260ca0c3682c2904b04bb907163aca8bc5adef" + integrity sha512-iU8DxnxEKJptf8Vcx4XvAUdpkZfaz0KWfRrnIRrOndL0SvzEte+MTM7nDH4A2Now4FvTZ01yFAgj6TX/mZl8hQ== + +"@rollup/rollup-linux-ppc64-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.3.tgz#36b002a84c04f2e18093f563896c95a6e687f28f" + integrity sha512-VrQZp9tkk0yozJoQvQcqlWiqaPnLM6uY1qPYXvukKePb0fqaiQtOdMJSxNFUZFsGw5oA5vvVokjHrx8a9Qsz2A== + +"@rollup/rollup-linux-riscv64-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.3.tgz#ff1b3708624fc8b912e5341431751977b78be273" + integrity sha512-uf2eucWSUb+M7b0poZ/08LsbcRgaDYL8NCGjUeFMwCWFwOuFcZ8D9ayPl25P3pl+D2FH45EbHdfyUesQ2Lt9wA== + +"@rollup/rollup-linux-riscv64-musl@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.3.tgz#ab6f7ef69cdf812eccb318021a8f5c221bd0c048" + integrity sha512-7tnUcDvN8DHm/9ra+/nF7lLzYHDeODKKKrh6JmZejbh1FnCNZS8zMkZY5J4sEipy2OW1d1Ncc4gNHUd0DLqkSg== + +"@rollup/rollup-linux-s390x-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.3.tgz#60527b48dd84814fa5092a2eef1ac90e2b4bf825" + integrity sha512-MUpAOallJim8CsJK+4Lc9tQzlfPbHxWDrGXZm2z6biaadNpvh3a5ewcdat478W+tXDoUiHwErX/dOql7ETcLqg== + +"@rollup/rollup-linux-x64-gnu@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.3.tgz#c95698199820782b7420f5472e5d36b681728274" + integrity sha512-F42IgZI4JicE2vM2PWCe0N5mR5vR0gIdORPqhGQ32/u1S1v3kLtbZ0C/mi9FFk7C5T0PgdeyWEPajPjaUpyoKg== + +"@rollup/rollup-linux-x64-musl@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.3.tgz#226eb081be8d6698a580022448197b01cb4193a2" + integrity sha512-oLc+JrwwvbimJUInzx56Q3ujL3Kkhxehg7O1gWAYzm8hImCd5ld1F2Gry5YDjR21MNb5WCKhC9hXgU7rRlyegQ== + +"@rollup/rollup-win32-arm64-msvc@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.3.tgz#e900bd51cfc20af2a1c828d999bb49da1bd497eb" + integrity sha512-lOrQ+BVRstruD1fkWg9yjmumhowR0oLAAzavB7yFSaGltY8klttmZtCLvOXCmGE9mLIn8IBV/IFrQOWz5xbFPg== + +"@rollup/rollup-win32-ia32-msvc@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.3.tgz#94652ba771a90bf2558c0a6c553857148d7ff8f4" + integrity sha512-vvrVKPRS4GduGR7VMH8EylCBqsDcw6U+/0nPDuIjXQRbHJc6xOBj+frx8ksfZAh6+Fptw5wHrN7etlMmQnPQVg== + +"@rollup/rollup-win32-x64-msvc@4.46.3": + version "4.46.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.3.tgz#3d9ed4f8b9f2be7500565515d863c409eaceeb70" + integrity sha512-fi3cPxCnu3ZeM3EwKZPgXbWoGzm2XHgB/WShKI81uj8wG0+laobmqy5wbgEwzstlbLu4MyO8C19FyhhWseYKNQ== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -4486,29 +4381,10 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== -"@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" - integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== - dependencies: - "@sinonjs/commons" "^1.7.0" +"@sinclair/typebox@^0.34.0": + version "0.34.40" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.40.tgz#740056ea8d8aaada2ac1ce414c2f074798283b92" + integrity sha512-gwBNIP8ZAYev/ORDWW0QvxdwPXwxBtLsdsJgSc7eDIRt8ubP+rxUBzPsrwnu16fgEF8Bx4lh/+mvQvJzcTM6Kw== "@swc/core-darwin-arm64@1.3.55": version "1.3.55" @@ -4724,7 +4600,7 @@ dependencies: "@types/estree" "*" -"@types/babel__core@*", "@types/babel__core@^7.1.14", "@types/babel__core@^7.20.5": +"@types/babel__core@*", "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== @@ -4757,7 +4633,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*": version "7.18.3" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.3.tgz#dfc508a85781e5698d5b33443416b6268c4b3e8d" integrity sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w== @@ -4769,6 +4645,13 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.1.tgz#5a284d193cfc61abb2e5a50d36ebbc50d942a32b" integrity sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ== +"@types/chai@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.2.tgz#6f14cea18180ffc4416bc0fd12be05fdd73bdd6b" + integrity sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg== + dependencies: + "@types/deep-eql" "*" + "@types/concat-stream@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-2.0.0.tgz#a716f0ba9015014e643addb351da05a73bef425c" @@ -4776,11 +4659,6 @@ dependencies: "@types/node" "*" -"@types/debounce@1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.4.tgz#cb7e85d9ad5ababfac2f27183e8ac8b576b2abb3" - integrity sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw== - "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" @@ -4793,6 +4671,11 @@ resolved "https://registry.yarnpkg.com/@types/dedent/-/dedent-0.7.2.tgz#878b5286877ec68e68e89f16b1014411c8e10814" integrity sha512-kRiitIeUg1mPV9yH4VUJ/1uk2XjyANfeL8/7rH1tsjvHeO9PJLBHJIYsFWmAvmGj5u8rj+1TZx7PZzW2qLw3Lw== +"@types/deep-eql@*": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd" + integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw== + "@types/estree-jsx@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/estree-jsx/-/estree-jsx-1.0.0.tgz#7bfc979ab9f692b492017df42520f7f765e98df1" @@ -4800,17 +4683,10 @@ dependencies: "@types/estree" "*" -"@types/estree@*", "@types/estree@1.0.6", "@types/estree@^1.0.0": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" - integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== - -"@types/graceful-fs@^4.1.3": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" - integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== - dependencies: - "@types/node" "*" +"@types/estree@*", "@types/estree@1.0.8", "@types/estree@^1.0.0": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== "@types/hast@^2.3.4": version "2.3.4" @@ -4826,14 +4702,6 @@ dependencies: "@types/unist" "*" -"@types/inquirer@8.2.10": - version "8.2.10" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.10.tgz#9444dce2d764c35bc5bb4d742598aaa4acb6561b" - integrity sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA== - dependencies: - "@types/through" "*" - rxjs "^7.2.0" - "@types/is-empty@^1.0.0": version "1.2.1" resolved "https://registry.yarnpkg.com/@types/is-empty/-/is-empty-1.2.1.tgz#18d7256a73e43ec51f8b75c25fbdc31350be52a6" @@ -4844,47 +4712,12 @@ resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.4.tgz#1d60fa47ff70abc97b4d9ea45328747c488b3a50" integrity sha512-3mFBtIPQ0TQetKRDe94g8YrxJZxdMillMGegyv6zRBXvq4peRRhf2wLZ/Dl53emtTsC29dQQBwYvovS20yXpiQ== -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@28.1.8": - version "28.1.8" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.8.tgz#6936409f3c9724ea431efd412ea0238a0f03b09b" - integrity sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw== - dependencies: - expect "^28.0.0" - pretty-format "^28.0.0" - -"@types/jest@^27.5.2": - version "27.5.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" - integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== - dependencies: - jest-matcher-utils "^27.0.0" - pretty-format "^27.0.0" - -"@types/js-yaml@4.0.9", "@types/js-yaml@^4.0.0": +"@types/js-yaml@4.0.9": version "4.0.9" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== -"@types/json-schema@7.0.9", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.4", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -4981,10 +4814,10 @@ resolved "https://registry.yarnpkg.com/@types/parse-filepath/-/parse-filepath-1.0.2.tgz#417f313bbb10526e7adb06e037e53040fb4d7f93" integrity sha512-CcyaQuvlpejsJR57RWxUR++E7zTKvbDDotZyiKaJsZdlbV8JfHgRYj4aZszEGKVLhiX0pbD8QeAuzEFUol4mRA== -"@types/prettier@^2.1.5": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" - integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== +"@types/parse-json@^4.0.0": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== "@types/prop-types@*": version "15.7.5" @@ -5028,38 +4861,26 @@ resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef" integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ== -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - "@types/supports-color@^8.0.0": version "8.1.1" resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-8.1.1.tgz#1b44b1b096479273adf7f93c75fc4ecc40a61ee4" integrity sha512-dPWnWsf+kzIG140B8z2w3fr5D03TLWbOAFQl45xUpI3vcizeXriNR5VYkWZ+WTMsUHqZ9Xlt3hrxGNANFyNQfw== -"@types/through@*": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" - integrity sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg== - dependencies: - "@types/node" "*" - "@types/trusted-types@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756" integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg== -"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.10.tgz#04ffa7f406ab628f7f7e97ca23e290cd8ab15efc" - integrity sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA== - -"@types/unist@^3.0.0": +"@types/unist@*", "@types/unist@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.0.tgz#988ae8af1e5239e89f9fbb1ade4c935f4eeedf9a" integrity sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w== +"@types/unist@^2.0.0", "@types/unist@^2.0.2": + version "2.0.10" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.10.tgz#04ffa7f406ab628f7f7e97ca23e290cd8ab15efc" + integrity sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA== + "@types/ws@^8.0.0": version "8.5.4" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5" @@ -5067,18 +4888,6 @@ dependencies: "@types/node" "*" -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^17.0.8": - version "17.0.22" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.22.tgz#7dd37697691b5f17d020f3c63e7a45971ff71e9a" - integrity sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g== - dependencies: - "@types/yargs-parser" "*" - "@types/yauzl@^2.9.1": version "2.10.0" resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" @@ -5281,6 +5090,67 @@ resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz#f11091e0130eca6c1ca8cfb85ee71ea53b255d31" integrity sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A== +"@vitest/expect@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-3.2.4.tgz#8362124cd811a5ee11c5768207b9df53d34f2433" + integrity sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig== + dependencies: + "@types/chai" "^5.2.2" + "@vitest/spy" "3.2.4" + "@vitest/utils" "3.2.4" + chai "^5.2.0" + tinyrainbow "^2.0.0" + +"@vitest/mocker@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/mocker/-/mocker-3.2.4.tgz#4471c4efbd62db0d4fa203e65cc6b058a85cabd3" + integrity sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ== + dependencies: + "@vitest/spy" "3.2.4" + estree-walker "^3.0.3" + magic-string "^0.30.17" + +"@vitest/pretty-format@3.2.4", "@vitest/pretty-format@^3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/pretty-format/-/pretty-format-3.2.4.tgz#3c102f79e82b204a26c7a5921bf47d534919d3b4" + integrity sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA== + dependencies: + tinyrainbow "^2.0.0" + +"@vitest/runner@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-3.2.4.tgz#5ce0274f24a971f6500f6fc166d53d8382430766" + integrity sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ== + dependencies: + "@vitest/utils" "3.2.4" + pathe "^2.0.3" + strip-literal "^3.0.0" + +"@vitest/snapshot@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-3.2.4.tgz#40a8bc0346ac0aee923c0eefc2dc005d90bc987c" + integrity sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ== + dependencies: + "@vitest/pretty-format" "3.2.4" + magic-string "^0.30.17" + pathe "^2.0.3" + +"@vitest/spy@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-3.2.4.tgz#cc18f26f40f3f028da6620046881f4e4518c2599" + integrity sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw== + dependencies: + tinyspy "^4.0.3" + +"@vitest/utils@3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-3.2.4.tgz#c0813bc42d99527fb8c5b138c7a88516bca46fea" + integrity sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA== + dependencies: + "@vitest/pretty-format" "3.2.4" + loupe "^3.1.4" + tinyrainbow "^2.0.0" + "@volar/language-core@2.4.0", "@volar/language-core@~2.4.0-alpha.18": version "2.4.0" resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-2.4.0.tgz#962efc66ff9198ee2412786e99528bf77cdad100" @@ -5421,11 +5291,6 @@ "@whatwg-node/promise-helpers" "^1.0.0" tslib "^2.6.3" -"@whatwg-node/events@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.3.tgz#13a65dd4f5893f55280f766e29ae48074927acad" - integrity sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA== - "@whatwg-node/events@^0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.1.0.tgz#1e7b4e4fd0d149b247ec0132b1030fe522282295" @@ -5439,17 +5304,6 @@ "@whatwg-node/node-fetch" "^0.7.25" urlpattern-polyfill "^10.0.0" -"@whatwg-node/fetch@^0.8.0", "@whatwg-node/fetch@^0.8.1": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.8.8.tgz#48c6ad0c6b7951a73e812f09dd22d75e9fa18cae" - integrity sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg== - dependencies: - "@peculiar/webcrypto" "^1.4.0" - "@whatwg-node/node-fetch" "^0.3.6" - busboy "^1.6.0" - urlpattern-polyfill "^8.0.0" - web-streams-polyfill "^3.2.1" - "@whatwg-node/fetch@^0.9.0", "@whatwg-node/fetch@^0.9.18", "@whatwg-node/fetch@^0.9.20": version "0.9.20" resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.9.20.tgz#f217153c173d9632a0f76f995513dfc435ff2778" @@ -5458,17 +5312,6 @@ "@whatwg-node/node-fetch" "^0.5.22" urlpattern-polyfill "^10.0.0" -"@whatwg-node/node-fetch@^0.3.6": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz#e28816955f359916e2d830b68a64493124faa6d0" - integrity sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA== - dependencies: - "@whatwg-node/events" "^0.0.3" - busboy "^1.6.0" - fast-querystring "^1.1.1" - fast-url-parser "^1.1.3" - tslib "^2.3.1" - "@whatwg-node/node-fetch@^0.5.22": version "0.5.22" resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.5.22.tgz#5fce9505f333a9ce463b6b5ff86223ffd19e3ace" @@ -5577,13 +5420,6 @@ acorn@8.14.0, acorn@^8.0.0, acorn@^8.0.4, acorn@^8.11.3, acorn@^8.12.0, acorn@^8 resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== -agent-base@^7.0.2, agent-base@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" - integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== - dependencies: - debug "^4.3.4" - aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -5629,7 +5465,7 @@ ansi-colors@^4.1.1, ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.3.0, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -5660,7 +5496,7 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -ansi-styles@^5.0.0: +ansi-styles@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== @@ -5675,7 +5511,7 @@ any-promise@^1.0.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -5833,20 +5669,16 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -asn1js@^3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.6.tgz#53e002ebe00c5f7fd77c1c047c3557d7c04dce25" - integrity sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA== - dependencies: - pvtsutils "^1.3.6" - pvutils "^1.1.3" - tslib "^2.8.1" - assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== +assertion-error@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7" + integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== + ast-types-flow@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6" @@ -5918,40 +5750,6 @@ axobject-query@^4.1.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.1.0.tgz#28768c76d0e3cff21bc62a9e2d0b6ac30042a1ee" integrity sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ== -babel-jest@29.7.0, babel-jest@^28.1.3: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - babel-plugin-macros@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" @@ -5990,24 +5788,6 @@ babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - babel-preset-fbjs@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.4.0.tgz#38a14e5a7a3b285a3f3a86552d650dca5cf6111c" @@ -6041,14 +5821,6 @@ babel-preset-fbjs@^3.4.0: "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - bail@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d" @@ -6102,15 +5874,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bl@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - blake3-wasm@2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/blake3-wasm/-/blake3-wasm-2.1.5.tgz#b22dbb84bc9419ed0159caa76af4b1b132e6ba52" @@ -6189,13 +5952,6 @@ browserslist@^4.19.1, browserslist@^4.24.0, browserslist@^4.24.2: node-releases "^2.0.18" update-browserslist-db "^1.1.1" -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -6213,7 +5969,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0, buffer@^5.7.1: +buffer@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6289,16 +6045,11 @@ camelcase-css@^2.0.1: resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== -camelcase@^5.0.0, camelcase@^5.3.1: +camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - camelcase@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.1.tgz#f02e50af9fd7782bc8b88a3558c32fd3a388f048" @@ -6328,6 +6079,17 @@ ccount@^2.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== +chai@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-5.3.1.tgz#f9e9a7e03f93d69e24b78d30db253780e26deb44" + integrity sha512-48af6xm9gQK8rhIcOxWwdGzIervm8BVTin+yRp9HEvU20BtVZ2lBywlIJBzwaDtvo0FvjeL7QdCADoUoqIbV3A== + dependencies: + assertion-error "^2.0.1" + check-error "^2.1.1" + deep-eql "^5.0.1" + loupe "^3.1.0" + pathval "^2.0.0" + chalk-template@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/chalk-template/-/chalk-template-0.4.0.tgz#692c034d0ed62436b9062c1707fadcd0f753204b" @@ -6340,7 +6102,7 @@ chalk@5.0.1: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== -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.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -6403,11 +6165,6 @@ change-case@^4.1.2: snake-case "^3.0.4" tslib "^2.0.3" -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - character-entities-html4@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" @@ -6448,6 +6205,16 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chardet@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-2.1.0.tgz#1007f441a1ae9f9199a4a67f6e978fb0aa9aa3fe" + integrity sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA== + +check-error@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc" + integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw== + check-more-types@2.24.0, check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" @@ -6487,7 +6254,7 @@ chokidar@^3.6.0: optionalDependencies: fsevents "~2.3.2" -ci-info@^3.2.0, ci-info@^3.7.0: +ci-info@^3.7.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== @@ -6497,11 +6264,6 @@ ci-info@^4.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - classnames@2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" @@ -6538,11 +6300,6 @@ cli-cursor@^5.0.0: dependencies: restore-cursor "^5.0.0" -cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - cli-table3@~0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" @@ -6568,10 +6325,10 @@ cli-truncate@^4.0.0: slice-ansi "^5.0.0" string-width "^7.0.0" -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cli-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== client-only@0.0.1: version "0.0.1" @@ -6614,31 +6371,16 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - clsx@2.1.1, clsx@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - collapse-white-space@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-2.1.0.tgz#640257174f9f42c740b40f3b55ee752924feefca" integrity sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw== -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -6788,7 +6530,7 @@ content-disposition@0.5.2: resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" integrity sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA== -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0: +convert-source-map@^1.5.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== @@ -6829,15 +6571,26 @@ cose-base@^2.2.0: dependencies: layout-base "^2.0.0" -cosmiconfig@8.0.0, cosmiconfig@8.3.6, cosmiconfig@^7.0.0, cosmiconfig@^8.1.3, cosmiconfig@^9.0.0: - version "8.3.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" - integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== +cosmiconfig@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" + integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + +cosmiconfig@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== + dependencies: + env-paths "^2.2.1" import-fresh "^3.3.0" js-yaml "^4.1.0" parse-json "^5.2.0" - path-type "^4.0.0" create-require@^1.1.0: version "1.1.1" @@ -7300,11 +7053,16 @@ de-indent@^1.0.2: resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== -debounce@^1.2.0, debounce@^1.2.1: +debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== +debounce@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-2.2.0.tgz#f895fa2fbdb579a0f0d3dcf5dde19657e50eaad5" + integrity sha512-Xks6RUDLZFdz8LIdR6q0MTH44k7FikOmnh5xkSjMig6ch45afc8sjTjRQf3P6ax8dMgcQrYO/AR2RGWURrruqw== + debug@2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -7312,7 +7070,7 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.6, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@~4.3.6: +debug@4.3.6, debug@~4.3.6: version "4.3.6" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== @@ -7326,10 +7084,10 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.3.7: - version "4.4.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" - integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== +debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7, debug@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" + integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== dependencies: ms "^2.1.3" @@ -7350,10 +7108,10 @@ dedent@1.5.3: resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-eql@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341" + integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q== deep-extend@^0.6.0: version "0.6.0" @@ -7365,18 +7123,11 @@ deep-is@^0.1.3, deep-is@~0.1.3: 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: +deepmerge@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og== -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - define-data-property@^1.0.1, define-data-property@^1.1.2, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -7422,6 +7173,11 @@ dependency-graph@^0.11.0: resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== +dependency-graph@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-1.0.0.tgz#bb5e85aec1310bc13b22dbd76e3196c4ee4c10d2" + integrity sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg== + dequal@^2.0.0, dequal@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" @@ -7442,11 +7198,6 @@ detect-libc@^2.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - devlop@^1.0.0, devlop@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/devlop/-/devlop-1.1.0.tgz#4db7c2ca4dc6e0e834c30be70c94bbc976dc7018" @@ -7459,16 +7210,6 @@ didyoumean@^1.2.2: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== - -diff-sequences@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" - integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== - diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -7519,17 +7260,12 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dotenv@^16.0.0: - version "16.0.3" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" - integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== - dotenv@^8.1.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== -dset@^3.1.1, dset@^3.1.2, dset@^3.1.4: +dset@^3.1.1, dset@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.4.tgz#f8eaf5f023f068a036d08cd07dc9ffb7d0065248" integrity sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA== @@ -7557,11 +7293,6 @@ electron-to-chromium@^1.5.41: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.55.tgz#73684752aa2e1aa49cafb355a41386c6637e76a9" integrity sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg== -emittery@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" - integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== - emoji-regex@^10.2.1, emoji-regex@^10.3.0: version "10.3.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" @@ -7610,6 +7341,11 @@ entities@^4.4.0, entities@^4.5.0: resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +env-paths@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + environment@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/environment/-/environment-1.1.0.tgz#8e86c66b180f363c7ab311787e0259665f45a9f1" @@ -7707,6 +7443,11 @@ es-iterator-helpers@^1.1.0: iterator.prototype "^1.1.3" safe-array-concat "^1.1.2" +es-module-lexer@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" + integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== + es-object-atoms@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" @@ -7820,6 +7561,38 @@ esbuild@^0.23.0, esbuild@~0.23.0: "@esbuild/win32-ia32" "0.23.1" "@esbuild/win32-x64" "0.23.1" +esbuild@^0.25.0: + version "0.25.9" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.9.tgz#15ab8e39ae6cdc64c24ff8a2c0aef5b3fd9fa976" + integrity sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g== + optionalDependencies: + "@esbuild/aix-ppc64" "0.25.9" + "@esbuild/android-arm" "0.25.9" + "@esbuild/android-arm64" "0.25.9" + "@esbuild/android-x64" "0.25.9" + "@esbuild/darwin-arm64" "0.25.9" + "@esbuild/darwin-x64" "0.25.9" + "@esbuild/freebsd-arm64" "0.25.9" + "@esbuild/freebsd-x64" "0.25.9" + "@esbuild/linux-arm" "0.25.9" + "@esbuild/linux-arm64" "0.25.9" + "@esbuild/linux-ia32" "0.25.9" + "@esbuild/linux-loong64" "0.25.9" + "@esbuild/linux-mips64el" "0.25.9" + "@esbuild/linux-ppc64" "0.25.9" + "@esbuild/linux-riscv64" "0.25.9" + "@esbuild/linux-s390x" "0.25.9" + "@esbuild/linux-x64" "0.25.9" + "@esbuild/netbsd-arm64" "0.25.9" + "@esbuild/netbsd-x64" "0.25.9" + "@esbuild/openbsd-arm64" "0.25.9" + "@esbuild/openbsd-x64" "0.25.9" + "@esbuild/openharmony-arm64" "0.25.9" + "@esbuild/sunos-x64" "0.25.9" + "@esbuild/win32-arm64" "0.25.9" + "@esbuild/win32-ia32" "0.25.9" + "@esbuild/win32-x64" "0.25.9" + escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" @@ -7830,11 +7603,6 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -8353,7 +8121,7 @@ estree-walker@^2.0.2: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== -estree-walker@^3.0.0: +estree-walker@^3.0.0, estree-walker@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== @@ -8403,7 +8171,7 @@ execa@4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@5.1.1, execa@^5.0.0, execa@^5.1.1: +execa@5.1.1, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -8460,21 +8228,10 @@ exit-hook@2.2.1: resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-2.2.1.tgz#007b2d92c6428eda2b76e7016a34351586934593" integrity sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw== -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^28.0.0, expect@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" - integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== - dependencies: - "@jest/expect-utils" "^28.1.3" - jest-get-type "^28.0.2" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" +expect-type@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expect-type/-/expect-type-1.2.2.tgz#c030a329fb61184126c8447585bc75a7ec6fbff3" + integrity sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA== exsolve@^1.0.1: version "1.0.4" @@ -8498,7 +8255,7 @@ extendable-error@^0.1.5: resolved "https://registry.yarnpkg.com/extendable-error/-/extendable-error-0.1.7.tgz#60b9adf206264ac920058a7395685ae4670c2b96" integrity sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg== -external-editor@^3.0.3, external-editor@^3.1.0: +external-editor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== @@ -8554,7 +8311,7 @@ fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.5, fast-glob@^3.2.9, fast-g merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: +fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -8571,7 +8328,7 @@ fast-querystring@^1.1.1: dependencies: fast-decode-uri-component "^1.0.1" -fast-url-parser@1.1.3, fast-url-parser@^1.1.3: +fast-url-parser@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== @@ -8631,7 +8388,12 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" -figures@^3.0.0, figures@^3.2.0: +fdir@^6.4.4, fdir@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" + integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== + +figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -8665,7 +8427,7 @@ find-root@^1.1.0: resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -8801,7 +8563,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2, fsevents@~2.3.3: +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -8862,11 +8624,6 @@ get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - get-source@^2.0.12: version "2.0.12" resolved "https://registry.yarnpkg.com/get-source/-/get-source-2.0.12.tgz#0b47d57ea1e53ce0d3a69f4f3d277eb8047da944" @@ -8953,7 +8710,7 @@ glob-to-regexp@0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.7, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7: +glob@7.1.7, glob@^7.1.1, glob@^7.1.3, glob@^7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -9059,7 +8816,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -9069,23 +8826,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -graphql-config@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-4.5.0.tgz#257c2338950b8dce295a27f75c5f6c39f8f777b2" - integrity sha512-x6D0/cftpLUJ0Ch1e5sj1TZn6Wcxx4oMfmhaG9shM0DKajA9iR+j1z86GSTQ19fShbGvrSSvbIQsHku6aQ6BBw== - dependencies: - "@graphql-tools/graphql-file-loader" "^7.3.7" - "@graphql-tools/json-file-loader" "^7.3.7" - "@graphql-tools/load" "^7.5.5" - "@graphql-tools/merge" "^8.2.6" - "@graphql-tools/url-loader" "^7.9.7" - "@graphql-tools/utils" "^9.0.0" - cosmiconfig "8.0.0" - jiti "1.17.1" - minimatch "4.2.3" - string-env-interpolation "1.0.1" - tslib "^2.4.0" - graphql-config@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-5.1.1.tgz#d840f20228da5c1386695838d6eb03cb7f7cf138" @@ -9108,41 +8848,6 @@ graphql-helix@1.13.0: resolved "https://registry.yarnpkg.com/graphql-helix/-/graphql-helix-1.13.0.tgz#e64dad5ef5f622ef38c97fa033f56f3d953c0104" integrity sha512-cqDKMoRywKjnL0ZWCTB0GOiBgsH6d3nU4JGDF6RuzAyd35tmalzKpSxkx3NNp4H5RvnKWnrukWzR51wUq277ng== -graphql-language-service-interface@2.10.2: - version "2.10.2" - resolved "https://registry.yarnpkg.com/graphql-language-service-interface/-/graphql-language-service-interface-2.10.2.tgz#de9386f699e446320256175e215cdc10ccf9f9b7" - integrity sha512-RKIEBPhRMWdXY3fxRs99XysTDnEgAvNbu8ov/5iOlnkZsWQNzitjtd0O0l1CutQOQt3iXoHde7w8uhCnKL4tcg== - dependencies: - graphql-config "^4.1.0" - graphql-language-service-parser "^1.10.4" - graphql-language-service-types "^1.8.7" - graphql-language-service-utils "^2.7.1" - vscode-languageserver-types "^3.15.1" - -graphql-language-service-parser@^1.10.4: - version "1.10.4" - resolved "https://registry.yarnpkg.com/graphql-language-service-parser/-/graphql-language-service-parser-1.10.4.tgz#b2979deefc5c0df571dacd409b2d5fbf1cdf7a9d" - integrity sha512-duDE+0aeKLFVrb9Kf28U84ZEHhHcvTjWIT6dJbIAQJWBaDoht0D4BK9EIhd94I3DtKRc1JCJb2+70y1lvP/hiA== - dependencies: - graphql-language-service-types "^1.8.7" - -graphql-language-service-types@^1.8.7: - version "1.8.7" - resolved "https://registry.yarnpkg.com/graphql-language-service-types/-/graphql-language-service-types-1.8.7.tgz#f5e909e6d9334ea2d8d1f7281b695b6f5602c07f" - integrity sha512-LP/Mx0nFBshYEyD0Ny6EVGfacJAGVx+qXtlJP4hLzUdBNOGimfDNtMVIdZANBXHXcM41MDgMHTnyEx2g6/Ttbw== - dependencies: - graphql-config "^4.1.0" - vscode-languageserver-types "^3.15.1" - -graphql-language-service-utils@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/graphql-language-service-utils/-/graphql-language-service-utils-2.7.1.tgz#c97c8d744a761480aba7e03e4a42adf28b6fce39" - integrity sha512-Wci5MbrQj+6d7rfvbORrA9uDlfMysBWYaG49ST5TKylNaXYFf3ixFOa74iM1KtM9eidosUbI3E1JlWi0JaidJA== - dependencies: - "@types/json-schema" "7.0.9" - graphql-language-service-types "^1.8.7" - nullthrows "^1.0.0" - graphql-relay@^0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.10.2.tgz#a1cd0e4b63e671a08da6c021ec033086a4887f6a" @@ -9158,14 +8863,6 @@ graphql-request@5.2.0: extract-files "^9.0.0" form-data "^3.0.0" -graphql-request@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-6.0.0.tgz#9c8b6a0c341f289e049936d03cc9205300faae1c" - integrity sha512-2BmHTuglonjZvmNVw6ZzCfFlW/qkIPds0f+Qdi/Lvjsl3whJg2uvHmSvHnLWhUTEw6zcxPYAHiZoPvSVKOZ7Jw== - dependencies: - "@graphql-typed-document-node/core" "^3.2.0" - cross-fetch "^3.1.5" - graphql-sock@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/graphql-sock/-/graphql-sock-1.0.0.tgz#efdfb991cbd8a37da91d7e2e81c2955945c6df37" @@ -9183,11 +8880,6 @@ graphql-tag@2.12.6, graphql-tag@^2.11.0, graphql-tag@^2.12.6: dependencies: tslib "^2.1.0" -graphql-ws@5.12.1: - version "5.12.1" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.12.1.tgz#c62d5ac54dbd409cc6520b0b39de374b3d59d0dd" - integrity sha512-umt4f5NnMK46ChM2coO36PTFhHouBrK9stWWBczERguwYrGnPNxJ9dimU6IyOBfOkC6Izhkg4H8+F51W/8CYDg== - graphql-ws@^5.14.0: version "5.15.0" resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.15.0.tgz#2db79e1b42468a8363bf5ca6168d076e2f8fdebc" @@ -9210,7 +8902,7 @@ graphql-yoga@5.7.0: lru-cache "^10.0.0" tslib "^2.5.2" -graphql@16.9.0, graphql@^16.0.0, graphql@^16.6.0: +graphql@16.9.0, graphql@^16.6.0: version "16.9.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== @@ -9472,7 +9164,7 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -html-escaper@^2.0.0, html-escaper@^2.0.2: +html-escaper@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== @@ -9487,14 +9179,6 @@ html-void-elements@^3.0.0: resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-3.0.0.tgz#fc9dbd84af9e747249034d4d62602def6517f1d7" integrity sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg== -http-proxy-agent@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" - integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== - dependencies: - agent-base "^7.1.0" - debug "^4.3.4" - http-signature@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.4.0.tgz#dee5a9ba2bf49416abc544abd6d967f6a94c8c3f" @@ -9504,14 +9188,6 @@ http-signature@~1.4.0: jsprim "^2.0.2" sshpk "^1.18.0" -https-proxy-agent@^7.0.0: - version "7.0.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" - integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== - dependencies: - agent-base "^7.0.2" - debug "4" - human-id@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3" @@ -9542,7 +9218,12 @@ husky@9.1.7: resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== -iconv-lite@0.6: +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + +iconv-lite@0.6, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -9584,14 +9265,6 @@ import-from@4.0.0: resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" integrity sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ== -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - import-meta-resolve@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz#0b1195915689f60ab00f830af0f15cc841e8919e" @@ -9615,7 +9288,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4: +inherits@2, inherits@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -9645,27 +9318,6 @@ inline-style-parser@0.2.2: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.2.tgz#d498b4e6de0373458fc610ff793f6b14ebf45633" integrity sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ== -inquirer@^8.0.0: - version "8.2.6" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" - integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.5.5" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - wrap-ansi "^6.0.1" - internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" @@ -9872,11 +9524,6 @@ is-fullwidth-code-point@^5.0.0: dependencies: get-east-asian-width "^1.0.0" -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - is-generator-function@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" @@ -9916,11 +9563,6 @@ is-installed-globally@~0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - is-lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-2.0.2.tgz#1c0884d3012c841556243483aa5d522f47396d2a" @@ -9938,6 +9580,11 @@ is-negative-zero@^2.0.3: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== +is-node-process@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134" + integrity sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -10094,569 +9741,91 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== dependencies: - is-docker "^2.0.0" - -is-wsl@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" - integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== - dependencies: - is-inside-container "^1.0.0" - -is64bit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" - integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== - dependencies: - system-architecture "^0.1.0" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isomorphic-ws@5.0.0, isomorphic-ws@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" - integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -iterator.prototype@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.3.tgz#016c2abe0be3bbdb8319852884f60908ac62bf9c" - integrity sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ== - dependencies: - define-properties "^1.2.1" - get-intrinsic "^1.2.1" - has-symbols "^1.0.3" - reflect.getprototypeof "^1.0.4" - set-function-name "^2.0.1" - -jackspeak@^3.1.2: - version "3.4.3" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" - integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -jackspeak@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.0.1.tgz#9fca4ce961af6083e259c376e9e3541431f5287b" - integrity sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -jest-changed-files@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.1.3.tgz#d9aeee6792be3686c47cb988a8eaf82ff4238831" - integrity sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA== - dependencies: - execa "^5.0.0" - p-limit "^3.1.0" - -jest-circus@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" - integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== - dependencies: - "@jest/environment" "^28.1.3" - "@jest/expect" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - is-generator-fn "^2.0.0" - jest-each "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-runtime "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - p-limit "^3.1.0" - pretty-format "^28.1.3" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" - integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== - dependencies: - "@jest/core" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - prompts "^2.0.1" - yargs "^17.3.1" - -jest-config@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" - integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^28.1.3" - "@jest/types" "^28.1.3" - babel-jest "^28.1.3" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^28.1.3" - jest-environment-node "^28.1.3" - jest-get-type "^28.0.2" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-runner "^28.1.3" - jest-util "^28.1.3" - jest-validate "^28.1.3" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^28.1.3" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-diff@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" - integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== - dependencies: - chalk "^4.0.0" - diff-sequences "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-docblock@29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-docblock@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" - integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== - dependencies: - detect-newline "^3.0.0" - -jest-each@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" - integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== - dependencies: - "@jest/types" "^28.1.3" - chalk "^4.0.0" - jest-get-type "^28.0.2" - jest-util "^28.1.3" - pretty-format "^28.1.3" - -jest-environment-node@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" - integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== - dependencies: - "@jest/environment" "^28.1.3" - "@jest/fake-timers" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - jest-mock "^28.1.3" - jest-util "^28.1.3" - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - -jest-get-type@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" - integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== - -jest-haste-map@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" - integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== - dependencies: - "@jest/types" "^28.1.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^28.0.2" - jest-util "^28.1.3" - jest-worker "^28.1.3" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-junit@16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" - integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== - dependencies: - mkdirp "^1.0.4" - strip-ansi "^6.0.1" - uuid "^8.3.2" - xml "^1.0.1" - -jest-leak-detector@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" - integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== - dependencies: - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-matcher-utils@^27.0.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== - dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" - integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== - dependencies: - chalk "^4.0.0" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-message-util@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" - integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^28.1.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^28.1.3" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" - integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== - dependencies: - "@jest/types" "^28.1.3" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" - integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66" - integrity sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA== - dependencies: - jest-regex-util "^28.0.2" - jest-snapshot "^28.1.3" - -jest-resolve@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" - integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-pnp-resolver "^1.2.2" - jest-util "^28.1.3" - jest-validate "^28.1.3" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@28.1.3, jest-runner@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" - integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== - dependencies: - "@jest/console" "^28.1.3" - "@jest/environment" "^28.1.3" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.10.2" - graceful-fs "^4.2.9" - jest-docblock "^28.1.1" - jest-environment-node "^28.1.3" - jest-haste-map "^28.1.3" - jest-leak-detector "^28.1.3" - jest-message-util "^28.1.3" - jest-resolve "^28.1.3" - jest-runtime "^28.1.3" - jest-util "^28.1.3" - jest-watcher "^28.1.3" - jest-worker "^28.1.3" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" - integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== - dependencies: - "@jest/environment" "^28.1.3" - "@jest/fake-timers" "^28.1.3" - "@jest/globals" "^28.1.3" - "@jest/source-map" "^28.1.2" - "@jest/test-result" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^28.1.3" - jest-message-util "^28.1.3" - jest-mock "^28.1.3" - jest-regex-util "^28.0.2" - jest-resolve "^28.1.3" - jest-snapshot "^28.1.3" - jest-util "^28.1.3" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" - integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^28.1.3" - "@jest/transform" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/babel__traverse" "^7.0.6" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^28.1.3" - graceful-fs "^4.2.9" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - jest-haste-map "^28.1.3" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - natural-compare "^1.4.0" - pretty-format "^28.1.3" - semver "^7.3.5" - -jest-util@^28.0.0, jest-util@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" - integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== - dependencies: - "@jest/types" "^28.1.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" + is-docker "^2.0.0" -jest-validate@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" - integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== dependencies: - "@jest/types" "^28.1.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^28.0.2" - leven "^3.1.0" - pretty-format "^28.1.3" + is-inside-container "^1.0.0" -jest-watcher@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" - integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== +is64bit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is64bit/-/is64bit-2.0.0.tgz#198c627cbcb198bbec402251f88e5e1a51236c07" + integrity sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw== dependencies: - "@jest/test-result" "^28.1.3" - "@jest/types" "^28.1.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.10.2" - jest-util "^28.1.3" - string-length "^4.0.1" + system-architecture "^0.1.0" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isomorphic-ws@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" + integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -jest-worker@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" - integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== +iterator.prototype@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.3.tgz#016c2abe0be3bbdb8319852884f60908ac62bf9c" + integrity sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ== dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" + define-properties "^1.2.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + reflect.getprototypeof "^1.0.4" + set-function-name "^2.0.1" -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" -jest@28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" - integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== +jackspeak@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.0.1.tgz#9fca4ce961af6083e259c376e9e3541431f5287b" + integrity sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog== dependencies: - "@jest/core" "^28.1.3" - "@jest/types" "^28.1.3" - import-local "^3.0.2" - jest-cli "^28.1.3" + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" -jiti@1.17.1: - version "1.17.1" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.17.1.tgz#264daa43ee89a03e8be28c3d712ccc4eb9f1e8ed" - integrity sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw== +jest-diff@30.0.5: + version "30.0.5" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-30.0.5.tgz#b40f81e0c0d13e5b81c4d62b0d0dfa6a524ee0fd" + integrity sha512-1UIqE9PoEKaHcIKvq2vbibrCog4Y8G0zmOxgQUVEiTqwR5hJVMCoDsN1vFvI5JvwD37hjueZ1C4l2FyGnfpE0A== + dependencies: + "@jest/diff-sequences" "30.0.1" + "@jest/get-type" "30.0.1" + chalk "^4.1.2" + pretty-format "30.0.5" -jiti@^1.17.1, jiti@^1.18.2, jiti@^1.21.6: +jiti@^1.18.2, jiti@^1.21.6: version "1.21.7" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.7.tgz#9dd81043424a3d28458b193d965f0d18a2300ba9" integrity sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A== +jiti@^2.3.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.5.1.tgz#bd099c1c2be1c59bbea4e5adcd127363446759d0" + integrity sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w== + joi@^17.11.0: version "17.11.0" resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" @@ -10668,11 +9837,6 @@ joi@^17.11.0: "@sideway/formula" "^3.0.1" "@sideway/pinpoint" "^2.0.0" -jose@^5.0.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/jose/-/jose-5.2.2.tgz#b91170e9ba6dbe609b0c0a86568f9a1fbe4335c0" - integrity sha512-/WByRr4jDcsKlvMd1dRJnPfS1GVO3WuKyaurJ/vvXcOaUQO8rnNObCQMlv/5uCceVQIq5Q4WLF44ohsdiTohdg== - joycon@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" @@ -10683,7 +9847,12 @@ joycon@^3.1.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: +js-tokens@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" + integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== + +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -10775,7 +9944,7 @@ json5@^1.0.1, json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.1, json5@^2.2.3: +json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -10871,11 +10040,6 @@ klaw-sync@^6.0.0: dependencies: graceful-fs "^4.1.11" -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - kleur@^4.0.3: version "4.1.5" resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" @@ -10924,11 +10088,6 @@ lazy-ass@1.6.0, lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -11058,19 +10217,17 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -listr2@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" - integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== +listr2@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-9.0.1.tgz#3cad12d81d998f8024621d9b35c969dba5da4103" + integrity sha512-SL0JY3DaxylDuo/MecFeiC+7pedM0zia33zl0vcjgwcq1q1FWWF1To9EIauPbl8GbMCU0R2e0uJ8bZunhYKD2g== dependencies: - cli-truncate "^2.1.0" - colorette "^2.0.16" - log-update "^4.0.0" - p-map "^4.0.0" - rfdc "^1.3.0" - rxjs "^7.5.5" - through "^2.3.8" - wrap-ansi "^7.0.0" + cli-truncate "^4.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.1.0" + rfdc "^1.4.1" + wrap-ansi "^9.0.0" listr2@~8.2.4: version "8.2.4" @@ -11173,11 +10330,6 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -11198,12 +10350,12 @@ lodash.startcase@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== -lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.0: +lodash@^4.17.21, lodash@~4.17.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.0.0, log-symbols@^4.1.0: +log-symbols@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -11244,6 +10396,11 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +loupe@^3.1.0, loupe@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-3.2.0.tgz#174073ba8e0a1d0d5e43cc08626ed8a19403c344" + integrity sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw== + lower-case-first@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-2.0.2.tgz#64c2324a2250bf7c37c5901e76a5b5309301160b" @@ -11280,10 +10437,10 @@ lz-string@^1.4.4: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== -magic-string@^0.30.10: - version "0.30.11" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954" - integrity sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A== +magic-string@^0.30.10, magic-string@^0.30.17: + version "0.30.17" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453" + integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA== dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" @@ -11294,25 +10451,11 @@ make-dir@4.0.0: dependencies: semver "^7.5.3" -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-error@1.x, make-error@^1.1.1: +make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - map-cache@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -11580,6 +10723,17 @@ mdast-util-to-string@^4.0.0: dependencies: "@types/mdast" "^4.0.0" +memfs@4.36.3: + version "4.36.3" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.36.3.tgz#ff0b3ebb01a29766fb1a60ad36f82d64d98b032c" + integrity sha512-rZIVsNPGdZDPls/ckWhIsod2zRNsI2f2kEru0gMldkrEve+fPn7CVBTvfKLNyHQ9rZDWwzVBF8tPsZivzDPiZQ== + dependencies: + "@jsonjoy.com/json-pack" "^1.11.0" + "@jsonjoy.com/util" "^1.9.0" + thingies "^2.5.0" + tree-dump "^1.0.3" + tslib "^2.0.0" + memoize-one@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -12114,13 +11268,6 @@ minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.3.tgz#b4dcece1d674dee104bb0fb833ebb85a78cbbca6" - integrity sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng== - dependencies: - brace-expansion "^1.1.7" - minimatch@9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" @@ -12157,11 +11304,6 @@ mj-context-menu@^0.6.1: resolved "https://registry.yarnpkg.com/mj-context-menu/-/mj-context-menu-0.6.1.tgz#a043c5282bf7e1cf3821de07b13525ca6f85aa69" integrity sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA== -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mlly@^1.4.2, mlly@^1.7.1, mlly@^1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.2.tgz#21c0d04543207495b8d867eff0ac29fac9a023c0" @@ -12217,10 +11359,10 @@ mustache@^4.2.0: resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mute-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" + integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== mvdan-sh@^0.10.1: version "0.10.1" @@ -12236,10 +11378,10 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nanoid@^3.3.4, nanoid@^3.3.6, nanoid@^3.3.8: - version "3.3.8" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" - integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== +nanoid@^3.3.11, nanoid@^3.3.4, nanoid@^3.3.6: + version "3.3.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" + integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== natural-compare@^1.4.0: version "1.4.0" @@ -12407,12 +11549,12 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -nock@13.5.4: - version "13.5.4" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" - integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== +nock@^14.0.0: + version "14.0.10" + resolved "https://registry.yarnpkg.com/nock/-/nock-14.0.10.tgz#d6f4e73e1c6b4b7aa19d852176e68940e15cd19d" + integrity sha512-Q7HjkpyPeLa0ZVZC5qpxBt5EyLczFJ91MEewQiIi9taWuA0KB/MDJlUWtON+7dGouVdADTQsf9RA7TZk6D8VMw== dependencies: - debug "^4.1.0" + "@mswjs/interceptors" "^0.39.5" json-stringify-safe "^5.0.1" propagate "^2.0.0" @@ -12491,7 +11633,7 @@ npm-to-yarn@^3.0.0: resolved "https://registry.yarnpkg.com/npm-to-yarn/-/npm-to-yarn-3.0.0.tgz#05006d97359e285f0316e249dbbe56f377ca1182" integrity sha512-76YnmsbfrYp0tMsWxM0RNX0Vs+x8JxpJGu6B/jDn4lW8+laiTcKmKi9MeMh4UikO4RkJ1oqURoDy9bXJmMXS6A== -nullthrows@^1.0.0, nullthrows@^1.1.1: +nullthrows@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== @@ -12657,21 +11799,6 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" -ora@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -12687,6 +11814,11 @@ outdent@^0.5.0: resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.5.0.tgz#9e10982fdc41492bb473ad13840d22f9655be2ff" integrity sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q== +outvariant@^1.4.0, outvariant@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873" + integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA== + p-filter@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c" @@ -12694,7 +11826,7 @@ p-filter@^2.1.0: dependencies: p-map "^2.0.0" -p-limit@3.1.0, p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@3.1.0, p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -12993,6 +12125,11 @@ pathe@^2.0.3: resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== +pathval@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.1.tgz#8855c5a2899af072d6ac05d11e46045ad0dc605d" + integrity sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ== + pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -13015,11 +12152,16 @@ picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0, picocolors@^1.1.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^4.0.2, picomatch@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" + integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== + pidtree@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" @@ -13035,18 +12177,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pirates@^4.0.1, pirates@^4.0.4: +pirates@^4.0.1: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-types@^1.0.3, pkg-types@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5" @@ -13182,12 +12317,12 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.4.4, postcss@^8.4.40, postcss@^8.4.47, postcss@^8.4.49: - version "8.5.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.1.tgz#e2272a1f8a807fafa413218245630b5db10a3214" - integrity sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ== +postcss@^8.4.4, postcss@^8.4.40, postcss@^8.4.47, postcss@^8.4.49, postcss@^8.5.6: + version "8.5.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c" + integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== dependencies: - nanoid "^3.3.8" + nanoid "^3.3.11" picocolors "^1.1.1" source-map-js "^1.2.1" @@ -13230,24 +12365,14 @@ pretty-bytes@^5.6.0: resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== -pretty-format@^27.0.0, pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" - -pretty-format@^28.0.0, pretty-format@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" - integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== +pretty-format@30.0.5: + version "30.0.5" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.0.5.tgz#e001649d472800396c1209684483e18a4d250360" + integrity sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw== dependencies: - "@jest/schemas" "^28.1.3" - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^18.0.0" + "@jest/schemas" "30.0.5" + ansi-styles "^5.2.0" + react-is "^18.3.1" printable-characters@^1.0.42: version "1.0.42" @@ -13271,14 +12396,6 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - prop-types@^15, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -13333,18 +12450,6 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -pvtsutils@^1.3.5, pvtsutils@^1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.6.tgz#ec46e34db7422b9e4fdc5490578c1883657d6001" - integrity sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg== - dependencies: - tslib "^2.8.1" - -pvutils@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" - integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== - qs@6.13.1: version "6.13.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" @@ -13390,15 +12495,10 @@ react-is@^16.13.1, react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +react-is@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== react-markdown@9.0.3: version "9.0.3" @@ -13515,7 +12615,7 @@ read-yaml-file@^1.1.0: pify "^4.0.1" strip-bom "^3.0.0" -readable-stream@^3.0.2, readable-stream@^3.4.0: +readable-stream@^3.0.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -13891,13 +12991,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - resolve-from@5.0.0, resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" @@ -13913,17 +13006,12 @@ resolve-pkg-maps@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve.exports@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" - integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== - resolve.exports@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.4, resolve@^1.22.8: +resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.22.4, resolve@^1.22.8: version "1.22.10" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== @@ -14024,44 +13112,38 @@ rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - robust-predicates@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== -rollup@^4.19.0, rollup@^4.23.0: - version "4.31.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.31.0.tgz#b84af969a0292cb047dce2c0ec5413a9457597a4" - integrity sha512-9cCE8P4rZLx9+PjoyqHLs31V9a9Vpvfo4qNcs6JCiGWYhw2gijSetFbH6SSy1whnkgcefnUwr8sad7tgqsGvnw== +rollup@^4.19.0, rollup@^4.23.0, rollup@^4.43.0: + version "4.46.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.46.3.tgz#ce207dcc18f18c1027c700d705f746df504436cb" + integrity sha512-RZn2XTjXb8t5g13f5YclGoilU/kwT696DIkY3sywjdZidNSi3+vseaQov7D7BZXVJCPv3pDWUN69C78GGbXsKw== dependencies: - "@types/estree" "1.0.6" + "@types/estree" "1.0.8" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.31.0" - "@rollup/rollup-android-arm64" "4.31.0" - "@rollup/rollup-darwin-arm64" "4.31.0" - "@rollup/rollup-darwin-x64" "4.31.0" - "@rollup/rollup-freebsd-arm64" "4.31.0" - "@rollup/rollup-freebsd-x64" "4.31.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.31.0" - "@rollup/rollup-linux-arm-musleabihf" "4.31.0" - "@rollup/rollup-linux-arm64-gnu" "4.31.0" - "@rollup/rollup-linux-arm64-musl" "4.31.0" - "@rollup/rollup-linux-loongarch64-gnu" "4.31.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.31.0" - "@rollup/rollup-linux-riscv64-gnu" "4.31.0" - "@rollup/rollup-linux-s390x-gnu" "4.31.0" - "@rollup/rollup-linux-x64-gnu" "4.31.0" - "@rollup/rollup-linux-x64-musl" "4.31.0" - "@rollup/rollup-win32-arm64-msvc" "4.31.0" - "@rollup/rollup-win32-ia32-msvc" "4.31.0" - "@rollup/rollup-win32-x64-msvc" "4.31.0" + "@rollup/rollup-android-arm-eabi" "4.46.3" + "@rollup/rollup-android-arm64" "4.46.3" + "@rollup/rollup-darwin-arm64" "4.46.3" + "@rollup/rollup-darwin-x64" "4.46.3" + "@rollup/rollup-freebsd-arm64" "4.46.3" + "@rollup/rollup-freebsd-x64" "4.46.3" + "@rollup/rollup-linux-arm-gnueabihf" "4.46.3" + "@rollup/rollup-linux-arm-musleabihf" "4.46.3" + "@rollup/rollup-linux-arm64-gnu" "4.46.3" + "@rollup/rollup-linux-arm64-musl" "4.46.3" + "@rollup/rollup-linux-loongarch64-gnu" "4.46.3" + "@rollup/rollup-linux-ppc64-gnu" "4.46.3" + "@rollup/rollup-linux-riscv64-gnu" "4.46.3" + "@rollup/rollup-linux-riscv64-musl" "4.46.3" + "@rollup/rollup-linux-s390x-gnu" "4.46.3" + "@rollup/rollup-linux-x64-gnu" "4.46.3" + "@rollup/rollup-linux-x64-musl" "4.46.3" + "@rollup/rollup-win32-arm64-msvc" "4.46.3" + "@rollup/rollup-win32-ia32-msvc" "4.46.3" + "@rollup/rollup-win32-x64-msvc" "4.46.3" fsevents "~2.3.2" roughjs@^4.6.6: @@ -14074,11 +13156,6 @@ roughjs@^4.6.6: points-on-curve "^0.2.0" points-on-path "^0.2.1" -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -14091,7 +13168,7 @@ rw@1: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== -rxjs@^7.2.0, rxjs@^7.5.1, rxjs@^7.5.5, rxjs@^7.8.1: +rxjs@^7.5.1, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -14171,11 +13248,6 @@ scslre@0.3.0: refa "^0.12.0" regexp-ast-analysis "^0.7.0" -scuid@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/scuid/-/scuid-1.1.0.tgz#d3f9f920956e737a60f72d0e4ad280bf324d5dab" - integrity sha512-MuCAyrGZcTLfQoH2XoBlQ8C6bzwN88XT/0slOGz0pn8+gIP85BOAfYa44ZXQUTOwRwPU0QvgU+V+OSajl/59Xg== - section-matter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167" @@ -14189,12 +13261,12 @@ section-matter@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.6.3, semver@7.x, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: +semver@7.6.3, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -14341,6 +13413,11 @@ side-channel@^1.0.4, side-channel@^1.0.6: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -14372,11 +13449,6 @@ sirv@^2.0.3: mrmime "^2.0.0" totalist "^3.0.0" -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" @@ -14444,14 +13516,6 @@ source-map-js@^1.0.2, source-map-js@^1.2.0, source-map-js@^1.2.1: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map@0.8.0-beta.0: version "0.8.0-beta.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" @@ -14464,7 +13528,7 @@ source-map@^0.5.7: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -14561,12 +13625,10 @@ stable-hash@^0.0.4: resolved "https://registry.yarnpkg.com/stable-hash/-/stable-hash-0.0.4.tgz#55ae7dadc13e4b3faed13601587cec41859b42f7" integrity sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g== -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== stacktracey@^2.1.8: version "2.1.8" @@ -14602,6 +13664,11 @@ static-eval@2.0.2: dependencies: escodegen "^1.8.1" +std-env@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.9.0.tgz#1a6f7243b339dca4c9fd55e1c7504c77ef23e8f1" + integrity sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw== + stoppable@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" @@ -14619,24 +13686,21 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +strict-event-emitter@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" + integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ== + string-argv@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== -string-env-interpolation@1.0.1, string-env-interpolation@^1.0.1: +string-env-interpolation@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz#ad4397ae4ac53fe6c91d1402ad6f6a52862c7152" integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg== -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - "string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -14791,11 +13855,6 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -14823,6 +13882,13 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +strip-literal@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-3.0.0.tgz#ce9c452a91a0af2876ed1ae4e583539a353df3fc" + integrity sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA== + dependencies: + js-tokens "^9.0.1" + strnum@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" @@ -14872,14 +13938,14 @@ sucrase@^3.35.0: pirates "^4.0.1" ts-interface-checker "^0.1.9" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -supports-color@^8.0.0, supports-color@^8.1.1: +supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -14891,14 +13957,6 @@ supports-color@^9.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -15000,23 +14058,6 @@ term-size@^2.1.0: resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -15036,6 +14077,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thingies@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-2.5.0.tgz#5f7b882c933b85989f8466b528a6247a6881e04f" + integrity sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw== + throttle-debounce@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-5.0.2.tgz#ec5549d84e053f043c9fd0f2a6dd892ff84456b1" @@ -15046,7 +14092,7 @@ throttleit@^1.0.0: resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" integrity sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g== -through@2, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, through@^2.3.8, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -15059,10 +14105,38 @@ tiny-glob@^0.2.9: globalyzer "0.1.0" globrex "^0.1.2" -tinyexec@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" - integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== +tinybench@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== + +tinyexec@^0.3.0, tinyexec@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2" + integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== + +tinyglobby@^0.2.14: + version "0.2.14" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.14.tgz#5280b0cf3f972b050e74ae88406c0a6a58f4079d" + integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ== + dependencies: + fdir "^6.4.4" + picomatch "^4.0.2" + +tinypool@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.1.1.tgz#059f2d042bd37567fbc017d3d426bdd2a2612591" + integrity sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg== + +tinyrainbow@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-2.0.0.tgz#9509b2162436315e80e3eee0fcce4474d2444294" + integrity sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw== + +tinyspy@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-4.0.3.tgz#d1d0f0602f4c15f1aae083a34d6d0df3363b1b52" + integrity sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A== title-case@^3.0.3: version "3.0.3" @@ -15104,11 +14178,6 @@ tmp@~0.2.3: resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -15140,6 +14209,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-dump@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.3.tgz#2f0e42e77354714418ed7ab44291e435ccdb0f80" + integrity sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg== + tree-kill@1.2.2, tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -15182,20 +14256,6 @@ ts-invariant@^0.10.3: dependencies: tslib "^2.1.0" -ts-jest@28.0.8: - version "28.0.8" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.8.tgz#cd204b8e7a2f78da32cf6c95c9a6165c5b99cc73" - integrity sha512-5FaG0lXmRPzApix8oFG8RKjAz4ehtm8yMKOTy5HX3fY6W8kmvOrmcY0hKDElW52FJov+clhUbrKAqofnj4mXTg== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^28.0.0" - json5 "^2.2.1" - lodash.memoize "4.x" - make-error "1.x" - semver "7.x" - yargs-parser "^21.0.1" - ts-log@^2.2.3: version "2.2.5" resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.5.tgz#aef3252f1143d11047e2cb6f7cfaac7408d96623" @@ -15220,6 +14280,11 @@ ts-node@10.9.2, ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfck@^3.0.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.6.tgz#da1f0b10d82237ac23422374b3fce1edb23c3ead" + integrity sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w== + tsconfig-paths@^3.15.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" @@ -15321,11 +14386,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -15771,11 +14831,6 @@ urlpattern-polyfill@^10.0.0: resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== -urlpattern-polyfill@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5" - integrity sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ== - urql@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/urql/-/urql-3.0.4.tgz#f73dbd2e5b134b7328c14d5b8ab1f93f93db8990" @@ -15824,15 +14879,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -15946,6 +14992,40 @@ villus@^3.0.0: resolved "https://registry.yarnpkg.com/villus/-/villus-3.5.0.tgz#44c22a70f61ab860586c178c87bb7164d169049c" integrity sha512-6DJAPCAo/HHZ14Wd/NbtIWSDRe59L0lm8qGYzVgwIaCdZOGhCGgtzuolQsb0nWS8wx+IDDWbKkMgvqbJzeeVJA== +vite-node@3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-3.2.4.tgz#f3676d94c4af1e76898c162c92728bca65f7bb07" + integrity sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg== + dependencies: + cac "^6.7.14" + debug "^4.4.1" + es-module-lexer "^1.7.0" + pathe "^2.0.3" + vite "^5.0.0 || ^6.0.0 || ^7.0.0-0" + +vite-tsconfig-paths@5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.4.tgz#d9a71106a7ff2c1c840c6f1708042f76a9212ed4" + integrity sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w== + dependencies: + debug "^4.1.1" + globrex "^0.1.2" + tsconfck "^3.0.3" + +"vite@^5.0.0 || ^6.0.0 || ^7.0.0-0": + version "7.1.3" + resolved "https://registry.yarnpkg.com/vite/-/vite-7.1.3.tgz#8d70cb02fd6346b4bf1329a6760800538ef0faea" + integrity sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw== + dependencies: + esbuild "^0.25.0" + fdir "^6.5.0" + picomatch "^4.0.3" + postcss "^8.5.6" + rollup "^4.43.0" + tinyglobby "^0.2.14" + optionalDependencies: + fsevents "~2.3.3" + vite@^6.0.0: version "6.0.10" resolved "https://registry.yarnpkg.com/vite/-/vite-6.0.10.tgz#48685694c36d8c8f87b93f3fd0de089d3930b361" @@ -15957,6 +15037,35 @@ vite@^6.0.0: optionalDependencies: fsevents "~2.3.3" +vitest@3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-3.2.4.tgz#0637b903ad79d1539a25bc34c0ed54b5c67702ea" + integrity sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A== + dependencies: + "@types/chai" "^5.2.2" + "@vitest/expect" "3.2.4" + "@vitest/mocker" "3.2.4" + "@vitest/pretty-format" "^3.2.4" + "@vitest/runner" "3.2.4" + "@vitest/snapshot" "3.2.4" + "@vitest/spy" "3.2.4" + "@vitest/utils" "3.2.4" + chai "^5.2.0" + debug "^4.4.1" + expect-type "^1.2.1" + magic-string "^0.30.17" + pathe "^2.0.3" + picomatch "^4.0.2" + std-env "^3.9.0" + tinybench "^2.9.0" + tinyexec "^0.3.2" + tinyglobby "^0.2.14" + tinypool "^1.1.1" + tinyrainbow "^2.0.0" + vite "^5.0.0 || ^6.0.0 || ^7.0.0-0" + vite-node "3.2.4" + why-is-node-running "^2.3.0" + vscode-jsonrpc@8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9" @@ -15975,7 +15084,7 @@ vscode-languageserver-textdocument@~1.0.11: resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631" integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA== -vscode-languageserver-types@3.17.5, vscode-languageserver-types@^3.15.1: +vscode-languageserver-types@3.17.5: version "3.17.5" resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a" integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== @@ -16033,41 +15142,11 @@ walk-up-path@^3.0.1: resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-3.0.1.tgz#c8d78d5375b4966c717eb17ada73dbd41490e886" integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - web-namespaces@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== -web-streams-polyfill@^3.2.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" - integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== - -webcrypto-core@^1.8.0: - version "1.8.1" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.8.1.tgz#09d5bd8a9c48e9fbcaf412e06b1ff1a57514ce86" - integrity sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A== - dependencies: - "@peculiar/asn1-schema" "^2.3.13" - "@peculiar/json-schema" "^1.1.12" - asn1js "^3.0.5" - pvtsutils "^1.3.5" - tslib "^2.7.0" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -16176,6 +15255,14 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +why-is-node-running@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" + integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + wicked-good-xpath@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz#81b0e95e8650e49c94b22298fff8686b5553cf6c" @@ -16235,7 +15322,7 @@ wrangler@4.1.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: +wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== @@ -16276,19 +15363,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - ws@8.18.0, ws@^8.12.0, ws@^8.13.0, ws@^8.15.0: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" @@ -16299,11 +15373,6 @@ ws@^7.3.1: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -xml@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" - integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== - xmldom-sre@0.1.31: version "0.1.31" resolved "https://registry.yarnpkg.com/xmldom-sre/-/xmldom-sre-0.1.31.tgz#10860d5bab2c603144597d04bf2c4980e98067f4" @@ -16324,11 +15393,6 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yaml-ast-parser@^0.0.43: - version "0.0.43" - resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb" - integrity sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A== - yaml-eslint-parser@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/yaml-eslint-parser/-/yaml-eslint-parser-1.2.2.tgz#1a9673ebe254328cfc2fa99f297f6d8c9364ccd8" @@ -16338,7 +15402,7 @@ yaml-eslint-parser@^1.2.1: lodash "^4.17.21" yaml "^2.0.0" -yaml@^1.10.2: +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== @@ -16356,7 +15420,7 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^21.0.1, yargs-parser@^21.1.1: +yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== @@ -16378,7 +15442,7 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.1.1, yargs@^17.3.1, yargs@^17.6.2: +yargs@^17.0.0, yargs@^17.1.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -16414,6 +15478,11 @@ yocto-queue@^1.0.0, yocto-queue@^1.1.1: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.1.1.tgz#fef65ce3ac9f8a32ceac5a634f74e17e5b232110" integrity sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g== +yoctocolors-cjs@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz#f4b905a840a37506813a7acaa28febe97767a242" + integrity sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA== + youch@3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/youch/-/youch-3.2.3.tgz#63c94ea504950a1a5bf1d5969439addba6c726e2" From 975cece80f179097578c75c415d2c265534e2d89 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 04:58:18 +0000 Subject: [PATCH 2/2] fix(deps): update graphql-codegen (#10428) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package.json | 4 +- yarn.lock | 238 +++++-------------------------------------- 2 files changed, 25 insertions(+), 217 deletions(-) diff --git a/website/package.json b/website/package.json index 86cf85fa24a..9da7bbd1da9 100644 --- a/website/package.json +++ b/website/package.json @@ -54,8 +54,8 @@ "@graphql-codegen/typescript-graphql-files-modules": "2.2.1", "@graphql-codegen/typescript-graphql-request": "5.0.0", "@graphql-codegen/typescript-mongodb": "2.4.6", - "@graphql-codegen/typescript-msw": "3.0.0", - "@graphql-codegen/typescript-nhost": "0.0.2", + "@graphql-codegen/typescript-msw": "3.0.1", + "@graphql-codegen/typescript-nhost": "0.0.3", "@graphql-codegen/typescript-operations": "4.6.1", "@graphql-codegen/typescript-react-apollo": "3.3.7", "@graphql-codegen/typescript-react-query": "4.1.0", diff --git a/yarn.lock b/yarn.lock index e118c44901b..5f6ee5663a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1717,11 +1717,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz#38848d3e25afe842a7943643cbcd387cc6e13461" integrity sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA== -"@esbuild/aix-ppc64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9" - integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA== - "@esbuild/android-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" @@ -1732,11 +1727,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz#f592957ae8b5643129fa889c79e69cd8669bb894" integrity sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg== -"@esbuild/android-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c" - integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg== - "@esbuild/android-arm@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" @@ -1747,11 +1737,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.2.tgz#72d8a2063aa630308af486a7e5cbcd1e134335b3" integrity sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q== -"@esbuild/android-arm@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419" - integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ== - "@esbuild/android-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" @@ -1762,11 +1747,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.2.tgz#9a7713504d5f04792f33be9c197a882b2d88febb" integrity sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw== -"@esbuild/android-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683" - integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw== - "@esbuild/darwin-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" @@ -1777,11 +1757,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz#02ae04ad8ebffd6e2ea096181b3366816b2b5936" integrity sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA== -"@esbuild/darwin-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae" - integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg== - "@esbuild/darwin-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" @@ -1792,11 +1767,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz#9ec312bc29c60e1b6cecadc82bd504d8adaa19e9" integrity sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA== -"@esbuild/darwin-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be" - integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ== - "@esbuild/freebsd-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" @@ -1807,11 +1777,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz#5e82f44cb4906d6aebf24497d6a068cfc152fa00" integrity sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg== -"@esbuild/freebsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca" - integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q== - "@esbuild/freebsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" @@ -1822,11 +1787,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz#3fb1ce92f276168b75074b4e51aa0d8141ecce7f" integrity sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q== -"@esbuild/freebsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab" - integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg== - "@esbuild/linux-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" @@ -1837,11 +1797,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz#856b632d79eb80aec0864381efd29de8fd0b1f43" integrity sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg== -"@esbuild/linux-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b" - integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw== - "@esbuild/linux-arm@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" @@ -1852,11 +1807,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz#c846b4694dc5a75d1444f52257ccc5659021b736" integrity sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA== -"@esbuild/linux-arm@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37" - integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw== - "@esbuild/linux-ia32@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" @@ -1867,11 +1817,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz#f8a16615a78826ccbb6566fab9a9606cfd4a37d5" integrity sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw== -"@esbuild/linux-ia32@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4" - integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A== - "@esbuild/linux-loong64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" @@ -1882,11 +1827,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz#1c451538c765bf14913512c76ed8a351e18b09fc" integrity sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ== -"@esbuild/linux-loong64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0" - integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ== - "@esbuild/linux-mips64el@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" @@ -1897,11 +1837,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz#0846edeefbc3d8d50645c51869cc64401d9239cb" integrity sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw== -"@esbuild/linux-mips64el@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5" - integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA== - "@esbuild/linux-ppc64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" @@ -1912,11 +1847,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz#8e3fc54505671d193337a36dfd4c1a23b8a41412" integrity sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw== -"@esbuild/linux-ppc64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db" - integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w== - "@esbuild/linux-riscv64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" @@ -1927,11 +1857,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz#6a1e92096d5e68f7bb10a0d64bb5b6d1daf9a694" integrity sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q== -"@esbuild/linux-riscv64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547" - integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg== - "@esbuild/linux-s390x@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" @@ -1942,11 +1867,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz#ab18e56e66f7a3c49cb97d337cd0a6fea28a8577" integrity sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw== -"@esbuild/linux-s390x@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830" - integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA== - "@esbuild/linux-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" @@ -1957,21 +1877,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz#8140c9b40da634d380b0b29c837a0b4267aff38f" integrity sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q== -"@esbuild/linux-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz#831fe0b0e1a80a8b8391224ea2377d5520e1527f" - integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg== - "@esbuild/netbsd-arm64@0.24.2": version "0.24.2" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz#65f19161432bafb3981f5f20a7ff45abb2e708e6" integrity sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw== -"@esbuild/netbsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548" - integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q== - "@esbuild/netbsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" @@ -1982,11 +1892,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz#7a3a97d77abfd11765a72f1c6f9b18f5396bcc40" integrity sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw== -"@esbuild/netbsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52" - integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g== - "@esbuild/openbsd-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" @@ -1997,11 +1902,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz#58b00238dd8f123bfff68d3acc53a6ee369af89f" integrity sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A== -"@esbuild/openbsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935" - integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ== - "@esbuild/openbsd-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" @@ -2012,16 +1912,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz#0ac843fda0feb85a93e288842936c21a00a8a205" integrity sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA== -"@esbuild/openbsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf" - integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA== - -"@esbuild/openharmony-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314" - integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg== - "@esbuild/sunos-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" @@ -2032,11 +1922,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz#8b7aa895e07828d36c422a4404cc2ecf27fb15c6" integrity sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig== -"@esbuild/sunos-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e" - integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw== - "@esbuild/win32-arm64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" @@ -2047,11 +1932,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz#c023afb647cabf0c3ed13f0eddfc4f1d61c66a85" integrity sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ== -"@esbuild/win32-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b" - integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ== - "@esbuild/win32-ia32@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" @@ -2062,11 +1942,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz#96c356132d2dda990098c8b8b951209c3cd743c2" integrity sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA== -"@esbuild/win32-ia32@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3" - integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww== - "@esbuild/win32-x64@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" @@ -2077,11 +1952,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz#34aa0b52d0fbb1a654b596acfa595f0c7b77a77b" integrity sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg== -"@esbuild/win32-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f" - integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ== - "@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.4.1": version "4.4.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" @@ -2497,27 +2367,27 @@ lodash "~4.17.0" tslib "~2.4.0" -"@graphql-codegen/typescript-msw@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-msw/-/typescript-msw-3.0.0.tgz#b6b6a8520f152ba79cb667914156f807f2485372" - integrity sha512-1cZJ5haxPMUCuq/4fGU1N0xeAxV7C1Hok0hk8klvR4IemOYY+IvajV98H5h/VJz3BpZin8v2kgQH09sPkn0mRQ== +"@graphql-codegen/typescript-msw@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-msw/-/typescript-msw-3.0.1.tgz#f85e7cb74445a413e64cedd42a3a3bb51585cce1" + integrity sha512-SSJxFHDDNpd+EO/6qqRs3k/ZMTgbAisoB/RB8oQ9yt8f7VcuKkpefCEuKIuKTl4XFqPPnTXUEToh7Xs1/w6VAA== dependencies: "@graphql-codegen/plugin-helpers" "^3.0.0" - "@graphql-codegen/visitor-plugin-common" "2.13.1" + "@graphql-codegen/visitor-plugin-common" "2.13.8" auto-bind "~4.0.0" change-case-all "1.0.15" - tslib "~2.6.0" + tslib "^2.8.1" -"@graphql-codegen/typescript-nhost@0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-nhost/-/typescript-nhost-0.0.2.tgz#e29bd26073c2bac548d67b42899f6992d7a53646" - integrity sha512-DhBqEyTZti3MARYXKezgX2TgG0aTM5AgEuGm96sWHR7OxkrXx73VX+lsC2xARI/vue7liqxjJLDOxBjV5CpqjQ== +"@graphql-codegen/typescript-nhost@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-nhost/-/typescript-nhost-0.0.3.tgz#bf7387a50a57f01b8b4ca01452b3addf1c93db54" + integrity sha512-Qd0qeJKJvzKVTMGeZ9HgTkkMtvwYlQtB/MK077d+LJf8x5RCEkWMZQUM6W4zrSeyDWe7GcAV8gBKbm506CJUew== dependencies: "@graphql-codegen/plugin-helpers" "^4.0.0" "@graphql-codegen/typescript" "^3.0.0" - "@graphql-codegen/visitor-plugin-common" "3.0.0" + "@graphql-codegen/visitor-plugin-common" "3.1.1" "@urql/introspection" "^1.0.0" - tslib "~2.6.0" + tslib "^2.8.1" "@graphql-codegen/typescript-react-apollo@3.3.7": version "3.3.7" @@ -2680,22 +2550,6 @@ parse-filepath "^1.0.2" tslib "~2.4.0" -"@graphql-codegen/visitor-plugin-common@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-3.0.0.tgz#527185eb3b1b06739702084bc6263713e167a166" - integrity sha512-ZoNlCmmkGClB137SpJT9og/nkihLN7Z4Ynl9Ir3OlbDuI20dbpyXsclpr9QGLcxEcfQeVfhGw9CooW7wZJJ8LA== - dependencies: - "@graphql-codegen/plugin-helpers" "^4.0.0" - "@graphql-tools/optimize" "^1.3.0" - "@graphql-tools/relay-operation-optimizer" "^6.5.0" - "@graphql-tools/utils" "^9.0.0" - auto-bind "~4.0.0" - change-case-all "1.0.15" - dependency-graph "^0.11.0" - graphql-tag "^2.11.0" - parse-filepath "^1.0.2" - tslib "~2.4.0" - "@graphql-codegen/visitor-plugin-common@3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-3.1.1.tgz#50c2aa3c537a805ce68d2f115d0a9811b151428c" @@ -4871,16 +4725,16 @@ resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756" integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg== -"@types/unist@*", "@types/unist@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.0.tgz#988ae8af1e5239e89f9fbb1ade4c935f4eeedf9a" - integrity sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w== - -"@types/unist@^2.0.0", "@types/unist@^2.0.2": +"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2": version "2.0.10" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.10.tgz#04ffa7f406ab628f7f7e97ca23e290cd8ab15efc" integrity sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA== +"@types/unist@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.0.tgz#988ae8af1e5239e89f9fbb1ade4c935f4eeedf9a" + integrity sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w== + "@types/ws@^8.0.0": version "8.5.4" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5" @@ -7561,38 +7415,6 @@ esbuild@^0.23.0, esbuild@~0.23.0: "@esbuild/win32-ia32" "0.23.1" "@esbuild/win32-x64" "0.23.1" -esbuild@^0.25.0: - version "0.25.9" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.9.tgz#15ab8e39ae6cdc64c24ff8a2c0aef5b3fd9fa976" - integrity sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g== - optionalDependencies: - "@esbuild/aix-ppc64" "0.25.9" - "@esbuild/android-arm" "0.25.9" - "@esbuild/android-arm64" "0.25.9" - "@esbuild/android-x64" "0.25.9" - "@esbuild/darwin-arm64" "0.25.9" - "@esbuild/darwin-x64" "0.25.9" - "@esbuild/freebsd-arm64" "0.25.9" - "@esbuild/freebsd-x64" "0.25.9" - "@esbuild/linux-arm" "0.25.9" - "@esbuild/linux-arm64" "0.25.9" - "@esbuild/linux-ia32" "0.25.9" - "@esbuild/linux-loong64" "0.25.9" - "@esbuild/linux-mips64el" "0.25.9" - "@esbuild/linux-ppc64" "0.25.9" - "@esbuild/linux-riscv64" "0.25.9" - "@esbuild/linux-s390x" "0.25.9" - "@esbuild/linux-x64" "0.25.9" - "@esbuild/netbsd-arm64" "0.25.9" - "@esbuild/netbsd-x64" "0.25.9" - "@esbuild/openbsd-arm64" "0.25.9" - "@esbuild/openbsd-x64" "0.25.9" - "@esbuild/openharmony-arm64" "0.25.9" - "@esbuild/sunos-x64" "0.25.9" - "@esbuild/win32-arm64" "0.25.9" - "@esbuild/win32-ia32" "0.25.9" - "@esbuild/win32-x64" "0.25.9" - escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" @@ -8388,7 +8210,7 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" -fdir@^6.4.4, fdir@^6.5.0: +fdir@^6.4.4: version "6.5.0" resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== @@ -12157,7 +11979,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^4.0.2, picomatch@^4.0.3: +picomatch@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== @@ -12317,7 +12139,7 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.4.4, postcss@^8.4.40, postcss@^8.4.47, postcss@^8.4.49, postcss@^8.5.6: +postcss@^8.4.4, postcss@^8.4.40, postcss@^8.4.47, postcss@^8.4.49: version "8.5.6" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c" integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== @@ -13117,7 +12939,7 @@ robust-predicates@^3.0.0: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== -rollup@^4.19.0, rollup@^4.23.0, rollup@^4.43.0: +rollup@^4.19.0, rollup@^4.23.0: version "4.46.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.46.3.tgz#ce207dcc18f18c1027c700d705f746df504436cb" integrity sha512-RZn2XTjXb8t5g13f5YclGoilU/kwT696DIkY3sywjdZidNSi3+vseaQov7D7BZXVJCPv3pDWUN69C78GGbXsKw== @@ -15012,21 +14834,7 @@ vite-tsconfig-paths@5.1.4: globrex "^0.1.2" tsconfck "^3.0.3" -"vite@^5.0.0 || ^6.0.0 || ^7.0.0-0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/vite/-/vite-7.1.3.tgz#8d70cb02fd6346b4bf1329a6760800538ef0faea" - integrity sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw== - dependencies: - esbuild "^0.25.0" - fdir "^6.5.0" - picomatch "^4.0.3" - postcss "^8.5.6" - rollup "^4.43.0" - tinyglobby "^0.2.14" - optionalDependencies: - fsevents "~2.3.3" - -vite@^6.0.0: +"vite@^5.0.0 || ^6.0.0 || ^7.0.0-0", vite@^6.0.0: version "6.0.10" resolved "https://registry.yarnpkg.com/vite/-/vite-6.0.10.tgz#48685694c36d8c8f87b93f3fd0de089d3930b361" integrity sha512-MEszunEcMo6pFsfXN1GhCFQqnE25tWRH0MA4f0Q7uanACi4y1Us+ZGpTMnITwCTnYzB2b9cpmnelTlxgTBmaBA==