diff --git a/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md b/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md new file mode 100644 index 00000000000..ff7f426e403 --- /dev/null +++ b/.changeset/@graphql-eslint_eslint-plugin-1792-dependencies.md @@ -0,0 +1,9 @@ +--- +'@graphql-eslint/eslint-plugin': patch +--- + +dependencies updates: + +- Removed dependency + [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from + `dependencies`) diff --git a/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md b/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md new file mode 100644 index 00000000000..2834dc0cd5f --- /dev/null +++ b/.changeset/@graphql-eslint_eslint-plugin-1813-dependencies.md @@ -0,0 +1,10 @@ +--- +"@graphql-eslint/eslint-plugin": patch +--- +dependencies updates: + - Updated dependency [`graphql-config@^4.5.0` ↗︎](https://www.npmjs.com/package/graphql-config/v/4.5.0) (from `^4.4.0`, in `dependencies`) + - Removed dependency [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from `dependencies`) + - Removed dependency [`chalk@^4.1.2` ↗︎](https://www.npmjs.com/package/chalk/v/4.1.2) (from `dependencies`) + - Removed dependency [`tslib@^2.4.1` ↗︎](https://www.npmjs.com/package/tslib/v/2.4.1) (from `dependencies`) + - Updated dependency [`graphql@^16` ↗︎](https://www.npmjs.com/package/graphql/v/16.0.0) (from `^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`, in `peerDependencies`) + - Added dependency [`eslint@>=8.44.0` ↗︎](https://www.npmjs.com/package/eslint/v/8.44.0) (to `peerDependencies`) diff --git a/.changeset/dull-scissors-destroy.md b/.changeset/dull-scissors-destroy.md new file mode 100644 index 00000000000..1197ad3c1c6 --- /dev/null +++ b/.changeset/dull-scissors-destroy.md @@ -0,0 +1,17 @@ +--- +'@graphql-eslint/eslint-plugin': major +--- + +- bring back `possible-type-extension` rule to `schema-recommended` config + +- add `unique-operation-name` and `unique-fragment-name` rules to `operations-recommended` config + +The concept of sibling operations provided by graphql-config's `documents` fields is based on +uniquely named operations and fragments, for omitting false-positive/negative cases when operations +and fragments are located in separate files. For this reason, these rules must be included in the +recommended config + +- rename `relay` config to `schema-relay` + +> To avoid confusing when users extend this config for executable definitions (operations and +> fragments) diff --git a/.changeset/few-mails-sparkle.md b/.changeset/few-mails-sparkle.md new file mode 100644 index 00000000000..954bb3d0683 --- /dev/null +++ b/.changeset/few-mails-sparkle.md @@ -0,0 +1,57 @@ +--- +'@graphql-eslint/eslint-plugin': major +--- + +- `alphabetize` rule changes + + - add `definitions: true` option for `schema-all`/`operations-all` configs + - rename `values: ['EnumTypeDefinition']` to `values: true` + - rename `variables: ['OperationDefinition']` to `variables: true` + - add `groups: ['id', '*', 'createdAt', 'updatedAt']` for `schema-all`/`operations-all` configs + +- `require-id-when-available` rule changes + + - rename rule to `require-selections` + +- update `schema-all`/`operations-all` configs + +- `require-description` rule changes + + - add `rootField: true` option for `schema-recommended` config + +- require `eslint` at least `>=8.44.0` as peerDependency + +- `naming-convention` + + - add new options for `schema-recommended` config + + ```json5 + { + 'EnumTypeDefinition,EnumTypeExtension': { + forbiddenPrefixes: ['Enum'], + forbiddenSuffixes: ['Enum'] + }, + 'InterfaceTypeDefinition,InterfaceTypeExtension': { + forbiddenPrefixes: ['Interface'], + forbiddenSuffixes: ['Interface'] + }, + 'UnionTypeDefinition,UnionTypeExtension': { + forbiddenPrefixes: ['Union'], + forbiddenSuffixes: ['Union'] + }, + 'ObjectTypeDefinition,ObjectTypeExtension': { + forbiddenPrefixes: ['Type'], + forbiddenSuffixes: ['Type'] + } + } + ``` + +- remove graphql-js' `unique-enum-value-names` rule + +- rename `no-case-insensitive-enum-values-duplicates` to `unique-enum-value-names` + + > Since this rule reports case-insensitive enum values duplicates too + +- `require-nullable-result-in-root` rule changes + + Do not check subscriptions diff --git a/.changeset/itchy-ads-compete.md b/.changeset/itchy-ads-compete.md new file mode 100644 index 00000000000..4eb1a723dd7 --- /dev/null +++ b/.changeset/itchy-ads-compete.md @@ -0,0 +1,16 @@ +--- +'@graphql-eslint/eslint-plugin': major +--- + +- remove `parserOptions.schema` +- remove `parserOptions.documents` +- remove `parserOptions.extensions` +- remove `parserOptions.include` +- remove `parserOptions.exclude` +- remove `parserOptions.projects` +- remove `parserOptions.schemaOptions` +- remove `parserOptions.graphQLParserOptions` +- remove `parserOptions.skipGraphQLConfig` +- remove `parserOptions.operations` + +- add `parserOptions.graphQLConfig?: IGraphQLConfig` for programmatic usage diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000000..b58b161ce5d --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,25 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "@graphql-eslint/example-code-file": "0.0.0", + "@graphql-eslint/example-graphql-config": "0.0.0", + "@graphql-eslint/example-monorepo": "0.0.0", + "@graphql-eslint/example-multiple-projects-graphql-config": "0.0.0", + "@graphql-eslint/example-prettier": "0.0.0", + "@graphql-eslint/example-programmatic": "0.0.0", + "@graphql-eslint/example-svelte-code-file": "0.0.0", + "@graphql-eslint/example-vue-code-file": "0.0.0", + "@graphql-eslint/eslint-plugin": "3.20.1", + "@theguild/eslint-rule-tester": "0.0.0", + "website": "0.0.0" + }, + "changesets": [ + "@graphql-eslint_eslint-plugin-1792-dependencies", + "dull-scissors-destroy", + "few-mails-sparkle", + "itchy-ads-compete", + "rare-planes-love", + "strong-needles-compare" + ] +} diff --git a/.changeset/rare-planes-love.md b/.changeset/rare-planes-love.md new file mode 100644 index 00000000000..7f471704f09 --- /dev/null +++ b/.changeset/rare-planes-love.md @@ -0,0 +1,5 @@ +--- +'@graphql-eslint/eslint-plugin': major +--- + +drop support of Node.js 12/14/16, GraphQL 14/15 diff --git a/.changeset/strong-needles-compare.md b/.changeset/strong-needles-compare.md new file mode 100644 index 00000000000..d4250b75cda --- /dev/null +++ b/.changeset/strong-needles-compare.md @@ -0,0 +1,15 @@ +--- +'@graphql-eslint/eslint-plugin': major +--- + +Remove `GraphQLRuleTester` from bundle, to test your rules use regular `RuleTester` from eslint + +> **Note**: with this change unnecessary dependency `@babel/code-frame` was removed too + +```js +import { RuleTester } from 'eslint' + +const ruleTester = new RuleTester({ + parser: require.resolve('@graphql-eslint/eslint-plugin') +}) +``` diff --git a/.eslintrc.cjs b/.eslintrc.cjs index c6b7af4fcf6..ad4ac14f223 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,5 +1,5 @@ module.exports = { - ignorePatterns: ['examples', 'packages/plugin/tests/__snapshots__'], + ignorePatterns: ['examples', 'packages/plugin/__tests__/__snapshots__'], extends: [ '@theguild', '@theguild/eslint-config/json', @@ -55,7 +55,7 @@ module.exports = { }, }, { - files: ['**/tests/mocks/**/*.{ts,js}'], + files: ['**/__tests__/mocks/**/*.{ts,js}'], rules: { '@typescript-eslint/no-unused-vars': 'off', }, @@ -69,13 +69,6 @@ module.exports = { node: true, }, }, - { - files: ['packages/plugin/src/**'], - rules: { - // remove in v4 major - 'unicorn/prefer-node-protocol': 'off', - }, - }, { files: ['packages/plugin/src/rules/index.ts'], rules: { diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index a25042531bb..f5fe8f18b3d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,8 +1,7 @@ -name: pr +name: PR on: pull_request: - branches: - - master + branches: [master] jobs: dependencies: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b09f0c222e..5823756e96a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,7 @@ -name: release +name: Release on: push: - branches: - - master + branches: [master] jobs: stable: diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yml similarity index 56% rename from .github/workflows/tests.yml rename to .github/workflows/test.yml index 802d62cb717..440235e54b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: Test on: push: @@ -35,21 +35,9 @@ jobs: nodeVersion: 18 packageManager: pnpm - - name: Use GraphQL v${{matrix.graphql_version}} - run: node scripts/match-graphql.js ${{matrix.graphql_version}} - - - name: Install Dependencies - run: pnpm i --no-frozen-lockfile - - name: Build run: pnpm build - - name: Upload Build Artifact - uses: actions/upload-artifact@v3 - with: - name: build-artifact - path: packages/plugin/dist - test: name: Node.js v${{matrix.node_version}} / GraphQL v${{matrix.graphql_version}} / ESLint v8 timeout-minutes: 60 @@ -57,8 +45,8 @@ jobs: needs: [typecheck] strategy: matrix: - node_version: [16, 18, 20] - graphql_version: [15, 16] + node_version: [18, 20] + graphql_version: [16] steps: - name: Checkout Master @@ -72,26 +60,11 @@ jobs: nodeVersion: ${{matrix.node_version}} packageManager: pnpm - - name: Use GraphQL v${{matrix.graphql_version}} - run: node scripts/match-graphql.js ${{matrix.graphql_version}} - - - name: Install Dependencies - run: pnpm i --no-frozen-lockfile - - # We need build for examples.spec.ts test - # Otherwise we'll get error - Cannot find module 'node_modules/@graphql-eslint/eslint-plugin/dist/index.js' - - name: Download Build Artifact - uses: actions/download-artifact@v3 - with: - name: build-artifact - path: packages/plugin/dist - - name: Test run: pnpm test - env: - CI: true -# - name: Lint ESLint -# run: pnpm lint + + - name: Type Check + run: pnpm typecheck # # - name: Lint Prettier # run: pnpm lint:prettier diff --git a/.github/workflows/website-integrity.yml b/.github/workflows/website-integrity.yml.backup similarity index 93% rename from .github/workflows/website-integrity.yml rename to .github/workflows/website-integrity.yml.backup index e59fa532a3e..3ab1ac2576a 100644 --- a/.github/workflows/website-integrity.yml +++ b/.github/workflows/website-integrity.yml.backup @@ -13,7 +13,7 @@ jobs: - name: Fetch run: git fetch origin master - - name: Setup env + - name: Setup ENV uses: the-guild-org/shared-config/setup@main with: nodeVersion: 18 @@ -28,7 +28,7 @@ jobs: - name: Compare run: git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt - - name: Diff to file + - name: Diff to File if: always() id: diff_result run: | @@ -36,7 +36,7 @@ jobs: echo "$(git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt)" >> $GITHUB_OUTPUT echo EOF >> $GITHUB_OUTPUT - - name: Publish a message + - name: Publish a Message if: always() && contains(steps.diff_result.outputs.result, 'diff') uses: marocchino/sticky-pull-request-comment@v2 with: diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 2f140c430be..99d17eb810a 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,12 +1,10 @@ -name: website +name: Website on: push: - branches: - - master + branches: [master] pull_request: - branches: - - master + branches: [master] jobs: deployment: diff --git a/.gitignore b/.gitignore index 8abd0e3c784..d47c8c7b7d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,111 +1,22 @@ -# Logs -logs *.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release # Dependency directories node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ # TypeScript cache *.tsbuildinfo -# Optional npm cache directory -.npm - # Optional eslint cache .eslintcache -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - # dotenv environment variables file .env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - +.next/ +dist/ .bob/ .idea/ out/ website/public/_redirects website/public/sitemap.xml website/public/robots.txt +.turbo/ diff --git a/.prettierignore b/.prettierignore index 46a44452cf3..7dfac6a3412 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,5 @@ dist/ -packages/plugin/tests/__snapshots__/ +packages/plugin/__tests__/__snapshots__/ examples/prettier/invalid.graphql examples/prettier/invalid.js pnpm-lock.yaml diff --git a/examples/code-file/eslint.config.js b/examples/code-file/eslint.config.js index 0e1c866bb7e..fdcf443bddb 100644 --- a/examples/code-file/eslint.config.js +++ b/examples/code-file/eslint.config.js @@ -17,9 +17,6 @@ export default [ }, languageOptions: { parser: graphqlESLint, - parserOptions: { - schema: 'schema.graphql', - }, }, rules: { '@graphql-eslint/no-anonymous-operations': 'error', diff --git a/examples/code-file/graphql.config.ts b/examples/code-file/graphql.config.ts new file mode 100644 index 00000000000..ceb196ffb2e --- /dev/null +++ b/examples/code-file/graphql.config.ts @@ -0,0 +1,3 @@ +export default { + schema: 'schema.graphql', +}; diff --git a/examples/code-file/package.json b/examples/code-file/package.json index a044b18b7fa..36da7a10024 100644 --- a/examples/code-file/package.json +++ b/examples/code-file/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@eslint/js": "8.48.0", "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0" + "eslint": "8.48.0" } } diff --git a/examples/graphql-config-code-file/.graphqlrc.yml b/examples/graphql-config-code-file/.graphqlrc.yml deleted file mode 100644 index 66dcbddfe19..00000000000 --- a/examples/graphql-config-code-file/.graphqlrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -schema: schema.graphql -documents: query.js diff --git a/examples/graphql-config-code-file/eslint.config.js b/examples/graphql-config-code-file/eslint.config.js deleted file mode 100644 index 1d159b78972..00000000000 --- a/examples/graphql-config-code-file/eslint.config.js +++ /dev/null @@ -1,33 +0,0 @@ -import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; -import js from '@eslint/js'; - -export default [ - { - files: ['**/*.js'], - processor: graphqlESLint.processors.graphql, - rules: js.configs.recommended.rules, - }, - { - files: ['**/*.graphql'], - plugins: { - '@graphql-eslint': graphqlESLint, - }, - languageOptions: { - parser: graphqlESLint, - }, - rules: { - '@graphql-eslint/require-id-when-available': 'error', - '@graphql-eslint/no-anonymous-operations': 'error', - '@graphql-eslint/naming-convention': [ - 'error', - { - OperationDefinition: { - style: 'PascalCase', - forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'], - forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'], - }, - }, - ], - }, - }, -]; diff --git a/examples/graphql-config-code-file/package.json b/examples/graphql-config-code-file/package.json deleted file mode 100644 index 2c28591917a..00000000000 --- a/examples/graphql-config-code-file/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@graphql-eslint/example-graphql-config-code-file", - "version": "0.0.0", - "type": "module", - "repository": "https://github.com/B2o5T/graphql-eslint", - "author": "Dotan Simha ", - "private": true, - "scripts": { - "lint": "eslint ." - }, - "dependencies": { - "graphql": "16.8.0", - "graphql-tag": "2.12.6" - }, - "devDependencies": { - "@eslint/js": "8.48.0", - "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0" - } -} diff --git a/examples/graphql-config-code-file/query.js b/examples/graphql-config-code-file/query.js deleted file mode 100644 index 3593310f64d..00000000000 --- a/examples/graphql-config-code-file/query.js +++ /dev/null @@ -1,9 +0,0 @@ -import gql from 'graphql-tag'; - -const GET_USER = gql` - query { - user { - name - } - } -`; diff --git a/examples/graphql-config-code-file/schema.graphql b/examples/graphql-config-code-file/schema.graphql deleted file mode 100644 index 66e44f9b16c..00000000000 --- a/examples/graphql-config-code-file/schema.graphql +++ /dev/null @@ -1,8 +0,0 @@ -type Query { - user: User! -} - -type User { - id: ID! - name: String! -} diff --git a/examples/graphql-config/.graphqlrc.yml b/examples/graphql-config/.graphqlrc.yml deleted file mode 100644 index d908b1e1f8d..00000000000 --- a/examples/graphql-config/.graphqlrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -schema: schema.graphql -documents: operations/*.graphql diff --git a/examples/graphql-config/graphql.config.ts b/examples/graphql-config/graphql.config.ts new file mode 100644 index 00000000000..b99a941c23f --- /dev/null +++ b/examples/graphql-config/graphql.config.ts @@ -0,0 +1,4 @@ +export default { + schema: 'schema.graphql', + documents: 'operations/*.graphql', +}; diff --git a/examples/graphql-config/package.json b/examples/graphql-config/package.json index adb31c98659..263a4cd52e6 100644 --- a/examples/graphql-config/package.json +++ b/examples/graphql-config/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@eslint/js": "8.48.0", "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0" + "eslint": "8.48.0" } } diff --git a/examples/monorepo/eslint.config.js b/examples/monorepo/eslint.config.js index 5b43a6c4077..9405c604daf 100644 --- a/examples/monorepo/eslint.config.js +++ b/examples/monorepo/eslint.config.js @@ -2,7 +2,6 @@ import * as graphqlESLint from '@graphql-eslint/eslint-plugin'; import js from '@eslint/js'; const SCHEMA_PATH = 'server/**/*.gql'; -const OPERATIONS_PATH = 'client/**/*.{tsx,gql}'; export default [ { @@ -30,10 +29,6 @@ export default [ }, languageOptions: { parser: graphqlESLint, - parserOptions: { - schema: SCHEMA_PATH, - operations: OPERATIONS_PATH, - }, }, }, { diff --git a/examples/monorepo/graphql.config.ts b/examples/monorepo/graphql.config.ts new file mode 100644 index 00000000000..c2b21c8598c --- /dev/null +++ b/examples/monorepo/graphql.config.ts @@ -0,0 +1,4 @@ +export default { + schema: 'server/**/*.gql', + documents: 'client/**/*.{tsx,gql}', +}; diff --git a/examples/monorepo/package.json b/examples/monorepo/package.json index c3406ae2479..6756d7db40c 100644 --- a/examples/monorepo/package.json +++ b/examples/monorepo/package.json @@ -13,6 +13,6 @@ "devDependencies": { "@eslint/js": "8.48.0", "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0" + "eslint": "8.48.0" } } diff --git a/examples/multiple-projects-graphql-config/graphql.config.ts b/examples/multiple-projects-graphql-config/graphql.config.ts index b122f56b9ef..943696ed494 100644 --- a/examples/multiple-projects-graphql-config/graphql.config.ts +++ b/examples/multiple-projects-graphql-config/graphql.config.ts @@ -1,5 +1,5 @@ -import { IGraphQLConfig } from 'graphql-config'; -import { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck'; +import type { IGraphQLConfig } from 'graphql-config'; +import type { GraphQLTagPluckOptions } from '@graphql-tools/graphql-tag-pluck'; const config: IGraphQLConfig = { projects: { @@ -12,11 +12,11 @@ const config: IGraphQLConfig = { documents: 'query.second-project.js', extensions: { // in case you want to use different names for magic comment and module identifier - pluckConfig: { + pluckConfig: { modules: [{ name: 'custom-graphql-tag', identifier: 'custom' }], globalGqlIdentifierName: 'custom', gqlMagicComment: 'MyGraphQL', - }, + } satisfies GraphQLTagPluckOptions, }, }, }, diff --git a/examples/multiple-projects-graphql-config/package.json b/examples/multiple-projects-graphql-config/package.json index ee6776df16b..32d86f8521e 100644 --- a/examples/multiple-projects-graphql-config/package.json +++ b/examples/multiple-projects-graphql-config/package.json @@ -11,9 +11,6 @@ }, "devDependencies": { "@graphql-eslint/eslint-plugin": "workspace:*", - "cosmiconfig-typescript-loader": "5.0.0", - "eslint": "8.38.0", - "ts-node": "10.9.1", - "typescript": "5.2.2" + "eslint": "8.48.0" } } diff --git a/examples/prettier/package.json b/examples/prettier/package.json index 0e4e9e6fa8e..1d353ff6a56 100644 --- a/examples/prettier/package.json +++ b/examples/prettier/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@eslint/js": "8.48.0", "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0", + "eslint": "8.48.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-prettier": "4.2.1", "prettier": "2.8.8" diff --git a/examples/basic/eslint.config.js b/examples/programmatic/eslint.config.js similarity index 76% rename from examples/basic/eslint.config.js rename to examples/programmatic/eslint.config.js index 5ef75ab71c1..7d953da3a8e 100644 --- a/examples/basic/eslint.config.js +++ b/examples/programmatic/eslint.config.js @@ -14,12 +14,14 @@ export default [ languageOptions: { parser: graphqlESLint, parserOptions: { - schema: 'schema.graphql', - operations: ['query.graphql', 'fragment.graphql', 'fragment2.graphql'], + graphQLConfig: { + schema: 'schema.graphql', + documents: ['query.graphql', 'fragment.graphql', 'fragment2.graphql'], + }, }, }, rules: { - '@graphql-eslint/require-id-when-available': ['error', { fieldName: '_id' }], + '@graphql-eslint/require-selections': ['error', { fieldName: '_id' }], '@graphql-eslint/unique-fragment-name': 'error', '@graphql-eslint/no-anonymous-operations': 'error', '@graphql-eslint/naming-convention': [ @@ -32,7 +34,7 @@ export default [ }, }, ], - '@graphql-eslint/no-case-insensitive-enum-values-duplicates': ['error'], + '@graphql-eslint/unique-enum-value-names': 'error', '@graphql-eslint/require-description': ['error', { FieldDefinition: true }], }, }, diff --git a/examples/basic/fragment.graphql b/examples/programmatic/fragment.graphql similarity index 100% rename from examples/basic/fragment.graphql rename to examples/programmatic/fragment.graphql diff --git a/examples/basic/fragment2.graphql b/examples/programmatic/fragment2.graphql similarity index 100% rename from examples/basic/fragment2.graphql rename to examples/programmatic/fragment2.graphql diff --git a/examples/basic/package.json b/examples/programmatic/package.json similarity index 83% rename from examples/basic/package.json rename to examples/programmatic/package.json index 1ff49aa4bc3..1dd6eb53f8d 100644 --- a/examples/basic/package.json +++ b/examples/programmatic/package.json @@ -1,5 +1,5 @@ { - "name": "@graphql-eslint/example-basic", + "name": "@graphql-eslint/example-programmatic", "version": "0.0.0", "type": "module", "repository": "https://github.com/B2o5T/graphql-eslint", @@ -14,6 +14,6 @@ "devDependencies": { "@eslint/js": "8.48.0", "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0" + "eslint": "8.48.0" } } diff --git a/examples/basic/query.graphql b/examples/programmatic/query.graphql similarity index 100% rename from examples/basic/query.graphql rename to examples/programmatic/query.graphql diff --git a/examples/basic/schema.graphql b/examples/programmatic/schema.graphql similarity index 100% rename from examples/basic/schema.graphql rename to examples/programmatic/schema.graphql diff --git a/examples/svelte-code-file/package.json b/examples/svelte-code-file/package.json index 18a544bc1a0..1d842cc5b6b 100644 --- a/examples/svelte-code-file/package.json +++ b/examples/svelte-code-file/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@graphql-eslint/eslint-plugin": "workspace:*", - "eslint": "8.38.0", + "eslint": "8.48.0", "svelte": "4.2.0", "svelte-eslint-parser": "0.33.0", "svelte2tsx": "0.6.21" diff --git a/examples/vue-code-file/package.json b/examples/vue-code-file/package.json index 237c72f366e..2a3df1ce35a 100644 --- a/examples/vue-code-file/package.json +++ b/examples/vue-code-file/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@graphql-eslint/eslint-plugin": "workspace:*", "@vue/compiler-sfc": "3.3.4", - "eslint": "8.38.0", + "eslint": "8.48.0", "vue-eslint-parser": "9.3.1" } } diff --git a/package.json b/package.json index 77727edf651..5495a28128c 100644 --- a/package.json +++ b/package.json @@ -10,18 +10,18 @@ "pnpm": ">=8" }, "scripts": { - "build": "pnpm --filter @graphql-eslint/eslint-plugin build && bob check", + "build": "turbo run build --filter=!website && bob check", "ci:lint": "eslint --ignore-path .gitignore --output-file eslint_report.json --format json .", "create-rule": "tsx scripts/create-rule.ts", "generate:configs": "tsx scripts/generate-configs.ts", - "lint": "eslint --ignore-path .gitignore .", + "lint": "eslint --ignore-path .gitignore --cache .", "lint:prettier": "prettier --cache --check .", - "postinstall": "tsx scripts/patch-graphql.ts", "prebuild": "rimraf tsconfig.tsbuildinfo", "prerelease": "NODE_ENV=production pnpm build", "prettier": "pnpm lint:prettier --write", "release": "changeset publish", - "test": "vitest ." + "test": "turbo run test --filter=!website", + "typecheck": "turbo run typecheck" }, "devDependencies": { "@changesets/changelog-github": "0.4.8", @@ -35,7 +35,7 @@ "chalk": "4.1.2", "dedent": "1.5.1", "enquirer": "2.4.1", - "eslint": "8.44.0", + "eslint": "8.48.0", "eslint-plugin-eslint-plugin": "5.0.7", "eslint-plugin-tailwindcss": "3.13.0", "husky": "8.0.3", @@ -46,18 +46,15 @@ "rimraf": "5.0.1", "tsup": "^7.1.0", "tsx": "3.12.7", + "turbo": "^1.10.12", "typescript": "5.2.2", "vitest": "0.30.1" }, - "resolutions": { - "graphql": "16.8.0" - }, "pnpm": { "patchedDependencies": { - "eslint@8.44.0": "patches/eslint@8.31.0.patch", + "eslint@8.48.0": "patches/eslint@8.46.0.patch", "eslint-plugin-eslint-plugin@5.0.7": "patches/eslint-plugin-eslint-plugin@5.0.6.patch", - "json-schema-to-markdown@1.1.1": "patches/json-schema-to-markdown@1.1.1.patch", - "@vitest/runner@0.30.1": "patches/@vitest__runner@0.28.4.patch" + "json-schema-to-markdown@1.1.1": "patches/json-schema-to-markdown@1.1.1.patch" } } } diff --git a/packages/plugin/CHANGELOG.md b/packages/plugin/CHANGELOG.md index 12f342ef835..497d1484d9e 100644 --- a/packages/plugin/CHANGELOG.md +++ b/packages/plugin/CHANGELOG.md @@ -1,5 +1,127 @@ # @graphql-eslint/eslint-plugin +## 4.0.0-alpha.0 + +### Major Changes + +- [#1794](https://github.com/B2o5T/graphql-eslint/pull/1794) + [`4079167e`](https://github.com/B2o5T/graphql-eslint/commit/4079167e2af800e12d74dc516d49bf4024b3f956) + Thanks [@B2o5T](https://github.com/B2o5T)! - - bring back `possible-type-extension` rule to + `schema-recommended` config + + - add `unique-operation-name` and `unique-fragment-name` rules to `operations-recommended` config + + The concept of sibling operations provided by graphql-config's `documents` fields is based on + uniquely named operations and fragments, for omitting false-positive/negative cases when + operations and fragments are located in separate files. For this reason, these rules must be + included in the recommended config + + - rename `relay` config to `schema-relay` + + > To avoid confusing when users extend this config for executable definitions (operations and + > fragments) + +- [#1812](https://github.com/B2o5T/graphql-eslint/pull/1812) + [`bf475e88`](https://github.com/B2o5T/graphql-eslint/commit/bf475e88ca60d77111c7ef324d4e3080451f094c) + Thanks [@B2o5T](https://github.com/B2o5T)! - - `alphabetize` rule changes + + - add `definitions: true` option for `schema-all`/`operations-all` configs + - rename `values: ['EnumTypeDefinition']` to `values: true` + - rename `variables: ['OperationDefinition']` to `variables: true` + - add `groups: ['id', '*', 'createdAt', 'updatedAt']` for `schema-all`/`operations-all` configs + + - `require-id-when-available` rule changes + + - rename rule to `require-selections` + + - update `schema-all`/`operations-all` configs + + - `require-description` rule changes + + - add `rootField: true` option for `schema-recommended` config + + - require `eslint` at least `>=8.44.0` as peerDependency + + - `naming-convention` + + - add new options for `schema-recommended` config + + ```json5 + { + 'EnumTypeDefinition,EnumTypeExtension': { + forbiddenPrefixes: ['Enum'], + forbiddenSuffixes: ['Enum'] + }, + 'InterfaceTypeDefinition,InterfaceTypeExtension': { + forbiddenPrefixes: ['Interface'], + forbiddenSuffixes: ['Interface'] + }, + 'UnionTypeDefinition,UnionTypeExtension': { + forbiddenPrefixes: ['Union'], + forbiddenSuffixes: ['Union'] + }, + 'ObjectTypeDefinition,ObjectTypeExtension': { + forbiddenPrefixes: ['Type'], + forbiddenSuffixes: ['Type'] + } + } + ``` + + - remove graphql-js' `unique-enum-value-names` rule + + - rename `no-case-insensitive-enum-values-duplicates` to `unique-enum-value-names` + + > Since this rule reports case-insensitive enum values duplicates too + + - `require-nullable-result-in-root` rule changes + + Do not check subscriptions + +- [#1795](https://github.com/B2o5T/graphql-eslint/pull/1795) + [`2f46a717`](https://github.com/B2o5T/graphql-eslint/commit/2f46a717349c63019a80935f4b19396b2319584e) + Thanks [@B2o5T](https://github.com/B2o5T)! - - remove `parserOptions.schema` + + - remove `parserOptions.documents` + - remove `parserOptions.extensions` + - remove `parserOptions.include` + - remove `parserOptions.exclude` + - remove `parserOptions.projects` + - remove `parserOptions.schemaOptions` + - remove `parserOptions.graphQLParserOptions` + - remove `parserOptions.skipGraphQLConfig` + - remove `parserOptions.operations` + + - add `parserOptions.graphQLConfig?: IGraphQLConfig` for programmatic usage + +- [#1793](https://github.com/B2o5T/graphql-eslint/pull/1793) + [`6593482b`](https://github.com/B2o5T/graphql-eslint/commit/6593482b3bf0d80a8afdfb0018b9eb13b874ebfc) + Thanks [@B2o5T](https://github.com/B2o5T)! - drop support of Node.js 12/14/16, GraphQL 14/15 + +- [#1792](https://github.com/B2o5T/graphql-eslint/pull/1792) + [`804f8b61`](https://github.com/B2o5T/graphql-eslint/commit/804f8b617b3d63407db5bdea686bb3992801fa96) + Thanks [@B2o5T](https://github.com/B2o5T)! - Remove `GraphQLRuleTester` from bundle, to test your + rules use regular `RuleTester` from eslint + + > **Note**: with this change unnecessary dependency `@babel/code-frame` was removed too + + ```js + import { RuleTester } from 'eslint' + + const ruleTester = new RuleTester({ + parser: require.resolve('@graphql-eslint/eslint-plugin') + }) + ``` + +### Patch Changes + +- [#1792](https://github.com/B2o5T/graphql-eslint/pull/1792) + [`804f8b61`](https://github.com/B2o5T/graphql-eslint/commit/804f8b617b3d63407db5bdea686bb3992801fa96) + Thanks [@B2o5T](https://github.com/B2o5T)! - dependencies updates: + + - Removed dependency + [`@babel/code-frame@^7.18.6` ↗︎](https://www.npmjs.com/package/@babel/code-frame/v/7.18.6) (from + `dependencies`) + ## 3.20.1 ### Patch Changes @@ -552,29 +674,29 @@ Special thanks to @connorjs ### Before - ```json + ```json5 { - "@graphql-eslint/avoid-operation-name-prefix": [ - "error", + '@graphql-eslint/avoid-operation-name-prefix': [ + 'error', { - "keywords": ["Query", "Mutation", "Subscription", "Get"] + keywords: ['Query', 'Mutation', 'Subscription', 'Get'] } ], - "@graphql-eslint/no-operation-name-suffix": "error" + '@graphql-eslint/no-operation-name-suffix': 'error' } ``` ### After - ```json + ```json5 { - "@graphql-eslint/naming-convention": [ - "error", + '@graphql-eslint/naming-convention': [ + 'error', { - "OperationDefinition": { - "style": "PascalCase", - "forbiddenPrefixes": ["Query", "Mutation", "Subscription", "Get"], - "forbiddenSuffixes": ["Query", "Mutation", "Subscription"] + OperationDefinition: { + style: 'PascalCase', + forbiddenPrefixes: ['Query', 'Mutation', 'Subscription', 'Get'], + forbiddenSuffixes: ['Query', 'Mutation', 'Subscription'] } } ] @@ -605,24 +727,24 @@ Special thanks to @connorjs ### Before - ```json + ```json5 { - "@graphql-eslint/naming-convention": [ - "error", + '@graphql-eslint/naming-convention': [ + 'error', { - "ObjectTypeDefinition": "PascalCase", - "InterfaceTypeDefinition": "PascalCase", - "EnumTypeDefinition": "PascalCase", - "ScalarTypeDefinition": "PascalCase", - "InputObjectTypeDefinition": "PascalCase", - "UnionTypeDefinition": "PascalCase", - "FieldDefinition": "camelCase", - "InputValueDefinition": "camelCase", - "QueryDefinition": { - "forbiddenPrefixes": ["get"] + ObjectTypeDefinition: 'PascalCase', + InterfaceTypeDefinition: 'PascalCase', + EnumTypeDefinition: 'PascalCase', + ScalarTypeDefinition: 'PascalCase', + InputObjectTypeDefinition: 'PascalCase', + UnionTypeDefinition: 'PascalCase', + FieldDefinition: 'camelCase', + InputValueDefinition: 'camelCase', + QueryDefinition: { + forbiddenPrefixes: ['get'] }, - "leadingUnderscore": "allow", - "trailingUnderscore": "allow" + leadingUnderscore: 'allow', + trailingUnderscore: 'allow' } ] } @@ -630,19 +752,19 @@ Special thanks to @connorjs ### After - ```json + ```json5 { - "@graphql-eslint/naming-convention": [ - "error", + '@graphql-eslint/naming-convention': [ + 'error', { - "types": "PascalCase", - "FieldDefinition": "camelCase", - "InputValueDefinition": "camelCase", - "FieldDefinition[parent.name.value=Query]": { - "forbiddenPrefixes": ["get"] + types: 'PascalCase', + FieldDefinition: 'camelCase', + InputValueDefinition: 'camelCase', + 'FieldDefinition[parent.name.value=Query]': { + forbiddenPrefixes: ['get'] }, - "allowLeadingUnderscore": true, - "allowTrailingUnderscore": true + allowLeadingUnderscore: true, + allowTrailingUnderscore: true } ] } @@ -663,21 +785,21 @@ Special thanks to @connorjs ### Before - ```json + ```json5 { - "@graphql-eslint/require-description": [ - "error", + '@graphql-eslint/require-description': [ + 'error', { - "on": [ - "ObjectTypeDefinition", - "InterfaceTypeDefinition", - "EnumTypeDefinition", - "InputObjectTypeDefinition", - "UnionTypeDefinition", - "FieldDefinition", - "InputValueDefinition", - "EnumValueDefinition", - "DirectiveDefinition" + on: [ + 'ObjectTypeDefinition', + 'InterfaceTypeDefinition', + 'EnumTypeDefinition', + 'InputObjectTypeDefinition', + 'UnionTypeDefinition', + 'FieldDefinition', + 'InputValueDefinition', + 'EnumValueDefinition', + 'DirectiveDefinition' ] } ] @@ -686,16 +808,16 @@ Special thanks to @connorjs ### After - ```json + ```json5 { - "@graphql-eslint/require-description": [ - "error", + '@graphql-eslint/require-description': [ + 'error', { - "types": true, - "FieldDefinition": true, - "InputValueDefinition": true, - "EnumValueDefinition": true, - "DirectiveDefinition": true + types: true, + FieldDefinition: true, + InputValueDefinition: true, + EnumValueDefinition: true, + DirectiveDefinition: true } ] } @@ -886,39 +1008,41 @@ Special thanks to @connorjs As a drop-in replacement for the whole set of rules we had in `validate-against-schema`, you can use this: -``` - "@graphql-eslint/executable-definitions": "error", - "@graphql-eslint/fields-on-correct-type": "error", - "@graphql-eslint/fragments-on-composite-type": "error", - "@graphql-eslint/known-argument-names": "error", - "@graphql-eslint/known-directives": "error", - "@graphql-eslint/known-fragment-names": "error", - "@graphql-eslint/known-type-names": "error", - "@graphql-eslint/lone-anonymous-operation": "error", - "@graphql-eslint/lone-schema-definition": "error", - "@graphql-eslint/no-fragment-cycles": "error", - "@graphql-eslint/no-undefined-variables": "error", - "@graphql-eslint/no-unused-fragments": "error", - "@graphql-eslint/no-unused-variables": "error", - "@graphql-eslint/overlapping-fields-can-be-merged": "error", - "@graphql-eslint/possible-fragment-spread": "error", - "@graphql-eslint/possible-type-extension": "error", - "@graphql-eslint/provided-required-arguments": "error", - "@graphql-eslint/scalar-leafs": "error", - "@graphql-eslint/one-field-subscriptions": "error", - "@graphql-eslint/unique-argument-names": "error", - "@graphql-eslint/unique-directive-names": "error", - "@graphql-eslint/unique-directive-names-per-location": "error", - "@graphql-eslint/unique-enum-value-names": "error", - "@graphql-eslint/unique-field-definition-names": "error", - "@graphql-eslint/unique-input-field-names": "error", - "@graphql-eslint/unique-operation-types": "error", - "@graphql-eslint/unique-type-names": "error", - "@graphql-eslint/unique-variable-names": "error", - "@graphql-eslint/value-literals-of-correct-type": "error", - "@graphql-eslint/variables-are-input-types": "error", - "@graphql-eslint/variables-in-allowed-position": "error" -``` + ```json5 + { + '@graphql-eslint/executable-definitions': 'error', + '@graphql-eslint/fields-on-correct-type': 'error', + '@graphql-eslint/fragments-on-composite-type': 'error', + '@graphql-eslint/known-argument-names': 'error', + '@graphql-eslint/known-directives': 'error', + '@graphql-eslint/known-fragment-names': 'error', + '@graphql-eslint/known-type-names': 'error', + '@graphql-eslint/lone-anonymous-operation': 'error', + '@graphql-eslint/lone-schema-definition': 'error', + '@graphql-eslint/no-fragment-cycles': 'error', + '@graphql-eslint/no-undefined-variables': 'error', + '@graphql-eslint/no-unused-fragments': 'error', + '@graphql-eslint/no-unused-variables': 'error', + '@graphql-eslint/overlapping-fields-can-be-merged': 'error', + '@graphql-eslint/possible-fragment-spread': 'error', + '@graphql-eslint/possible-type-extension': 'error', + '@graphql-eslint/provided-required-arguments': 'error', + '@graphql-eslint/scalar-leafs': 'error', + '@graphql-eslint/one-field-subscriptions': 'error', + '@graphql-eslint/unique-argument-names': 'error', + '@graphql-eslint/unique-directive-names': 'error', + '@graphql-eslint/unique-directive-names-per-location': 'error', + '@graphql-eslint/unique-enum-value-names': 'error', + '@graphql-eslint/unique-field-definition-names': 'error', + '@graphql-eslint/unique-input-field-names': 'error', + '@graphql-eslint/unique-operation-types': 'error', + '@graphql-eslint/unique-type-names': 'error', + '@graphql-eslint/unique-variable-names': 'error', + '@graphql-eslint/value-literals-of-correct-type': 'error', + '@graphql-eslint/variables-are-input-types': 'error', + '@graphql-eslint/variables-in-allowed-position': 'error' + } + ``` - 61251e7: Bump dependencies and update minimum Node version to `v12` diff --git a/packages/plugin/tests/__snapshots__/alphabetize.spec.md b/packages/plugin/__tests__/__snapshots__/alphabetize.spec.md similarity index 91% rename from packages/plugin/tests/__snapshots__/alphabetize.spec.md rename to packages/plugin/__tests__/__snapshots__/alphabetize.spec.md index 3c5e5813eab..287c08f5962 100644 --- a/packages/plugin/tests/__snapshots__/alphabetize.spec.md +++ b/packages/plugin/__tests__/__snapshots__/alphabetize.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`alphabetize > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type User { @@ -42,7 +42,7 @@ exports[`Invalid #1 1`] = ` 6 | } `; -exports[`Invalid #2 1`] = ` +exports[`alphabetize > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | extend type User { @@ -77,7 +77,7 @@ exports[`Invalid #2 1`] = ` 6 | } `; -exports[`Invalid #3 1`] = ` +exports[`alphabetize > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | interface Test { @@ -117,7 +117,7 @@ exports[`Invalid #3 1`] = ` 5 | } `; -exports[`Invalid #4 1`] = ` +exports[`alphabetize > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | input UserInput { @@ -159,7 +159,7 @@ exports[`Invalid #4 1`] = ` 6 | } `; -exports[`Invalid #5 1`] = ` +exports[`alphabetize > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | extend input UserInput { @@ -194,7 +194,7 @@ exports[`Invalid #5 1`] = ` 6 | } `; -exports[`Invalid #6 1`] = ` +exports[`alphabetize > invalid > Invalid #6 1`] = ` #### ⌨️ Code 1 | enum Role { @@ -207,9 +207,7 @@ exports[`Invalid #6 1`] = ` #### ⚙️ Options { - "values": [ - "EnumTypeDefinition" - ] + "values": true } #### ❌ Error 1/2 @@ -236,7 +234,7 @@ exports[`Invalid #6 1`] = ` 6 | } `; -exports[`Invalid #7 1`] = ` +exports[`alphabetize > invalid > Invalid #7 1`] = ` #### ⌨️ Code 1 | extend enum Role { @@ -249,9 +247,7 @@ exports[`Invalid #7 1`] = ` #### ⚙️ Options { - "values": [ - "EnumTypeDefinition" - ] + "values": true } #### ❌ Error @@ -271,7 +267,7 @@ exports[`Invalid #7 1`] = ` 6 | } `; -exports[`Invalid #8 1`] = ` +exports[`alphabetize > invalid > Invalid #8 1`] = ` #### ⌨️ Code 1 | directive @test(cc: [Cc!]!, bb: [Bb!], aa: Aa!) on FIELD_DEFINITION @@ -299,7 +295,7 @@ exports[`Invalid #8 1`] = ` 1 | directive @test(aa: Aa!, bb: [Bb!], cc: [Cc!]!) on FIELD_DEFINITION `; -exports[`Invalid #9 1`] = ` +exports[`alphabetize > invalid > Invalid #9 1`] = ` #### ⌨️ Code 1 | type Query { @@ -335,7 +331,7 @@ exports[`Invalid #9 1`] = ` 3 | } `; -exports[`Invalid #10 1`] = ` +exports[`alphabetize > invalid > Invalid #10 1`] = ` #### ⌨️ Code 1 | fragment TestFields on Test { @@ -375,7 +371,7 @@ exports[`Invalid #10 1`] = ` 5 | } `; -exports[`Invalid #11 1`] = ` +exports[`alphabetize > invalid > Invalid #11 1`] = ` #### ⌨️ Code 1 | query { @@ -443,7 +439,7 @@ exports[`Invalid #11 1`] = ` 12 | } `; -exports[`Invalid #12 1`] = ` +exports[`alphabetize > invalid > Invalid #12 1`] = ` #### ⌨️ Code 1 | mutation ($cc: [Cc!]!, $bb: [Bb!], $aa: Aa!) { @@ -455,9 +451,7 @@ exports[`Invalid #12 1`] = ` #### ⚙️ Options { - "variables": [ - "OperationDefinition" - ], + "variables": true, "arguments": [ "Field" ] @@ -498,7 +492,7 @@ exports[`Invalid #12 1`] = ` 5 | } `; -exports[`should compare with lexicographic order 1`] = ` +exports[`alphabetize > invalid > should compare with lexicographic order 1`] = ` #### ⌨️ Code 1 | enum Test { @@ -516,9 +510,7 @@ exports[`should compare with lexicographic order 1`] = ` #### ⚙️ Options { - "values": [ - "EnumTypeDefinition" - ] + "values": true } #### ❌ Error 1/3 @@ -557,7 +549,7 @@ exports[`should compare with lexicographic order 1`] = ` 11 | } `; -exports[`should move comment 1`] = ` +exports[`alphabetize > invalid > should move comment 1`] = ` #### ⌨️ Code 1 | type Test { # { character @@ -622,7 +614,7 @@ exports[`should move comment 1`] = ` 14 | } # } character `; -exports[`should sort by group when \`*\` at the start 1`] = ` +exports[`alphabetize > invalid > should sort by group when \`*\` at the start 1`] = ` #### ⌨️ Code 1 | type User { @@ -696,7 +688,7 @@ exports[`should sort by group when \`*\` at the start 1`] = ` 12 | } `; -exports[`should sort by group when \`*\` is at the end 1`] = ` +exports[`alphabetize > invalid > should sort by group when \`*\` is at the end 1`] = ` #### ⌨️ Code 1 | type User { @@ -770,7 +762,7 @@ exports[`should sort by group when \`*\` is at the end 1`] = ` 12 | } `; -exports[`should sort by group when \`*\` is between 1`] = ` +exports[`alphabetize > invalid > should sort by group when \`*\` is between 1`] = ` #### ⌨️ Code 1 | type User { @@ -844,7 +836,7 @@ exports[`should sort by group when \`*\` is between 1`] = ` 12 | } `; -exports[`should sort definitions 1`] = ` +exports[`alphabetize > invalid > should sort definitions 1`] = ` #### ⌨️ Code 1 | # START @@ -1039,7 +1031,64 @@ exports[`should sort definitions 1`] = ` 59 | # END `; -exports[`should sort when selection is aliased 1`] = ` +exports[`alphabetize > invalid > should sort selections by group when \`*\` is between 1`] = ` +#### ⌨️ Code + + 1 | { + 2 | zz + 3 | updatedAt + 4 | createdAt + 5 | aa + 6 | id + 7 | } + +#### ⚙️ Options + + { + "selections": [ + "OperationDefinition" + ], + "groups": [ + "id", + "*", + "createdAt", + "updatedAt" + ] + } + +#### ❌ Error 1/3 + + 3 | updatedAt + > 4 | createdAt + | ^^^^^^^^^ field "createdAt" should be before field "updatedAt" + 5 | aa + +#### ❌ Error 2/3 + + 4 | createdAt + > 5 | aa + | ^^ field "aa" should be before field "createdAt" + 6 | id + +#### ❌ Error 3/3 + + 5 | aa + > 6 | id + | ^^ field "id" should be before field "aa" + 7 | } + +#### 🔧 Autofix output + + 1 | { + 2 | id + 3 | aa + 4 | zz + 5 | createdAt + 6 | updatedAt + 7 | } +`; + +exports[`alphabetize > invalid > should sort when selection is aliased 1`] = ` #### ⌨️ Code 1 | { diff --git a/packages/plugin/tests/__snapshots__/description-style.spec.md b/packages/plugin/__tests__/__snapshots__/description-style.spec.md similarity index 96% rename from packages/plugin/tests/__snapshots__/description-style.spec.md rename to packages/plugin/__tests__/__snapshots__/description-style.spec.md index d46cf142c4b..6e6a88237a3 100644 --- a/packages/plugin/tests/__snapshots__/description-style.spec.md +++ b/packages/plugin/__tests__/__snapshots__/description-style.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`description-style > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | enum EnumUserLanguagesSkill { @@ -91,7 +91,7 @@ exports[`Invalid #1 1`] = ` 12 | } `; -exports[`Invalid #2 1`] = ` +exports[`description-style > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | " Test " diff --git a/packages/plugin/tests/__snapshots__/eslint-directives.spec.md b/packages/plugin/__tests__/__snapshots__/eslint-directives.spec.md similarity index 93% rename from packages/plugin/tests/__snapshots__/eslint-directives.spec.md rename to packages/plugin/__tests__/__snapshots__/eslint-directives.spec.md index 88a2604eb82..24f6c139b9f 100644 --- a/packages/plugin/tests/__snapshots__/eslint-directives.spec.md +++ b/packages/plugin/__tests__/__snapshots__/eslint-directives.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`test-directives > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | # eslint-disable-next-line non-existing-rule diff --git a/packages/plugin/tests/__snapshots__/examples.spec.md b/packages/plugin/__tests__/__snapshots__/examples.spec.md similarity index 92% rename from packages/plugin/tests/__snapshots__/examples.spec.md rename to packages/plugin/__tests__/__snapshots__/examples.spec.md index 1574659785c..4924559daf4 100644 --- a/packages/plugin/tests/__snapshots__/examples.spec.md +++ b/packages/plugin/__tests__/__snapshots__/examples.spec.md @@ -91,6 +91,28 @@ exports[`Examples > should work in monorepo 1`] = ` ruleId: @graphql-eslint/require-description, severity: 2, }, + { + column: 3, + endColumn: 7, + endLine: 11, + line: 11, + message: Description is required for field "post" in type "Query", + messageId: require-description, + nodeType: null, + ruleId: @graphql-eslint/require-description, + severity: 2, + }, + { + column: 3, + endColumn: 8, + endLine: 12, + line: 12, + message: Description is required for field "posts" in type "Query", + messageId: require-description, + nodeType: null, + ruleId: @graphql-eslint/require-description, + severity: 2, + }, ], }, { @@ -139,6 +161,28 @@ exports[`Examples > should work in monorepo 1`] = ` ruleId: @graphql-eslint/require-description, severity: 2, }, + { + column: 3, + endColumn: 7, + endLine: 10, + line: 10, + message: Description is required for field "user" in type "Query", + messageId: require-description, + nodeType: null, + ruleId: @graphql-eslint/require-description, + severity: 2, + }, + { + column: 3, + endColumn: 8, + endLine: 11, + line: 11, + message: Description is required for field "users" in type "Query", + messageId: require-description, + nodeType: null, + ruleId: @graphql-eslint/require-description, + severity: 2, + }, ], }, ] @@ -293,10 +337,92 @@ exports[`Examples > should work in vue 1`] = ` ] `; -exports[`Examples > should work on \`.graphql\` files 1`] = ` +exports[`Examples > should work on \`.js\` files 1`] = ` [ { - filePath: examples/basic/fragment.graphql, + filePath: examples/code-file/not-query.js, + messages: [ + { + column: 1, + endColumn: 8, + endLine: 1, + line: 1, + message: 'console' is not defined., + messageId: undef, + nodeType: Identifier, + ruleId: no-undef, + severity: 2, + }, + { + column: 1, + endColumn: 12, + endLine: 1, + line: 1, + message: Unexpected console statement., + messageId: unexpected, + nodeType: MemberExpression, + ruleId: no-console, + severity: 2, + }, + ], + }, + { + filePath: examples/code-file/query.js, + messages: [ + { + column: 3, + endColumn: 8, + endLine: 4, + line: 4, + message: Anonymous GraphQL operations are forbidden. Make sure to name your query!, + messageId: no-anonymous-operations, + nodeType: null, + ruleId: @graphql-eslint/no-anonymous-operations, + severity: 2, + suggestions: [ + { + desc: Rename to \`user\`, + fix: { + range: [ + 77, + 77, + ], + text: user, + }, + }, + ], + }, + { + column: 9, + endColumn: 18, + endLine: 12, + line: 12, + message: Operation "UserQuery" should not have "Query" suffix, + nodeType: Name, + ruleId: @graphql-eslint/naming-convention, + severity: 2, + suggestions: [ + { + desc: Rename to \`User\`, + fix: { + range: [ + 165, + 174, + ], + text: User, + }, + }, + ], + }, + ], + }, +] +`; + +exports[`Examples > should work programmatically 1`] = ` +[ + { + filePath: examples/programmatic/fragment.graphql, messages: [ { column: 10, @@ -313,7 +439,7 @@ exports[`Examples > should work on \`.graphql\` files 1`] = ` ], }, { - filePath: examples/basic/fragment2.graphql, + filePath: examples/programmatic/fragment2.graphql, messages: [ { column: 10, @@ -330,7 +456,7 @@ exports[`Examples > should work on \`.graphql\` files 1`] = ` ], }, { - filePath: examples/basic/query.graphql, + filePath: examples/programmatic/query.graphql, messages: [ { column: 1, @@ -358,7 +484,7 @@ exports[`Examples > should work on \`.graphql\` files 1`] = ` ], }, { - filePath: examples/basic/schema.graphql, + filePath: examples/programmatic/schema.graphql, messages: [ { column: 3, @@ -398,88 +524,6 @@ exports[`Examples > should work on \`.graphql\` files 1`] = ` ] `; -exports[`Examples > should work on \`.js\` files 1`] = ` -[ - { - filePath: examples/code-file/not-query.js, - messages: [ - { - column: 1, - endColumn: 8, - endLine: 1, - line: 1, - message: 'console' is not defined., - messageId: undef, - nodeType: Identifier, - ruleId: no-undef, - severity: 2, - }, - { - column: 1, - endColumn: 12, - endLine: 1, - line: 1, - message: Unexpected console statement., - messageId: unexpected, - nodeType: MemberExpression, - ruleId: no-console, - severity: 2, - }, - ], - }, - { - filePath: examples/code-file/query.js, - messages: [ - { - column: 3, - endColumn: 8, - endLine: 4, - line: 4, - message: Anonymous GraphQL operations are forbidden. Make sure to name your query!, - messageId: no-anonymous-operations, - nodeType: null, - ruleId: @graphql-eslint/no-anonymous-operations, - severity: 2, - suggestions: [ - { - desc: Rename to \`user\`, - fix: { - range: [ - 77, - 77, - ], - text: user, - }, - }, - ], - }, - { - column: 9, - endColumn: 18, - endLine: 12, - line: 12, - message: Operation "UserQuery" should not have "Query" suffix, - nodeType: Name, - ruleId: @graphql-eslint/naming-convention, - severity: 2, - suggestions: [ - { - desc: Rename to \`User\`, - fix: { - range: [ - 165, - 174, - ], - text: User, - }, - }, - ], - }, - ], - }, -] -`; - exports[`Examples > should work with \`eslint-plugin-prettier\` 1`] = ` [ { @@ -970,69 +1014,3 @@ exports[`Examples > should work with \`graphql-config\` 1`] = ` }, ] `; - -exports[`Examples > should work with \`graphql-config\` on \`.js\` files 1`] = ` -[ - { - filePath: examples/graphql-config-code-file/query.js, - messages: [ - { - column: 7, - endColumn: 15, - endLine: 3, - line: 3, - message: 'GET_USER' is assigned a value but never used., - messageId: unusedVar, - nodeType: Identifier, - ruleId: no-unused-vars, - severity: 2, - }, - { - column: 3, - endColumn: 8, - endLine: 4, - line: 4, - message: Anonymous GraphQL operations are forbidden. Make sure to name your query!, - messageId: no-anonymous-operations, - nodeType: null, - ruleId: @graphql-eslint/no-anonymous-operations, - severity: 2, - suggestions: [ - { - desc: Rename to \`user\`, - fix: { - range: [ - 61, - 61, - ], - text: user, - }, - }, - ], - }, - { - column: 10, - line: 5, - message: Field \`user.id\` must be selected when it's available on a type. -Include it in your selection set., - messageId: require-id-when-available, - nodeType: null, - ruleId: @graphql-eslint/require-id-when-available, - severity: 2, - suggestions: [ - { - desc: Add \`id\` selection, - fix: { - range: [ - 81, - 81, - ], - text: id , - }, - }, - ], - }, - ], - }, -] -`; diff --git a/packages/plugin/tests/__snapshots__/executable-definitions.spec.md b/packages/plugin/__tests__/__snapshots__/executable-definitions.spec.md similarity index 78% rename from packages/plugin/tests/__snapshots__/executable-definitions.spec.md rename to packages/plugin/__tests__/__snapshots__/executable-definitions.spec.md index 12111cd18b1..8802e38bfc0 100644 --- a/packages/plugin/tests/__snapshots__/executable-definitions.spec.md +++ b/packages/plugin/__tests__/__snapshots__/executable-definitions.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`executable-definitions > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type Query { t: String } diff --git a/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md b/packages/plugin/__tests__/__snapshots__/fields-on-correct-type.spec.md similarity index 80% rename from packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md rename to packages/plugin/__tests__/__snapshots__/fields-on-correct-type.spec.md index f69d285c9e1..3fc5c0970eb 100644 --- a/packages/plugin/tests/__snapshots__/fields-on-correct-type.spec.md +++ b/packages/plugin/__tests__/__snapshots__/fields-on-correct-type.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should highlight selection on multi line 1`] = ` +exports[`fields-on-correct-type > invalid > should highlight selection on multi line 1`] = ` #### ⌨️ Code 1 | { @@ -19,7 +19,7 @@ exports[`should highlight selection on multi line 1`] = ` 5 | age `; -exports[`should highlight selection on single line 1`] = ` +exports[`fields-on-correct-type > invalid > should highlight selection on single line 1`] = ` #### ⌨️ Code 1 | fragment UserFields on User { id bad age } diff --git a/packages/plugin/tests/__snapshots__/input-name.spec.md b/packages/plugin/__tests__/__snapshots__/input-name.spec.md similarity index 81% rename from packages/plugin/tests/__snapshots__/input-name.spec.md rename to packages/plugin/__tests__/__snapshots__/input-name.spec.md index 35290a274a7..308a741fb41 100644 --- a/packages/plugin/tests/__snapshots__/input-name.spec.md +++ b/packages/plugin/__tests__/__snapshots__/input-name.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`input-name > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type Mutation { SetMessage(message: String): String } @@ -8,7 +8,10 @@ exports[`Invalid #1 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -30,7 +33,7 @@ exports[`Invalid #1 1`] = ` 1 | type Mutation { SetMessage(message: SetMessageInput): String } `; -exports[`Invalid #2 1`] = ` +exports[`input-name > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type Mutation { SetMessage(input: String): String } @@ -38,7 +41,10 @@ exports[`Invalid #2 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error @@ -51,7 +57,7 @@ exports[`Invalid #2 1`] = ` 1 | type Mutation { SetMessage(input: SetMessageInput): String } `; -exports[`Invalid #3 1`] = ` +exports[`input-name > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | type Mutation { SetMessage(hello: SetMessageInput): String } @@ -59,7 +65,10 @@ exports[`Invalid #3 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error @@ -72,7 +81,7 @@ exports[`Invalid #3 1`] = ` 1 | type Mutation { SetMessage(input: SetMessageInput): String } `; -exports[`Invalid #4 1`] = ` +exports[`input-name > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: CreateOneUserInput!): CreateOneUserPayload } @@ -80,7 +89,10 @@ exports[`Invalid #4 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -102,7 +114,7 @@ exports[`Invalid #4 1`] = ` 1 | type Mutation { userCreate(record: userCreateInput!): CreateOneUserPayload } `; -exports[`Invalid #5 1`] = ` +exports[`input-name > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: [CreateOneUserInput]!): CreateOneUserPayload } @@ -110,7 +122,10 @@ exports[`Invalid #5 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -132,7 +147,7 @@ exports[`Invalid #5 1`] = ` 1 | type Mutation { userCreate(record: [userCreateInput]!): CreateOneUserPayload } `; -exports[`Invalid #6 1`] = ` +exports[`input-name > invalid > Invalid #6 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: [CreateOneUserInput!]!): CreateOneUserPayload } @@ -140,7 +155,10 @@ exports[`Invalid #6 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -162,7 +180,7 @@ exports[`Invalid #6 1`] = ` 1 | type Mutation { userCreate(record: [userCreateInput!]!): CreateOneUserPayload } `; -exports[`Invalid #7 1`] = ` +exports[`input-name > invalid > Invalid #7 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: [CreateOneUserInput!]): CreateOneUserPayload } @@ -170,7 +188,10 @@ exports[`Invalid #7 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -192,7 +213,7 @@ exports[`Invalid #7 1`] = ` 1 | type Mutation { userCreate(record: [userCreateInput!]): CreateOneUserPayload } `; -exports[`Invalid #8 1`] = ` +exports[`input-name > invalid > Invalid #8 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: String, test: String): String } @@ -200,7 +221,10 @@ exports[`Invalid #8 1`] = ` #### ⚙️ Options { - "checkInputType": true + "checkInputType": true, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/4 @@ -240,7 +264,7 @@ exports[`Invalid #8 1`] = ` 1 | type Mutation { userCreate(record: String, test: userCreateInput): String } `; -exports[`Invalid #9 1`] = ` +exports[`input-name > invalid > Invalid #9 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(record: String, test: String): String } @@ -248,7 +272,10 @@ exports[`Invalid #9 1`] = ` #### ⚙️ Options { - "checkInputType": false + "checkInputType": false, + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error 1/2 @@ -270,7 +297,7 @@ exports[`Invalid #9 1`] = ` 1 | type Mutation { userCreate(record: String, input: String): String } `; -exports[`Invalid #10 1`] = ` +exports[`input-name > invalid > Invalid #10 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(input: String): String } @@ -279,7 +306,9 @@ exports[`Invalid #10 1`] = ` { "checkInputType": true, - "caseSensitiveInputType": false + "caseSensitiveInputType": false, + "checkQueries": false, + "checkMutations": true } #### ❌ Error @@ -292,7 +321,7 @@ exports[`Invalid #10 1`] = ` 1 | type Mutation { userCreate(input: userCreateInput): String } `; -exports[`Invalid #11 1`] = ` +exports[`input-name > invalid > Invalid #11 1`] = ` #### ⌨️ Code 1 | type Mutation { userCreate(input: UserCreateInput): String } @@ -301,7 +330,9 @@ exports[`Invalid #11 1`] = ` { "checkInputType": true, - "caseSensitiveInputType": true + "caseSensitiveInputType": true, + "checkQueries": false, + "checkMutations": true } #### ❌ Error @@ -314,7 +345,7 @@ exports[`Invalid #11 1`] = ` 1 | type Mutation { userCreate(input: userCreateInput): String } `; -exports[`Invalid #12 1`] = ` +exports[`input-name > invalid > Invalid #12 1`] = ` #### ⌨️ Code 1 | type Query { getUser(input: GetUserInput): String } @@ -324,7 +355,8 @@ exports[`Invalid #12 1`] = ` { "checkQueries": true, "checkInputType": true, - "caseSensitiveInputType": true + "caseSensitiveInputType": true, + "checkMutations": true } #### ❌ Error diff --git a/packages/plugin/tests/__snapshots__/known-directives.spec.md b/packages/plugin/__tests__/__snapshots__/known-directives.spec.md similarity index 78% rename from packages/plugin/tests/__snapshots__/known-directives.spec.md rename to packages/plugin/__tests__/__snapshots__/known-directives.spec.md index 897dc0e13ef..7e37884d714 100644 --- a/packages/plugin/tests/__snapshots__/known-directives.spec.md +++ b/packages/plugin/__tests__/__snapshots__/known-directives.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should work only with Kind.FIELD 1`] = ` +exports[`known-directives > invalid > should work only with Kind.FIELD 1`] = ` #### ⌨️ Code 1 | scalar Foo @bad diff --git a/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md b/packages/plugin/__tests__/__snapshots__/known-fragment-names.spec.md similarity index 76% rename from packages/plugin/tests/__snapshots__/known-fragment-names.spec.md rename to packages/plugin/__tests__/__snapshots__/known-fragment-names.spec.md index e0898008a60..b648293dd84 100644 --- a/packages/plugin/tests/__snapshots__/known-fragment-names.spec.md +++ b/packages/plugin/__tests__/__snapshots__/known-fragment-names.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should not throw an error on undefined fragment 1`] = ` +exports[`known-fragment-names > invalid > should not throw an error on undefined fragment 1`] = ` #### ⌨️ Code 1 | { diff --git a/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md b/packages/plugin/__tests__/__snapshots__/lone-executable-definition.spec.md similarity index 90% rename from packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md rename to packages/plugin/__tests__/__snapshots__/lone-executable-definition.spec.md index 1de57f9fcee..2c8d71a6f95 100644 --- a/packages/plugin/tests/__snapshots__/lone-executable-definition.spec.md +++ b/packages/plugin/__tests__/__snapshots__/lone-executable-definition.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should allow fragments if they are ignored 1`] = ` +exports[`lone-executable-definition > invalid > should allow fragments if they are ignored 1`] = ` #### ⌨️ Code 1 | query Foo { @@ -31,7 +31,7 @@ exports[`should allow fragments if they are ignored 1`] = ` 8 | createFoo { `; -exports[`should report additional definitions 1`] = ` +exports[`lone-executable-definition > invalid > should report additional definitions 1`] = ` #### ⌨️ Code 1 | query Valid { @@ -103,7 +103,7 @@ exports[`should report additional definitions 1`] = ` 24 | id `; -exports[`should report definitions after short-hand query 1`] = ` +exports[`lone-executable-definition > invalid > should report definitions after short-hand query 1`] = ` #### ⌨️ Code 1 | { diff --git a/packages/plugin/__tests__/__snapshots__/lone-schema-definition.spec.md b/packages/plugin/__tests__/__snapshots__/lone-schema-definition.spec.md new file mode 100644 index 00000000000..261ac984ca7 --- /dev/null +++ b/packages/plugin/__tests__/__snapshots__/lone-schema-definition.spec.md @@ -0,0 +1,28 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`lone-schema-definition > invalid > Invalid #1 1`] = ` +#### ⌨️ Code + + 1 | type Query { + 2 | foo: String + 3 | } + 4 | + 5 | schema { + 6 | query: Query + 7 | } + 8 | + 9 | type RootQuery { + 10 | foo: String + 11 | } + 12 | + 13 | schema { + 14 | query: RootQuery + 15 | } + +#### ❌ Error + + 12 | + > 13 | schema { + | ^^^^^^ Must provide only one schema definition. + 14 | query: RootQuery +`; diff --git a/packages/plugin/tests/__snapshots__/match-document-filename.spec.md b/packages/plugin/__tests__/__snapshots__/match-document-filename.spec.md similarity index 83% rename from packages/plugin/tests/__snapshots__/match-document-filename.spec.md rename to packages/plugin/__tests__/__snapshots__/match-document-filename.spec.md index e612dea0142..0c554ce1e46 100644 --- a/packages/plugin/tests/__snapshots__/match-document-filename.spec.md +++ b/packages/plugin/__tests__/__snapshots__/match-document-filename.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`match-document-filename > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | { me } @@ -17,7 +17,7 @@ exports[`Invalid #1 1`] = ` | ^ File extension ".graphql" don't match extension ".gql" `; -exports[`Invalid #2 1`] = ` +exports[`match-document-filename > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | query UserById { user { id } } @@ -36,7 +36,7 @@ exports[`Invalid #2 1`] = ` | ^ Unexpected filename "user-by-id.gql". Rename it to "UserById.gql" `; -exports[`Invalid #3 1`] = ` +exports[`match-document-filename > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | query UserById { user { id } } @@ -56,7 +56,7 @@ exports[`Invalid #3 1`] = ` | ^ Unexpected filename "userById.gql". Rename it to "UserById.query.gql" `; -exports[`Invalid #4 1`] = ` +exports[`match-document-filename > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | fragment UserFields on User { id } @@ -75,7 +75,7 @@ exports[`Invalid #4 1`] = ` | ^ Unexpected filename "user-fields.gql". Rename it to "UserFields.gql" `; -exports[`Invalid #7 1`] = ` +exports[`match-document-filename > invalid > Invalid #7 1`] = ` #### ⌨️ Code 1 | mutation addAlertChannel { @@ -97,7 +97,7 @@ exports[`Invalid #7 1`] = ` 2 | foo `; -exports[`compare only first operation name 1`] = ` +exports[`match-document-filename > invalid > compare only first operation name 1`] = ` #### ⌨️ Code 1 | query getUsers { users } mutation createPost { createPost } @@ -121,7 +121,7 @@ exports[`compare only first operation name 1`] = ` | ^ Unexpected filename "getUsersQuery.gql". Rename it to "GetUsers.query.gql" `; -exports[`compare only first operation name if fragment is present 1`] = ` +exports[`match-document-filename > invalid > compare only first operation name if fragment is present 1`] = ` #### ⌨️ Code 1 | fragment UserFields on User { diff --git a/packages/plugin/tests/__snapshots__/naming-convention.spec.md b/packages/plugin/__tests__/__snapshots__/naming-convention.spec.md similarity index 81% rename from packages/plugin/tests/__snapshots__/naming-convention.spec.md rename to packages/plugin/__tests__/__snapshots__/naming-convention.spec.md index 43a27f75d6f..ed4bd36eeed 100644 --- a/packages/plugin/tests/__snapshots__/naming-convention.spec.md +++ b/packages/plugin/__tests__/__snapshots__/naming-convention.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`naming-convention > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type b { test: String } @@ -9,7 +9,9 @@ exports[`Invalid #1 1`] = ` { "types": "PascalCase", - "FieldDefinition": "PascalCase" + "FieldDefinition": "PascalCase", + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/2 @@ -31,7 +33,7 @@ exports[`Invalid #1 1`] = ` 1 | type b { Test: String } `; -exports[`Invalid #2 1`] = ` +exports[`naming-convention > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type __b { test__: String } @@ -62,7 +64,7 @@ exports[`Invalid #2 1`] = ` 1 | type __b { test: String } `; -exports[`Invalid #3 1`] = ` +exports[`naming-convention > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | scalar BSONDecimal @@ -70,7 +72,9 @@ exports[`Invalid #3 1`] = ` #### ⚙️ Options { - "ScalarTypeDefinition": "snake_case" + "ScalarTypeDefinition": "snake_case", + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error @@ -83,7 +87,7 @@ exports[`Invalid #3 1`] = ` 1 | scalar bson_decimal `; -exports[`Invalid #5 1`] = ` +exports[`naming-convention > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | enum B { test } @@ -92,7 +96,9 @@ exports[`Invalid #5 1`] = ` { "EnumTypeDefinition": "camelCase", - "EnumValueDefinition": "UPPER_CASE" + "EnumValueDefinition": "UPPER_CASE", + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/2 @@ -114,7 +120,7 @@ exports[`Invalid #5 1`] = ` 1 | enum B { TEST } `; -exports[`Invalid #6 1`] = ` +exports[`naming-convention > invalid > Invalid #6 1`] = ` #### ⌨️ Code 1 | input test { _Value: String } @@ -123,7 +129,9 @@ exports[`Invalid #6 1`] = ` { "types": "PascalCase", - "InputValueDefinition": "snake_case" + "InputValueDefinition": "snake_case", + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/3 @@ -154,7 +162,7 @@ exports[`Invalid #6 1`] = ` 1 | input test { Value: String } `; -exports[`Invalid #7 1`] = ` +exports[`naming-convention > invalid > Invalid #7 1`] = ` #### ⌨️ Code 1 | type TypeOne { aField: String } enum Z { VALUE_ONE VALUE_TWO } @@ -172,7 +180,9 @@ exports[`Invalid #7 1`] = ` "EnumValueDefinition": { "style": "camelCase", "suffix": "ENUM" - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/4 @@ -212,7 +222,7 @@ exports[`Invalid #7 1`] = ` 1 | type TypeOne { aField: String } enum Z { VALUE_ONE VALUE_TWOENUM } `; -exports[`Invalid #8 1`] = ` +exports[`naming-convention > invalid > Invalid #8 1`] = ` #### ⌨️ Code 1 | type One { aField: String } enum Z { A_ENUM_VALUE_ONE VALUE_TWO } @@ -230,7 +240,9 @@ exports[`Invalid #8 1`] = ` "EnumValueDefinition": { "style": "UPPER_CASE", "prefix": "ENUM" - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/3 @@ -261,7 +273,7 @@ exports[`Invalid #8 1`] = ` 1 | type One { aField: String } enum Z { A_ENUM_VALUE_ONE ENUMVALUE_TWO } `; -exports[`Invalid #9 1`] = ` +exports[`naming-convention > invalid > Invalid #9 1`] = ` #### ⌨️ Code 1 | type One { getFoo: String, queryBar: String } type Query { getA(id: ID!): String, queryB: String } extend type Query { getC: String } @@ -291,7 +303,9 @@ exports[`Invalid #9 1`] = ` "get", "query" ] - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/5 @@ -340,7 +354,7 @@ exports[`Invalid #9 1`] = ` 1 | type One { getFoo: String, queryBar: String } type Query { getA(id: ID!): String, queryB: String } extend type Query { C: String } `; -exports[`Invalid #10 1`] = ` +exports[`naming-convention > invalid > Invalid #10 1`] = ` #### ⌨️ Code 1 | query Foo { foo } query getBar { bar } @@ -353,7 +367,9 @@ exports[`Invalid #10 1`] = ` "forbiddenPrefixes": [ "get" ] - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/2 @@ -375,7 +391,7 @@ exports[`Invalid #10 1`] = ` 1 | query Foo { foo } query Bar { bar } `; -exports[`large graphql file 1`] = ` +exports[`naming-convention > invalid > large graphql file 1`] = ` #### ⌨️ Code 1 | input _idOperatorsFilterFindManyUserInput { @@ -1495,7 +1511,8 @@ exports[`large graphql file 1`] = ` "types": "PascalCase", "InputValueDefinition": "camelCase", "EnumValueDefinition": "UPPER_CASE", - "FragmentDefinition": "PascalCase" + "FragmentDefinition": "PascalCase", + "allowTrailingUnderscore": false } #### ❌ Error 1/27 @@ -1687,7 +1704,7 @@ exports[`large graphql file 1`] = ` 390 | } `; -exports[`operations-recommended config 1`] = ` +exports[`naming-convention > invalid > operations-recommended config 1`] = ` #### ⌨️ Code 1 | query TestQuery { test } @@ -1730,7 +1747,9 @@ exports[`operations-recommended config 1`] = ` "forbiddenSuffixes": [ "Fragment" ] - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/9 @@ -1939,7 +1958,7 @@ exports[`operations-recommended config 1`] = ` 13 | fragment Test on Test { id } `; -exports[`schema-recommended config 1`] = ` +exports[`naming-convention > invalid > schema-recommended config 1`] = ` #### ⌨️ Code 1 | type Query { @@ -1957,6 +1976,24 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } #### ⚙️ Options @@ -1991,10 +2028,44 @@ exports[`schema-recommended config 1`] = ` "forbiddenSuffixes": [ "Subscription" ] - } + }, + "EnumTypeDefinition,EnumTypeExtension": { + "forbiddenPrefixes": [ + "Enum" + ], + "forbiddenSuffixes": [ + "Enum" + ] + }, + "InterfaceTypeDefinition,InterfaceTypeExtension": { + "forbiddenPrefixes": [ + "Interface" + ], + "forbiddenSuffixes": [ + "Interface" + ] + }, + "UnionTypeDefinition,UnionTypeExtension": { + "forbiddenPrefixes": [ + "Union" + ], + "forbiddenSuffixes": [ + "Union" + ] + }, + "ObjectTypeDefinition,ObjectTypeExtension": { + "forbiddenPrefixes": [ + "Type" + ], + "forbiddenSuffixes": [ + "Type" + ] + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } -#### ❌ Error 1/7 +#### ❌ Error 1/15 1 | type Query { > 2 | fieldQuery: ID @@ -2018,8 +2089,26 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 2/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 2/15 2 | fieldQuery: ID > 3 | queryField: ID @@ -2043,8 +2132,26 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 3/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 3/15 3 | queryField: ID > 4 | getField: ID @@ -2068,8 +2175,26 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 4/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 4/15 7 | type Mutation { > 8 | fieldMutation: ID @@ -2093,8 +2218,26 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 5/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 5/15 8 | fieldMutation: ID > 9 | mutationField: ID @@ -2118,8 +2261,26 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 6/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 6/15 12 | type Subscription { > 13 | fieldSubscription: ID @@ -2143,8 +2304,26 @@ exports[`schema-recommended config 1`] = ` 13 | field: ID 14 | subscriptionField: ID 15 | } - -#### ❌ Error 7/7 + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 7/15 13 | fieldSubscription: ID > 14 | subscriptionField: ID @@ -2168,9 +2347,371 @@ exports[`schema-recommended config 1`] = ` 13 | fieldSubscription: ID 14 | Field: ID 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 8/15 + + 16 | + > 17 | enum TestEnum + | ^^^^^^^^ Enumerator "TestEnum" should not have "Enum" suffix + 18 | extend enum EnumTest { + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum Test + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 9/15 + + 17 | enum TestEnum + > 18 | extend enum EnumTest { + | ^^^^^^^^ EnumTypeExtension "EnumTest" should not have "Enum" prefix + 19 | A + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum Test { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 10/15 + + 21 | + > 22 | interface TestInterface + | ^^^^^^^^^^^^^ Interface "TestInterface" should not have "Interface" suffix + 23 | extend interface InterfaceTest { + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface Test + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 11/15 + + 22 | interface TestInterface + > 23 | extend interface InterfaceTest { + | ^^^^^^^^^^^^^ InterfaceTypeExtension "InterfaceTest" should not have "Interface" prefix + 24 | id: ID + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface Test { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 12/15 + + 26 | + > 27 | union TestUnion + | ^^^^^^^^^ Union "TestUnion" should not have "Union" suffix + 28 | extend union UnionTest = TestInterface + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union Test + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 13/15 + + 27 | union TestUnion + > 28 | extend union UnionTest = TestInterface + | ^^^^^^^^^ UnionTypeExtension "UnionTest" should not have "Union" prefix + 29 | + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union Test = TestInterface + 29 | + 30 | type TestType + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 14/15 + + 29 | + > 30 | type TestType + | ^^^^^^^^ Type "TestType" should not have "Type" suffix + 31 | extend type TypeTest { + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type Test + 31 | extend type TypeTest { + 32 | id: ID + 33 | } + +#### ❌ Error 15/15 + + 30 | type TestType + > 31 | extend type TypeTest { + | ^^^^^^^^ ObjectTypeExtension "TypeTest" should not have "Type" prefix + 32 | id: ID + +#### 💡 Suggestion: Rename to \`Test\` + + 1 | type Query { + 2 | fieldQuery: ID + 3 | queryField: ID + 4 | getField: ID + 5 | } + 6 | + 7 | type Mutation { + 8 | fieldMutation: ID + 9 | mutationField: ID + 10 | } + 11 | + 12 | type Subscription { + 13 | fieldSubscription: ID + 14 | subscriptionField: ID + 15 | } + 16 | + 17 | enum TestEnum + 18 | extend enum EnumTest { + 19 | A + 20 | } + 21 | + 22 | interface TestInterface + 23 | extend interface InterfaceTest { + 24 | id: ID + 25 | } + 26 | + 27 | union TestUnion + 28 | extend union UnionTest = TestInterface + 29 | + 30 | type TestType + 31 | extend type Test { + 32 | id: ID + 33 | } `; -exports[`should error when selected type names do not match require prefixes 1`] = ` +exports[`naming-convention > invalid > should error when selected type names do not match require prefixes 1`] = ` #### ⌨️ Code 1 | scalar Secret @@ -2205,7 +2746,9 @@ exports[`should error when selected type names do not match require prefixes 1`] "requiredPrefixes": [ "hiss" ] - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/3 @@ -2286,7 +2829,7 @@ exports[`should error when selected type names do not match require prefixes 1`] 11 | } `; -exports[`should error when selected type names do not match require suffixes 1`] = ` +exports[`naming-convention > invalid > should error when selected type names do not match require suffixes 1`] = ` #### ⌨️ Code 1 | scalar IpAddress @@ -2310,7 +2853,9 @@ exports[`should error when selected type names do not match require suffixes 1`] "requiredSuffixes": [ "IpAddress" ] - } + }, + "allowLeadingUnderscore": false, + "allowTrailingUnderscore": false } #### ❌ Error 1/2 @@ -2355,7 +2900,7 @@ exports[`should error when selected type names do not match require suffixes 1`] 6 | } `; -exports[`should ignore selections fields but check alias renaming 1`] = ` +exports[`naming-convention > invalid > should ignore selections fields but check alias renaming 1`] = ` #### ⌨️ Code 1 | { diff --git a/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md b/packages/plugin/__tests__/__snapshots__/no-anonymous-operations.spec.md similarity index 83% rename from packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md rename to packages/plugin/__tests__/__snapshots__/no-anonymous-operations.spec.md index aec338a2840..37215e81880 100644 --- a/packages/plugin/tests/__snapshots__/no-anonymous-operations.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-anonymous-operations.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-anonymous-operations > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | query { a } @@ -15,7 +15,7 @@ exports[`Invalid #1 1`] = ` 1 | query a { a } `; -exports[`Invalid #2 1`] = ` +exports[`no-anonymous-operations > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | mutation { renamed: a } @@ -30,7 +30,7 @@ exports[`Invalid #2 1`] = ` 1 | mutation renamed { renamed: a } `; -exports[`Invalid #3 1`] = ` +exports[`no-anonymous-operations > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | subscription { ...someFragmentSpread } diff --git a/packages/plugin/tests/__snapshots__/no-deprecated.spec.md b/packages/plugin/__tests__/__snapshots__/no-deprecated.spec.md similarity index 86% rename from packages/plugin/tests/__snapshots__/no-deprecated.spec.md rename to packages/plugin/__tests__/__snapshots__/no-deprecated.spec.md index 7d0bacc44bb..41564657f1a 100644 --- a/packages/plugin/tests/__snapshots__/no-deprecated.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-deprecated.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-deprecated > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | mutation { something(t: OLD) } @@ -15,7 +15,7 @@ exports[`Invalid #1 1`] = ` 1 | mutation { something(t: ) } `; -exports[`Invalid #2 1`] = ` +exports[`no-deprecated > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | mutation { something(t: OLD_WITH_REASON) } @@ -30,7 +30,7 @@ exports[`Invalid #2 1`] = ` 1 | mutation { something(t: ) } `; -exports[`Invalid #3 1`] = ` +exports[`no-deprecated > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | query { oldField } @@ -45,7 +45,7 @@ exports[`Invalid #3 1`] = ` 1 | query { } `; -exports[`Invalid #4 1`] = ` +exports[`no-deprecated > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | query { oldFieldWithReason } diff --git a/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md b/packages/plugin/__tests__/__snapshots__/no-duplicate-fields.spec.md similarity index 91% rename from packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md rename to packages/plugin/__tests__/__snapshots__/no-duplicate-fields.spec.md index 5f6300a0b32..a914063f4a8 100644 --- a/packages/plugin/tests/__snapshots__/no-duplicate-fields.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-duplicate-fields.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-duplicate-fields > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | query test($v: String, $t: String, $v: String) { @@ -20,7 +20,7 @@ exports[`Invalid #1 1`] = ` 3 | } `; -exports[`Invalid #2 1`] = ` +exports[`no-duplicate-fields > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | query test { @@ -45,7 +45,7 @@ exports[`Invalid #2 1`] = ` 5 | } `; -exports[`Invalid #3 1`] = ` +exports[`no-duplicate-fields > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | query test { @@ -76,7 +76,7 @@ exports[`Invalid #3 1`] = ` 8 | } `; -exports[`Invalid #4 1`] = ` +exports[`no-duplicate-fields > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | query test { diff --git a/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md b/packages/plugin/__tests__/__snapshots__/no-hashtag-description.spec.md similarity index 93% rename from packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md rename to packages/plugin/__tests__/__snapshots__/no-hashtag-description.spec.md index d4fb34a2274..20049bbf613 100644 --- a/packages/plugin/tests/__snapshots__/no-hashtag-description.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-hashtag-description.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-hashtag-description > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | # Bad @@ -30,7 +30,7 @@ exports[`Invalid #1 1`] = ` 4 | } `; -exports[`Invalid #2 1`] = ` +exports[`no-hashtag-description > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | # multiline @@ -64,7 +64,7 @@ exports[`Invalid #2 1`] = ` 5 | } `; -exports[`Invalid #3 1`] = ` +exports[`no-hashtag-description > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | type Query { @@ -95,7 +95,7 @@ exports[`Invalid #3 1`] = ` 4 | } `; -exports[`Invalid #4 1`] = ` +exports[`no-hashtag-description > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | type Query { @@ -132,7 +132,7 @@ exports[`Invalid #4 1`] = ` 6 | } `; -exports[`Invalid #5 1`] = ` +exports[`no-hashtag-description > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type Query { diff --git a/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md b/packages/plugin/__tests__/__snapshots__/no-one-place-fragments.spec.md similarity index 69% rename from packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md rename to packages/plugin/__tests__/__snapshots__/no-one-place-fragments.spec.md index e8c32fabfb0..453f3fe3151 100644 --- a/packages/plugin/tests/__snapshots__/no-one-place-fragments.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-one-place-fragments.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should error fragment used in one place 1`] = ` +exports[`no-one-place-fragments > invalid > should error fragment used in one place 1`] = ` #### ⌨️ Code 1 | fragment UserFields on User { @@ -11,6 +11,6 @@ exports[`should error fragment used in one place 1`] = ` #### ❌ Error > 1 | fragment UserFields on User { - | ^^^^^^^^^^ Fragment \`UserFields\` used only once. Inline him in "-877628611.graphql". + | ^^^^^^^^^^ Fragment \`UserFields\` used only once. Inline him in "146179389.graphql". 2 | id `; diff --git a/packages/plugin/tests/__snapshots__/no-root-type.spec.md b/packages/plugin/__tests__/__snapshots__/no-root-type.spec.md similarity index 82% rename from packages/plugin/tests/__snapshots__/no-root-type.spec.md rename to packages/plugin/__tests__/__snapshots__/no-root-type.spec.md index bdb0ce7b29e..3ad37ae5834 100644 --- a/packages/plugin/tests/__snapshots__/no-root-type.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-root-type.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`disallow mutation 1`] = ` +exports[`no-root-type > invalid > disallow mutation 1`] = ` #### ⌨️ Code 1 | type Mutation @@ -23,7 +23,7 @@ exports[`disallow mutation 1`] = ` 1 | `; -exports[`disallow subscription 1`] = ` +exports[`no-root-type > invalid > disallow subscription 1`] = ` #### ⌨️ Code 1 | type Subscription @@ -46,7 +46,7 @@ exports[`disallow subscription 1`] = ` 1 | `; -exports[`disallow when root type name is renamed 1`] = ` +exports[`no-root-type > invalid > disallow when root type name is renamed 1`] = ` #### ⌨️ Code 1 | type MyMutation @@ -69,7 +69,7 @@ exports[`disallow when root type name is renamed 1`] = ` 1 | `; -exports[`disallow with extend 1`] = ` +exports[`no-root-type > invalid > disallow with extend 1`] = ` #### ⌨️ Code 1 | extend type Mutation { foo: ID } diff --git a/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md b/packages/plugin/__tests__/__snapshots__/no-scalar-result-type-on-mutation.spec.md similarity index 90% rename from packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md rename to packages/plugin/__tests__/__snapshots__/no-scalar-result-type-on-mutation.spec.md index 32c7667a1a5..b86f5c84e61 100644 --- a/packages/plugin/tests/__snapshots__/no-scalar-result-type-on-mutation.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-scalar-result-type-on-mutation.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #2 1`] = ` +exports[`no-scalar-result-type-on-mutation > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type Mutation @@ -25,7 +25,7 @@ exports[`Invalid #2 1`] = ` 5 | } `; -exports[`Invalid #3 1`] = ` +exports[`no-scalar-result-type-on-mutation > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | type RootMutation { @@ -54,7 +54,7 @@ exports[`Invalid #3 1`] = ` 7 | } `; -exports[`Invalid #4 1`] = ` +exports[`no-scalar-result-type-on-mutation > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | type RootMutation @@ -85,7 +85,7 @@ exports[`Invalid #4 1`] = ` 8 | } `; -exports[`Invalid #5 1`] = ` +exports[`no-scalar-result-type-on-mutation > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type Mutation { @@ -125,7 +125,7 @@ exports[`Invalid #5 1`] = ` 5 | } `; -exports[`should ignore arguments 1`] = ` +exports[`no-scalar-result-type-on-mutation > invalid > should ignore arguments 1`] = ` #### ⌨️ Code 1 | type Mutation { diff --git a/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md b/packages/plugin/__tests__/__snapshots__/no-typename-prefix.spec.md similarity index 90% rename from packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md rename to packages/plugin/__tests__/__snapshots__/no-typename-prefix.spec.md index 42a69885ad6..e7f250ded0d 100644 --- a/packages/plugin/tests/__snapshots__/no-typename-prefix.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-typename-prefix.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-typename-prefix > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type User { @@ -21,7 +21,7 @@ exports[`Invalid #1 1`] = ` 3 | } `; -exports[`Invalid #2 1`] = ` +exports[`no-typename-prefix > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type User { @@ -58,7 +58,7 @@ exports[`Invalid #2 1`] = ` 4 | } `; -exports[`Invalid #3 1`] = ` +exports[`no-typename-prefix > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | interface Node { diff --git a/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md b/packages/plugin/__tests__/__snapshots__/no-undefined-variables.spec.md similarity index 89% rename from packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md rename to packages/plugin/__tests__/__snapshots__/no-undefined-variables.spec.md index f9d072f5080..7469b7f4ed6 100644 --- a/packages/plugin/tests/__snapshots__/no-undefined-variables.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-undefined-variables.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-undefined-variables > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | query User { diff --git a/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md b/packages/plugin/__tests__/__snapshots__/no-unreachable-types.spec.md similarity index 98% rename from packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md rename to packages/plugin/__tests__/__snapshots__/no-unreachable-types.spec.md index e530be8116c..07b0ff5fd08 100644 --- a/packages/plugin/tests/__snapshots__/no-unreachable-types.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-unreachable-types.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-unreachable-types > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type Query { @@ -114,7 +114,7 @@ exports[`Invalid #1 1`] = ` 18 | `; -exports[`Invalid #2 1`] = ` +exports[`no-unreachable-types > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | # ScalarTypeDefinition @@ -412,7 +412,7 @@ exports[`Invalid #2 1`] = ` 27 | `; -exports[`Invalid #3 1`] = ` +exports[`no-unreachable-types > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | interface User { @@ -462,7 +462,7 @@ exports[`Invalid #3 1`] = ` 18 | `; -exports[`Invalid #4 1`] = ` +exports[`no-unreachable-types > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | interface User { @@ -570,7 +570,7 @@ exports[`Invalid #4 1`] = ` 18 | } `; -exports[`Invalid #5 1`] = ` +exports[`no-unreachable-types > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type Query { diff --git a/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md b/packages/plugin/__tests__/__snapshots__/no-unused-fields.spec.md similarity index 90% rename from packages/plugin/tests/__snapshots__/no-unused-fields.spec.md rename to packages/plugin/__tests__/__snapshots__/no-unused-fields.spec.md index 3b6bb6d7bb9..098b38eb2c5 100644 --- a/packages/plugin/tests/__snapshots__/no-unused-fields.spec.md +++ b/packages/plugin/__tests__/__snapshots__/no-unused-fields.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`no-unused-fields > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type User { @@ -23,7 +23,7 @@ exports[`Invalid #1 1`] = ` 4 | } `; -exports[`Invalid #2 1`] = ` +exports[`no-unused-fields > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type Query { diff --git a/packages/plugin/tests/__snapshots__/parser.spec.md b/packages/plugin/__tests__/__snapshots__/parser.spec.md similarity index 100% rename from packages/plugin/tests/__snapshots__/parser.spec.md rename to packages/plugin/__tests__/__snapshots__/parser.spec.md diff --git a/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md b/packages/plugin/__tests__/__snapshots__/possible-type-extension.spec.md similarity index 85% rename from packages/plugin/tests/__snapshots__/possible-type-extension.spec.md rename to packages/plugin/__tests__/__snapshots__/possible-type-extension.spec.md index 0e8536a5594..377aaedd976 100644 --- a/packages/plugin/tests/__snapshots__/possible-type-extension.spec.md +++ b/packages/plugin/__tests__/__snapshots__/possible-type-extension.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`possible-type-extension > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | extend type OtherUser { diff --git a/packages/plugin/tests/__snapshots__/relay-arguments.spec.md b/packages/plugin/__tests__/__snapshots__/relay-arguments.spec.md similarity index 92% rename from packages/plugin/tests/__snapshots__/relay-arguments.spec.md rename to packages/plugin/__tests__/__snapshots__/relay-arguments.spec.md index c122b0c2def..98f6f625c11 100644 --- a/packages/plugin/tests/__snapshots__/relay-arguments.spec.md +++ b/packages/plugin/__tests__/__snapshots__/relay-arguments.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`relay-arguments > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type User { @@ -49,7 +49,7 @@ exports[`Invalid #1 1`] = ` 8 | ): PostConnection `; -exports[`Invalid #2 1`] = ` +exports[`relay-arguments > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type User { @@ -71,7 +71,7 @@ exports[`Invalid #2 1`] = ` 3 | } `; -exports[`should report about 2nd required argument if 1st was provided 1`] = ` +exports[`relay-arguments > invalid > should report about 2nd required argument if 1st was provided 1`] = ` #### ⌨️ Code 1 | type User { diff --git a/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md b/packages/plugin/__tests__/__snapshots__/relay-connection-types.spec.md similarity index 90% rename from packages/plugin/tests/__snapshots__/relay-connection-types.spec.md rename to packages/plugin/__tests__/__snapshots__/relay-connection-types.spec.md index e85124b3c1b..5b960cd2f97 100644 --- a/packages/plugin/tests/__snapshots__/relay-connection-types.spec.md +++ b/packages/plugin/__tests__/__snapshots__/relay-connection-types.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`\`edges\` field should return a list type that wraps an edge type 1`] = ` +exports[`relay-connection-types > invalid > \`edges\` field should return a list type that wraps an edge type 1`] = ` #### ⌨️ Code 1 | type AConnection { @@ -27,7 +27,7 @@ exports[`\`edges\` field should return a list type that wraps an edge type 1`] = 7 | pageInfo: PageInfo! `; -exports[`\`pageInfo\` field must return a non-null \`PageInfo\` object 1`] = ` +exports[`relay-connection-types > invalid > \`pageInfo\` field must return a non-null \`PageInfo\` object 1`] = ` #### ⌨️ Code 1 | type AConnection { @@ -87,7 +87,7 @@ exports[`\`pageInfo\` field must return a non-null \`PageInfo\` object 1`] = ` 20 | } `; -exports[`should report about missing \`Connection\` suffix 1`] = ` +exports[`relay-connection-types > invalid > should report about missing \`Connection\` suffix 1`] = ` #### ⌨️ Code 1 | type User { @@ -102,7 +102,7 @@ exports[`should report about missing \`Connection\` suffix 1`] = ` 2 | edges: UserEdge `; -exports[`should report about missing \`edges\` field 1`] = ` +exports[`relay-connection-types > invalid > should report about missing \`edges\` field 1`] = ` #### ⌨️ Code 1 | type UserConnection { pageInfo: PageInfo! } @@ -113,7 +113,7 @@ exports[`should report about missing \`edges\` field 1`] = ` | ^^^^^^^^^^^^^^ Connection type must contain a field \`edges\` that return a list type. `; -exports[`should report about missing \`pageInfo\` field 1`] = ` +exports[`relay-connection-types > invalid > should report about missing \`pageInfo\` field 1`] = ` #### ⌨️ Code 1 | type UserConnection { edges: [UserEdge] } @@ -124,7 +124,7 @@ exports[`should report about missing \`pageInfo\` field 1`] = ` | ^^^^^^^^^^^^^^ Connection type must contain a field \`pageInfo\` that return a non-null \`PageInfo\` Object type. `; -exports[`should report about non connection types with \`Connection\` suffix 1`] = ` +exports[`relay-connection-types > invalid > should report about non connection types with \`Connection\` suffix 1`] = ` #### ⌨️ Code 1 | scalar DateTimeConnection diff --git a/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md b/packages/plugin/__tests__/__snapshots__/relay-edge-types.spec.md similarity index 87% rename from packages/plugin/tests/__snapshots__/relay-edge-types.spec.md rename to packages/plugin/__tests__/__snapshots__/relay-edge-types.spec.md index ba9a0f29522..3b2b5658f4c 100644 --- a/packages/plugin/tests/__snapshots__/relay-edge-types.spec.md +++ b/packages/plugin/__tests__/__snapshots__/relay-edge-types.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Edge type must be Object type 1`] = ` +exports[`relay-edge-types > invalid > Edge type must be Object type 1`] = ` #### ⌨️ Code 1 | type PageInfo @@ -31,7 +31,8 @@ exports[`Edge type must be Object type 1`] = ` { "shouldImplementNode": false, - "listTypeCanWrapOnlyEdgeType": false + "listTypeCanWrapOnlyEdgeType": false, + "withEdgeSuffix": true } #### ❌ Error 1/4 @@ -63,7 +64,7 @@ exports[`Edge type must be Object type 1`] = ` 22 | pageInfo: PageInfo! `; -exports[`list type 1`] = ` +exports[`relay-edge-types > invalid > list type 1`] = ` #### ⌨️ Code 1 | type AEdge { @@ -83,7 +84,9 @@ exports[`list type 1`] = ` #### ⚙️ Options { - "listTypeCanWrapOnlyEdgeType": true + "listTypeCanWrapOnlyEdgeType": true, + "withEdgeSuffix": true, + "shouldImplementNode": true } #### ❌ Error 1/4 @@ -115,7 +118,7 @@ exports[`list type 1`] = ` 13 | } `; -exports[`should implements Node 1`] = ` +exports[`relay-edge-types > invalid > should implements Node 1`] = ` #### ⌨️ Code 1 | type User { @@ -132,7 +135,9 @@ exports[`should implements Node 1`] = ` #### ⚙️ Options { - "shouldImplementNode": true + "shouldImplementNode": true, + "withEdgeSuffix": true, + "listTypeCanWrapOnlyEdgeType": true } #### ❌ Error @@ -143,7 +148,7 @@ exports[`should implements Node 1`] = ` 5 | node: User! `; -exports[`should report cursor when list is used 1`] = ` +exports[`relay-edge-types > invalid > should report cursor when list is used 1`] = ` #### ⌨️ Code 1 | type PageInfo @@ -160,7 +165,8 @@ exports[`should report cursor when list is used 1`] = ` { "shouldImplementNode": false, - "listTypeCanWrapOnlyEdgeType": false + "listTypeCanWrapOnlyEdgeType": false, + "withEdgeSuffix": true } #### ❌ Error 1/2 @@ -178,7 +184,7 @@ exports[`should report cursor when list is used 1`] = ` 5 | } `; -exports[`should report when fields is missing 1`] = ` +exports[`relay-edge-types > invalid > should report when fields is missing 1`] = ` #### ⌨️ Code 1 | type PageInfo @@ -203,7 +209,7 @@ exports[`should report when fields is missing 1`] = ` 3 | type AConnection { `; -exports[`should report when without Edge suffix 1`] = ` +exports[`relay-edge-types > invalid > should report when without Edge suffix 1`] = ` #### ⌨️ Code 1 | scalar Email @@ -218,7 +224,9 @@ exports[`should report when without Edge suffix 1`] = ` #### ⚙️ Options { - "withEdgeSuffix": true + "withEdgeSuffix": true, + "shouldImplementNode": true, + "listTypeCanWrapOnlyEdgeType": true } #### ❌ Error diff --git a/packages/plugin/tests/__snapshots__/relay-page-info.spec.md b/packages/plugin/__tests__/__snapshots__/relay-page-info.spec.md similarity index 91% rename from packages/plugin/tests/__snapshots__/relay-page-info.spec.md rename to packages/plugin/__tests__/__snapshots__/relay-page-info.spec.md index 99649777bd5..bb3d80c2320 100644 --- a/packages/plugin/tests/__snapshots__/relay-page-info.spec.md +++ b/packages/plugin/__tests__/__snapshots__/relay-page-info.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`relay-page-info > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | scalar PageInfo @@ -11,7 +11,7 @@ exports[`Invalid #1 1`] = ` | ^^^^^^^^ \`PageInfo\` must be an Object type. `; -exports[`when \`PageInfo\` is missing 1`] = ` +exports[`relay-page-info > invalid > when \`PageInfo\` is missing 1`] = ` #### ⌨️ Code 1 | type Query @@ -22,7 +22,7 @@ exports[`when \`PageInfo\` is missing 1`] = ` | ^ The server must provide a \`PageInfo\` object. `; -exports[`when enum 1`] = ` +exports[`relay-page-info > invalid > when enum 1`] = ` #### ⌨️ Code 1 | enum PageInfo @@ -47,7 +47,7 @@ exports[`when enum 1`] = ` 3 | hasPreviousPage `; -exports[`when extend type 1`] = ` +exports[`relay-page-info > invalid > when extend type 1`] = ` #### ⌨️ Code 1 | type PageInfo @@ -83,7 +83,7 @@ exports[`when extend type 1`] = ` 2 | extend type PageInfo { `; -exports[`when fields is missing or incorrect return type 1`] = ` +exports[`relay-page-info > invalid > when fields is missing or incorrect return type 1`] = ` #### ⌨️ Code 1 | type PageInfo { @@ -118,7 +118,7 @@ exports[`when fields is missing or incorrect return type 1`] = ` 4 | } `; -exports[`when input 1`] = ` +exports[`relay-page-info > invalid > when input 1`] = ` #### ⌨️ Code 1 | input PageInfo @@ -143,7 +143,7 @@ exports[`when input 1`] = ` 3 | hasPreviousPage: Boolean! `; -exports[`when interface 1`] = ` +exports[`relay-page-info > invalid > when interface 1`] = ` #### ⌨️ Code 1 | interface PageInfo @@ -168,7 +168,7 @@ exports[`when interface 1`] = ` 3 | hasPreviousPage: Boolean! `; -exports[`when union 1`] = ` +exports[`relay-page-info > invalid > when union 1`] = ` #### ⌨️ Code 1 | union PageInfo = UserConnection | Post diff --git a/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md b/packages/plugin/__tests__/__snapshots__/require-deprecation-date.spec.md similarity index 81% rename from packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md rename to packages/plugin/__tests__/__snapshots__/require-deprecation-date.spec.md index b7923f54861..4743ba4ecda 100644 --- a/packages/plugin/tests/__snapshots__/require-deprecation-date.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-deprecation-date.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`require-deprecation-date > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | scalar Old @deprecated(deletionDate: "22/08/2021") @@ -15,7 +15,7 @@ exports[`Invalid #1 1`] = ` 1 | `; -exports[`Invalid #2 1`] = ` +exports[`require-deprecation-date > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | scalar Old @deprecated(untilDate: "22/08/2021") @@ -36,7 +36,7 @@ exports[`Invalid #2 1`] = ` 1 | `; -exports[`Invalid #3 1`] = ` +exports[`require-deprecation-date > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | scalar Old @deprecated(deletionDate: "bad") @@ -47,7 +47,7 @@ exports[`Invalid #3 1`] = ` | ^^^^^ Deletion date must be in format "DD/MM/YYYY" for scalar "Old" `; -exports[`Invalid #4 1`] = ` +exports[`require-deprecation-date > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | scalar Old @deprecated(deletionDate: "32/08/2021") @@ -58,7 +58,7 @@ exports[`Invalid #4 1`] = ` | ^^^^^^^^^^^^ Invalid "32/08/2021" deletion date for scalar "Old" `; -exports[`Invalid #5 1`] = ` +exports[`require-deprecation-date > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type Old { oldField: ID @deprecated } diff --git a/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md b/packages/plugin/__tests__/__snapshots__/require-deprecation-reason.spec.md similarity index 97% rename from packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md rename to packages/plugin/__tests__/__snapshots__/require-deprecation-reason.spec.md index 6eaf90e70ff..92de704ea9b 100644 --- a/packages/plugin/tests/__snapshots__/require-deprecation-reason.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-deprecation-reason.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`require-deprecation-reason > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type A { diff --git a/packages/plugin/tests/__snapshots__/require-description.spec.md b/packages/plugin/__tests__/__snapshots__/require-description.spec.md similarity index 82% rename from packages/plugin/tests/__snapshots__/require-description.spec.md rename to packages/plugin/__tests__/__snapshots__/require-description.spec.md index c55d6c1df5f..817e48a1637 100644 --- a/packages/plugin/tests/__snapshots__/require-description.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-description.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`require-description > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type User { id: ID } @@ -17,7 +17,7 @@ exports[`Invalid #1 1`] = ` | ^^^^ Description is required for type "User" `; -exports[`Invalid #2 1`] = ` +exports[`require-description > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | interface Node { id: ID! } @@ -34,7 +34,7 @@ exports[`Invalid #2 1`] = ` | ^^^^ Description is required for interface "Node" `; -exports[`Invalid #3 1`] = ` +exports[`require-description > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | enum Role { ADMIN } @@ -51,7 +51,7 @@ exports[`Invalid #3 1`] = ` | ^^^^ Description is required for enum "Role" `; -exports[`Invalid #4 1`] = ` +exports[`require-description > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | scalar Email @@ -68,7 +68,7 @@ exports[`Invalid #4 1`] = ` | ^^^^^ Description is required for scalar "Email" `; -exports[`Invalid #5 1`] = ` +exports[`require-description > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | input CreateUserInput { email: Email! } @@ -85,7 +85,7 @@ exports[`Invalid #5 1`] = ` | ^^^^^^^^^^^^^^^ Description is required for input "CreateUserInput" `; -exports[`Invalid #6 1`] = ` +exports[`require-description > invalid > Invalid #6 1`] = ` #### ⌨️ Code 1 | union Media = Book | Movie @@ -102,7 +102,7 @@ exports[`Invalid #6 1`] = ` | ^^^^^ Description is required for union "Media" `; -exports[`Invalid #7 1`] = ` +exports[`require-description > invalid > Invalid #7 1`] = ` #### ⌨️ Code 1 | directive @auth(requires: Role!) on FIELD_DEFINITION @@ -119,7 +119,7 @@ exports[`Invalid #7 1`] = ` | ^^^^ Description is required for directive "auth" `; -exports[`Invalid #8 1`] = ` +exports[`require-description > invalid > Invalid #8 1`] = ` #### ⌨️ Code 1 | type User { email: Email! } @@ -136,7 +136,7 @@ exports[`Invalid #8 1`] = ` | ^^^^^ Description is required for field "email" in type "User" `; -exports[`Invalid #9 1`] = ` +exports[`require-description > invalid > Invalid #9 1`] = ` #### ⌨️ Code 1 | input CreateUserInput { email: Email! } @@ -153,7 +153,7 @@ exports[`Invalid #9 1`] = ` | ^^^^^ Description is required for input value "email" in input "CreateUserInput" `; -exports[`Invalid #10 1`] = ` +exports[`require-description > invalid > Invalid #10 1`] = ` #### ⌨️ Code 1 | enum Role { ADMIN } @@ -170,7 +170,7 @@ exports[`Invalid #10 1`] = ` | ^^^^^ Description is required for enum value "ADMIN" in enum "Role" `; -exports[`Invalid #17 1`] = ` +exports[`require-description > invalid > Invalid #17 1`] = ` #### ⌨️ Code 1 | type Query { user(id: String!): User! } @@ -187,7 +187,7 @@ exports[`Invalid #17 1`] = ` | ^^^^ Description is required for field "user" in type "Query" `; -exports[`Invalid #18 1`] = ` +exports[`require-description > invalid > Invalid #18 1`] = ` #### ⌨️ Code 1 | type Mutation { createUser(id: [ID!]!): User! } @@ -204,7 +204,7 @@ exports[`Invalid #18 1`] = ` | ^^^^^^^^^^ Description is required for field "createUser" in type "Mutation" `; -exports[`Invalid #19 1`] = ` +exports[`require-description > invalid > Invalid #19 1`] = ` #### ⌨️ Code 1 | type MySubscription { @@ -228,7 +228,7 @@ exports[`Invalid #19 1`] = ` 3 | } `; -exports[`should disable description for ObjectTypeDefinition 1`] = ` +exports[`require-description > invalid > should disable description for ObjectTypeDefinition 1`] = ` #### ⌨️ Code 1 | type CreateOneUserPayload { @@ -259,7 +259,7 @@ exports[`should disable description for ObjectTypeDefinition 1`] = ` 4 | } `; -exports[`should ignore comments before fragment definition 1`] = ` +exports[`require-description > invalid > should ignore comments before fragment definition 1`] = ` #### ⌨️ Code 1 | # BAD @@ -287,7 +287,7 @@ exports[`should ignore comments before fragment definition 1`] = ` 7 | user { `; -exports[`should report because of linesBefore !== 1 1`] = ` +exports[`require-description > invalid > should report because of linesBefore !== 1 1`] = ` #### ⌨️ Code 1 | # linesBefore !== 1 @@ -310,7 +310,7 @@ exports[`should report because of linesBefore !== 1 1`] = ` 4 | foo `; -exports[`should report because skips comment that starts with \`eslint\` 1`] = ` +exports[`require-description > invalid > should report because skips comment that starts with \`eslint\` 1`] = ` #### ⌨️ Code 1 | # eslint-disable-next-line semi @@ -332,7 +332,7 @@ exports[`should report because skips comment that starts with \`eslint\` 1`] = ` 3 | foo `; -exports[`should validate mutation 1`] = ` +exports[`require-description > invalid > should validate mutation 1`] = ` #### ⌨️ Code 1 | mutation createUser { foo } @@ -349,7 +349,7 @@ exports[`should validate mutation 1`] = ` | ^^^^^^^^ Description is required for mutation "createUser" `; -exports[`should validate subscription 1`] = ` +exports[`require-description > invalid > should validate subscription 1`] = ` #### ⌨️ Code 1 | subscription commentAdded { foo } diff --git a/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md b/packages/plugin/__tests__/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md similarity index 85% rename from packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md rename to packages/plugin/__tests__/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md index 421cb6b7366..3ae90340fde 100644 --- a/packages/plugin/tests/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-field-of-type-query-in-mutation-result.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #2 1`] = ` +exports[`require-field-of-type-query-in-mutation-result > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type Query @@ -18,7 +18,7 @@ exports[`Invalid #2 1`] = ` 6 | } `; -exports[`Invalid #3 1`] = ` +exports[`require-field-of-type-query-in-mutation-result > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | type RootQuery @@ -39,7 +39,7 @@ exports[`Invalid #3 1`] = ` 4 | } `; -exports[`Invalid #4 1`] = ` +exports[`require-field-of-type-query-in-mutation-result > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | type RootQuery @@ -61,7 +61,7 @@ exports[`Invalid #4 1`] = ` 5 | } `; -exports[`should ignore arguments 1`] = ` +exports[`require-field-of-type-query-in-mutation-result > invalid > should ignore arguments 1`] = ` #### ⌨️ Code 1 | type Query diff --git a/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md b/packages/plugin/__tests__/__snapshots__/require-import-fragment.spec.md similarity index 84% rename from packages/plugin/tests/__snapshots__/require-import-fragment.spec.md rename to packages/plugin/__tests__/__snapshots__/require-import-fragment.spec.md index 803e15db845..27391745144 100644 --- a/packages/plugin/tests/__snapshots__/require-import-fragment.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-import-fragment.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should report fragments when there are no import expressions 1`] = ` +exports[`require-import-fragment > invalid > should report fragments when there are no import expressions 1`] = ` #### ⌨️ Code 1 | { @@ -26,7 +26,7 @@ exports[`should report fragments when there are no import expressions 1`] = ` 6 | } `; -exports[`should report with default import 1`] = ` +exports[`require-import-fragment > invalid > should report with default import 1`] = ` #### ⌨️ Code 1 | #import 'bar-fragment.gql' @@ -54,7 +54,7 @@ exports[`should report with default import 1`] = ` 7 | } `; -exports[`should report with named import 1`] = ` +exports[`require-import-fragment > invalid > should report with named import 1`] = ` #### ⌨️ Code 1 | #import FooFields from "bar-fragment.gql" diff --git a/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md b/packages/plugin/__tests__/__snapshots__/require-nullable-fields-with-oneof.spec.md similarity index 84% rename from packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md rename to packages/plugin/__tests__/__snapshots__/require-nullable-fields-with-oneof.spec.md index ba7950d4d42..87f80b2e2d7 100644 --- a/packages/plugin/tests/__snapshots__/require-nullable-fields-with-oneof.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-nullable-fields-with-oneof.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should validate \`input\` 1`] = ` +exports[`require-nullable-fields-with-oneof > invalid > should validate \`input\` 1`] = ` #### ⌨️ Code 1 | input Input @oneOf { @@ -23,7 +23,7 @@ exports[`should validate \`input\` 1`] = ` 4 | } `; -exports[`should validate \`type\` 1`] = ` +exports[`require-nullable-fields-with-oneof > invalid > should validate \`type\` 1`] = ` #### ⌨️ Code 1 | type Type @oneOf { diff --git a/packages/plugin/tests/__snapshots__/require-nullable-result-in-root.spec.md b/packages/plugin/__tests__/__snapshots__/require-nullable-result-in-root.spec.md similarity index 67% rename from packages/plugin/tests/__snapshots__/require-nullable-result-in-root.spec.md rename to packages/plugin/__tests__/__snapshots__/require-nullable-result-in-root.spec.md index bfefa575292..f1516626d18 100644 --- a/packages/plugin/tests/__snapshots__/require-nullable-result-in-root.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-nullable-result-in-root.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`require-nullable-result-in-root > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type Query { @@ -27,36 +27,22 @@ exports[`Invalid #1 1`] = ` 6 | } `; -exports[`should work with default scalars 1`] = ` +exports[`require-nullable-result-in-root > invalid > should work with default scalars 1`] = ` #### ⌨️ Code - 1 | type MySubscription - 2 | extend type MySubscription { - 3 | foo: Boolean! - 4 | } - 5 | schema { - 6 | subscription: MySubscription - 7 | } + 1 | type Mutation { foo: Boolean! } #### ❌ Error - 2 | extend type MySubscription { - > 3 | foo: Boolean! - | ^^^^^^^ Unexpected non-null result Boolean in type "MySubscription" - 4 | } + > 1 | type Mutation { foo: Boolean! } + | ^^^^^^^ Unexpected non-null result Boolean in type "Mutation" #### 💡 Suggestion: Make Boolean nullable - 1 | type MySubscription - 2 | extend type MySubscription { - 3 | foo: Boolean - 4 | } - 5 | schema { - 6 | subscription: MySubscription - 7 | } + 1 | type Mutation { foo: Boolean } `; -exports[`should work with extend query 1`] = ` +exports[`require-nullable-result-in-root > invalid > should work with extend query 1`] = ` #### ⌨️ Code 1 | type MyMutation diff --git a/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md b/packages/plugin/__tests__/__snapshots__/require-selections.spec.md similarity index 85% rename from packages/plugin/tests/__snapshots__/require-id-when-available.spec.md rename to packages/plugin/__tests__/__snapshots__/require-selections.spec.md index f7cd4687624..e6cf46ffc38 100644 --- a/packages/plugin/tests/__snapshots__/require-id-when-available.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-selections.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`require-selections > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | { hasId { name } } @@ -16,7 +16,7 @@ exports[`Invalid #1 1`] = ` 1 | { hasId { id name } } `; -exports[`Invalid #2 1`] = ` +exports[`require-selections > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | { hasId { id } } @@ -38,7 +38,7 @@ exports[`Invalid #2 1`] = ` 1 | { hasId { name id } } `; -exports[`should not work with n nested fragments if you never get the id 1`] = ` +exports[`require-selections > invalid > should not work with n nested fragments if you never get the id 1`] = ` #### ⌨️ Code 1 | query User { @@ -64,7 +64,7 @@ exports[`should not work with n nested fragments if you never get the id 1`] = ` 5 | } `; -exports[`should report an error about missing \`posts.id\` field in fragment 1`] = ` +exports[`require-selections > invalid > should report an error about missing \`posts.id\` field in fragment 1`] = ` #### ⌨️ Code 1 | { user { id ...UserFields } } @@ -76,7 +76,7 @@ exports[`should report an error about missing \`posts.id\` field in fragment 1`] Include it in your selection set or add to used fragment \`UserFields\`. `; -exports[`should report an error about missing \`user.id\`, \`posts.id\`, \`author.id\` and \`authorPosts.id\` selection 1`] = ` +exports[`require-selections > invalid > should report an error about missing \`user.id\`, \`posts.id\`, \`author.id\` and \`authorPosts.id\` selection 1`] = ` #### ⌨️ Code 1 | { user { ...UserFullFields } } @@ -110,7 +110,7 @@ exports[`should report an error about missing \`user.id\`, \`posts.id\`, \`autho Include it in your selection set or add to used fragments \`UserFullFields\` or \`UserFields\`. `; -exports[`should report an error with union 1`] = ` +exports[`require-selections > invalid > should report an error with union 1`] = ` #### ⌨️ Code 1 | { @@ -140,7 +140,7 @@ exports[`should report an error with union 1`] = ` 7 | } `; -exports[`should report an error with union and fragment spread 1`] = ` +exports[`require-selections > invalid > should report an error with union and fragment spread 1`] = ` #### ⌨️ Code 1 | { @@ -170,7 +170,7 @@ exports[`should report an error with union and fragment spread 1`] = ` 7 | } `; -exports[`support multiple id field names 1`] = ` +exports[`require-selections > invalid > support multiple id field names 1`] = ` #### ⌨️ Code 1 | { hasId { name } } diff --git a/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md b/packages/plugin/__tests__/__snapshots__/require-type-pattern-with-oneof.spec.md similarity index 79% rename from packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md rename to packages/plugin/__tests__/__snapshots__/require-type-pattern-with-oneof.spec.md index f7bee157a34..ccdc7cd7fba 100644 --- a/packages/plugin/tests/__snapshots__/require-type-pattern-with-oneof.spec.md +++ b/packages/plugin/__tests__/__snapshots__/require-type-pattern-with-oneof.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`should validate \`error\` field 1`] = ` +exports[`require-type-pattern-with-oneof > invalid > should validate \`error\` field 1`] = ` #### ⌨️ Code 1 | type T @oneOf { @@ -15,7 +15,7 @@ exports[`should validate \`error\` field 1`] = ` 2 | ok: Ok `; -exports[`should validate \`ok\` field 1`] = ` +exports[`require-type-pattern-with-oneof > invalid > should validate \`ok\` field 1`] = ` #### ⌨️ Code 1 | type T @oneOf { diff --git a/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md b/packages/plugin/__tests__/__snapshots__/selection-set-depth.spec.md similarity index 87% rename from packages/plugin/tests/__snapshots__/selection-set-depth.spec.md rename to packages/plugin/__tests__/__snapshots__/selection-set-depth.spec.md index 33c9363275c..b2df89f2364 100644 --- a/packages/plugin/tests/__snapshots__/selection-set-depth.spec.md +++ b/packages/plugin/__tests__/__snapshots__/selection-set-depth.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`selection-set-depth > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | query deep2 { @@ -33,7 +33,7 @@ exports[`Invalid #1 1`] = ` 5 | } `; -exports[`Invalid #2 1`] = ` +exports[`selection-set-depth > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | query deep2 { @@ -66,7 +66,7 @@ exports[`Invalid #2 1`] = ` 5 | } `; -exports[`suggestions should not throw error when fragment is located in different file 1`] = ` +exports[`selection-set-depth > invalid > suggestions should not throw error when fragment is located in different file 1`] = ` #### ⌨️ Code 1 | { @@ -91,7 +91,7 @@ exports[`suggestions should not throw error when fragment is located in differen 6 | } `; -exports[`suggestions should work with inline fragments 1`] = ` +exports[`selection-set-depth > invalid > suggestions should work with inline fragments 1`] = ` #### ⌨️ Code 1 | { diff --git a/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md b/packages/plugin/__tests__/__snapshots__/strict-id-in-types.spec.md similarity index 93% rename from packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md rename to packages/plugin/__tests__/__snapshots__/strict-id-in-types.spec.md index 2be2ddc54fc..83f8e28d1da 100644 --- a/packages/plugin/tests/__snapshots__/strict-id-in-types.spec.md +++ b/packages/plugin/__tests__/__snapshots__/strict-id-in-types.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`strict-id-in-types > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type B { name: String! } @@ -13,7 +13,7 @@ exports[`Invalid #1 1`] = ` Accepted type: ID. `; -exports[`Invalid #2 1`] = ` +exports[`strict-id-in-types > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | type B { id: ID! _id: String! } @@ -39,7 +39,7 @@ exports[`Invalid #2 1`] = ` Accepted types: ID or String. `; -exports[`Invalid #3 1`] = ` +exports[`strict-id-in-types > invalid > Invalid #3 1`] = ` #### ⌨️ Code 1 | type B { id: String! } type B1 { id: [String] } type B2 { id: [String!] } type B3 { id: [String]! } type B4 { id: [String!]! } @@ -84,7 +84,7 @@ exports[`Invalid #3 1`] = ` Accepted type: String. `; -exports[`Invalid #4 1`] = ` +exports[`strict-id-in-types > invalid > Invalid #4 1`] = ` #### ⌨️ Code 1 | type B { id: ID! } type Bresult { key: String! } type BPayload { bool: Boolean! } type BPagination { num: Int! } @@ -121,7 +121,7 @@ exports[`Invalid #4 1`] = ` Accepted type: ID. `; -exports[`Invalid #5 1`] = ` +exports[`strict-id-in-types > invalid > Invalid #5 1`] = ` #### ⌨️ Code 1 | type B { id: ID! } type BError { message: String! } diff --git a/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md b/packages/plugin/__tests__/__snapshots__/unique-enum-value-names.spec.md similarity index 84% rename from packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md rename to packages/plugin/__tests__/__snapshots__/unique-enum-value-names.spec.md index e00d7f30621..be322d24b1b 100644 --- a/packages/plugin/tests/__snapshots__/no-case-insensitive-enum-values-duplicates.spec.md +++ b/packages/plugin/__tests__/__snapshots__/unique-enum-value-names.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`unique-enum-value-names > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | enum A { TEST TesT } @@ -15,7 +15,7 @@ exports[`Invalid #1 1`] = ` 1 | enum A { TEST } `; -exports[`Invalid #2 1`] = ` +exports[`unique-enum-value-names > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | extend enum A { TEST TesT } diff --git a/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md b/packages/plugin/__tests__/__snapshots__/unique-fragment-name.spec.md similarity index 82% rename from packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md rename to packages/plugin/__tests__/__snapshots__/unique-fragment-name.spec.md index 2b3b8fcd943..59472efeac1 100644 --- a/packages/plugin/tests/__snapshots__/unique-fragment-name.spec.md +++ b/packages/plugin/__tests__/__snapshots__/unique-fragment-name.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`unique-fragment-name > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | fragment HasIdFields on U { a b c } @@ -12,7 +12,7 @@ exports[`Invalid #1 1`] = ` -1866344359.graphql `; -exports[`Invalid #2 1`] = ` +exports[`unique-fragment-name > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | fragment HasIdFields on U { a b c } diff --git a/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md b/packages/plugin/__tests__/__snapshots__/unique-operation-name.spec.md similarity index 78% rename from packages/plugin/tests/__snapshots__/unique-operation-name.spec.md rename to packages/plugin/__tests__/__snapshots__/unique-operation-name.spec.md index 45151f7058b..e0c57a89aaa 100644 --- a/packages/plugin/tests/__snapshots__/unique-operation-name.spec.md +++ b/packages/plugin/__tests__/__snapshots__/unique-operation-name.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`unique-operation-name > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | query test { bar } @@ -12,7 +12,7 @@ exports[`Invalid #1 1`] = ` 6844040.graphql `; -exports[`Invalid #2 1`] = ` +exports[`unique-operation-name > invalid > Invalid #2 1`] = ` #### ⌨️ Code 1 | query test { bar } diff --git a/packages/plugin/tests/__snapshots__/unique-type-names.spec.md b/packages/plugin/__tests__/__snapshots__/unique-type-names.spec.md similarity index 87% rename from packages/plugin/tests/__snapshots__/unique-type-names.spec.md rename to packages/plugin/__tests__/__snapshots__/unique-type-names.spec.md index 3e505092477..f40374ffcd0 100644 --- a/packages/plugin/tests/__snapshots__/unique-type-names.spec.md +++ b/packages/plugin/__tests__/__snapshots__/unique-type-names.spec.md @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Invalid #1 1`] = ` +exports[`unique-type-names > invalid > Invalid #1 1`] = ` #### ⌨️ Code 1 | type Query { diff --git a/packages/plugin/tests/alphabetize.spec.ts b/packages/plugin/__tests__/alphabetize.spec.ts similarity index 94% rename from packages/plugin/tests/alphabetize.spec.ts rename to packages/plugin/__tests__/alphabetize.spec.ts index c3f623b7e4e..6cb77b78c14 100644 --- a/packages/plugin/tests/alphabetize.spec.ts +++ b/packages/plugin/__tests__/alphabetize.spec.ts @@ -1,7 +1,5 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/alphabetize'; - -const ruleTester = new GraphQLRuleTester(); +import { ruleTester } from './test-utils'; const GROUP_ORDER_TEST = /* GraphQL */ ` type User { @@ -18,7 +16,7 @@ const GROUP_ORDER_TEST = /* GraphQL */ ` } `; -ruleTester.runGraphQLTests('alphabetize', rule, { +ruleTester.run('alphabetize', rule, { valid: [ { options: [{ fields: ['ObjectTypeDefinition'] }], @@ -44,7 +42,7 @@ ruleTester.runGraphQLTests('alphabetize', rule, { `, }, { - options: [{ values: ['EnumTypeDefinition'] }], + options: [{ values: true }], code: /* GraphQL */ ` enum Role { ADMIN @@ -138,7 +136,7 @@ ruleTester.runGraphQLTests('alphabetize', rule, { errors: [{ message: 'input value "lastName" should be before input value "password"' }], }, { - options: [{ values: ['EnumTypeDefinition'] }], + options: [{ values: true }], code: /* GraphQL */ ` enum Role { SUPER_ADMIN @@ -153,7 +151,7 @@ ruleTester.runGraphQLTests('alphabetize', rule, { ], }, { - options: [{ values: ['EnumTypeDefinition'] }], + options: [{ values: true }], code: /* GraphQL */ ` extend enum Role { ADMIN @@ -224,7 +222,7 @@ ruleTester.runGraphQLTests('alphabetize', rule, { ], }, { - options: [{ variables: ['OperationDefinition'], arguments: ['Field'] }], + options: [{ variables: true, arguments: ['Field'] }], code: /* GraphQL */ ` mutation ($cc: [Cc!]!, $bb: [Bb!], $aa: Aa!) { test(ccc: $cc, bbb: $bb, aaa: $aa) { @@ -266,7 +264,7 @@ ruleTester.runGraphQLTests('alphabetize', rule, { }, { name: 'should compare with lexicographic order', - options: [{ values: ['EnumTypeDefinition'] }], + options: [{ values: true }], code: /* GraphQL */ ` enum Test { "qux" @@ -427,5 +425,24 @@ ruleTester.runGraphQLTests('alphabetize', rule, { { message: 'field "guild" should be before field "nachos"' }, ], }, + { + name: 'should sort selections by group when `*` is between', + options: [ + { + selections: ['OperationDefinition'], + groups: ['id', '*', 'createdAt', 'updatedAt'], + }, + ], + code: /* GraphQL */ ` + { + zz + updatedAt + createdAt + aa + id + } + `, + errors: 3, + }, ], }); diff --git a/packages/plugin/tests/description-style.spec.ts b/packages/plugin/__tests__/description-style.spec.ts similarity index 81% rename from packages/plugin/tests/description-style.spec.ts rename to packages/plugin/__tests__/description-style.spec.ts index 409f59d8c67..3c538eb5a0c 100644 --- a/packages/plugin/tests/description-style.spec.ts +++ b/packages/plugin/__tests__/description-style.spec.ts @@ -1,7 +1,5 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/description-style'; - -const ruleTester = new GraphQLRuleTester(); +import { ruleTester } from './test-utils'; const INLINE_SDL = /* GraphQL */ ` " Test " @@ -31,7 +29,7 @@ export const BLOCK_SDL = /* GraphQL */ ` } `; -ruleTester.runGraphQLTests('description-style', rule, { +ruleTester.run('description-style', rule, { valid: [ BLOCK_SDL, { diff --git a/packages/plugin/tests/eslint-directives.spec.ts b/packages/plugin/__tests__/eslint-directives.spec.ts similarity index 85% rename from packages/plugin/tests/eslint-directives.spec.ts rename to packages/plugin/__tests__/eslint-directives.spec.ts index fcb6a411013..e3a6114088d 100644 --- a/packages/plugin/tests/eslint-directives.spec.ts +++ b/packages/plugin/__tests__/eslint-directives.spec.ts @@ -1,11 +1,9 @@ import { join } from 'node:path'; -import { GraphQLRuleTester } from '../src'; import { rule as noAnonymousOperations } from '../src/rules/no-anonymous-operations'; import { rule as noTypenamePrefix } from '../src/rules/no-typename-prefix'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-typename-prefix', noTypenamePrefix, { +ruleTester.run('no-typename-prefix', noTypenamePrefix, { valid: [ { name: 'should work with descriptions #942', @@ -20,7 +18,7 @@ ruleTester.runGraphQLTests('no-typename-prefix', noTypenamePrefix, { invalid: [], }); -ruleTester.runGraphQLTests('test-directives', noAnonymousOperations, { +ruleTester.run('test-directives', noAnonymousOperations, { valid: [ /* GraphQL */ ` # eslint-disable-next-line diff --git a/packages/plugin/tests/examples.spec.ts b/packages/plugin/__tests__/examples.spec.ts similarity index 71% rename from packages/plugin/tests/examples.spec.ts rename to packages/plugin/__tests__/examples.spec.ts index edb0329fa79..b21fdb72e92 100644 --- a/packages/plugin/tests/examples.spec.ts +++ b/packages/plugin/__tests__/examples.spec.ts @@ -1,13 +1,17 @@ import { spawnSync } from 'node:child_process'; import { join, relative } from 'node:path'; import { ESLint } from 'eslint'; +import { CWD as PROJECT_CWD } from '../src/utils'; -const ROOT_CWD = process.cwd(); +const CWD = join(PROJECT_CWD, '..', '..'); function countErrors(results: ESLint.LintResult[]): number { return results.reduce((acc, curr: ESLint.LintResult & { fatalErrorCount: number }) => { if (curr.fatalErrorCount > 0) { - throw new Error('Found fatal error'); + throw new Error(`Found fatal error: + +${results.map(result => result.messages.map(m => m.message)).join('\n\n')} + `); } return acc + curr.errorCount; }, 0); @@ -28,7 +32,7 @@ function getESLintOutput(cwd: string): ESLint.LintResult[] { function testSnapshot(results: ESLint.LintResult[]): void { const normalizedResults = results .map(result => ({ - filePath: relative(ROOT_CWD, result.filePath), + filePath: relative(CWD, result.filePath), messages: result.messages, })) .filter(result => result.messages.length > 0); @@ -37,64 +41,57 @@ function testSnapshot(results: ESLint.LintResult[]): void { } describe('Examples', () => { - it('should work on `.graphql` files', () => { - const cwd = join(ROOT_CWD, 'examples/basic'); + it('should work programmatically', () => { + const cwd = join(CWD, 'examples/programmatic'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(6); testSnapshot(results); }); it('should work on `.js` files', () => { - const cwd = join(ROOT_CWD, 'examples/code-file'); + const cwd = join(CWD, 'examples/code-file'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(4); testSnapshot(results); }); it('should work with `graphql-config`', () => { - const cwd = join(ROOT_CWD, 'examples/graphql-config'); + const cwd = join(CWD, 'examples/graphql-config'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(2); testSnapshot(results); }); - it('should work with `graphql-config` on `.js` files', () => { - const cwd = join(ROOT_CWD, 'examples/graphql-config-code-file'); - const results = getESLintOutput(cwd); - expect(countErrors(results)).toBe(3); - testSnapshot(results); - }); - it('should work with `eslint-plugin-prettier`', () => { - const cwd = join(ROOT_CWD, 'examples/prettier'); + const cwd = join(CWD, 'examples/prettier'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(23); testSnapshot(results); }); it('should work in monorepo', () => { - const cwd = join(ROOT_CWD, 'examples/monorepo'); + const cwd = join(CWD, 'examples/monorepo'); const results = getESLintOutput(cwd); - expect(countErrors(results)).toBe(7); + expect(countErrors(results)).toBe(11); testSnapshot(results); }); it('should work in svelte', () => { - const cwd = join(ROOT_CWD, 'examples/svelte-code-file'); + const cwd = join(CWD, 'examples/svelte-code-file'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(2); testSnapshot(results); }); it('should work in vue', () => { - const cwd = join(ROOT_CWD, 'examples/vue-code-file'); + const cwd = join(CWD, 'examples/vue-code-file'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(2); testSnapshot(results); }); it('should work in multiple projects', () => { - const cwd = join(ROOT_CWD, 'examples/multiple-projects-graphql-config'); + const cwd = join(CWD, 'examples/multiple-projects-graphql-config'); const results = getESLintOutput(cwd); expect(countErrors(results)).toBe(4); testSnapshot(results); diff --git a/packages/plugin/__tests__/executable-definitions.spec.ts b/packages/plugin/__tests__/executable-definitions.spec.ts new file mode 100644 index 00000000000..a85779b766b --- /dev/null +++ b/packages/plugin/__tests__/executable-definitions.spec.ts @@ -0,0 +1,49 @@ +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; +import { ruleTester, ParserOptionsForTests } from './test-utils'; + +const TEST_SCHEMA = /* GraphQL */ ` + type Query { + foo: String! + bar: String! + } + + type Mutation { + foo: String! + } + + type T { + foo: String! + } +`; + +const WITH_SCHEMA = { + parserOptions: { + graphQLConfig: { + schema: TEST_SCHEMA, + }, + } satisfies ParserOptionsForTests, +}; + +ruleTester.run('executable-definitions', GRAPHQL_JS_VALIDATIONS['executable-definitions'], { + valid: [ + { + ...WITH_SCHEMA, + code: 'query test2 { foo }', + }, + { + ...WITH_SCHEMA, + code: 'mutation test { foo }', + }, + { + ...WITH_SCHEMA, + code: 'fragment Test on T { foo }', + }, + ], + invalid: [ + { + ...WITH_SCHEMA, + code: 'type Query { t: String }', + errors: [{ message: 'The "Query" definition is not executable.' }], + }, + ], +}); diff --git a/packages/plugin/__tests__/fields-on-correct-type.spec.ts b/packages/plugin/__tests__/fields-on-correct-type.spec.ts new file mode 100644 index 00000000000..d12037981ab --- /dev/null +++ b/packages/plugin/__tests__/fields-on-correct-type.spec.ts @@ -0,0 +1,46 @@ +import { DEFAULT_CONFIG, ParserOptionsForTests } from './test-utils'; +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this +import { RuleTester } from '@theguild/eslint-rule-tester'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; + +const ruleTester = new RuleTester({ + ...DEFAULT_CONFIG, + parserOptions: { + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID + age: Int + } + + type Query { + user: User + } + `, + }, + }, +}); + +ruleTester.run('fields-on-correct-type', GRAPHQL_JS_VALIDATIONS['fields-on-correct-type'], { + valid: [], + invalid: [ + { + name: 'should highlight selection on single line', + code: 'fragment UserFields on User { id bad age }', + errors: [{ message: 'Cannot query field "bad" on type "User". Did you mean "id"?' }], + }, + { + name: 'should highlight selection on multi line', + code: /* GraphQL */ ` + { + user { + id + veryBad + age + } + } + `, + errors: [{ message: 'Cannot query field "veryBad" on type "User".' }], + }, + ], +}); diff --git a/packages/plugin/tests/input-name.spec.ts b/packages/plugin/__tests__/input-name.spec.ts similarity index 96% rename from packages/plugin/tests/input-name.spec.ts rename to packages/plugin/__tests__/input-name.spec.ts index 7bd2285b46a..6e5e75efe4c 100644 --- a/packages/plugin/tests/input-name.spec.ts +++ b/packages/plugin/__tests__/input-name.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/input-name'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('input-name', rule, { +ruleTester.run('input-name', rule, { valid: [ { code: 'type Mutation { SetMessage(input: SetMessageInput): String }', diff --git a/packages/plugin/tests/known-directives.spec.ts b/packages/plugin/__tests__/known-directives.spec.ts similarity index 56% rename from packages/plugin/tests/known-directives.spec.ts rename to packages/plugin/__tests__/known-directives.spec.ts index d8e1056a370..23ffddacb88 100644 --- a/packages/plugin/tests/known-directives.spec.ts +++ b/packages/plugin/__tests__/known-directives.spec.ts @@ -1,20 +1,29 @@ -import { GraphQLRuleTester, rules } from '../src'; +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this +import { RuleTester } from '@theguild/eslint-rule-tester'; +import { DEFAULT_CONFIG, ParserOptionsForTests } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; -const ruleTester = new GraphQLRuleTester({ - schema: /* GraphQL */ ` - type User { - id: ID! - } +const ruleTester = new RuleTester({ + ...DEFAULT_CONFIG, + parserOptions: { + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID! + } - type Query { - user: User - } - `, + type Query { + user: User + } + `, + }, + }, }); -ruleTester.runGraphQLTests<[{ ignoreClientDirectives: string[] }]>( +ruleTester.run<[{ ignoreClientDirectives: string[] }]>( 'known-directives', - rules['known-directives'], + // @ts-expect-error -- I don't know why it's complaining + GRAPHQL_JS_VALIDATIONS['known-directives'], { valid: [ { diff --git a/packages/plugin/__tests__/known-fragment-names.spec.ts b/packages/plugin/__tests__/known-fragment-names.spec.ts new file mode 100644 index 00000000000..2b220db7a63 --- /dev/null +++ b/packages/plugin/__tests__/known-fragment-names.spec.ts @@ -0,0 +1,152 @@ +import { join } from 'node:path'; +import { ruleTester } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; + +ruleTester.run('known-fragment-names', GRAPHQL_JS_VALIDATIONS['known-fragment-names'], { + valid: [ + { + filename: join(__dirname, 'mocks/user.graphql'), + code: ruleTester.fromMockFile('user.graphql'), + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), + }, + }, + }, + { + filename: join(__dirname, 'mocks/known-fragment-names.ts/1_document.graphql'), + code: /* GraphQL */ ` + query User { + user { + ...UserFields + } + } + `, + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: join(__dirname, 'mocks/known-fragment-names.ts'), + }, + }, + }, + { + name: 'should import all fragments inside fragments', + filename: join(__dirname, 'mocks/known-fragment-names/user.gql'), + code: ruleTester.fromMockFile('known-fragment-names/user.gql'), + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: [ + join(__dirname, 'mocks/known-fragment-names/user.gql'), + join(__dirname, 'mocks/known-fragment-names/user-fields.gql'), + ], + }, + }, + }, + { + name: 'should work when interface implemented', + code: /* GraphQL */ ` + fragment Introduction on Introduction { + introText { + ...ContentUnit + } + } + `, + parserOptions: { + graphQLConfig: { + schema: /* GraphQL */ ` + interface ContentUnit { + contentSets: Int + } + + type IntroText implements ContentUnit { + contentSets: Int + } + + type Introduction { + introText: IntroText + } + + type Query { + foo: Int + } + `, + documents: /* GraphQL */ ` + fragment ContentUnit on ContentUnit { + contentSets { + id + } + } + `, + }, + }, + }, + { + name: 'should work when with union', + code: /* GraphQL */ ` + query { + animal { + ...AnimalFields + } + } + `, + parserOptions: { + graphQLConfig: { + schema: /* GraphQL */ ` + type Cat { + name: String + } + + type Dog { + age: String + } + + union AnimalUnion = Cat | Dog + + type Animal { + animal: AnimalUnion + } + + type Query { + animal: Animal + } + `, + documents: /* GraphQL */ ` + fragment CatFields on Cat { + title + } + + fragment DogFields on Dog { + url + } + + fragment AnimalFields on AnimalUnion { + animal { + ...CatFields + ...DogFields + } + } + `, + }, + }, + }, + ], + invalid: [ + { + name: 'should not throw an error on undefined fragment', + filename: join(__dirname, 'mocks/known-fragment-names/operation-with-undefined-fragment.gql'), + code: ruleTester.fromMockFile('known-fragment-names/operation-with-undefined-fragment.gql'), + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: join( + __dirname, + 'mocks/known-fragment-names/operation-with-undefined-fragment.gql', + ), + }, + }, + errors: [{ message: 'Unknown fragment "DoesNotExist".' }], + }, + ], +}); diff --git a/packages/plugin/tests/lone-executable-definition.spec.ts b/packages/plugin/__tests__/lone-executable-definition.spec.ts similarity index 95% rename from packages/plugin/tests/lone-executable-definition.spec.ts rename to packages/plugin/__tests__/lone-executable-definition.spec.ts index c925c616aff..b6f18100ae8 100644 --- a/packages/plugin/tests/lone-executable-definition.spec.ts +++ b/packages/plugin/__tests__/lone-executable-definition.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/lone-executable-definition'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('lone-executable-definition', rule, { +ruleTester.run('lone-executable-definition', rule, { valid: [ { name: 'should allow single short-hand query', diff --git a/packages/plugin/__tests__/lone-schema-definition.spec.ts b/packages/plugin/__tests__/lone-schema-definition.spec.ts new file mode 100644 index 00000000000..bc1b9da3a68 --- /dev/null +++ b/packages/plugin/__tests__/lone-schema-definition.spec.ts @@ -0,0 +1,38 @@ +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; +import { ruleTester } from './test-utils'; + +ruleTester.run('lone-schema-definition', GRAPHQL_JS_VALIDATIONS['lone-schema-definition'], { + valid: [ + /* GraphQL */ ` + type Query { + foo: String + } + + schema { + query: Query + } + `, + ], + invalid: [ + { + code: /* GraphQL */ ` + type Query { + foo: String + } + + schema { + query: Query + } + + type RootQuery { + foo: String + } + + schema { + query: RootQuery + } + `, + errors: [{ message: 'Must provide only one schema definition.' }], + }, + ], +}); diff --git a/packages/plugin/tests/match-document-filename.spec.ts b/packages/plugin/__tests__/match-document-filename.spec.ts similarity index 95% rename from packages/plugin/tests/match-document-filename.spec.ts rename to packages/plugin/__tests__/match-document-filename.spec.ts index 94dacb85a02..08dbaa77158 100644 --- a/packages/plugin/tests/match-document-filename.spec.ts +++ b/packages/plugin/__tests__/match-document-filename.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/match-document-filename'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('match-document-filename', rule, { +ruleTester.run('match-document-filename', rule, { valid: [ { filename: 'src/me.gql', diff --git a/packages/plugin/tests/mocks/graphql-server.ts b/packages/plugin/__tests__/mocks/graphql-server.ts similarity index 94% rename from packages/plugin/tests/mocks/graphql-server.ts rename to packages/plugin/__tests__/mocks/graphql-server.ts index 751d81f6cdb..896f9346141 100644 --- a/packages/plugin/tests/mocks/graphql-server.ts +++ b/packages/plugin/__tests__/mocks/graphql-server.ts @@ -4,6 +4,7 @@ import { resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; import { buildSchema, introspectionFromSchema } from 'graphql'; +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this const __dirname = fileURLToPath(new URL('.', import.meta.url)); const sdlSchema = readFileSync(resolve(__dirname, 'user-schema.graphql'), 'utf8'); @@ -40,7 +41,7 @@ class TestGraphQLServer { } private async router(req: IncomingMessage, res: ServerResponse): Promise { - const { pathname } = new URL(req.url, this.base); + const { pathname } = new URL(req.url!, this.base); if (pathname === '/') { const { query } = await this.parseData(req); diff --git a/packages/plugin/tests/mocks/import-fragments/bar-fragment.gql b/packages/plugin/__tests__/mocks/import-fragments/bar-fragment.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/bar-fragment.gql rename to packages/plugin/__tests__/mocks/import-fragments/bar-fragment.gql diff --git a/packages/plugin/tests/mocks/import-fragments/foo-fragment.gql b/packages/plugin/__tests__/mocks/import-fragments/foo-fragment.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/foo-fragment.gql rename to packages/plugin/__tests__/mocks/import-fragments/foo-fragment.gql diff --git a/packages/plugin/tests/mocks/import-fragments/invalid-query-default.gql b/packages/plugin/__tests__/mocks/import-fragments/invalid-query-default.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/invalid-query-default.gql rename to packages/plugin/__tests__/mocks/import-fragments/invalid-query-default.gql diff --git a/packages/plugin/tests/mocks/import-fragments/invalid-query.gql b/packages/plugin/__tests__/mocks/import-fragments/invalid-query.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/invalid-query.gql rename to packages/plugin/__tests__/mocks/import-fragments/invalid-query.gql diff --git a/packages/plugin/tests/mocks/import-fragments/missing-import.gql b/packages/plugin/__tests__/mocks/import-fragments/missing-import.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/missing-import.gql rename to packages/plugin/__tests__/mocks/import-fragments/missing-import.gql diff --git a/packages/plugin/tests/mocks/import-fragments/same-file.gql b/packages/plugin/__tests__/mocks/import-fragments/same-file.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/same-file.gql rename to packages/plugin/__tests__/mocks/import-fragments/same-file.gql diff --git a/packages/plugin/tests/mocks/import-fragments/valid-query-default.gql b/packages/plugin/__tests__/mocks/import-fragments/valid-query-default.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/valid-query-default.gql rename to packages/plugin/__tests__/mocks/import-fragments/valid-query-default.gql diff --git a/packages/plugin/tests/mocks/import-fragments/valid-query.gql b/packages/plugin/__tests__/mocks/import-fragments/valid-query.gql similarity index 100% rename from packages/plugin/tests/mocks/import-fragments/valid-query.gql rename to packages/plugin/__tests__/mocks/import-fragments/valid-query.gql diff --git a/packages/plugin/tests/mocks/known-fragment-names.ts b/packages/plugin/__tests__/mocks/known-fragment-names.ts similarity index 100% rename from packages/plugin/tests/mocks/known-fragment-names.ts rename to packages/plugin/__tests__/mocks/known-fragment-names.ts diff --git a/packages/plugin/tests/mocks/known-fragment-names/operation-with-undefined-fragment.gql b/packages/plugin/__tests__/mocks/known-fragment-names/operation-with-undefined-fragment.gql similarity index 100% rename from packages/plugin/tests/mocks/known-fragment-names/operation-with-undefined-fragment.gql rename to packages/plugin/__tests__/mocks/known-fragment-names/operation-with-undefined-fragment.gql diff --git a/packages/plugin/tests/mocks/known-fragment-names/user-fields.gql b/packages/plugin/__tests__/mocks/known-fragment-names/user-fields.gql similarity index 100% rename from packages/plugin/tests/mocks/known-fragment-names/user-fields.gql rename to packages/plugin/__tests__/mocks/known-fragment-names/user-fields.gql diff --git a/packages/plugin/tests/mocks/known-fragment-names/user.gql b/packages/plugin/__tests__/mocks/known-fragment-names/user.gql similarity index 100% rename from packages/plugin/tests/mocks/known-fragment-names/user.gql rename to packages/plugin/__tests__/mocks/known-fragment-names/user.gql diff --git a/packages/plugin/tests/mocks/large.graphql b/packages/plugin/__tests__/mocks/large.graphql similarity index 100% rename from packages/plugin/tests/mocks/large.graphql rename to packages/plugin/__tests__/mocks/large.graphql diff --git a/packages/plugin/tests/mocks/no-one-place-fragments.graphql b/packages/plugin/__tests__/mocks/no-one-place-fragments.graphql similarity index 100% rename from packages/plugin/tests/mocks/no-one-place-fragments.graphql rename to packages/plugin/__tests__/mocks/no-one-place-fragments.graphql diff --git a/packages/plugin/tests/mocks/no-undefined-variables.gql b/packages/plugin/__tests__/mocks/no-undefined-variables.gql similarity index 100% rename from packages/plugin/tests/mocks/no-undefined-variables.gql rename to packages/plugin/__tests__/mocks/no-undefined-variables.gql diff --git a/packages/plugin/tests/mocks/no-unused-variables-imported.gql b/packages/plugin/__tests__/mocks/no-unused-variables-imported.gql similarity index 100% rename from packages/plugin/tests/mocks/no-unused-variables-imported.gql rename to packages/plugin/__tests__/mocks/no-unused-variables-imported.gql diff --git a/packages/plugin/tests/mocks/no-unused-variables.gql b/packages/plugin/__tests__/mocks/no-unused-variables.gql similarity index 100% rename from packages/plugin/tests/mocks/no-unused-variables.gql rename to packages/plugin/__tests__/mocks/no-unused-variables.gql diff --git a/packages/plugin/tests/mocks/possible-type-extension/one-graphql-file/type-user.gql b/packages/plugin/__tests__/mocks/possible-type-extension/one-graphql-file/type-user.gql similarity index 100% rename from packages/plugin/tests/mocks/possible-type-extension/one-graphql-file/type-user.gql rename to packages/plugin/__tests__/mocks/possible-type-extension/one-graphql-file/type-user.gql diff --git a/packages/plugin/tests/mocks/possible-type-extension/separate-code-files/extend-type-user.ts b/packages/plugin/__tests__/mocks/possible-type-extension/separate-code-files/extend-type-user.ts similarity index 100% rename from packages/plugin/tests/mocks/possible-type-extension/separate-code-files/extend-type-user.ts rename to packages/plugin/__tests__/mocks/possible-type-extension/separate-code-files/extend-type-user.ts diff --git a/packages/plugin/tests/mocks/possible-type-extension/separate-code-files/type-user.ts b/packages/plugin/__tests__/mocks/possible-type-extension/separate-code-files/type-user.ts similarity index 100% rename from packages/plugin/tests/mocks/possible-type-extension/separate-code-files/type-user.ts rename to packages/plugin/__tests__/mocks/possible-type-extension/separate-code-files/type-user.ts diff --git a/packages/plugin/tests/mocks/possible-type-extension/separate-graphql-files/extend-type-user.gql b/packages/plugin/__tests__/mocks/possible-type-extension/separate-graphql-files/extend-type-user.gql similarity index 100% rename from packages/plugin/tests/mocks/possible-type-extension/separate-graphql-files/extend-type-user.gql rename to packages/plugin/__tests__/mocks/possible-type-extension/separate-graphql-files/extend-type-user.gql diff --git a/packages/plugin/tests/mocks/possible-type-extension/separate-graphql-files/type-user.gql b/packages/plugin/__tests__/mocks/possible-type-extension/separate-graphql-files/type-user.gql similarity index 100% rename from packages/plugin/tests/mocks/possible-type-extension/separate-graphql-files/type-user.gql rename to packages/plugin/__tests__/mocks/possible-type-extension/separate-graphql-files/type-user.gql diff --git a/packages/plugin/tests/mocks/post-fields.graphql b/packages/plugin/__tests__/mocks/post-fields.graphql similarity index 100% rename from packages/plugin/tests/mocks/post-fields.graphql rename to packages/plugin/__tests__/mocks/post-fields.graphql diff --git a/packages/plugin/tests/mocks/post.graphql b/packages/plugin/__tests__/mocks/post.graphql similarity index 100% rename from packages/plugin/tests/mocks/post.graphql rename to packages/plugin/__tests__/mocks/post.graphql diff --git a/packages/plugin/tests/mocks/test-directives-with-import.graphql b/packages/plugin/__tests__/mocks/test-directives-with-import.graphql similarity index 100% rename from packages/plugin/tests/mocks/test-directives-with-import.graphql rename to packages/plugin/__tests__/mocks/test-directives-with-import.graphql diff --git a/packages/plugin/tests/mocks/two-fragments-in-code-file.js b/packages/plugin/__tests__/mocks/two-fragments-in-code-file.js similarity index 100% rename from packages/plugin/tests/mocks/two-fragments-in-code-file.js rename to packages/plugin/__tests__/mocks/two-fragments-in-code-file.js diff --git a/packages/plugin/tests/mocks/unique-fragment.js b/packages/plugin/__tests__/mocks/unique-fragment.js similarity index 100% rename from packages/plugin/tests/mocks/unique-fragment.js rename to packages/plugin/__tests__/mocks/unique-fragment.js diff --git a/packages/plugin/tests/mocks/user-fields-with-nested-fragment.gql b/packages/plugin/__tests__/mocks/user-fields-with-nested-fragment.gql similarity index 100% rename from packages/plugin/tests/mocks/user-fields-with-nested-fragment.gql rename to packages/plugin/__tests__/mocks/user-fields-with-nested-fragment.gql diff --git a/packages/plugin/tests/mocks/user-fields-with-variables.gql b/packages/plugin/__tests__/mocks/user-fields-with-variables.gql similarity index 100% rename from packages/plugin/tests/mocks/user-fields-with-variables.gql rename to packages/plugin/__tests__/mocks/user-fields-with-variables.gql diff --git a/packages/plugin/tests/mocks/user-fields.graphql b/packages/plugin/__tests__/mocks/user-fields.graphql similarity index 100% rename from packages/plugin/tests/mocks/user-fields.graphql rename to packages/plugin/__tests__/mocks/user-fields.graphql diff --git a/packages/plugin/tests/mocks/user-schema.graphql b/packages/plugin/__tests__/mocks/user-schema.graphql similarity index 100% rename from packages/plugin/tests/mocks/user-schema.graphql rename to packages/plugin/__tests__/mocks/user-schema.graphql diff --git a/packages/plugin/tests/mocks/user-schema.json b/packages/plugin/__tests__/mocks/user-schema.json similarity index 100% rename from packages/plugin/tests/mocks/user-schema.json rename to packages/plugin/__tests__/mocks/user-schema.json diff --git a/packages/plugin/tests/mocks/user-schema.ts b/packages/plugin/__tests__/mocks/user-schema.ts similarity index 100% rename from packages/plugin/tests/mocks/user-schema.ts rename to packages/plugin/__tests__/mocks/user-schema.ts diff --git a/packages/plugin/tests/mocks/user.graphql b/packages/plugin/__tests__/mocks/user.graphql similarity index 100% rename from packages/plugin/tests/mocks/user.graphql rename to packages/plugin/__tests__/mocks/user.graphql diff --git a/packages/plugin/tests/mocks/using-config/.graphqlrc b/packages/plugin/__tests__/mocks/using-config/.graphqlrc similarity index 100% rename from packages/plugin/tests/mocks/using-config/.graphqlrc rename to packages/plugin/__tests__/mocks/using-config/.graphqlrc diff --git a/packages/plugin/tests/mocks/using-config/schema-in-config.graphql b/packages/plugin/__tests__/mocks/using-config/schema-in-config.graphql similarity index 100% rename from packages/plugin/tests/mocks/using-config/schema-in-config.graphql rename to packages/plugin/__tests__/mocks/using-config/schema-in-config.graphql diff --git a/packages/plugin/tests/mocks/using-config/test.graphql b/packages/plugin/__tests__/mocks/using-config/test.graphql similarity index 100% rename from packages/plugin/tests/mocks/using-config/test.graphql rename to packages/plugin/__tests__/mocks/using-config/test.graphql diff --git a/packages/plugin/tests/naming-convention.spec.ts b/packages/plugin/__tests__/naming-convention.spec.ts similarity index 94% rename from packages/plugin/tests/naming-convention.spec.ts rename to packages/plugin/__tests__/naming-convention.spec.ts index 8502edc712b..cf2b91f24ec 100644 --- a/packages/plugin/tests/naming-convention.spec.ts +++ b/packages/plugin/__tests__/naming-convention.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/naming-convention'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('naming-convention', rule, { +ruleTester.run('naming-convention', rule, { valid: [ { code: /* GraphQL */ ` @@ -396,17 +394,27 @@ ruleTester.runGraphQLTests('naming-convention', rule, { fieldSubscription: ID subscriptionField: ID } + + enum TestEnum + extend enum EnumTest { + A + } + + interface TestInterface + extend interface InterfaceTest { + id: ID + } + + union TestUnion + extend union UnionTest = TestInterface + + type TestType + extend type TypeTest { + id: ID + } `, - options: (rule.meta.docs.configOptions as any).schema, - errors: [ - { message: 'Field "fieldQuery" should not have "Query" suffix' }, - { message: 'Field "queryField" should not have "query" prefix' }, - { message: 'Field "getField" should not have "get" prefix' }, - { message: 'Field "fieldMutation" should not have "Mutation" suffix' }, - { message: 'Field "mutationField" should not have "mutation" prefix' }, - { message: 'Field "fieldSubscription" should not have "Subscription" suffix' }, - { message: 'Field "subscriptionField" should not have "subscription" prefix' }, - ], + options: (rule.meta.docs!.configOptions as any).schema, + errors: 15, }, { name: 'operations-recommended config', @@ -425,7 +433,7 @@ ruleTester.runGraphQLTests('naming-convention', rule, { fragment TestFragment on Test { id } fragment FragmentTest on Test { id } `, - options: (rule.meta.docs.configOptions as any).operations, + options: (rule.meta.docs!.configOptions as any).operations, errors: [ { message: 'Operation "TestQuery" should not have "Query" suffix' }, { message: 'Operation "QueryTest" should not have "Query" prefix' }, diff --git a/packages/plugin/tests/no-anonymous-operations.spec.ts b/packages/plugin/__tests__/no-anonymous-operations.spec.ts similarity index 68% rename from packages/plugin/tests/no-anonymous-operations.spec.ts rename to packages/plugin/__tests__/no-anonymous-operations.spec.ts index d7ddecfca8f..62bee2f51cb 100644 --- a/packages/plugin/tests/no-anonymous-operations.spec.ts +++ b/packages/plugin/__tests__/no-anonymous-operations.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/no-anonymous-operations'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-anonymous-operations', rule, { +ruleTester.run('no-anonymous-operations', rule, { valid: ['query myQuery { a }', 'mutation doSomething { a }', 'subscription myData { a }'], invalid: [ { code: 'query { a }', errors: 1 }, diff --git a/packages/plugin/tests/no-deprecated.spec.ts b/packages/plugin/__tests__/no-deprecated.spec.ts similarity index 87% rename from packages/plugin/tests/no-deprecated.spec.ts rename to packages/plugin/__tests__/no-deprecated.spec.ts index 672f3ace547..78a45281e06 100644 --- a/packages/plugin/tests/no-deprecated.spec.ts +++ b/packages/plugin/__tests__/no-deprecated.spec.ts @@ -1,5 +1,5 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/no-deprecated'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const TEST_SCHEMA = /* GraphQL */ ` type Query { @@ -21,13 +21,13 @@ const TEST_SCHEMA = /* GraphQL */ ` const WITH_SCHEMA = { parserOptions: { - schema: TEST_SCHEMA, - documents: [], - } as ParserOptions, + graphQLConfig: { + schema: TEST_SCHEMA, + }, + } satisfies ParserOptionsForTests, }; -const ruleTester = new GraphQLRuleTester(); -ruleTester.runGraphQLTests('no-deprecated', rule, { +ruleTester.run('no-deprecated', rule, { valid: [ { ...WITH_SCHEMA, code: 'query { newField }' }, { ...WITH_SCHEMA, code: 'mutation { something(t: NEW) }' }, diff --git a/packages/plugin/tests/no-duplicate-fields.spec.ts b/packages/plugin/__tests__/no-duplicate-fields.spec.ts similarity index 87% rename from packages/plugin/tests/no-duplicate-fields.spec.ts rename to packages/plugin/__tests__/no-duplicate-fields.spec.ts index 9f67c5da2dd..32e0b3a7afb 100644 --- a/packages/plugin/tests/no-duplicate-fields.spec.ts +++ b/packages/plugin/__tests__/no-duplicate-fields.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/no-duplicate-fields'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-duplicate-fields', rule, { +ruleTester.run('no-duplicate-fields', rule, { valid: [], invalid: [ { diff --git a/packages/plugin/tests/no-hashtag-description.spec.ts b/packages/plugin/__tests__/no-hashtag-description.spec.ts similarity index 93% rename from packages/plugin/tests/no-hashtag-description.spec.ts rename to packages/plugin/__tests__/no-hashtag-description.spec.ts index a740f485084..4f577d41372 100644 --- a/packages/plugin/tests/no-hashtag-description.spec.ts +++ b/packages/plugin/__tests__/no-hashtag-description.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RULE_ID } from '../src/rules/no-hashtag-description'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-hashtag-description', rule, { +ruleTester.run('no-hashtag-description', rule, { valid: [ /* GraphQL */ ` " Good " diff --git a/packages/plugin/tests/no-one-place-fragments.spec.ts b/packages/plugin/__tests__/no-one-place-fragments.spec.ts similarity index 57% rename from packages/plugin/tests/no-one-place-fragments.spec.ts rename to packages/plugin/__tests__/no-one-place-fragments.spec.ts index 29ebacd9278..6542bdd099c 100644 --- a/packages/plugin/tests/no-one-place-fragments.spec.ts +++ b/packages/plugin/__tests__/no-one-place-fragments.spec.ts @@ -1,16 +1,16 @@ import { join } from 'node:path'; -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/no-one-place-fragments'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-one-place-fragments', rule, { +ruleTester.run('no-one-place-fragments', rule, { valid: [ { name: 'ok when spread 2 times', code: ruleTester.fromMockFile('no-one-place-fragments.graphql'), parserOptions: { - documents: join(__dirname, 'mocks/no-one-place-fragments.graphql'), + graphQLConfig: { + documents: join(__dirname, 'mocks/no-one-place-fragments.graphql'), + }, }, }, ], @@ -19,16 +19,18 @@ ruleTester.runGraphQLTests('no-one-place-fragments', rule, { name: 'should error fragment used in one place', code: ruleTester.fromMockFile('user-fields.graphql'), errors: [ - { message: 'Fragment `UserFields` used only once. Inline him in "-877628611.graphql".' }, + { message: 'Fragment `UserFields` used only once. Inline him in "146179389.graphql".' }, ], parserOptions: { - documents: /* GraphQL */ ` - { - user { - ...UserFields + graphQLConfig: { + documents: /* GraphQL */ ` + { + user { + ...UserFields + } } - } - `, + `, + }, }, }, ], diff --git a/packages/plugin/tests/no-root-type.spec.ts b/packages/plugin/__tests__/no-root-type.spec.ts similarity index 77% rename from packages/plugin/tests/no-root-type.spec.ts rename to packages/plugin/__tests__/no-root-type.spec.ts index 1c833de7933..7842b23dd3f 100644 --- a/packages/plugin/tests/no-root-type.spec.ts +++ b/packages/plugin/__tests__/no-root-type.spec.ts @@ -1,19 +1,16 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions } from '../src/rules/no-root-type'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const useSchema = ( - code: string, - schema = '', -): { code: string; parserOptions: Pick } => ({ +const useSchema = (code: string, schema = '') => ({ code, parserOptions: { - schema: schema + code, - }, + graphQLConfig: { + schema: schema + code, + }, + } satisfies ParserOptionsForTests, }); -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-root-type', rule, { +ruleTester.run('no-root-type', rule, { valid: [ { ...useSchema('type Query'), diff --git a/packages/plugin/tests/no-scalar-result-type-on-mutation.spec.ts b/packages/plugin/__tests__/no-scalar-result-type-on-mutation.spec.ts similarity index 79% rename from packages/plugin/tests/no-scalar-result-type-on-mutation.spec.ts rename to packages/plugin/__tests__/no-scalar-result-type-on-mutation.spec.ts index bda124ed6b3..4396482cb5b 100644 --- a/packages/plugin/tests/no-scalar-result-type-on-mutation.spec.ts +++ b/packages/plugin/__tests__/no-scalar-result-type-on-mutation.spec.ts @@ -1,24 +1,22 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/no-scalar-result-type-on-mutation'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const useSchema = ( - code: string, -): { code: string; parserOptions: Pick } => ({ +const useSchema = (code: string) => ({ code, parserOptions: { - schema: /* GraphQL */ ` - type User { - id: ID! - } + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID! + } - ${code} - `, - }, + ${code} + `, + }, + } satisfies ParserOptionsForTests, }); -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-scalar-result-type-on-mutation', rule, { +ruleTester.run('no-scalar-result-type-on-mutation', rule, { valid: [ useSchema(/* GraphQL */ ` type Query { diff --git a/packages/plugin/tests/no-typename-prefix.spec.ts b/packages/plugin/__tests__/no-typename-prefix.spec.ts similarity index 88% rename from packages/plugin/tests/no-typename-prefix.spec.ts rename to packages/plugin/__tests__/no-typename-prefix.spec.ts index e4a248f25c4..8d5e0ee68ae 100644 --- a/packages/plugin/tests/no-typename-prefix.spec.ts +++ b/packages/plugin/__tests__/no-typename-prefix.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/no-typename-prefix'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-typename-prefix', rule, { +ruleTester.run('no-typename-prefix', rule, { valid: [ /* GraphQL */ ` type User { diff --git a/packages/plugin/tests/no-undefined-variables.spec.ts b/packages/plugin/__tests__/no-undefined-variables.spec.ts similarity index 52% rename from packages/plugin/tests/no-undefined-variables.spec.ts rename to packages/plugin/__tests__/no-undefined-variables.spec.ts index 0ee9f4c4433..fb36f54ebfb 100644 --- a/packages/plugin/tests/no-undefined-variables.spec.ts +++ b/packages/plugin/__tests__/no-undefined-variables.spec.ts @@ -1,17 +1,18 @@ import { join } from 'node:path'; -import { GraphQLRuleTester, rules } from '../src'; +import { ruleTester } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-undefined-variables', rules['no-undefined-variables'], { +ruleTester.run('no-undefined-variables', GRAPHQL_JS_VALIDATIONS['no-undefined-variables'], { valid: [], invalid: [ { filename: join(__dirname, 'mocks/no-undefined-variables.gql'), code: ruleTester.fromMockFile('no-undefined-variables.gql'), parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), + }, }, errors: [ { message: 'Variable "$limit" is not defined by operation "User".' }, diff --git a/packages/plugin/tests/no-unreachable-types.spec.ts b/packages/plugin/__tests__/no-unreachable-types.spec.ts similarity index 58% rename from packages/plugin/tests/no-unreachable-types.spec.ts rename to packages/plugin/__tests__/no-unreachable-types.spec.ts index f9581c7d71f..401050a8754 100644 --- a/packages/plugin/tests/no-unreachable-types.spec.ts +++ b/packages/plugin/__tests__/no-unreachable-types.spec.ts @@ -1,130 +1,137 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/no-unreachable-types'; +import { ruleTester, withSchema } from './test-utils'; -const useSchema = ( - schema: string, -): { code: string; parserOptions: Pick } => { - return { - parserOptions: { schema }, - code: schema, - }; -}; +ruleTester.run('no-unreachable-types', rule, { + valid: [ + withSchema({ + code: /* GraphQL */ ` + scalar A + scalar B -const ruleTester = new GraphQLRuleTester(); + # UnionTypeDefinition + union Response = A | B -ruleTester.runGraphQLTests('no-unreachable-types', rule, { - valid: [ - useSchema(/* GraphQL */ ` - scalar A - scalar B - - # UnionTypeDefinition - union Response = A | B - - type Query { - foo: Response - } - `), - useSchema(/* GraphQL */ ` - type Query { - me: User - } - - # ObjectTypeDefinition - type User { - id: ID - name: String - } - `), - useSchema(/* GraphQL */ ` - type Query { - me: User - } - - # InterfaceTypeDefinition - interface Address { - city: String - } - - type User implements Address { - city: String - } - `), - useSchema(/* GraphQL */ ` - # ScalarTypeDefinition - scalar DateTime - - type Query { - now: DateTime - } - `), - useSchema(/* GraphQL */ ` - # EnumTypeDefinition - enum Role { - ADMIN - USER - } - - type Query { - role: Role - } - `), - useSchema(/* GraphQL */ ` - input UserInput { - id: ID - } - - type Query { - # InputValueDefinition - user(input: UserInput!): Boolean - } - `), - useSchema(/* GraphQL */ ` - # DirectiveDefinition - directive @auth(role: [Role!]!) on FIELD_DEFINITION - - enum Role { - ADMIN - USER - } - - type Query { - # Directive - user: ID @auth(role: [ADMIN]) - } - `), - useSchema(/* GraphQL */ ` - type RootQuery - type RootMutation - type RootSubscription - - schema { - query: RootQuery - mutation: RootMutation - subscription: RootSubscription - } - `), - useSchema(/* GraphQL */ ` - interface User { - id: ID! - } - - interface Manager implements User { - id: ID! - } - - type TopManager implements Manager { - id: ID! - name: String - } - - type Query { - me: User - } - `), - { + type Query { + foo: Response + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + type Query { + me: User + } + + # ObjectTypeDefinition + type User { + id: ID + name: String + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + type Query { + me: User + } + + # InterfaceTypeDefinition + interface Address { + city: String + } + + type User implements Address { + city: String + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + # ScalarTypeDefinition + scalar DateTime + + type Query { + now: DateTime + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + # EnumTypeDefinition + enum Role { + ADMIN + USER + } + + type Query { + role: Role + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + input UserInput { + id: ID + } + + type Query { + # InputValueDefinition + user(input: UserInput!): Boolean + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + # DirectiveDefinition + directive @auth(role: [Role!]!) on FIELD_DEFINITION + + enum Role { + ADMIN + USER + } + + type Query { + # Directive + user: ID @auth(role: [ADMIN]) + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + type RootQuery + type RootMutation + type RootSubscription + + schema { + query: RootQuery + mutation: RootMutation + subscription: RootSubscription + } + `, + }), + withSchema({ + code: /* GraphQL */ ` + interface User { + id: ID! + } + + interface Manager implements User { + id: ID! + } + + type TopManager implements Manager { + id: ID! + name: String + } + + type Query { + me: User + } + `, + }), + withSchema({ name: 'directive on schema', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type Query schema @good { @@ -132,11 +139,11 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { } directive @good on SCHEMA - `), - }, - { + `, + }), + withSchema({ name: 'should ignore directive with request locations', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` directive @q on QUERY directive @w on MUTATION directive @e on SUBSCRIPTION @@ -146,23 +153,23 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { directive @u on INLINE_FRAGMENT directive @i on VARIABLE_DEFINITION type Query - `), - }, - { + `, + }), + withSchema({ name: 'should ignore types from directive arguments with request locations', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` enum Enum { A B } directive @q(arg: Enum = A) on QUERY type Query - `), - }, + `, + }), ], invalid: [ - { - ...useSchema(/* GraphQL */ ` + withSchema({ + code: /* GraphQL */ ` type Query { node(id: ID!): AnotherNode! } @@ -185,15 +192,15 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { name: String address: String } - `), + `, errors: [ { message: 'Interface type `Node` is unreachable.' }, { message: 'Interface type `User` is unreachable.' }, { message: 'Object type `SuperUser` is unreachable.' }, ], - }, - { - ...useSchema(/* GraphQL */ ` + }), + withSchema({ + code: /* GraphQL */ ` # ScalarTypeDefinition scalar DateTime @@ -223,7 +230,7 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { type User implements Address { city: String } - `), + `, errors: [ { message: 'Scalar type `DateTime` is unreachable.' }, { message: 'Enum type `Role` is unreachable.' }, @@ -233,9 +240,9 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { { message: 'Interface type `Address` is unreachable.' }, { message: 'Object type `User` is unreachable.' }, ], - }, - { - ...useSchema(/* GraphQL */ ` + }), + withSchema({ + code: /* GraphQL */ ` interface User { id: String } @@ -254,11 +261,11 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { } scalar DateTime - `), + `, errors: [{ message: 'Scalar type `DateTime` is unreachable.' }], - }, - { - ...useSchema(/* GraphQL */ ` + }), + withSchema({ + code: /* GraphQL */ ` interface User { id: String } @@ -279,15 +286,15 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { type Query { user: AnotherUser! } - `), + `, errors: [ { message: 'Interface type `User` is unreachable.' }, { message: 'Object type `SuperUser` is unreachable.' }, { message: 'Object type `SuperUser` is unreachable.' }, ], - }, - { - ...useSchema(/* GraphQL */ ` + }), + withSchema({ + code: /* GraphQL */ ` type Query { node(id: ID!): Node! } @@ -308,8 +315,8 @@ ruleTester.runGraphQLTests('no-unreachable-types', rule, { } scalar DateTime - `), + `, errors: [{ message: 'Scalar type `DateTime` is unreachable.' }], - }, + }), ], }); diff --git a/packages/plugin/__tests__/no-unused-fields.spec.ts b/packages/plugin/__tests__/no-unused-fields.spec.ts new file mode 100644 index 00000000000..d03e9272f7b --- /dev/null +++ b/packages/plugin/__tests__/no-unused-fields.spec.ts @@ -0,0 +1,143 @@ +import { rule } from '../src/rules/no-unused-fields'; +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this +import { RuleTester } from '@theguild/eslint-rule-tester'; +import { DEFAULT_CONFIG, ParserOptionsForTests } from './test-utils'; + +const SCHEMA = /* GraphQL */ ` + type User { + id: ID! + firstName: String + lastName: String + age: Int + address: Address + } + + type Address { + country: String! + zip: String! + events: [Event!]! + } + + enum EventName { + CREATE + UPDATE + DELETE + } + + type Event { + by: User + name: EventName + data: String + } + + type Query { + user(id: ID!): User + } + + type Mutation { + createUser(firstName: String!): User + deleteUser(id: ID!): User + } +`; + +const ruleTester = new RuleTester({ + ...DEFAULT_CONFIG, + parserOptions: { + graphQLConfig: { + schema: SCHEMA, + }, + }, +}); + +ruleTester.run('no-unused-fields', rule, { + valid: [ + { + code: SCHEMA, + parserOptions: { + graphQLConfig: { + documents: /* GraphQL */ ` + { + user(id: 1) { + ... on User { + address { + zip + events { + ... on Event { + by { + id + } + can_rename: name + data + } + } + } + } + } + } + + fragment UserFields on User { + can_rename: firstName + lastName + } + + mutation { + deleteUser(id: 2) { + age + } + createUser(firstName: "Foo") { + address { + country + } + } + } + `, + }, + }, + }, + ], + invalid: [ + { + code: /* GraphQL */ ` + type User { + id: ID! + firstName: String + } + `, + parserOptions: { + graphQLConfig: { + documents: /* GraphQL */ ` + { + user(id: 1) { + id + } + } + `, + }, + }, + errors: [{ message: 'Field "firstName" is unused' }], + }, + { + code: /* GraphQL */ ` + type Query { + user(id: ID!): User + } + + type Mutation { + deleteUser(id: ID!): User + } + `, + parserOptions: { + graphQLConfig: { + documents: /* GraphQL */ ` + { + user(id: 1) { + id + } + } + `, + }, + }, + errors: [{ message: 'Field "deleteUser" is unused' }], + }, + ], +}); diff --git a/packages/plugin/__tests__/no-unused-fragments.spec.ts b/packages/plugin/__tests__/no-unused-fragments.spec.ts new file mode 100644 index 00000000000..3aa1c3f9189 --- /dev/null +++ b/packages/plugin/__tests__/no-unused-fragments.spec.ts @@ -0,0 +1,24 @@ +import { join } from 'node:path'; +import { ruleTester } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; + +ruleTester.run('no-unused-fragments', GRAPHQL_JS_VALIDATIONS['no-unused-fragments'], { + valid: [ + { + name: 'should find file with operation definition that import current fragment', + filename: join(__dirname, 'mocks/user-fields.graphql'), + code: ruleTester.fromMockFile('user-fields.graphql'), + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: [ + join(__dirname, 'mocks/user-fields.graphql'), + join(__dirname, 'mocks/post-fields.graphql'), + join(__dirname, 'mocks/post.graphql'), + ], + }, + }, + }, + ], + invalid: [], +}); diff --git a/packages/plugin/__tests__/no-unused-variables.spec.ts b/packages/plugin/__tests__/no-unused-variables.spec.ts new file mode 100644 index 00000000000..b19167181a1 --- /dev/null +++ b/packages/plugin/__tests__/no-unused-variables.spec.ts @@ -0,0 +1,19 @@ +import { join } from 'node:path'; +import { ruleTester } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; + +ruleTester.run('no-unused-variables', GRAPHQL_JS_VALIDATIONS['no-unused-variables'], { + valid: [ + { + filename: join(__dirname, 'mocks/no-unused-variables.gql'), + code: ruleTester.fromMockFile('no-unused-variables.gql'), + parserOptions: { + graphQLConfig: { + schema: join(__dirname, 'mocks/user-schema.graphql'), + documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), + }, + }, + }, + ], + invalid: [], +}); diff --git a/packages/plugin/tests/parser.spec.ts b/packages/plugin/__tests__/parser.spec.ts similarity index 82% rename from packages/plugin/tests/parser.spec.ts rename to packages/plugin/__tests__/parser.spec.ts index 2dd548bf9bb..8bc4df3a245 100644 --- a/packages/plugin/tests/parser.spec.ts +++ b/packages/plugin/__tests__/parser.spec.ts @@ -9,7 +9,8 @@ describe('Parser', () => { type Query `; - const result = parseForESLint(code, { filePath: 'test.graphql' }); + // @ts-expect-error -- empty object to run programmatic config + const result = parseForESLint(code, { graphQLConfig: {}, filePath: 'test.graphql' }); expect(result.ast).toMatchSnapshot(); expect(result.ast.tokens).toBeTruthy(); }); @@ -31,7 +32,8 @@ describe('Parser', () => { } `; - const result = parseForESLint(code, { filePath: 'test.graphql' }); + // @ts-expect-error -- empty object to run programmatic config + const result = parseForESLint(code, { graphQLConfig: {}, filePath: 'test.graphql' }); const field = (result.ast.body[0] as any).definitions[0].variableDefinitions[0]; expect(field.type).toBe('VariableDefinition'); @@ -58,8 +60,7 @@ describe('Parser', () => { const result = parseForESLint(code, { filePath: 'test.graphql', - schema, - skipGraphQLConfig: true, + graphQLConfig: { schema }, }); const { selectionSet } = (result.ast.body[0] as any).definitions[0]; const typeInfo = selectionSet.typeInfo(); diff --git a/packages/plugin/tests/possible-type-extension.spec.ts b/packages/plugin/__tests__/possible-type-extension.spec.ts similarity index 59% rename from packages/plugin/tests/possible-type-extension.spec.ts rename to packages/plugin/__tests__/possible-type-extension.spec.ts index f2026d83665..06cfd2feee1 100644 --- a/packages/plugin/tests/possible-type-extension.spec.ts +++ b/packages/plugin/__tests__/possible-type-extension.spec.ts @@ -1,28 +1,27 @@ import { join } from 'node:path'; -import { GraphQLRuleTester, ParserOptions, rules } from '../src'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; +import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; -const ruleTester = new GraphQLRuleTester(); - -const useUserSchema = ( - code: string, -): { code: string; parserOptions: Pick } => { +const useUserSchema = (code: string) => { return { code, parserOptions: { - schema: /* GraphQL */ ` - type User { - id: ID - } + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID + } - type Query { - user: User - } - `, - }, + type Query { + user: User + } + `, + }, + } satisfies ParserOptionsForTests, }; }; -ruleTester.runGraphQLTests('possible-type-extension', rules['possible-type-extension'], { +ruleTester.run('possible-type-extension', GRAPHQL_JS_VALIDATIONS['possible-type-extension'], { valid: [ useUserSchema(/* GraphQL */ ` extend type User { @@ -37,7 +36,9 @@ ruleTester.runGraphQLTests('possible-type-extension', rules['possible-type-exten ), code: ruleTester.fromMockFile('possible-type-extension/separate-graphql-files/type-user.gql'), parserOptions: { - schema: join(__dirname, 'mocks/possible-type-extension/separate-graphql-files/*.gql'), + graphQLConfig: { + schema: join(__dirname, 'mocks/possible-type-extension/separate-graphql-files/*.gql'), + }, }, }, { @@ -49,7 +50,9 @@ ruleTester.runGraphQLTests('possible-type-extension', rules['possible-type-exten } `, parserOptions: { - schema: join(__dirname, 'mocks/possible-type-extension/separate-code-files/*.ts'), + graphQLConfig: { + schema: join(__dirname, 'mocks/possible-type-extension/separate-code-files/*.ts'), + }, }, }, { @@ -57,7 +60,9 @@ ruleTester.runGraphQLTests('possible-type-extension', rules['possible-type-exten filename: join(__dirname, 'mocks/possible-type-extension/one-graphql-file/type-user.gql'), code: ruleTester.fromMockFile('possible-type-extension/one-graphql-file/type-user.gql'), parserOptions: { - schema: join(__dirname, 'mocks/possible-type-extension/one-graphql-file/type-user.gql'), + graphQLConfig: { + schema: join(__dirname, 'mocks/possible-type-extension/one-graphql-file/type-user.gql'), + }, }, }, ], diff --git a/packages/plugin/tests/processor-with-graphql-config.spec.ts b/packages/plugin/__tests__/processor-with-graphql-config.spec.ts similarity index 100% rename from packages/plugin/tests/processor-with-graphql-config.spec.ts rename to packages/plugin/__tests__/processor-with-graphql-config.spec.ts diff --git a/packages/plugin/tests/processor-without-graphql-config.spec.ts b/packages/plugin/__tests__/processor-without-graphql-config.spec.ts similarity index 100% rename from packages/plugin/tests/processor-without-graphql-config.spec.ts rename to packages/plugin/__tests__/processor-without-graphql-config.spec.ts diff --git a/packages/plugin/tests/relay-arguments.spec.ts b/packages/plugin/__tests__/relay-arguments.spec.ts similarity index 79% rename from packages/plugin/tests/relay-arguments.spec.ts rename to packages/plugin/__tests__/relay-arguments.spec.ts index cd4ccb46667..3a8202a739a 100644 --- a/packages/plugin/tests/relay-arguments.spec.ts +++ b/packages/plugin/__tests__/relay-arguments.spec.ts @@ -1,22 +1,22 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions } from '../src/rules/relay-arguments'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -function useSchema(code: string): { code: string; parserOptions: Pick } { +function useSchema(code: string) { return { code, parserOptions: { - schema: /* GraphQL */ ` - ${code} - type PostConnection - type Query - `, - }, + graphQLConfig: { + schema: /* GraphQL */ ` + type PostConnection + type Query + ${code} + `, + }, + } satisfies ParserOptionsForTests, }; } -ruleTester.runGraphQLTests('relay-arguments', rule, { +ruleTester.run('relay-arguments', rule, { valid: [ useSchema(/* GraphQL */ ` type User { diff --git a/packages/plugin/tests/relay-connection-types.spec.ts b/packages/plugin/__tests__/relay-connection-types.spec.ts similarity index 95% rename from packages/plugin/tests/relay-connection-types.spec.ts rename to packages/plugin/__tests__/relay-connection-types.spec.ts index d1c74119ae9..a988f0c4360 100644 --- a/packages/plugin/tests/relay-connection-types.spec.ts +++ b/packages/plugin/__tests__/relay-connection-types.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/relay-connection-types'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('relay-connection-types', rule, { +ruleTester.run('relay-connection-types', rule, { valid: [ { name: 'follow Relay spec', diff --git a/packages/plugin/tests/relay-edge-types.spec.ts b/packages/plugin/__tests__/relay-edge-types.spec.ts similarity index 78% rename from packages/plugin/tests/relay-edge-types.spec.ts rename to packages/plugin/__tests__/relay-edge-types.spec.ts index a6f9f203a3b..af3ac34e3f2 100644 --- a/packages/plugin/tests/relay-edge-types.spec.ts +++ b/packages/plugin/__tests__/relay-edge-types.spec.ts @@ -1,23 +1,12 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions } from '../src/rules/relay-edge-types'; +import { ruleTester, withSchema } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -function useSchema(code: string): { code: string; parserOptions: Pick } { - return { - code, - parserOptions: { - schema: code, - }, - }; -} - -ruleTester.runGraphQLTests('relay-edge-types', rule, { +ruleTester.run('relay-edge-types', rule, { valid: [ - { + withSchema({ name: 'when cursor returns string', options: [{ shouldImplementNode: false }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type AEdge { node: Int! cursor: String! @@ -25,11 +14,11 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), - }, - { + `, + }), + withSchema({ name: 'cursor returns scalar', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` scalar Email type AEdge { node: Email! @@ -38,12 +27,12 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), - }, - { + `, + }), + withSchema({ name: 'with Edge suffix', options: [{ withEdgeSuffix: true }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` scalar Email type AEdge { node: Email! @@ -52,12 +41,12 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), - }, - { + `, + }), + withSchema({ name: 'should implements Node', options: [{ shouldImplementNode: true }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` interface Node { id: ID! } @@ -71,11 +60,11 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), - }, - { + `, + }), + withSchema({ name: 'should not throw when not Object type is used', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type AEdge { node: Int! cursor: String! @@ -83,14 +72,14 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), - }, + `, + }), ], invalid: [ - { + withSchema({ name: 'Edge type must be Object type', options: [{ shouldImplementNode: false, listTypeCanWrapOnlyEdgeType: false }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo type BConnection type DConnection @@ -114,25 +103,25 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { edges: [DEdge!]! pageInfo: PageInfo! } - `), + `, errors: 4, - }, - { + }), + withSchema({ name: 'should report when fields is missing', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo type AEdge type AConnection { edges: [AEdge] pageInfo: PageInfo! } - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'should report cursor when list is used', options: [{ shouldImplementNode: false, listTypeCanWrapOnlyEdgeType: false }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo type AEdge { node: [PageInfo!]! @@ -142,13 +131,13 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { edges: [AEdge] pageInfo: PageInfo! } - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'should report when without Edge suffix', options: [{ withEdgeSuffix: true }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` scalar Email type Aedge { node: Email! @@ -157,13 +146,13 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [Aedge] } - `), + `, errors: 1, - }, - { + }), + withSchema({ name: 'list type', options: [{ listTypeCanWrapOnlyEdgeType: true }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type AEdge { node: Int! cursor: String! @@ -177,13 +166,13 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { messages: [Int]! posts: [Int!]! } - `), + `, errors: 4, - }, - { + }), + withSchema({ name: 'should implements Node', options: [{ shouldImplementNode: true }], - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type User { id: ID! } @@ -194,8 +183,8 @@ ruleTester.runGraphQLTests('relay-edge-types', rule, { type AConnection { edges: [AEdge] } - `), + `, errors: 1, - }, + }), ], }); diff --git a/packages/plugin/tests/relay-page-info.spec.ts b/packages/plugin/__tests__/relay-page-info.spec.ts similarity index 63% rename from packages/plugin/tests/relay-page-info.spec.ts rename to packages/plugin/__tests__/relay-page-info.spec.ts index 07ddd00456d..9f680d8a6fa 100644 --- a/packages/plugin/tests/relay-page-info.spec.ts +++ b/packages/plugin/__tests__/relay-page-info.spec.ts @@ -1,47 +1,38 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/relay-page-info'; +import { ruleTester, withSchema } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -function useSchema(code: string): { code: string; parserOptions: Pick } { - return { - code, - parserOptions: { - schema: code, - }, - }; -} - -ruleTester.runGraphQLTests('relay-page-info', rule, { +ruleTester.run('relay-page-info', rule, { valid: [ - useSchema(/* GraphQL */ ` - type PageInfo { - hasPreviousPage: Boolean! - hasNextPage: Boolean! - startCursor: String - endCursor: String - } - `), - { + withSchema({ + code: /* GraphQL */ ` + type PageInfo { + hasPreviousPage: Boolean! + hasNextPage: Boolean! + startCursor: String + endCursor: String + } + `, + }), + withSchema({ name: 'startCursor/endCursor can be Scalar', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo { hasPreviousPage: Boolean! hasNextPage: Boolean! startCursor: Int endCursor: Float } - `), - }, + `, + }), ], invalid: [ - { - ...useSchema('scalar PageInfo'), + withSchema({ + code: 'scalar PageInfo', errors: 1, - }, - { + }), + withSchema({ name: 'when union', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` union PageInfo = UserConnection | Post extend union PageInfo = Comment type UserConnection { @@ -51,12 +42,12 @@ ruleTester.runGraphQLTests('relay-page-info', rule, { type Post type Comment type UserEdge - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'when input', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` input PageInfo extend input PageInfo { hasPreviousPage: Boolean! @@ -64,12 +55,12 @@ ruleTester.runGraphQLTests('relay-page-info', rule, { startCursor: String endCursor: String } - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'when enum', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` enum PageInfo extend enum PageInfo { hasPreviousPage @@ -77,12 +68,12 @@ ruleTester.runGraphQLTests('relay-page-info', rule, { startCursor endCursor } - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'when interface', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` interface PageInfo extend interface PageInfo { hasPreviousPage: Boolean! @@ -90,12 +81,12 @@ ruleTester.runGraphQLTests('relay-page-info', rule, { startCursor: String endCursor: String } - `), + `, errors: 2, - }, - { + }), + withSchema({ name: 'when extend type', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo extend type PageInfo { hasPreviousPage: Boolean! @@ -103,23 +94,23 @@ ruleTester.runGraphQLTests('relay-page-info', rule, { startCursor: String endCursor: String } - `), + `, errors: 4, - }, - { + }), + withSchema({ name: 'when fields is missing or incorrect return type', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type PageInfo { hasPreviousPage: [Boolean!]! startCursor: [String] } - `), + `, errors: 4, - }, - { + }), + withSchema({ name: 'when `PageInfo` is missing', - ...useSchema('type Query'), + code: 'type Query', errors: 1, - }, + }), ], }); diff --git a/packages/plugin/tests/require-deprecation-date.spec.ts b/packages/plugin/__tests__/require-deprecation-date.spec.ts similarity index 88% rename from packages/plugin/tests/require-deprecation-date.spec.ts rename to packages/plugin/__tests__/require-deprecation-date.spec.ts index c7048257ac1..077633a5a4f 100644 --- a/packages/plugin/tests/require-deprecation-date.spec.ts +++ b/packages/plugin/__tests__/require-deprecation-date.spec.ts @@ -1,5 +1,5 @@ -import { GraphQLRuleTester } from '../src'; import { rule, RuleOptions } from '../src/rules/require-deprecation-date'; +import { ruleTester } from './test-utils'; const now = new Date(); now.setDate(now.getDate() + 1); @@ -10,9 +10,7 @@ const year = now.getFullYear(); const tomorrow = `${day}/${month}/${year}`; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('require-deprecation-date', rule, { +ruleTester.run('require-deprecation-date', rule, { valid: [ 'type User { firstName: String }', `scalar Old @deprecated(deletionDate: "${tomorrow}")`, diff --git a/packages/plugin/tests/require-deprecation-reason.spec.ts b/packages/plugin/__tests__/require-deprecation-reason.spec.ts similarity index 89% rename from packages/plugin/tests/require-deprecation-reason.spec.ts rename to packages/plugin/__tests__/require-deprecation-reason.spec.ts index 84f8dfbff58..6c2284b281c 100644 --- a/packages/plugin/tests/require-deprecation-reason.spec.ts +++ b/packages/plugin/__tests__/require-deprecation-reason.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/require-deprecation-reason'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('require-deprecation-reason', rule, { +ruleTester.run('require-deprecation-reason', rule, { valid: [ /* GraphQL */ ` query getUser { diff --git a/packages/plugin/tests/require-description.spec.ts b/packages/plugin/__tests__/require-description.spec.ts similarity index 93% rename from packages/plugin/tests/require-description.spec.ts rename to packages/plugin/__tests__/require-description.spec.ts index 076cfe819e0..08b462b98fd 100644 --- a/packages/plugin/tests/require-description.spec.ts +++ b/packages/plugin/__tests__/require-description.spec.ts @@ -1,10 +1,9 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions, RULE_ID } from '../src/rules/require-description'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); const OPERATION = { OperationDefinition: true }; -ruleTester.runGraphQLTests('require-description', rule, { +ruleTester.run('require-description', rule, { valid: [ { code: /* GraphQL */ ` @@ -232,17 +231,19 @@ ruleTester.runGraphQLTests('require-description', rule, { ], }); -function useSchema(code: string): { code: string; parserOptions: Pick } { +function useSchema(code: string) { return { code, parserOptions: { - schema: /* GraphQL */ ` - type User { - id: ID! - } + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID! + } - ${code} - `, - }, + ${code} + `, + }, + } satisfies ParserOptionsForTests, }; } diff --git a/packages/plugin/tests/require-field-of-type-query-in-mutation-result.spec.ts b/packages/plugin/__tests__/require-field-of-type-query-in-mutation-result.spec.ts similarity index 85% rename from packages/plugin/tests/require-field-of-type-query-in-mutation-result.spec.ts rename to packages/plugin/__tests__/require-field-of-type-query-in-mutation-result.spec.ts index b74bda23239..e3a48e85fd6 100644 --- a/packages/plugin/tests/require-field-of-type-query-in-mutation-result.spec.ts +++ b/packages/plugin/__tests__/require-field-of-type-query-in-mutation-result.spec.ts @@ -1,24 +1,22 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/require-field-of-type-query-in-mutation-result'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const useSchema = ( - code: string, -): { code: string; parserOptions: Pick } => ({ +const useSchema = (code: string) => ({ code, parserOptions: { - schema: /* GraphQL */ ` - type User { - id: ID! - } + graphQLConfig: { + schema: /* GraphQL */ ` + type User { + id: ID! + } - ${code} - `, - }, + ${code} + `, + }, + } satisfies ParserOptionsForTests, }); -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('require-field-of-type-query-in-mutation-result', rule, { +ruleTester.run('require-field-of-type-query-in-mutation-result', rule, { valid: [ useSchema(/* GraphQL */ ` type Query { diff --git a/packages/plugin/tests/require-import-fragment.spec.ts b/packages/plugin/__tests__/require-import-fragment.spec.ts similarity index 66% rename from packages/plugin/tests/require-import-fragment.spec.ts rename to packages/plugin/__tests__/require-import-fragment.spec.ts index 4a09f908372..b594e68d836 100644 --- a/packages/plugin/tests/require-import-fragment.spec.ts +++ b/packages/plugin/__tests__/require-import-fragment.spec.ts @@ -1,44 +1,26 @@ import { join } from 'node:path'; -import { GraphQLInvalidTestCase, GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/require-import-fragment'; -import { Linter } from 'eslint'; -import ParserOptions = Linter.ParserOptions; +import { ParserOptionsForTests, ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -function withMocks({ - name, - filename, - errors, -}: { - name: string; - filename: string; - errors?: GraphQLInvalidTestCase['errors']; -}): { - name: string; - filename: string; - code: string; - parserOptions: { - documents: ParserOptions['documents']; - }; - errors: any; -} { +function withMocks({ name, filename, errors }: { name: string; filename: string; errors?: any }) { return { name, filename, code: ruleTester.fromMockFile(filename.split('/mocks')[1]), parserOptions: { - documents: [ - filename, - join(__dirname, 'mocks/import-fragments/foo-fragment.gql'), - join(__dirname, 'mocks/import-fragments/bar-fragment.gql'), - ], - }, + graphQLConfig: { + documents: [ + filename, + join(__dirname, 'mocks/import-fragments/foo-fragment.gql'), + join(__dirname, 'mocks/import-fragments/bar-fragment.gql'), + ], + }, + } satisfies ParserOptionsForTests, errors, }; } -ruleTester.runGraphQLTests('require-import-fragment', rule, { +ruleTester.run('require-import-fragment', rule, { valid: [ withMocks({ name: 'should not report with named import', diff --git a/packages/plugin/tests/require-nullable-fields-with-oneof.spec.ts b/packages/plugin/__tests__/require-nullable-fields-with-oneof.spec.ts similarity index 80% rename from packages/plugin/tests/require-nullable-fields-with-oneof.spec.ts rename to packages/plugin/__tests__/require-nullable-fields-with-oneof.spec.ts index fbc77d33774..1e64c9465dd 100644 --- a/packages/plugin/tests/require-nullable-fields-with-oneof.spec.ts +++ b/packages/plugin/__tests__/require-nullable-fields-with-oneof.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/require-nullable-fields-with-oneof'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('require-nullable-fields-with-oneof', rule, { +ruleTester.run('require-nullable-fields-with-oneof', rule, { valid: [ /* GraphQL */ ` input Input @oneOf { diff --git a/packages/plugin/__tests__/require-nullable-result-in-root.spec.ts b/packages/plugin/__tests__/require-nullable-result-in-root.spec.ts new file mode 100644 index 00000000000..8eb40023a70 --- /dev/null +++ b/packages/plugin/__tests__/require-nullable-result-in-root.spec.ts @@ -0,0 +1,53 @@ +import { rule } from '../src/rules/require-nullable-result-in-root'; +import { ruleTester, withSchema } from './test-utils'; + +ruleTester.run('require-nullable-result-in-root', rule, { + valid: [ + withSchema({ + code: /* GraphQL */ ` + type Query { + foo: User + baz: [User]! + bar: [User!]! + } + type User { + id: ID! + } + `, + }), + ], + invalid: [ + withSchema({ + code: /* GraphQL */ ` + type Query { + user: User! + } + type User { + id: ID! + } + `, + errors: 1, + }), + withSchema({ + name: 'should work with extend query', + code: /* GraphQL */ ` + type MyMutation + extend type MyMutation { + user: User! + } + interface User { + id: ID! + } + schema { + mutation: MyMutation + } + `, + errors: 1, + }), + withSchema({ + name: 'should work with default scalars', + code: 'type Mutation { foo: Boolean! }', + errors: 1, + }), + ], +}); diff --git a/packages/plugin/tests/require-id-when-available.spec.ts b/packages/plugin/__tests__/require-selections.spec.ts similarity index 56% rename from packages/plugin/tests/require-id-when-available.spec.ts rename to packages/plugin/__tests__/require-selections.spec.ts index 8099b914c0f..c31e5ad2445 100644 --- a/packages/plugin/tests/require-id-when-available.spec.ts +++ b/packages/plugin/__tests__/require-selections.spec.ts @@ -1,5 +1,5 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; -import { rule, RuleOptions } from '../src/rules/require-id-when-available'; +import { rule, RuleOptions } from '../src/rules/require-selections'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const TEST_SCHEMA = /* GraphQL */ ` type Query { @@ -61,13 +61,14 @@ const USER_POST_SCHEMA = /* GraphQL */ ` const WITH_SCHEMA = { parserOptions: { - schema: TEST_SCHEMA, - documents: '{ foo }', - } as ParserOptions, + graphQLConfig: { + schema: TEST_SCHEMA, + documents: '{ foo }', + }, + } satisfies ParserOptionsForTests, }; -const ruleTester = new GraphQLRuleTester(); -const MESSAGE_ID = { messageId: 'require-id-when-available' }; +const MESSAGE_ID = { messageId: 'require-selections' }; const DOCUMENT_WITH_UNION = /* GraphQL */ ` { @@ -79,7 +80,7 @@ const DOCUMENT_WITH_UNION = /* GraphQL */ ` } `; -ruleTester.runGraphQLTests('require-id-when-available', rule, { +ruleTester.run('require-selections', rule, { valid: [ { name: 'should completely ignore FragmentDefinition', @@ -92,16 +93,20 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: '{ foo }', + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: '{ foo }', + }, }, }, { name: "should ignore checking selections on OperationDefinition as it's redundant check", code: '{ foo }', parserOptions: { - schema: 'type Query { id: ID }', - documents: '{ foo }', + graphQLConfig: { + schema: 'type Query { id: ID }', + documents: '{ foo }', + }, }, }, { ...WITH_SCHEMA, code: '{ noId { name } }' }, @@ -110,8 +115,10 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, name: 'should find selection in fragment', code: '{ hasId { ...HasIdFields } }', parserOptions: { - schema: TEST_SCHEMA, - documents: 'fragment HasIdFields on HasId { id }', + graphQLConfig: { + schema: TEST_SCHEMA, + documents: 'fragment HasIdFields on HasId { id }', + }, }, }, { ...WITH_SCHEMA, code: '{ vehicles { id ...on Car { id mileage } } }' }, @@ -142,16 +149,18 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserLightFields on User { - id - } - fragment UserFullFields on User { - ...UserLightFields - name - } - `, + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserLightFields on User { + id + } + fragment UserFullFields on User { + ...UserLightFields + name + } + `, + }, }, }, { @@ -164,20 +173,22 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserLightFields on User { - id - } - fragment UserMediumFields on User { - ...UserLightFields - name - } - fragment UserFullFields on User { - ...UserMediumFields - name - } - `, + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserLightFields on User { + id + } + fragment UserMediumFields on User { + ...UserLightFields + name + } + fragment UserFullFields on User { + ...UserMediumFields + name + } + `, + }, }, }, { @@ -190,20 +201,22 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserLightFields on User { - ... on User { - id + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserLightFields on User { + ... on User { + id + } } - } - fragment UserMediumFields on User { - ...UserLightFields - } - fragment UserFullFields on User { - ...UserMediumFields - } - `, + fragment UserMediumFields on User { + ...UserLightFields + } + fragment UserFullFields on User { + ...UserMediumFields + } + `, + }, }, }, { @@ -216,26 +229,28 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserFields on User { - id - } - fragment UserLightFields on User { - ... on User { - ...UserFields + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFields on User { + id + } + fragment UserLightFields on User { + ... on User { + ...UserFields + name + } + } + fragment UserMediumFields on User { name + ...UserLightFields } - } - fragment UserMediumFields on User { - name - ...UserLightFields - } - fragment UserFullFields on User { - name - ...UserMediumFields - } - `, + fragment UserFullFields on User { + name + ...UserMediumFields + } + `, + }, }, }, { @@ -248,18 +263,20 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserFields on User { - name - } - fragment UserFullFields on User { - ... on User { - ...UserFields - id # order is matter + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFields on User { + name } - } - `, + fragment UserFullFields on User { + ... on User { + ...UserFields + id # order is matter + } + } + `, + }, }, }, { @@ -272,18 +289,20 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserFields on User { - name - } - fragment UserFullFields on User { - ... on User { - ...UserFields + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFields on User { + name } - id # order is matter - } - `, + fragment UserFullFields on User { + ... on User { + ...UserFields + } + id # order is matter + } + `, + }, }, }, { @@ -321,20 +340,22 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserLightFields on User { - name - } - fragment UserMediumFields on User { - ...UserLightFields - name - } - fragment UserFullFields on User { - ...UserMediumFields - name - } - `, + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserLightFields on User { + name + } + fragment UserMediumFields on User { + ...UserLightFields + name + } + fragment UserFullFields on User { + ...UserMediumFields + name + } + `, + }, }, errors: [MESSAGE_ID], }, @@ -343,8 +364,10 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, code: '{ user { id ...UserFields } }', errors: [MESSAGE_ID], parserOptions: { - schema: USER_POST_SCHEMA, - documents: 'fragment UserFields on User { posts { title } }', + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: 'fragment UserFields on User { posts { title } }', + }, }, }, { @@ -352,22 +375,24 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, code: '{ user { ...UserFullFields } }', errors: [MESSAGE_ID, MESSAGE_ID, MESSAGE_ID, MESSAGE_ID], parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserFullFields on User { - posts { - author { - ...UserFields - authorPosts: posts { - title + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFullFields on User { + posts { + author { + ...UserFields + authorPosts: posts { + title + } } } } - } - fragment UserFields on User { - name - } - `, + fragment UserFields on User { + name + } + `, + }, }, }, { @@ -375,8 +400,10 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, errors: [MESSAGE_ID], code: DOCUMENT_WITH_UNION, parserOptions: { - schema: USER_POST_SCHEMA, - documents: DOCUMENT_WITH_UNION, + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: DOCUMENT_WITH_UNION, + }, }, }, { @@ -392,12 +419,14 @@ ruleTester.runGraphQLTests('require-id-when-available', rule, } `, parserOptions: { - schema: USER_POST_SCHEMA, - documents: /* GraphQL */ ` - fragment UserFields on User { - name - } - `, + graphQLConfig: { + schema: USER_POST_SCHEMA, + documents: /* GraphQL */ ` + fragment UserFields on User { + name + } + `, + }, }, }, ], diff --git a/packages/plugin/tests/require-type-pattern-with-oneof.spec.ts b/packages/plugin/__tests__/require-type-pattern-with-oneof.spec.ts similarity index 85% rename from packages/plugin/tests/require-type-pattern-with-oneof.spec.ts rename to packages/plugin/__tests__/require-type-pattern-with-oneof.spec.ts index 8a08a7d5f16..9cb82548585 100644 --- a/packages/plugin/tests/require-type-pattern-with-oneof.spec.ts +++ b/packages/plugin/__tests__/require-type-pattern-with-oneof.spec.ts @@ -1,9 +1,7 @@ -import { GraphQLRuleTester } from '../src'; import { rule } from '../src/rules/require-type-pattern-with-oneof'; +import { ruleTester } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('require-type-pattern-with-oneof', rule, { +ruleTester.run('require-type-pattern-with-oneof', rule, { valid: [ /* GraphQL */ ` type T @oneOf { diff --git a/packages/plugin/tests/rules.spec.ts b/packages/plugin/__tests__/rules.spec.ts similarity index 71% rename from packages/plugin/tests/rules.spec.ts rename to packages/plugin/__tests__/rules.spec.ts index acca9188621..12d2201b69a 100644 --- a/packages/plugin/tests/rules.spec.ts +++ b/packages/plugin/__tests__/rules.spec.ts @@ -1,12 +1,13 @@ -import { configs, parseForESLint, ParserOptions, rules } from '@graphql-eslint/eslint-plugin'; +import { configs, parseForESLint, rules } from '@graphql-eslint/eslint-plugin'; import eslintExperimentalApis from 'eslint/use-at-your-own-risk'; +import { ParserOptionsForTests } from './test-utils'; // @ts-expect-error we need to wait when ESLint publish correct types const { FlatESLint } = eslintExperimentalApis; export function getESLintWithConfig( config: Record, - parserOptions?: Omit, + graphQLConfig?: ParserOptionsForTests['graphQLConfig'], ) { return new FlatESLint({ overrideConfigFile: true, @@ -16,10 +17,11 @@ export function getESLintWithConfig( languageOptions: { parser: { parseForESLint }, parserOptions: { - schema: 'type Query { foo: Int }', - skipGraphQLConfig: true, - ...parserOptions, - }, + graphQLConfig: { + schema: 'type Query { foo: Int }', + ...graphQLConfig, + }, + } satisfies ParserOptionsForTests, }, plugins: { '@graphql-eslint': { rules }, @@ -43,8 +45,8 @@ describe('Rules', () => { expect(results).toHaveLength(1); }); - it('should load all rules properly from `relay` config', async () => { - const eslint = getESLintWithConfig(configs.relay, { documents: '{ foo }' }); + it('should load all rules properly from `schema-relay` config', async () => { + const eslint = getESLintWithConfig(configs['schema-relay'], { documents: '{ foo }' }); const results = await eslint.lintText('{ foo }', { filePath: 'foo.graphql' }); expect(results).toHaveLength(1); }); diff --git a/packages/plugin/tests/schema.spec.ts b/packages/plugin/__tests__/schema.spec.ts similarity index 71% rename from packages/plugin/tests/schema.spec.ts rename to packages/plugin/__tests__/schema.spec.ts index 1256a941eda..c33f1adc731 100644 --- a/packages/plugin/tests/schema.spec.ts +++ b/packages/plugin/__tests__/schema.spec.ts @@ -1,9 +1,10 @@ import { ChildProcessWithoutNullStreams, spawn } from 'node:child_process'; import { readFile } from 'node:fs/promises'; import path from 'node:path'; -import { GraphQLSchema, printSchema, version } from 'graphql'; +import { GraphQLSchema, printSchema } from 'graphql'; import { loadGraphQLConfig } from '../src/graphql-config'; import { getSchema } from '../src/schema'; +import { CWD } from '../src/utils'; describe('schema', async () => { const SCHEMA_GRAPHQL_PATH = path.resolve(__dirname, 'mocks/user-schema.graphql'); @@ -12,22 +13,11 @@ describe('schema', async () => { const schemaOnDisk = await readFile(SCHEMA_GRAPHQL_PATH, 'utf8'); const testSchema = (schema: string) => { - const gqlConfig = loadGraphQLConfig({ schema, filePath: '' }); + const gqlConfig = loadGraphQLConfig({ graphQLConfig: { schema }, filePath: '' }); const graphQLSchema = getSchema(gqlConfig.getDefault()); expect(graphQLSchema).toBeInstanceOf(GraphQLSchema); - let sdlString = printSchema(graphQLSchema as GraphQLSchema); - - if (version.startsWith('15')) { - sdlString = sdlString.replace( - `"""Exposes a URL that specifies the behaviour of this scalar.""" -directive @specifiedBy( - """The URL that specifies the behaviour of this scalar.""" - url: String! -) on SCALAR`, - '', - ); - } + const sdlString = printSchema(graphQLSchema as GraphQLSchema); expect(sdlString.trim()).toBe(schemaOnDisk.trim()); }; @@ -57,7 +47,7 @@ directive @specifiedBy( beforeAll( () => new Promise(resolve => { - const tsNodeCommand = path.resolve(process.cwd(), 'node_modules/.bin/tsx'); + const tsNodeCommand = path.resolve(CWD, '..', '..', 'node_modules', '.bin', 'tsx'); const serverPath = path.resolve(__dirname, 'mocks/graphql-server.ts'); // Import `TestGraphQLServer` and run it in this file will don't work @@ -87,42 +77,32 @@ directive @specifiedBy( }); describe('should passe headers', () => { - let schemaUrl: string; - let schemaOptions; - - beforeAll(() => { - schemaUrl = `${url}/my-headers`; - schemaOptions = { - headers: { - authorization: 'Bearer Foo', - }, - }; - }); - // https://graphql-config.com/schema#passing-headers it('with `parserOptions.schema`', () => { const gqlConfig = loadGraphQLConfig({ - schema: { - [schemaUrl]: schemaOptions, + graphQLConfig: { + // @ts-expect-error -- here I don't know why it's complaining + schema: { + [`${url}/my-headers`]: { + headers: { + authorization: 'Bearer Foo', + }, + }, + }, }, filePath: '', }); expect(() => getSchema(gqlConfig.getDefault())).toThrow('authorization: "Bearer Foo"'); }); - - // https://github.com/B2o5T/graphql-eslint/blob/master/docs/parser-options.md#schemaoptions - it('with `parserOptions.schemaOptions`', () => { - const gqlConfig = loadGraphQLConfig({ schema: schemaUrl, filePath: '' }); - expect(() => getSchema(gqlConfig.getDefault(), schemaOptions)).toThrow( - 'authorization: "Bearer Foo"', - ); - }); }); }); describe('schema loading', () => { it('should return Error', () => { - const gqlConfig = loadGraphQLConfig({ schema: 'not-exist.gql', filePath: '' }); + const gqlConfig = loadGraphQLConfig({ + graphQLConfig: { schema: 'not-exist.gql' }, + filePath: '', + }); expect(() => getSchema(gqlConfig.getDefault())).toThrow( 'Unable to find any GraphQL type definitions for the following pointers', ); @@ -131,7 +111,9 @@ directive @specifiedBy( it('should load the graphql-config rc file relative to the linted file', () => { const gqlConfig = loadGraphQLConfig({ - schema: path.resolve(__dirname, 'mocks/using-config/schema.graphql'), + graphQLConfig: { + schema: path.resolve(__dirname, 'mocks/using-config/schema-in-config.graphql'), + }, filePath: path.resolve(__dirname, 'mocks/using-config/test.graphql'), }); diff --git a/packages/plugin/tests/selection-set-depth.spec.ts b/packages/plugin/__tests__/selection-set-depth.spec.ts similarity index 83% rename from packages/plugin/tests/selection-set-depth.spec.ts rename to packages/plugin/__tests__/selection-set-depth.spec.ts index 5ff345178be..565f14dd9c0 100644 --- a/packages/plugin/tests/selection-set-depth.spec.ts +++ b/packages/plugin/__tests__/selection-set-depth.spec.ts @@ -1,15 +1,15 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions } from '../src/rules/selection-set-depth'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const WITH_SIBLINGS = { parserOptions: { - documents: 'fragment AlbumFields on Album { id }', - } as ParserOptions, + graphQLConfig: { + documents: 'fragment AlbumFields on Album { id }', + }, + } satisfies ParserOptionsForTests, }; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('selection-set-depth', rule, { +ruleTester.run('selection-set-depth', rule, { valid: [ { options: [{ maxDepth: 2 }], @@ -98,14 +98,16 @@ ruleTester.runGraphQLTests('selection-set-depth', rule, { { name: 'suggestions should not throw error when fragment is located in different file', parserOptions: { - documents: /* GraphQL */ ` - fragment AlbumFields on Album { - id - modifier { - date + graphQLConfig: { + documents: /* GraphQL */ ` + fragment AlbumFields on Album { + id + modifier { + date + } } - } - `, + `, + }, }, options: [{ maxDepth: 2 }], errors: [{ message: "'' exceeds maximum operation depth of 2" }], diff --git a/packages/plugin/tests/strict-id-in-types.spec.ts b/packages/plugin/__tests__/strict-id-in-types.spec.ts similarity index 61% rename from packages/plugin/tests/strict-id-in-types.spec.ts rename to packages/plugin/__tests__/strict-id-in-types.spec.ts index afbf212a1ef..af8c28fe98a 100644 --- a/packages/plugin/tests/strict-id-in-types.spec.ts +++ b/packages/plugin/__tests__/strict-id-in-types.spec.ts @@ -1,40 +1,29 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule, RuleOptions } from '../src/rules/strict-id-in-types'; +import { ruleTester, withSchema } from './test-utils'; -const ruleTester = new GraphQLRuleTester(); - -function useSchema(code: string): { code: string; parserOptions: Pick } { - return { - code, - parserOptions: { - schema: code, - }, - }; -} - -ruleTester.runGraphQLTests('strict-id-in-types', rule, { +ruleTester.run('strict-id-in-types', rule, { valid: [ - useSchema('type A { id: ID! }'), - { - ...useSchema('type A { _id: String! }'), + withSchema({ code: 'type A { id: ID! }' }), + withSchema({ + code: 'type A { _id: String! }', options: [ { acceptedIdNames: ['_id'], acceptedIdTypes: ['String'], }, ], - }, - { - ...useSchema('type A { _id: String! } type A1 { id: ID! }'), + }), + withSchema({ + code: 'type A { _id: String! } type A1 { id: ID! }', options: [ { acceptedIdNames: ['id', '_id'], acceptedIdTypes: ['ID', 'String'], }, ], - }, - { - ...useSchema('type A { id: ID! } type AResult { key: String! }'), + }), + withSchema({ + code: 'type A { id: ID! } type AResult { key: String! }', options: [ { acceptedIdNames: ['id'], @@ -44,9 +33,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema('type A { id: ID! } type A1 { id: ID! }'), + }), + withSchema({ + code: 'type A { id: ID! } type A1 { id: ID! }', options: [ { acceptedIdNames: ['id'], @@ -56,20 +45,18 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema('type A { id: ID! } type A1 { id: ID! }'), + }), + withSchema({ + code: 'type A { id: ID! } type A1 { id: ID! }', options: [ { acceptedIdNames: ['id'], acceptedIdTypes: ['ID'], }, ], - }, - { - ...useSchema( - 'type A { id: ID! } type AResult { key: String! } type APayload { bool: Boolean! } type APagination { num: Int! }', - ), + }), + withSchema({ + code: 'type A { id: ID! } type AResult { key: String! } type APayload { bool: Boolean! } type APagination { num: Int! }', options: [ { acceptedIdNames: ['id'], @@ -79,9 +66,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema('type A { id: ID! } type AError { message: String! }'), + }), + withSchema({ + code: 'type A { id: ID! } type AError { message: String! }', options: [ { acceptedIdNames: ['id'], @@ -91,11 +78,10 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema( - 'type A { id: ID! } type AGeneralError { message: String! } type AForbiddenError { message: String! }', - ), + }), + withSchema({ + code: 'type A { id: ID! } type AGeneralError { message: String! } type AForbiddenError { message: String! }', + options: [ { acceptedIdNames: ['id'], @@ -105,9 +91,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema('type A { id: ID! }'), + }), + withSchema({ + code: 'type A { id: ID! }', options: [ { acceptedIdNames: ['id'], @@ -117,11 +103,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { - ...useSchema( - 'type A { id: ID! } type AError { message: String! } type AResult { payload: A! }', - ), + }), + withSchema({ + code: 'type A { id: ID! } type AError { message: String! } type AResult { payload: A! }', options: [ { acceptedIdNames: ['id'], @@ -132,10 +116,10 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, }, ], - }, - { + }), + withSchema({ name: 'should ignore root types', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type User { id: ID! } @@ -148,11 +132,11 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { type Subscription { userAdded: User } - `), - }, - { + `, + }), + withSchema({ name: 'should ignore root types that are renamed', - ...useSchema(/* GraphQL */ ` + code: /* GraphQL */ ` type User { id: ID! } @@ -170,16 +154,16 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { mutation: MyMutation subscription: MySubscription } - `), - }, + `, + }), ], invalid: [ - { - ...useSchema('type B { name: String! }'), + withSchema({ + code: 'type B { name: String! }', errors: 1, - }, - { - ...useSchema('type B { id: ID! _id: String! }'), + }), + withSchema({ + code: 'type B { id: ID! _id: String! }', options: [ { acceptedIdNames: ['id', '_id'], @@ -187,11 +171,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, ], errors: 1, - }, - { - ...useSchema( - 'type B { id: String! } type B1 { id: [String] } type B2 { id: [String!] } type B3 { id: [String]! } type B4 { id: [String!]! }', - ), + }), + withSchema({ + code: 'type B { id: String! } type B1 { id: [String] } type B2 { id: [String!] } type B3 { id: [String]! } type B4 { id: [String!]! }', options: [ { acceptedIdNames: ['id'], @@ -199,11 +181,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, ], errors: 4, - }, - { - ...useSchema( - 'type B { id: ID! } type Bresult { key: String! } type BPayload { bool: Boolean! } type BPagination { num: Int! }', - ), + }), + withSchema({ + code: 'type B { id: ID! } type Bresult { key: String! } type BPayload { bool: Boolean! } type BPagination { num: Int! }', options: [ { acceptedIdNames: ['id'], @@ -214,9 +194,9 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, ], errors: 2, - }, - { - ...useSchema('type B { id: ID! } type BError { message: String! }'), + }), + withSchema({ + code: 'type B { id: ID! } type BError { message: String! }', options: [ { acceptedIdNames: ['id'], @@ -227,6 +207,6 @@ ruleTester.runGraphQLTests('strict-id-in-types', rule, { }, ], errors: 1, - }, + }), ], }); diff --git a/packages/plugin/__tests__/test-utils.ts b/packages/plugin/__tests__/test-utils.ts new file mode 100644 index 00000000000..b29a1d95751 --- /dev/null +++ b/packages/plugin/__tests__/test-utils.ts @@ -0,0 +1,28 @@ +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this +import { RuleTester } from '@theguild/eslint-rule-tester'; +import { ParserOptions } from '../src/index.js'; + +export const DEFAULT_CONFIG = { + parser: require.resolve('@graphql-eslint/eslint-plugin'), + parserOptions: { + graphQLConfig: {}, + }, +}; + +export type ParserOptionsForTests = { + graphQLConfig: Partial; +}; + +export const ruleTester = new RuleTester(DEFAULT_CONFIG); + +export function withSchema({ code, ...rest }: T) { + return { + code, + parserOptions: { + graphQLConfig: { + schema: code, + }, + } satisfies ParserOptionsForTests, + ...rest, + }; +} diff --git a/packages/plugin/__tests__/unique-enum-value-names.spec.ts b/packages/plugin/__tests__/unique-enum-value-names.spec.ts new file mode 100644 index 00000000000..53d03b17bab --- /dev/null +++ b/packages/plugin/__tests__/unique-enum-value-names.spec.ts @@ -0,0 +1,16 @@ +import { rule } from '../src/rules/unique-enum-value-names'; +import { ruleTester } from './test-utils'; + +ruleTester.run('unique-enum-value-names', rule, { + valid: [], + invalid: [ + { + code: 'enum A { TEST TesT }', + errors: 1, + }, + { + code: 'extend enum A { TEST TesT }', + errors: 1, + }, + ], +}); diff --git a/packages/plugin/tests/unique-fragment-name.spec.ts b/packages/plugin/__tests__/unique-fragment-name.spec.ts similarity index 82% rename from packages/plugin/tests/unique-fragment-name.spec.ts rename to packages/plugin/__tests__/unique-fragment-name.spec.ts index dd4a036ca81..6f0c7217f9a 100644 --- a/packages/plugin/tests/unique-fragment-name.spec.ts +++ b/packages/plugin/__tests__/unique-fragment-name.spec.ts @@ -1,6 +1,6 @@ import { join } from 'node:path'; -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/unique-fragment-name'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const TEST_FRAGMENT = /* GraphQL */ ` fragment HasIdFields on HasId { @@ -8,17 +8,15 @@ const TEST_FRAGMENT = /* GraphQL */ ` } `; -const SIBLING_FRAGMENTS = ( - ...documents: string[] -): { parserOptions: Pick } => ({ +const SIBLING_FRAGMENTS = (...documents: string[]) => ({ parserOptions: { - documents, - }, + graphQLConfig: { + documents, + }, + } satisfies ParserOptionsForTests, }); -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('unique-fragment-name', rule, { +ruleTester.run('unique-fragment-name', rule, { valid: [ { ...SIBLING_FRAGMENTS(TEST_FRAGMENT), diff --git a/packages/plugin/tests/unique-operation-name.spec.ts b/packages/plugin/__tests__/unique-operation-name.spec.ts similarity index 76% rename from packages/plugin/tests/unique-operation-name.spec.ts rename to packages/plugin/__tests__/unique-operation-name.spec.ts index 58008d4b34c..29f1a019581 100644 --- a/packages/plugin/tests/unique-operation-name.spec.ts +++ b/packages/plugin/__tests__/unique-operation-name.spec.ts @@ -1,20 +1,18 @@ import { join } from 'node:path'; -import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/unique-operation-name'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const TEST_OPERATION = 'query test { foo }'; -const SIBLING_OPERATIONS = ( - ...documents: string[] -): { parserOptions: Pick } => ({ +const SIBLING_OPERATIONS = (...documents: string[]) => ({ parserOptions: { - documents, - }, + graphQLConfig: { + documents, + }, + } satisfies ParserOptionsForTests, }); -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('unique-operation-name', rule, { +ruleTester.run('unique-operation-name', rule, { valid: [ { ...SIBLING_OPERATIONS(TEST_OPERATION), diff --git a/packages/plugin/tests/unique-type-names.spec.ts b/packages/plugin/__tests__/unique-type-names.spec.ts similarity index 73% rename from packages/plugin/tests/unique-type-names.spec.ts rename to packages/plugin/__tests__/unique-type-names.spec.ts index a82b4667afc..523010694e8 100644 --- a/packages/plugin/tests/unique-type-names.spec.ts +++ b/packages/plugin/__tests__/unique-type-names.spec.ts @@ -1,5 +1,5 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; +import { ParserOptionsForTests, ruleTester } from './test-utils'; const TEST_SCHEMA = /* GraphQL */ ` type Query { @@ -10,14 +10,13 @@ const TEST_SCHEMA = /* GraphQL */ ` const WITH_SCHEMA = { parserOptions: { - schema: TEST_SCHEMA, - documents: [], - } as ParserOptions, + graphQLConfig: { + schema: TEST_SCHEMA, + }, + } satisfies ParserOptionsForTests, }; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('unique-type-names', GRAPHQL_JS_VALIDATIONS['unique-type-names'], { +ruleTester.run('unique-type-names', GRAPHQL_JS_VALIDATIONS['unique-type-names'], { valid: [ { ...WITH_SCHEMA, code: TEST_SCHEMA }, { diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 6e3926a6b0f..ea7ad9cf5ef 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,18 +1,18 @@ { "name": "@graphql-eslint/eslint-plugin", - "version": "3.20.1", + "version": "4.0.0-alpha.0", "description": "GraphQL plugin for ESLint", "repository": "https://github.com/B2o5T/graphql-eslint", "author": "Dotan Simha ", "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" }, "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", "exports": { "./package.json": "./package.json", ".": { + "browser": "./dist/index.browser.mjs", "require": { "types": "./dist/cjs/index.d.ts", "default": "./dist/cjs/index.js" @@ -27,7 +27,6 @@ } } }, - "typings": "dist/esm/index.d.mts", "keywords": [ "eslint", "eslintplugin", @@ -35,28 +34,28 @@ "graphql" ], "scripts": { - "build": "tsup" + "build": "tsup", + "test": "vitest", + "typecheck": "tsc --noEmit" }, "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" + "eslint": ">=8.44.0", + "graphql": "^16" }, "dependencies": { - "@babel/code-frame": "^7.18.6", "@graphql-tools/code-file-loader": "^7.3.6", "@graphql-tools/graphql-tag-pluck": "^7.3.6", "@graphql-tools/utils": "^9.0.0", - "chalk": "^4.1.2", "debug": "^4.3.4", "fast-glob": "^3.2.12", - "graphql-config": "^4.4.0", + "graphql-config": "^4.5.0", "graphql-depth-limit": "^1.1.0", - "lodash.lowercase": "^4.3.0", - "tslib": "^2.4.1" + "lodash.lowercase": "^4.3.0" }, "devDependencies": { - "@types/babel__code-frame": "7.0.3", + "@theguild/eslint-rule-tester": "workspace:*", "@types/debug": "4.1.8", - "@types/eslint": "8.37.0", + "@types/eslint": "8.44.2", "@types/estree": "1.0.1", "@types/graphql-depth-limit": "1.1.3", "@types/json-schema": "7.0.12", @@ -68,8 +67,5 @@ "directory": "dist", "access": "public" }, - "sideEffects": false, - "typescript": { - "definition": "dist/cjs/index.d.ts" - } + "sideEffects": false } diff --git a/serializer.ts b/packages/plugin/serializer.ts similarity index 62% rename from serializer.ts rename to packages/plugin/serializer.ts index 4066f9ec00c..242225be3db 100644 --- a/serializer.ts +++ b/packages/plugin/serializer.ts @@ -1,3 +1,4 @@ +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this import rawSnapshotSerializer from 'jest-snapshot-serializer-raw/always'; expect.addSnapshotSerializer(rawSnapshotSerializer); diff --git a/packages/plugin/src/configs/index.ts b/packages/plugin/src/configs/index.ts index c97e1a42bfd..d31e36be6c6 100644 --- a/packages/plugin/src/configs/index.ts +++ b/packages/plugin/src/configs/index.ts @@ -1,13 +1,14 @@ import operationsAllConfig from './operations-all.js'; import operationsRecommendedConfig from './operations-recommended.js'; -import relayConfig from './relay.js'; import schemaAllConfig from './schema-all.js'; import schemaRecommendedConfig from './schema-recommended.js'; +import relayConfig from './schema-relay.js'; +import { ConfigName } from '../types.js'; export const configs = { 'schema-recommended': schemaRecommendedConfig, 'schema-all': schemaAllConfig, + 'schema-relay': relayConfig, 'operations-recommended': operationsRecommendedConfig, 'operations-all': operationsAllConfig, - relay: relayConfig, -}; +} satisfies Record; diff --git a/packages/plugin/src/configs/operations-all.ts b/packages/plugin/src/configs/operations-all.ts index 9896c9e3007..a2c3cf75843 100644 --- a/packages/plugin/src/configs/operations-all.ts +++ b/packages/plugin/src/configs/operations-all.ts @@ -8,9 +8,11 @@ export = { '@graphql-eslint/alphabetize': [ 'error', { + definitions: true, selections: ['OperationDefinition', 'FragmentDefinition'], - variables: ['OperationDefinition'], + variables: true, arguments: ['Field', 'Directive'], + groups: ['id', '*', 'createdAt', 'updatedAt'], }, ], '@graphql-eslint/lone-executable-definition': 'error', @@ -24,7 +26,6 @@ export = { }, ], '@graphql-eslint/no-one-place-fragments': 'error', - '@graphql-eslint/unique-fragment-name': 'error', - '@graphql-eslint/unique-operation-name': 'error', + '@graphql-eslint/require-import-fragment': 'error', }, }; diff --git a/packages/plugin/src/configs/operations-recommended.ts b/packages/plugin/src/configs/operations-recommended.ts index 3e0346ae6f1..b4930c39f7b 100644 --- a/packages/plugin/src/configs/operations-recommended.ts +++ b/packages/plugin/src/configs/operations-recommended.ts @@ -41,12 +41,14 @@ export = { '@graphql-eslint/overlapping-fields-can-be-merged': 'error', '@graphql-eslint/possible-fragment-spread': 'error', '@graphql-eslint/provided-required-arguments': 'error', - '@graphql-eslint/require-id-when-available': 'error', + '@graphql-eslint/require-selections': 'error', '@graphql-eslint/scalar-leafs': 'error', '@graphql-eslint/selection-set-depth': ['error', { maxDepth: 7 }], '@graphql-eslint/unique-argument-names': 'error', '@graphql-eslint/unique-directive-names-per-location': 'error', + '@graphql-eslint/unique-fragment-name': 'error', '@graphql-eslint/unique-input-field-names': 'error', + '@graphql-eslint/unique-operation-name': 'error', '@graphql-eslint/unique-variable-names': 'error', '@graphql-eslint/value-literals-of-correct-type': 'error', '@graphql-eslint/variables-are-input-types': 'error', diff --git a/packages/plugin/src/configs/schema-all.ts b/packages/plugin/src/configs/schema-all.ts index f159e61b55e..f6a62a62b24 100644 --- a/packages/plugin/src/configs/schema-all.ts +++ b/packages/plugin/src/configs/schema-all.ts @@ -8,12 +8,15 @@ export = { '@graphql-eslint/alphabetize': [ 'error', { + definitions: true, fields: ['ObjectTypeDefinition', 'InterfaceTypeDefinition', 'InputObjectTypeDefinition'], - values: ['EnumTypeDefinition'], + values: true, arguments: ['FieldDefinition', 'Field', 'DirectiveDefinition', 'Directive'], + groups: ['id', '*', 'createdAt', 'updatedAt'], }, ], '@graphql-eslint/input-name': 'error', + '@graphql-eslint/no-root-type': ['error', { disallow: ['mutation', 'subscription'] }], '@graphql-eslint/no-scalar-result-type-on-mutation': 'error', '@graphql-eslint/require-deprecation-date': 'error', '@graphql-eslint/require-field-of-type-query-in-mutation-result': 'error', diff --git a/packages/plugin/src/configs/schema-recommended.ts b/packages/plugin/src/configs/schema-recommended.ts index 4b6be28f61b..54202c400f6 100644 --- a/packages/plugin/src/configs/schema-recommended.ts +++ b/packages/plugin/src/configs/schema-recommended.ts @@ -32,18 +32,38 @@ export = { forbiddenPrefixes: ['subscription'], forbiddenSuffixes: ['Subscription'], }, + 'EnumTypeDefinition,EnumTypeExtension': { + forbiddenPrefixes: ['Enum'], + forbiddenSuffixes: ['Enum'], + }, + 'InterfaceTypeDefinition,InterfaceTypeExtension': { + forbiddenPrefixes: ['Interface'], + forbiddenSuffixes: ['Interface'], + }, + 'UnionTypeDefinition,UnionTypeExtension': { + forbiddenPrefixes: ['Union'], + forbiddenSuffixes: ['Union'], + }, + 'ObjectTypeDefinition,ObjectTypeExtension': { + forbiddenPrefixes: ['Type'], + forbiddenSuffixes: ['Type'], + }, }, ], - '@graphql-eslint/no-case-insensitive-enum-values-duplicates': 'error', '@graphql-eslint/no-hashtag-description': 'error', '@graphql-eslint/no-typename-prefix': 'error', '@graphql-eslint/no-unreachable-types': 'error', + '@graphql-eslint/possible-type-extension': 'error', '@graphql-eslint/provided-required-arguments': 'error', '@graphql-eslint/require-deprecation-reason': 'error', - '@graphql-eslint/require-description': ['error', { types: true, DirectiveDefinition: true }], + '@graphql-eslint/require-description': [ + 'error', + { types: true, DirectiveDefinition: true, rootField: true }, + ], '@graphql-eslint/strict-id-in-types': 'error', '@graphql-eslint/unique-directive-names': 'error', '@graphql-eslint/unique-directive-names-per-location': 'error', + '@graphql-eslint/unique-enum-value-names': 'error', '@graphql-eslint/unique-field-definition-names': 'error', '@graphql-eslint/unique-operation-types': 'error', '@graphql-eslint/unique-type-names': 'error', diff --git a/packages/plugin/src/configs/relay.ts b/packages/plugin/src/configs/schema-relay.ts similarity index 100% rename from packages/plugin/src/configs/relay.ts rename to packages/plugin/src/configs/schema-relay.ts diff --git a/packages/plugin/src/documents.ts b/packages/plugin/src/documents.ts index 2ed3fc1df1f..70e23a3d45c 100644 --- a/packages/plugin/src/documents.ts +++ b/packages/plugin/src/documents.ts @@ -1,4 +1,4 @@ -import { resolve } from 'path'; +import { resolve } from 'node:path'; import { Source } from '@graphql-tools/utils'; import debugFactory from 'debug'; import fg from 'fast-glob'; diff --git a/packages/plugin/src/estree-converter/utils.ts b/packages/plugin/src/estree-converter/utils.ts index 1a93e258bef..0486a58b759 100644 --- a/packages/plugin/src/estree-converter/utils.ts +++ b/packages/plugin/src/estree-converter/utils.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ import { AST } from 'eslint'; import { Comment, SourceLocation } from 'estree'; import { @@ -25,40 +24,14 @@ export function getBaseType(type: GraphQLOutputType): GraphQLNamedType { return type; } -// Hardcoded type because tests fails on graphql 15 -type TokenKindValue = - | ':' - | '!' - | '...' - | '(' - | ')' - | '[' - | ']' - | '{' - | '}' - | '@' - | '&' - // | '' - | '' - | '=' - | '|' - | '$' - | 'BlockString' - | 'Comment' - | 'Float' - | 'Int' - | 'Name' - | 'String'; - -export function convertToken( +export function convertToken( token: Token, type: T, ): Omit & { type: T } { const { line, column, end, start, value } = token; return { type, - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TODO: remove `!` when drop support of graphql@15 - value: value!, + value, /* * ESLint has 0-based column number * https://eslint.org/docs/developer-guide/working-with-rules#contextreport @@ -77,25 +50,9 @@ export function convertToken( }; } -function getLexer(source: Source): Lexer { - // GraphQL v14 - const gqlLanguage = require('graphql/language'); - if (gqlLanguage?.createLexer) { - return gqlLanguage.createLexer(source, {}); - } - - // GraphQL v15 - const { Lexer: LexerCls } = require('graphql'); - if (LexerCls && typeof LexerCls === 'function') { - return new LexerCls(source); - } - - throw new Error('Unsupported GraphQL version! Please make sure to use GraphQL v14 or newer!'); -} - export function extractTokens(filePath: string, code: string): AST.Token[] { const source = new Source(code, filePath); - const lexer = getLexer(source); + const lexer = new Lexer(source); const tokens: AST.Token[] = []; let token = lexer.advance(); @@ -120,8 +77,7 @@ export function extractComments(loc?: Location): Comment[] { const comment = convertToken( token, // `eslint-disable` directive works only with `Block` type comment - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TODO: remove `!` when drop support of graphql@15 - token.value!.trimStart().startsWith('eslint') ? 'Block' : 'Line', + token.value.trimStart().startsWith('eslint') ? 'Block' : 'Line', ); comments.push(comment); } diff --git a/packages/plugin/src/flat-configs.ts b/packages/plugin/src/flat-configs.ts index 6bc15e22143..29395c940f5 100644 --- a/packages/plugin/src/flat-configs.ts +++ b/packages/plugin/src/flat-configs.ts @@ -1,5 +1,6 @@ import { configs } from './configs/index.js'; import { parseForESLint } from './parser.js'; +import { ConfigName } from './types.js'; const languageOptions = { parser: { parseForESLint }, @@ -17,9 +18,9 @@ export const flatConfigs = { languageOptions, rules: configs['operations-recommended'].rules, }, - relay: { + 'schema-relay': { languageOptions, - rules: configs.relay.rules, + rules: configs['schema-relay'].rules, }, 'schema-all': { languageOptions, @@ -32,4 +33,4 @@ export const flatConfigs = { languageOptions, rules: configs['schema-recommended'].rules, }, -}; +} satisfies Record; diff --git a/packages/plugin/src/graphql-config.ts b/packages/plugin/src/graphql-config.ts index beb4751462d..2ca011c3c4a 100644 --- a/packages/plugin/src/graphql-config.ts +++ b/packages/plugin/src/graphql-config.ts @@ -1,12 +1,7 @@ -import { dirname } from 'path'; +import path from 'node:path'; import { CodeFileLoader } from '@graphql-tools/code-file-loader'; import debugFactory from 'debug'; -import { - GraphQLConfig, - GraphQLExtensionDeclaration, - loadConfigSync, - SchemaPointer, -} from 'graphql-config'; +import { GraphQLConfig, GraphQLExtensionDeclaration, loadConfigSync } from 'graphql-config'; import { ParserOptions } from './types.js'; const debug = debugFactory('graphql-eslint:graphql-config'); @@ -15,46 +10,39 @@ let graphQLConfig: GraphQLConfig; export function loadOnDiskGraphQLConfig(filePath: string): GraphQLConfig { return loadConfigSync({ // load config relative to the file being linted - rootDir: dirname(filePath), - throwOnEmpty: false, + rootDir: path.dirname(filePath), throwOnMissing: false, extensions: [codeFileLoaderExtension], }); } -export function loadGraphQLConfig(options: ParserOptions): GraphQLConfig { +export function loadGraphQLConfig({ + graphQLConfig: config, + filePath, +}: ParserOptions): GraphQLConfig { // We don't want cache config on test environment // Otherwise schema and documents will be same for all tests if (process.env.NODE_ENV !== 'test' && graphQLConfig) { return graphQLConfig; } - - const onDiskConfig = !options.skipGraphQLConfig && loadOnDiskGraphQLConfig(options.filePath); - - debug('options.skipGraphQLConfig: %o', options.skipGraphQLConfig); + debug('parserOptions.graphQLConfig: %o', config); + const onDiskConfig = !config && loadOnDiskGraphQLConfig(filePath); if (onDiskConfig) { - debug('Graphql-config path %o', onDiskConfig.filepath); + debug('GraphQL-Config path %o', onDiskConfig.filepath); } - const configOptions = options.projects - ? { projects: options.projects } - : { - schema: (options.schema || '') as SchemaPointer, // if `schema` is `undefined` will throw error `Project 'default' not found` - documents: options.documents, - extensions: options.extensions, - include: options.include, - exclude: options.exclude, - }; + const configOptions = + config && ('projects' in config || 'schemaPath' in config) + ? config + : { + // if `schema` is `undefined` will throw error `Project 'default' not found` + schema: config?.schema ?? '', + ...config, + }; graphQLConfig = onDiskConfig || - new GraphQLConfig( - { - config: configOptions, - filepath: 'virtual-config', - }, - [codeFileLoaderExtension], - ); + new GraphQLConfig({ config: configOptions, filepath: '' }, [codeFileLoaderExtension]); return graphQLConfig; } @@ -63,5 +51,5 @@ const codeFileLoaderExtension: GraphQLExtensionDeclaration = api => { const { schema, documents } = api.loaders; schema.register(new CodeFileLoader()); documents.register(new CodeFileLoader()); - return { name: 'graphql-eslint-loaders' }; + return { name: 'code-file-loaders' }; }; diff --git a/packages/plugin/src/index.browser.ts b/packages/plugin/src/index.browser.ts new file mode 100644 index 00000000000..f8e43ac9661 --- /dev/null +++ b/packages/plugin/src/index.browser.ts @@ -0,0 +1,8 @@ +// rewrite exports because we don't need `processors` export that has fs related dependencies + +export { parseForESLint } from './parser.js'; +export { rules } from './rules/index.js'; +export * from './types.js'; +export { requireGraphQLSchemaFromContext, requireSiblingsOperations } from './utils.js'; +export { configs } from './configs/index.js'; +export { flatConfigs } from './flat-configs.js'; diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 9c0fac88974..48f0fcea3b1 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -2,7 +2,6 @@ import { processor } from './processor.js'; export { parseForESLint } from './parser.js'; export { rules } from './rules/index.js'; -export * from './testkit.js'; export * from './types.js'; export { requireGraphQLSchemaFromContext, requireSiblingsOperations } from './utils.js'; diff --git a/packages/plugin/src/parser.ts b/packages/plugin/src/parser.ts index 6361b8802dc..b3186dc8af7 100644 --- a/packages/plugin/src/parser.ts +++ b/packages/plugin/src/parser.ts @@ -1,40 +1,70 @@ -import { parseGraphQLSDL } from '@graphql-tools/utils'; +import { parseGraphQLSDL, Source } from '@graphql-tools/utils'; import debugFactory from 'debug'; -import { buildSchema, GraphQLError, GraphQLSchema } from 'graphql'; +import { buildSchema, GraphQLError } from 'graphql'; import { convertToESTree, extractComments, extractTokens } from './estree-converter/index.js'; import { loadGraphQLConfig } from './graphql-config.js'; import { getSchema } from './schema.js'; import { getSiblings } from './siblings.js'; -import { GraphQLESLintParseResult, ParserOptions } from './types.js'; +import { GraphQLESLintParseResult, ParserOptions, Schema } from './types.js'; import { CWD, VIRTUAL_DOCUMENT_REGEX } from './utils.js'; +import { GraphQLProjectConfig, IGraphQLProject } from 'graphql-config'; +import { getDocuments } from './documents.js'; const debug = debugFactory('graphql-eslint:parser'); debug('cwd %o', CWD); +const LEGACY_PARSER_OPTIONS_KEYS = [ + 'schema', + 'documents', + 'extensions', + 'include', + 'exclude', + 'projects', + 'schemaOptions', + 'graphQLParserOptions', + 'skipGraphQLConfig', + 'operations', +] as const; + export function parseForESLint(code: string, options: ParserOptions): GraphQLESLintParseResult { + for (const key of LEGACY_PARSER_OPTIONS_KEYS) { + if (key in options) { + throw new Error( + `\`parserOptions.${key}\` was removed in graphql-eslint@4. Use physical graphql-config for setting schema and documents or \`parserOptions.graphQLConfig\` for programmatic usage.`, + ); + } + } + try { const { filePath } = options; - // TODO: remove in graphql-eslint v4 - options.documents ||= options.operations; // First parse code from file, in case of syntax error do not try load schema, // documents or even graphql-config instance - const { document } = parseGraphQLSDL(filePath, code, { - ...options.graphQLParserOptions, - noLocation: false, - }); - const gqlConfig = loadGraphQLConfig(options); - const realFilepath = filePath.replace(VIRTUAL_DOCUMENT_REGEX, ''); - const project = gqlConfig.getProjectForFile(realFilepath); + const { document } = parseGraphQLSDL(filePath, code, { noLocation: false }); + let project: GraphQLProjectConfig; + let schema: Schema, documents: Source[]; - let schema: GraphQLSchema | null = null; + if (typeof window === 'undefined') { + const gqlConfig = loadGraphQLConfig(options); + const realFilepath = filePath.replace(VIRTUAL_DOCUMENT_REGEX, ''); + project = gqlConfig.getProjectForFile(realFilepath); + documents = getDocuments(project); + } else { + documents = [ + parseGraphQLSDL( + 'operation.graphql', + (options.graphQLConfig as IGraphQLProject).documents as string, + { noLocation: true }, + ), + ]; + } try { - schema = project - ? getSchema(project, options.schemaOptions) - : typeof options.schema === 'string' - ? buildSchema(options.schema) - : null; + if (typeof window === 'undefined') { + schema = getSchema(project!); + } else { + schema = buildSchema((options.graphQLConfig as IGraphQLProject).schema as string); + } } catch (error) { if (error instanceof Error) { error.message = `Error while loading schema: ${error.message}`; @@ -47,7 +77,7 @@ export function parseForESLint(code: string, options: ParserOptions): GraphQLESL return { services: { schema, - siblingOperations: getSiblings(project, options.documents), + siblingOperations: getSiblings(documents), }, ast: { comments: extractComments(document.loc), diff --git a/packages/plugin/src/processor.ts b/packages/plugin/src/processor.ts index da31ff0b787..acc3787be90 100644 --- a/packages/plugin/src/processor.ts +++ b/packages/plugin/src/processor.ts @@ -1,4 +1,4 @@ -import { relative } from 'path'; +import { relative } from 'node:path'; import { gqlPluckFromCodeStringSync, GraphQLTagPluckOptions, @@ -21,7 +21,7 @@ let onDiskConfigLoaded = false; const RELEVANT_KEYWORDS = ['gql', 'graphql', 'GraphQL'] as const; -export const processor: Linter.Processor = { +export const processor = { supportsAutofix: true, preprocess(code, filePath) { if (!onDiskConfigLoaded) { @@ -123,4 +123,4 @@ export const processor: Linter.Processor = { // sort eslint/graphql-eslint messages by line/column return result.sort((a, b) => a.line - b.line || a.column - b.column); }, -}; +} satisfies Linter.Processor; diff --git a/packages/plugin/src/rules/alphabetize.ts b/packages/plugin/src/rules/alphabetize.ts index f8bfbe03e87..f61fe91ed65 100644 --- a/packages/plugin/src/rules/alphabetize.ts +++ b/packages/plugin/src/rules/alphabetize.ts @@ -21,8 +21,7 @@ import { import { FromSchema } from 'json-schema-to-ts'; import lowerCase from 'lodash.lowercase'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; -import { GraphQLESLintRuleListener } from '../testkit.js'; -import { GraphQLESLintRule } from '../types.js'; +import { GraphQLESLintRule, GraphQLESLintRuleListener } from '../types.js'; import { ARRAY_DEFAULT_OPTIONS, displayNodeName, truthy } from '../utils.js'; const RULE_ID = 'alphabetize'; @@ -36,12 +35,10 @@ const fieldsEnum: ( Kind.INTERFACE_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_DEFINITION, ]; -const valuesEnum: ['EnumTypeDefinition'] = [Kind.ENUM_TYPE_DEFINITION]; const selectionsEnum: ('FragmentDefinition' | 'OperationDefinition')[] = [ Kind.OPERATION_DEFINITION, Kind.FRAGMENT_DEFINITION, ]; -const variablesEnum: ['OperationDefinition'] = [Kind.OPERATION_DEFINITION]; const argumentsEnum: ('Directive' | 'DirectiveDefinition' | 'Field' | 'FieldDefinition')[] = [ Kind.FIELD_DEFINITION, Kind.FIELD, @@ -66,10 +63,7 @@ const schema = { description: 'Fields of `type`, `interface`, and `input`.', }, values: { - ...ARRAY_DEFAULT_OPTIONS, - items: { - enum: valuesEnum, - }, + type: 'boolean', description: 'Values of `enum`.', }, selections: { @@ -81,10 +75,7 @@ const schema = { 'Selections of `fragment` and operations `query`, `mutation` and `subscription`.', }, variables: { - ...ARRAY_DEFAULT_OPTIONS, - items: { - enum: variablesEnum, - }, + type: 'boolean', description: 'Variables of operations `query`, `mutation` and `subscription`.', }, arguments: { @@ -98,7 +89,6 @@ const schema = { type: 'boolean', description: 'Definitions – `type`, `interface`, `enum`, `scalar`, `input`, `union` and `directive`.', - default: false, }, groups: { ...ARRAY_DEFAULT_OPTIONS, @@ -148,7 +138,7 @@ export const rule: GraphQLESLintRule = { }, { title: 'Incorrect', - usage: [{ values: [Kind.ENUM_TYPE_DEFINITION] }], + usage: [{ values: true }], code: /* GraphQL */ ` enum Role { SUPER_ADMIN @@ -160,7 +150,7 @@ export const rule: GraphQLESLintRule = { }, { title: 'Correct', - usage: [{ values: [Kind.ENUM_TYPE_DEFINITION] }], + usage: [{ values: true }], code: /* GraphQL */ ` enum Role { ADMIN @@ -200,19 +190,20 @@ export const rule: GraphQLESLintRule = { configOptions: { schema: [ { + definitions: true, fields: fieldsEnum, - values: valuesEnum, + values: true, arguments: argumentsEnum, - // TODO: add in graphql-eslint v4 - // definitions: true, - // groups: ['id', '*', 'createdAt', 'updatedAt'] + groups: ['id', '*', 'createdAt', 'updatedAt'], }, ], operations: [ { + definitions: true, selections: selectionsEnum, - variables: variablesEnum, + variables: true, arguments: [Kind.FIELD, Kind.DIRECTIVE], + groups: ['id', '*', 'createdAt', 'updatedAt'], }, ], }, @@ -361,10 +352,7 @@ export const rule: GraphQLESLintRule = { .flat(); const fieldsSelector = kinds.join(','); - - const hasEnumValues = opts.values?.[0] === Kind.ENUM_TYPE_DEFINITION; const selectionsSelector = opts.selections?.join(','); - const hasVariables = opts.variables?.[0] === Kind.OPERATION_DEFINITION; const argumentsSelector = opts.arguments?.join(','); if (fieldsSelector) { @@ -382,7 +370,7 @@ export const rule: GraphQLESLintRule = { }; } - if (hasEnumValues) { + if (opts.values) { const enumValuesSelector = [Kind.ENUM_TYPE_DEFINITION, Kind.ENUM_TYPE_EXTENSION].join(','); listeners[enumValuesSelector] = ( node: GraphQLESTreeNode, @@ -399,7 +387,7 @@ export const rule: GraphQLESLintRule = { }; } - if (hasVariables) { + if (opts.variables) { listeners.OperationDefinition = (node: GraphQLESTreeNode) => { checkNodes(node.variableDefinitions?.map(varDef => varDef.variable)); }; diff --git a/packages/plugin/src/rules/graphql-js-validation.ts b/packages/plugin/src/rules/graphql-js-validation.ts index 555e28c0ed9..3415693c6ad 100644 --- a/packages/plugin/src/rules/graphql-js-validation.ts +++ b/packages/plugin/src/rules/graphql-js-validation.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ import { AST } from 'eslint'; import { ASTVisitor, @@ -12,16 +11,51 @@ import { ValidationRule, visit, } from 'graphql'; +import { + ExecutableDefinitionsRule, + FieldsOnCorrectTypeRule, + FragmentsOnCompositeTypesRule, + KnownArgumentNamesRule, + KnownDirectivesRule, + KnownFragmentNamesRule, + KnownTypeNamesRule, + LoneAnonymousOperationRule, + LoneSchemaDefinitionRule, + NoFragmentCyclesRule, + NoUndefinedVariablesRule, + NoUnusedFragmentsRule, + NoUnusedVariablesRule, + OverlappingFieldsCanBeMergedRule, + PossibleFragmentSpreadsRule, + PossibleTypeExtensionsRule, + ProvidedRequiredArgumentsRule, + ScalarLeafsRule, + SingleFieldSubscriptionsRule, + UniqueArgumentNamesRule, + UniqueDirectiveNamesRule, + UniqueDirectivesPerLocationRule, + // UniqueEnumValueNamesRule, -- Superseded by graphql-eslint's `unique-enum-value-names` rule + UniqueFieldDefinitionNamesRule, + UniqueInputFieldNamesRule, + UniqueOperationTypesRule, + UniqueTypeNamesRule, + UniqueVariableNamesRule, + ValuesOfCorrectTypeRule, + VariablesAreInputTypesRule, + VariablesInAllowedPositionRule, +} from 'graphql/validation/index.js'; import { validateSDL } from 'graphql/validation/validate.js'; import { JSONSchema } from 'json-schema-to-ts'; import { GraphQLESLintRule, GraphQLESLintRuleContext, RuleDocsInfo } from '../types.js'; import { ARRAY_DEFAULT_OPTIONS, - logger, REPORT_ON_FIRST_CHARACTER, requireGraphQLSchemaFromContext, requireSiblingsOperations, } from '../utils.js'; +import { SDLValidationRule } from 'graphql/validation/ValidationContext'; + +type GraphQLJSRule = ValidationRule | SDLValidationRule; function validateDocument({ context, @@ -33,7 +67,7 @@ function validateDocument({ context: GraphQLESLintRuleContext; schema: GraphQLSchema | null; documentNode: DocumentNode; - rule: ValidationRule; + rule: GraphQLJSRule; hasDidYouMeanSuggestions?: boolean; }): void { if (documentNode.definitions.length === 0) { @@ -41,7 +75,7 @@ function validateDocument({ } try { const validationErrors = schema - ? validate(schema, documentNode, [rule]) + ? validate(schema, documentNode, [rule as ValidationRule]) : validateSDL(documentNode, null, [rule as any]); for (const error of validationErrors) { @@ -155,37 +189,26 @@ const handleMissingFragments: GetDocumentNode = ({ ruleId, context, node }) => { const validationToRule = ( { ruleId, - ruleName, + rule, getDocumentNode, schema = [], hasDidYouMeanSuggestions, }: { ruleId: string; - ruleName: string; + rule: GraphQLJSRule; getDocumentNode?: GetDocumentNode; schema?: JSONSchema | []; hasDidYouMeanSuggestions?: boolean; }, docs: RuleDocsInfo, ): Record> => { - let ruleFn: ValidationRule | null = null; - - try { - ruleFn = require(`graphql/validation/rules/${ruleName}Rule`)[`${ruleName}Rule`]; - } catch { - try { - ruleFn = require(`graphql/validation/rules/${ruleName}`)[`${ruleName}Rule`]; - } catch { - ruleFn = require('graphql/validation')[`${ruleName}Rule`]; - } - } return { [ruleId]: { meta: { docs: { recommended: true, ...docs, - graphQLJSRuleName: ruleName, + graphQLJSRuleName: rule.name, url: `https://the-guild.dev/graphql/eslint/rules/${ruleId}`, description: `${docs.description}\n> This rule is a wrapper around a \`graphql-js\` validation function.`, }, @@ -193,13 +216,6 @@ const validationToRule = ( hasSuggestions: hasDidYouMeanSuggestions, }, create(context) { - if (!ruleFn) { - logger.warn( - `Rule "${ruleId}" depends on a GraphQL validation rule "${ruleName}" but it's not available in the "graphql" version you are using. Skipping…`, - ); - return {}; - } - return { Document(node) { const schema = docs.requiresSchema @@ -214,7 +230,7 @@ const validationToRule = ( context, schema, documentNode, - rule: ruleFn!, + rule, hasDidYouMeanSuggestions, }); }, @@ -229,7 +245,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'executable-definitions', - ruleName: 'ExecutableDefinitions', + rule: ExecutableDefinitionsRule, }, { category: 'Operations', @@ -241,7 +257,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'fields-on-correct-type', - ruleName: 'FieldsOnCorrectType', + rule: FieldsOnCorrectTypeRule, hasDidYouMeanSuggestions: true, }, { @@ -254,7 +270,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'fragments-on-composite-type', - ruleName: 'FragmentsOnCompositeTypes', + rule: FragmentsOnCompositeTypesRule, }, { category: 'Operations', @@ -266,7 +282,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'known-argument-names', - ruleName: 'KnownArgumentNames', + rule: KnownArgumentNamesRule, hasDidYouMeanSuggestions: true, }, { @@ -279,7 +295,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'known-directives', - ruleName: 'KnownDirectives', + rule: KnownDirectivesRule, getDocumentNode({ context, node: documentNode }) { const { ignoreClientDirectives = [] } = context.options[0] || {}; if (ignoreClientDirectives.length === 0) { @@ -334,7 +350,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'known-fragment-names', - ruleName: 'KnownFragmentNames', + rule: KnownFragmentNamesRule, getDocumentNode: handleMissingFragments, }, { @@ -394,7 +410,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'known-type-names', - ruleName: 'KnownTypeNames', + rule: KnownTypeNamesRule, hasDidYouMeanSuggestions: true, }, { @@ -407,7 +423,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'lone-anonymous-operation', - ruleName: 'LoneAnonymousOperation', + rule: LoneAnonymousOperationRule, }, { category: 'Operations', @@ -419,7 +435,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'lone-schema-definition', - ruleName: 'LoneSchemaDefinition', + rule: LoneSchemaDefinitionRule, }, { category: 'Schema', @@ -429,7 +445,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'no-fragment-cycles', - ruleName: 'NoFragmentCycles', + rule: NoFragmentCyclesRule, }, { category: 'Operations', @@ -441,7 +457,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'no-undefined-variables', - ruleName: 'NoUndefinedVariables', + rule: NoUndefinedVariablesRule, getDocumentNode: handleMissingFragments, }, { @@ -455,7 +471,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'no-unused-fragments', - ruleName: 'NoUnusedFragments', + rule: NoUnusedFragmentsRule, getDocumentNode: ({ ruleId, context, node }) => { const siblings = requireSiblingsOperations(ruleId, context); const FilePathToDocumentsMap = [ @@ -494,7 +510,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. return node; }; - return getParentNode(context.getFilename(), node); + return getParentNode(context.filename, node); }, }, { @@ -508,7 +524,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'no-unused-variables', - ruleName: 'NoUnusedVariables', + rule: NoUnusedVariablesRule, getDocumentNode: handleMissingFragments, }, { @@ -522,7 +538,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'overlapping-fields-can-be-merged', - ruleName: 'OverlappingFieldsCanBeMerged', + rule: OverlappingFieldsCanBeMergedRule, }, { category: 'Operations', @@ -534,7 +550,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'possible-fragment-spread', - ruleName: 'PossibleFragmentSpreads', + rule: PossibleFragmentSpreadsRule, }, { category: 'Operations', @@ -546,22 +562,20 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'possible-type-extension', - ruleName: 'PossibleTypeExtensions', + rule: PossibleTypeExtensionsRule, hasDidYouMeanSuggestions: true, }, { category: 'Schema', description: 'A type extension is only valid if the type is defined and has the same kind.', - // TODO: add in graphql-eslint v4 - recommended: false, + recommended: true, requiresSchema: true, - isDisabledForAllConfig: true, }, ), validationToRule( { ruleId: 'provided-required-arguments', - ruleName: 'ProvidedRequiredArguments', + rule: ProvidedRequiredArgumentsRule, }, { category: ['Schema', 'Operations'], @@ -573,7 +587,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'scalar-leafs', - ruleName: 'ScalarLeafs', + rule: ScalarLeafsRule, hasDidYouMeanSuggestions: true, }, { @@ -586,7 +600,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'one-field-subscriptions', - ruleName: 'SingleFieldSubscriptions', + rule: SingleFieldSubscriptionsRule, }, { category: 'Operations', @@ -597,7 +611,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-argument-names', - ruleName: 'UniqueArgumentNames', + rule: UniqueArgumentNamesRule, }, { category: 'Operations', @@ -609,7 +623,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-directive-names', - ruleName: 'UniqueDirectiveNames', + rule: UniqueDirectiveNamesRule, }, { category: 'Schema', @@ -619,7 +633,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-directive-names-per-location', - ruleName: 'UniqueDirectivesPerLocation', + rule: UniqueDirectivesPerLocationRule, }, { category: ['Schema', 'Operations'], @@ -628,22 +642,10 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. requiresSchema: true, }, ), - validationToRule( - { - ruleId: 'unique-enum-value-names', - ruleName: 'UniqueEnumValueNames', - }, - { - category: 'Schema', - description: 'A GraphQL enum type is only valid if all its values are uniquely named.', - recommended: false, - isDisabledForAllConfig: true, - }, - ), validationToRule( { ruleId: 'unique-field-definition-names', - ruleName: 'UniqueFieldDefinitionNames', + rule: UniqueFieldDefinitionNamesRule, }, { category: 'Schema', @@ -653,7 +655,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-input-field-names', - ruleName: 'UniqueInputFieldNames', + rule: UniqueInputFieldNamesRule, }, { category: 'Operations', @@ -664,7 +666,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-operation-types', - ruleName: 'UniqueOperationTypes', + rule: UniqueOperationTypesRule, }, { category: 'Schema', @@ -674,7 +676,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-type-names', - ruleName: 'UniqueTypeNames', + rule: UniqueTypeNamesRule, }, { category: 'Schema', @@ -684,7 +686,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'unique-variable-names', - ruleName: 'UniqueVariableNames', + rule: UniqueVariableNamesRule, }, { category: 'Operations', @@ -695,7 +697,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'value-literals-of-correct-type', - ruleName: 'ValuesOfCorrectType', + rule: ValuesOfCorrectTypeRule, hasDidYouMeanSuggestions: true, }, { @@ -708,7 +710,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'variables-are-input-types', - ruleName: 'VariablesAreInputTypes', + rule: VariablesAreInputTypesRule, }, { category: 'Operations', @@ -720,7 +722,7 @@ export const GRAPHQL_JS_VALIDATIONS: Record = Object. validationToRule( { ruleId: 'variables-in-allowed-position', - ruleName: 'VariablesInAllowedPosition', + rule: VariablesInAllowedPositionRule, }, { category: 'Operations', diff --git a/packages/plugin/src/rules/index.ts b/packages/plugin/src/rules/index.ts index 1ba4e1f999a..d997ec54f7f 100644 --- a/packages/plugin/src/rules/index.ts +++ b/packages/plugin/src/rules/index.ts @@ -10,7 +10,6 @@ import { rule as loneExecutableDefinition } from './lone-executable-definition.j import { rule as matchDocumentFilename } from './match-document-filename.js'; import { rule as namingConvention } from './naming-convention.js'; import { rule as noAnonymousOperations } from './no-anonymous-operations.js'; -import { rule as noCaseInsensitiveEnumValuesDuplicates } from './no-case-insensitive-enum-values-duplicates.js'; import { rule as noDeprecated } from './no-deprecated.js'; import { rule as noDuplicateFields } from './no-duplicate-fields.js'; import { rule as noHashtagDescription } from './no-hashtag-description.js'; @@ -28,13 +27,14 @@ import { rule as requireDeprecationDate } from './require-deprecation-date.js'; import { rule as requireDeprecationReason } from './require-deprecation-reason.js'; import { rule as requireDescription } from './require-description.js'; import { rule as requireFieldOfTypeQueryInMutationResult } from './require-field-of-type-query-in-mutation-result.js'; -import { rule as requireIdWhenAvailable } from './require-id-when-available.js'; import { rule as requireImportFragment } from './require-import-fragment.js'; import { rule as requireNullableFieldsWithOneof } from './require-nullable-fields-with-oneof.js'; import { rule as requireNullableResultInRoot } from './require-nullable-result-in-root.js'; +import { rule as requireSelections } from './require-selections.js'; import { rule as requireTypePatternWithOneof } from './require-type-pattern-with-oneof.js'; import { rule as selectionSetDepth } from './selection-set-depth.js'; import { rule as strictIdInTypes } from './strict-id-in-types.js'; +import { rule as uniqueEnumValueNames } from './unique-enum-value-names.js'; import { rule as uniqueFragmentName } from './unique-fragment-name.js'; import { rule as uniqueOperationName } from './unique-operation-name.js'; @@ -47,7 +47,6 @@ export const rules = { 'match-document-filename': matchDocumentFilename, 'naming-convention': namingConvention, 'no-anonymous-operations': noAnonymousOperations, - 'no-case-insensitive-enum-values-duplicates': noCaseInsensitiveEnumValuesDuplicates, 'no-deprecated': noDeprecated, 'no-duplicate-fields': noDuplicateFields, 'no-hashtag-description': noHashtagDescription, @@ -65,13 +64,14 @@ export const rules = { 'require-deprecation-reason': requireDeprecationReason, 'require-description': requireDescription, 'require-field-of-type-query-in-mutation-result': requireFieldOfTypeQueryInMutationResult, - 'require-id-when-available': requireIdWhenAvailable, 'require-import-fragment': requireImportFragment, 'require-nullable-fields-with-oneof': requireNullableFieldsWithOneof, 'require-nullable-result-in-root': requireNullableResultInRoot, + 'require-selections': requireSelections, 'require-type-pattern-with-oneof': requireTypePatternWithOneof, 'selection-set-depth': selectionSetDepth, 'strict-id-in-types': strictIdInTypes, + 'unique-enum-value-names': uniqueEnumValueNames, 'unique-fragment-name': uniqueFragmentName, 'unique-operation-name': uniqueOperationName, }; diff --git a/packages/plugin/src/rules/input-name.ts b/packages/plugin/src/rules/input-name.ts index 4942215c34c..40e38d2bc5f 100644 --- a/packages/plugin/src/rules/input-name.ts +++ b/packages/plugin/src/rules/input-name.ts @@ -10,8 +10,7 @@ import { } from 'graphql'; import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; -import { GraphQLESLintRuleListener } from '../testkit.js'; -import { GraphQLESLintRule } from '../types.js'; +import { GraphQLESLintRule, GraphQLESLintRuleListener } from '../types.js'; const schema = { type: 'array', diff --git a/packages/plugin/src/rules/lone-executable-definition.ts b/packages/plugin/src/rules/lone-executable-definition.ts index 38fefef92a1..8396d4833f3 100644 --- a/packages/plugin/src/rules/lone-executable-definition.ts +++ b/packages/plugin/src/rules/lone-executable-definition.ts @@ -1,4 +1,4 @@ -import { ExecutableDefinitionNode } from 'graphql'; +import { ExecutableDefinitionNode, OperationTypeNode } from 'graphql'; import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; import { GraphQLESLintRule } from '../types.js'; @@ -6,7 +6,7 @@ import { ARRAY_DEFAULT_OPTIONS, getLocation, pascalCase } from '../utils.js'; const RULE_ID = 'lone-executable-definition'; -const definitionTypes = ['fragment', 'query', 'mutation', 'subscription'] as const; +const definitionTypes = ['fragment', ...Object.values(OperationTypeNode)] as const; type Definition = (typeof definitionTypes)[number]; type DefinitionESTreeNode = GraphQLESTreeNode; diff --git a/packages/plugin/src/rules/match-document-filename.ts b/packages/plugin/src/rules/match-document-filename.ts index b28568b2300..25bf39bb44a 100644 --- a/packages/plugin/src/rules/match-document-filename.ts +++ b/packages/plugin/src/rules/match-document-filename.ts @@ -1,4 +1,4 @@ -import { basename, extname } from 'path'; +import { basename, extname } from 'node:path'; import { FragmentDefinitionNode, Kind, OperationDefinitionNode } from 'graphql'; import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; @@ -183,7 +183,7 @@ export const rule: GraphQLESLintRule = { const options = context.options[0] || { fileExtension: null, }; - const filePath = context.getFilename(); + const filePath = context.filename; const isVirtualFile = VIRTUAL_DOCUMENT_REGEX.test(filePath); if (process.env.NODE_ENV !== 'test' && isVirtualFile) { diff --git a/packages/plugin/src/rules/naming-convention.ts b/packages/plugin/src/rules/naming-convention.ts index 61cef6fadab..6e4f11cda3a 100644 --- a/packages/plugin/src/rules/naming-convention.ts +++ b/packages/plugin/src/rules/naming-convention.ts @@ -1,8 +1,7 @@ import { ASTKindToNode, Kind, NameNode } from 'graphql'; import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; -import { GraphQLESLintRuleListener } from '../testkit.js'; -import { GraphQLESLintRule, ValueOf } from '../types.js'; +import { GraphQLESLintRule, ValueOf, GraphQLESLintRuleListener } from '../types.js'; import { ARRAY_DEFAULT_OPTIONS, convertCase, @@ -266,6 +265,22 @@ export const rule: GraphQLESLintRule = { forbiddenPrefixes: ['subscription'], forbiddenSuffixes: ['Subscription'], }, + 'EnumTypeDefinition,EnumTypeExtension': { + forbiddenPrefixes: ['Enum'], + forbiddenSuffixes: ['Enum'], + }, + 'InterfaceTypeDefinition,InterfaceTypeExtension': { + forbiddenPrefixes: ['Interface'], + forbiddenSuffixes: ['Interface'], + }, + 'UnionTypeDefinition,UnionTypeExtension': { + forbiddenPrefixes: ['Union'], + forbiddenSuffixes: ['Union'], + }, + 'ObjectTypeDefinition,ObjectTypeExtension': { + forbiddenPrefixes: ['Type'], + forbiddenSuffixes: ['Type'], + }, }, ], operations: [ diff --git a/packages/plugin/src/rules/no-hashtag-description.ts b/packages/plugin/src/rules/no-hashtag-description.ts index 0ad642f7bec..d6c43f042b8 100644 --- a/packages/plugin/src/rules/no-hashtag-description.ts +++ b/packages/plugin/src/rules/no-hashtag-description.ts @@ -67,8 +67,7 @@ export const rule: GraphQLESLintRule = { while (token) { const { kind, prev, next, value, line, column } = token; if (kind === TokenKind.COMMENT && prev && next) { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TODO: remove `!` when drop support of graphql@15 - const isEslintComment = value!.trimStart().startsWith('eslint'); + const isEslintComment = value.trimStart().startsWith('eslint'); const linesAfter = next.line - line; if ( !isEslintComment && @@ -101,8 +100,7 @@ export const rule: GraphQLESLintRule = { fix: fixer => fixer.replaceTextRange( [token.start, token.end] as [number, number], - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TODO: remove `!` when drop support of graphql@15 - [descriptionSyntax, value!.trim(), descriptionSyntax].join(''), + [descriptionSyntax, value.trim(), descriptionSyntax].join(''), ), })), }); diff --git a/packages/plugin/src/rules/no-one-place-fragments.ts b/packages/plugin/src/rules/no-one-place-fragments.ts index e9b963329ce..df4684e7870 100644 --- a/packages/plugin/src/rules/no-one-place-fragments.ts +++ b/packages/plugin/src/rules/no-one-place-fragments.ts @@ -1,4 +1,4 @@ -import { relative } from 'path'; +import { relative } from 'node:path'; import { NameNode, visit } from 'graphql'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; import { GraphQLESLintRule } from '../types.js'; diff --git a/packages/plugin/src/rules/no-root-type.ts b/packages/plugin/src/rules/no-root-type.ts index 6490d6a458e..7f45238eba0 100644 --- a/packages/plugin/src/rules/no-root-type.ts +++ b/packages/plugin/src/rules/no-root-type.ts @@ -34,7 +34,6 @@ export const rule: GraphQLESLintRule = { description: 'Disallow using root types `mutation` and/or `subscription`.', url: 'https://the-guild.dev/graphql/eslint/rules/no-root-type', requiresSchema: true, - isDisabledForAllConfig: true, examples: [ { title: 'Incorrect', @@ -55,6 +54,7 @@ export const rule: GraphQLESLintRule = { `, }, ], + configOptions: [{ disallow: ['mutation', 'subscription'] }], }, schema, }, diff --git a/packages/plugin/src/rules/no-unused-fields.ts b/packages/plugin/src/rules/no-unused-fields.ts index 8b6993c5198..60bd7c3af90 100644 --- a/packages/plugin/src/rules/no-unused-fields.ts +++ b/packages/plugin/src/rules/no-unused-fields.ts @@ -52,6 +52,7 @@ export const rule: GraphQLESLintRule = { url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID}`, requiresSiblings: true, requiresSchema: true, + // Requires documents to be set isDisabledForAllConfig: true, examples: [ { diff --git a/packages/plugin/src/rules/relay-edge-types.ts b/packages/plugin/src/rules/relay-edge-types.ts index e88f8896c18..3ae78a71077 100644 --- a/packages/plugin/src/rules/relay-edge-types.ts +++ b/packages/plugin/src/rules/relay-edge-types.ts @@ -12,8 +12,7 @@ import { } from 'graphql'; import { FromSchema } from 'json-schema-to-ts'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; -import { GraphQLESLintRuleListener } from '../testkit.js'; -import { GraphQLESLintRule } from '../types.js'; +import { GraphQLESLintRule, GraphQLESLintRuleListener } from '../types.js'; import { getTypeName, requireGraphQLSchemaFromContext } from '../utils.js'; const RULE_ID = 'relay-edge-types'; diff --git a/packages/plugin/src/rules/require-description.ts b/packages/plugin/src/rules/require-description.ts index 143f6419039..292557b37cf 100644 --- a/packages/plugin/src/rules/require-description.ts +++ b/packages/plugin/src/rules/require-description.ts @@ -125,7 +125,7 @@ export const rule: GraphQLESLintRule = { { types: true, [Kind.DIRECTIVE_DEFINITION]: true, - // rootField: true TODO enable in graphql-eslint v4 + rootField: true, }, ], recommended: true, @@ -168,8 +168,7 @@ export const rule: GraphQLESLintRule = { const rawNode = node.rawNode(); const { prev, line } = rawNode.loc!.startToken; if (prev?.kind === TokenKind.COMMENT) { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- TODO: remove `!` when drop support of graphql@15 - const value = prev.value!.trim(); + const value = prev.value.trim(); const linesBefore = line - prev.line; if (!value.startsWith('eslint') && linesBefore === 1) { description = value; diff --git a/packages/plugin/src/rules/require-import-fragment.ts b/packages/plugin/src/rules/require-import-fragment.ts index e19d6a3aaf6..2c5380edd4e 100644 --- a/packages/plugin/src/rules/require-import-fragment.ts +++ b/packages/plugin/src/rules/require-import-fragment.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; import { NameNode } from 'graphql'; import { requireSiblingsOperations } from '../utils.js'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; @@ -60,7 +60,6 @@ export const rule: GraphQLESLintRule = { }, ], requiresSiblings: true, - isDisabledForAllConfig: true, }, hasSuggestions: true, messages: { @@ -72,7 +71,7 @@ export const rule: GraphQLESLintRule = { create(context) { const comments = context.getSourceCode().getAllComments(); const siblings = requireSiblingsOperations(RULE_ID, context); - const filePath = context.getFilename(); + const filePath = context.filename; return { 'FragmentSpread > .name'(node: GraphQLESTreeNode) { diff --git a/packages/plugin/src/rules/require-nullable-result-in-root.ts b/packages/plugin/src/rules/require-nullable-result-in-root.ts index 24c67326b9d..a722ed03530 100644 --- a/packages/plugin/src/rules/require-nullable-result-in-root.ts +++ b/packages/plugin/src/rules/require-nullable-result-in-root.ts @@ -43,9 +43,7 @@ export const rule: GraphQLESLintRule = { create(context) { const schema = requireGraphQLSchemaFromContext(RULE_ID, context); const rootTypeNames = new Set( - [schema.getQueryType(), schema.getMutationType(), schema.getSubscriptionType()] - .filter(truthy) - .map(type => type.name), + [schema.getQueryType(), schema.getMutationType()].filter(truthy).map(type => type.name), ); const sourceCode = context.getSourceCode(); diff --git a/packages/plugin/src/rules/require-id-when-available.ts b/packages/plugin/src/rules/require-selections.ts similarity index 99% rename from packages/plugin/src/rules/require-id-when-available.ts rename to packages/plugin/src/rules/require-selections.ts index 1ed8e649081..1aac5ce6b9c 100644 --- a/packages/plugin/src/rules/require-id-when-available.ts +++ b/packages/plugin/src/rules/require-selections.ts @@ -22,7 +22,7 @@ import { requireSiblingsOperations, } from '../utils.js'; -const RULE_ID = 'require-id-when-available'; +const RULE_ID = 'require-selections'; const DEFAULT_ID_FIELD_NAME = 'id'; const schema = { diff --git a/packages/plugin/src/rules/no-case-insensitive-enum-values-duplicates.ts b/packages/plugin/src/rules/unique-enum-value-names.ts similarity index 88% rename from packages/plugin/src/rules/no-case-insensitive-enum-values-duplicates.ts rename to packages/plugin/src/rules/unique-enum-value-names.ts index 334cccde027..7adb9930e10 100644 --- a/packages/plugin/src/rules/no-case-insensitive-enum-values-duplicates.ts +++ b/packages/plugin/src/rules/unique-enum-value-names.ts @@ -8,10 +8,11 @@ export const rule: GraphQLESLintRule = { type: 'suggestion', hasSuggestions: true, docs: { - url: 'https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates', + url: 'https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names', category: 'Schema', recommended: true, - description: 'Disallow case-insensitive enum values duplicates.', + description: `A GraphQL enum type is only valid if all its values are uniquely named. +> This rule disallows case-insensitive enum values duplicates too.`, examples: [ { title: 'Incorrect', diff --git a/packages/plugin/src/rules/unique-fragment-name.ts b/packages/plugin/src/rules/unique-fragment-name.ts index d02bc308953..6c76cd02347 100644 --- a/packages/plugin/src/rules/unique-fragment-name.ts +++ b/packages/plugin/src/rules/unique-fragment-name.ts @@ -1,4 +1,4 @@ -import { relative } from 'path'; +import { relative } from 'node:path'; import { ExecutableDefinitionNode, Kind } from 'graphql'; import { GraphQLESTreeNode } from '../estree-converter/index.js'; import { FragmentSource, OperationSource } from '../siblings.js'; @@ -18,7 +18,7 @@ export const checkNode = ( node.kind === Kind.FRAGMENT_DEFINITION ? siblings.getFragment(documentName) : siblings.getOperation(documentName); - const filepath = context.getFilename(); + const filepath = context.filename; const conflictingDocuments = siblingDocuments.filter(f => { const isSameName = f.document.name?.value === documentName; @@ -49,6 +49,7 @@ export const rule: GraphQLESLintRule = { description: 'Enforce unique fragment names across your project.', url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID}`, requiresSiblings: true, + recommended: true, examples: [ { title: 'Incorrect', diff --git a/packages/plugin/src/rules/unique-operation-name.ts b/packages/plugin/src/rules/unique-operation-name.ts index 06bd2307b39..e2d33faee0b 100644 --- a/packages/plugin/src/rules/unique-operation-name.ts +++ b/packages/plugin/src/rules/unique-operation-name.ts @@ -13,6 +13,7 @@ export const rule: GraphQLESLintRule = { description: 'Enforce unique operation names across your project.', url: `https://the-guild.dev/graphql/eslint/rules/${RULE_ID}`, requiresSiblings: true, + recommended: true, examples: [ { title: 'Incorrect', diff --git a/packages/plugin/src/schema.ts b/packages/plugin/src/schema.ts index 8be4f8c744e..9c940a1fd40 100644 --- a/packages/plugin/src/schema.ts +++ b/packages/plugin/src/schema.ts @@ -3,15 +3,12 @@ import fg from 'fast-glob'; import { GraphQLSchema } from 'graphql'; import { GraphQLProjectConfig } from 'graphql-config'; import { ModuleCache } from './cache.js'; -import { ParserOptions, Pointer, Schema } from './types.js'; +import { Pointer, Schema } from './types.js'; const schemaCache = new ModuleCache(); const debug = debugFactory('graphql-eslint:schema'); -export function getSchema( - project: GraphQLProjectConfig, - schemaOptions?: ParserOptions['schemaOptions'], -): Schema { +export function getSchema(project: GraphQLProjectConfig): Schema { const schemaKey = project.schema; if (!schemaKey) { @@ -26,7 +23,6 @@ export function getSchema( debug('Loading schema from %o', project.schema); const schema = project.loadSchemaSync(project.schema, 'GraphQLSchema', { - ...schemaOptions, pluckConfig: project.extensions.pluckConfig, }); if (debug.enabled) { diff --git a/packages/plugin/src/siblings.ts b/packages/plugin/src/siblings.ts index f60c2ba2f9c..f6a4c949cf7 100644 --- a/packages/plugin/src/siblings.ts +++ b/packages/plugin/src/siblings.ts @@ -1,4 +1,4 @@ -import { parseGraphQLSDL, Source } from '@graphql-tools/utils'; +import { Source } from '@graphql-tools/utils'; import { FragmentDefinitionNode, Kind, @@ -7,9 +7,6 @@ import { SelectionSetNode, visit, } from 'graphql'; -import { GraphQLProjectConfig } from 'graphql-config'; -import { getDocuments } from './documents.js'; -import { ParserOptions } from './types.js'; import { logger } from './utils.js'; export type FragmentSource = { filePath: string; document: FragmentDefinitionNode }; @@ -31,23 +28,14 @@ export type SiblingOperations = { const siblingOperationsCache = new Map(); -export function getSiblings( - project?: GraphQLProjectConfig, - documents?: ParserOptions['documents'], -): SiblingOperations { - const siblings = project - ? getDocuments(project) - : typeof documents === 'string' - ? [parseGraphQLSDL('operation.graphql', documents, { noLocation: true })] - : []; - - if (siblings.length === 0) { +export function getSiblings(documents: Source[]): SiblingOperations { + if (documents.length === 0) { let printed = false; const noopWarn = () => { if (!printed) { logger.warn( - 'getSiblingOperations was called without any operations. Make sure to set "parserOptions.operations" to make this feature available!', + 'getSiblingOperations was called without any operations. Make sure to set graphql-config `documents` field to make this feature available! See https://the-guild.dev/graphql/config/docs/user/documents for more info', ); printed = true; } @@ -69,7 +57,7 @@ export function getSiblings( // Since the siblings array is cached, we can use it as cache key. // We should get the same array reference each time we get // to this point for the same graphql project - const value = siblingOperationsCache.get(siblings); + const value = siblingOperationsCache.get(documents); if (value) { return value; @@ -81,7 +69,7 @@ export function getSiblings( if (fragmentsCache === null) { const result: FragmentSource[] = []; - for (const source of siblings) { + for (const source of documents) { for (const definition of source.document?.definitions || []) { if (definition.kind === Kind.FRAGMENT_DEFINITION) { result.push({ @@ -102,7 +90,7 @@ export function getSiblings( if (cachedOperations === null) { const result: OperationSource[] = []; - for (const source of siblings) { + for (const source of documents) { for (const definition of source.document?.definitions || []) { if (definition.kind === Kind.OPERATION_DEFINITION) { result.push({ @@ -159,6 +147,6 @@ export function getSiblings( getOperationByType: type => getOperations().filter(o => o.document.operation === type), }; - siblingOperationsCache.set(siblings, siblingOperations); + siblingOperationsCache.set(documents, siblingOperations); return siblingOperations; } diff --git a/packages/plugin/src/testkit.ts b/packages/plugin/src/testkit.ts deleted file mode 100644 index e20460dc8a1..00000000000 --- a/packages/plugin/src/testkit.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { readFileSync } from 'fs'; -import { resolve } from 'path'; -import { codeFrameColumns } from '@babel/code-frame'; -import { AST, Linter, Rule, RuleTester } from 'eslint'; -import { ASTKindToNode } from 'graphql'; -import { GraphQLESTreeNode } from './estree-converter/index.js'; -import { GraphQLESLintRule, ParserOptions } from './types.js'; - -export type GraphQLESLintRuleListener = Record< - string, - any -> & { - [K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode) => void; -}; - -export type GraphQLValidTestCase = Omit< - RuleTester.ValidTestCase, - 'options' | 'parserOptions' -> & { - options?: Options; - parserOptions?: Omit; -}; - -export type GraphQLInvalidTestCase = GraphQLValidTestCase & { - errors: (RuleTester.TestCaseError | string)[] | number; - output?: string | null; -}; - -function indentCode(code: string, indent = 4): string { - return code.replace(/^/gm, ' '.repeat(indent)); -} - -// A simple version of `SourceCodeFixer.applyFixes` -// https://github.com/eslint/eslint/issues/14936#issuecomment-906746754 -function applyFix(code: string, { range, text }: Rule.Fix): string { - return [code.slice(0, range[0]), text, code.slice(range[1])].join(''); -} - -type RuleTesterConfig = { - parser: string; - parserOptions: Omit; -}; - -export class GraphQLRuleTester extends RuleTester { - config: RuleTesterConfig; - - constructor(parserOptions: Omit = {}) { - const config = { - parser: require.resolve('@graphql-eslint/eslint-plugin'), - parserOptions: { - ...parserOptions, - skipGraphQLConfig: true, - }, - }; - super(config); - this.config = config; - } - - fromMockFile(path: string): string { - return readFileSync(resolve(__dirname, `../tests/mocks/${path}`), 'utf-8'); - } - - runGraphQLTests( - ruleId: string, - rule: GraphQLESLintRule, - tests: { - valid: (GraphQLValidTestCase | string)[]; - invalid: GraphQLInvalidTestCase[]; - }, - ): void { - super.run(ruleId, rule as any, tests); - const linter = new Linter(); - linter.defineRule(ruleId, rule as any); - - const hasOnlyTest = [...tests.valid, ...tests.invalid].some( - t => typeof t !== 'string' && t.only, - ); - - // for (const [index, testCase] of tests.valid.entries()) { - // const { name, code, filename, only }: RuleTester.ValidTestCase = - // typeof testCase === 'string' ? { code: testCase } : testCase; - // - // if (hasOnlyTest && !only) { - // continue; - // } - // - // const verifyConfig = getVerifyConfig(ruleId, this.config, testCase); - // defineParser(linter, verifyConfig.parser); - // - // const messages = linter.verify(code, verifyConfig, { filename }); - // const codeFrame = printCode(code, { line: 0, column: 0 }); - // - // it(name || `Valid #${index + 1}\n${codeFrame}`, () => { - // expect(messages).toEqual([]); - // }); - // } - - for (const [idx, testCase] of tests.invalid.entries()) { - const { only, filename, options, name } = testCase; - if (hasOnlyTest && !only) { - continue; - } - - const code = removeTrailingBlankLines(testCase.code); - const verifyConfig = getVerifyConfig(ruleId, this.config, testCase); - defineParser(linter, verifyConfig.parser); - - const messages = linter.verify(code, verifyConfig, filename); - if (messages.length === 0) { - throw new Error('Invalid case should have at least one error.'); - } - const codeFrame = indentCode(printCode(code, { line: 0, column: 0 })); - const messageForSnapshot = ['#### ⌨️ Code', codeFrame]; - - if (options) { - const opts = JSON.stringify(options, null, 2).slice(1, -1); - messageForSnapshot.push('#### ⚙️ Options', indentCode(removeTrailingBlankLines(opts), 2)); - } - - for (const [index, message] of messages.entries()) { - if (message.fatal) { - throw new Error(message.message); - } - - const codeWithMessage = printCode(code, message, 1); - messageForSnapshot.push( - printWithIndex('#### ❌ Error', index, messages.length), - indentCode(codeWithMessage), - ); - - // Don't print suggestions in snapshots for too big codes - if (message.suggestions && (code.match(/\n/g) || '').length < 1000) { - for (const [i, suggestion] of message.suggestions.entries()) { - const title = printWithIndex( - '#### 💡 Suggestion', - i, - message.suggestions.length, - suggestion.desc, - ); - const output = applyFix(code, suggestion.fix); - const codeFrame = printCode(output, { line: 0, column: 0 }); - messageForSnapshot.push(title, indentCode(codeFrame, 2)); - } - } - } - - if (rule.meta.fixable) { - const { fixed, output } = linter.verifyAndFix(code, verifyConfig, filename); - if (fixed) { - messageForSnapshot.push('#### 🔧 Autofix output', indentCode(printCode(output))); - } - } - it(name || `Invalid #${idx + 1}`, () => { - expect(messageForSnapshot.join('\n\n')).toMatchSnapshot(); - }); - } - } -} - -function removeTrailingBlankLines(text: string): string { - return text.replace(/^\s*\n/, '').trimEnd(); -} - -function printWithIndex(title: string, index: number, total: number, description?: string): string { - if (total > 1) { - title += ` ${index + 1}/${total}`; - } - if (description) { - title += `: ${description}`; - } - return title; -} - -function getVerifyConfig( - ruleId: string, - testerConfig: RuleTesterConfig, - testCase: GraphQLInvalidTestCase, -): Omit & { parser: string } { - const { parser = testerConfig.parser, parserOptions, options } = testCase; - - return { - ...testerConfig, - parser, - parserOptions: { - ...testerConfig.parserOptions, - ...parserOptions, - }, - rules: { - [ruleId]: Array.isArray(options) ? ['error', ...options] : 'error', - }, - }; -} - -const parsers = new WeakMap(); - -function defineParser(linter: Linter, parser: string): void { - if (!parser) { - return; - } - if (!parsers.has(linter)) { - parsers.set(linter, new Set()); - } - - const defined = parsers.get(linter); - if (!defined.has(parser)) { - defined.add(parser); - // eslint-disable-next-line @typescript-eslint/no-var-requires - linter.defineParser(parser, require(parser)); - } -} - -function printCode( - code: string, - result: Partial = {}, - linesOffset = Number.POSITIVE_INFINITY, -): string { - const { line, column, endLine, endColumn, message } = result; - const location = {} as AST.SourceLocation; - - if (typeof line === 'number' && typeof column === 'number') { - location.start = { - line, - column, - }; - } - - if (typeof endLine === 'number' && typeof endColumn === 'number') { - location.end = { - line: endLine, - column: endColumn, - }; - } - - return codeFrameColumns(code, location, { - linesAbove: linesOffset, - linesBelow: linesOffset, - message, - }); -} diff --git a/packages/plugin/src/types.ts b/packages/plugin/src/types.ts index 2c4ea82f75e..47859fe9558 100644 --- a/packages/plugin/src/types.ts +++ b/packages/plugin/src/types.ts @@ -1,30 +1,17 @@ -import { GraphQLParseOptions } from '@graphql-tools/utils'; import { AST, Linter, Rule } from 'eslint'; import * as ESTree from 'estree'; -import { GraphQLSchema } from 'graphql'; -import { IExtensions, IGraphQLProject } from 'graphql-config'; +import { GraphQLSchema, ASTKindToNode } from 'graphql'; import { JSONSchema } from 'json-schema-to-ts'; import { SiblingOperations } from './siblings.js'; -import { GraphQLESLintRuleListener } from './testkit.js'; +import { GraphQLESTreeNode } from './estree-converter/index.js'; +import { IGraphQLConfig } from 'graphql-config'; export type Schema = GraphQLSchema | null; export type Pointer = string | string[]; export interface ParserOptions { - schema?: Pointer | Record }>; - documents?: Pointer; - extensions?: IExtensions; - include?: Pointer; - exclude?: Pointer; - projects?: Record; - schemaOptions?: Omit & { - headers: Record; - }; - graphQLParserOptions?: Omit; - skipGraphQLConfig?: boolean; + graphQLConfig?: IGraphQLConfig; filePath: string; - /** @deprecated Use `documents` instead */ - operations?: Pointer; } export type ParserServices = { @@ -65,16 +52,18 @@ export type RuleDocsInfo = Omit code: string; usage?: T; }[]; - configOptions?: - | T - | { - schema?: T; - operations?: T; - }; + configOptions?: T | { schema?: T; operations?: T }; graphQLJSRuleName?: string; isDisabledForAllConfig?: true; }; +export type GraphQLESLintRuleListener = Record< + string, + any +> & { + [K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode) => void; +}; + export type GraphQLESLintRule = { meta: Omit & { docs?: RuleDocsInfo; @@ -93,3 +82,10 @@ export type OmitRecursively = Omit< { [P in keyof T]: OmitDistributive }, K >; + +export type ConfigName = + | 'operations-all' + | 'operations-recommended' + | 'schema-all' + | 'schema-recommended' + | 'schema-relay'; diff --git a/packages/plugin/src/utils.ts b/packages/plugin/src/utils.ts index 9dbf77fb09a..db290604968 100644 --- a/packages/plugin/src/utils.ts +++ b/packages/plugin/src/utils.ts @@ -1,4 +1,3 @@ -import chalk from 'chalk'; import { AST } from 'eslint'; import { Position } from 'estree'; import { ASTNode, GraphQLSchema, Kind } from 'graphql'; @@ -11,10 +10,10 @@ export function requireSiblingsOperations( ruleId: string, context: GraphQLESLintRuleContext, ): SiblingOperations | never { - const { siblingOperations } = context.parserServices; + const { siblingOperations } = context.sourceCode.parserServices; if (!siblingOperations.available) { throw new Error( - `Rule \`${ruleId}\` requires \`parserOptions.operations\` to be set and loaded. See https://bit.ly/graphql-eslint-operations for more info`, + `Rule \`${ruleId}\` requires graphql-config \`documents\` field to be set and loaded. See https://the-guild.dev/graphql/config/docs/user/documents for more info`, ); } return siblingOperations; @@ -24,22 +23,27 @@ export function requireGraphQLSchemaFromContext( ruleId: string, context: GraphQLESLintRuleContext, ): GraphQLSchema | never { - const { schema } = context.parserServices; + const { schema } = context.sourceCode.parserServices; if (!schema) { throw new Error( - `Rule \`${ruleId}\` requires \`parserOptions.schema\` to be set and loaded. See https://bit.ly/graphql-eslint-schema for more info`, + `Rule \`${ruleId}\` requires graphql-config \`schema\` field to be set and loaded. See https://the-guild.dev/graphql/config/docs/user/schema for more info`, ); } return schema; } +const chalk = { + red: (str: string) => `\x1b[31m${str}\x1b[39m`, + yellow: (str: string) => `\x1b[33m${str}\x1b[39m`, +}; + export const logger = { error: (...args: unknown[]) => // eslint-disable-next-line no-console - console.error(chalk.red('error'), '[graphql-eslint]', chalk(...args)), + console.error(chalk.red('error'), '[graphql-eslint]', ...args), warn: (...args: unknown[]) => // eslint-disable-next-line no-console - console.warn(chalk.yellow('warning'), '[graphql-eslint]', chalk(...args)), + console.warn(chalk.yellow('warning'), '[graphql-eslint]', ...args), }; export const normalizePath = (path: string): string => (path || '').replace(/\\/g, '/'); diff --git a/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md b/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md deleted file mode 100644 index 699f53b7a09..00000000000 --- a/packages/plugin/tests/__snapshots__/lone-schema-definition.spec.md +++ /dev/null @@ -1,28 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Invalid #1 1`] = ` -#### ⌨️ Code - - 1 | type Query { - 2 | foo: String - 3 | } - 4 | - 5 | schema { - 6 | query: Query - 7 | } - 8 | - 9 | type RootQuery { - 10 | foo: String - 11 | } - 12 | - 13 | schema { - 14 | query: RootQuery - 15 | } - -#### ❌ Error - - 12 | - > 13 | schema { - | ^^^^^^ Must provide only one schema definition. - 14 | query: RootQuery -`; diff --git a/packages/plugin/tests/executable-definitions.spec.ts b/packages/plugin/tests/executable-definitions.spec.ts deleted file mode 100644 index ad9fa197142..00000000000 --- a/packages/plugin/tests/executable-definitions.spec.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; -import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; - -const TEST_SCHEMA = /* GraphQL */ ` - type Query { - foo: String! - bar: String! - } - - type Mutation { - foo: String! - } - - type T { - foo: String! - } -`; - -const WITH_SCHEMA = { - parserOptions: { - schema: TEST_SCHEMA, - } as ParserOptions, -}; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests( - 'executable-definitions', - GRAPHQL_JS_VALIDATIONS['executable-definitions'], - { - valid: [ - { - ...WITH_SCHEMA, - code: 'query test2 { foo }', - }, - { - ...WITH_SCHEMA, - code: 'mutation test { foo }', - }, - { - ...WITH_SCHEMA, - code: 'fragment Test on T { foo }', - }, - ], - invalid: [ - { - ...WITH_SCHEMA, - code: 'type Query { t: String }', - errors: [{ message: 'The "Query" definition is not executable.' }], - }, - ], - }, -); diff --git a/packages/plugin/tests/fields-on-correct-type.spec.ts b/packages/plugin/tests/fields-on-correct-type.spec.ts deleted file mode 100644 index e38562b793c..00000000000 --- a/packages/plugin/tests/fields-on-correct-type.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { GraphQLRuleTester, ParserOptions, rules } from '../src'; - -const parserOptions: Pick = { - schema: /* GraphQL */ ` - type User { - id: ID - age: Int - } - - type Query { - user: User - } - `, -}; -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('fields-on-correct-type', rules['fields-on-correct-type'], { - valid: [], - invalid: [ - { - name: 'should highlight selection on single line', - code: 'fragment UserFields on User { id bad age }', - parserOptions, - errors: [{ message: 'Cannot query field "bad" on type "User". Did you mean "id"?' }], - }, - { - name: 'should highlight selection on multi line', - code: /* GraphQL */ ` - { - user { - id - veryBad - age - } - } - `, - parserOptions, - errors: [{ message: 'Cannot query field "veryBad" on type "User".' }], - }, - ], -}); diff --git a/packages/plugin/tests/known-fragment-names.spec.ts b/packages/plugin/tests/known-fragment-names.spec.ts deleted file mode 100644 index 3b0804fedbd..00000000000 --- a/packages/plugin/tests/known-fragment-names.spec.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { join } from 'node:path'; -import { GraphQLRuleTester, rules } from '../src'; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('known-fragment-names', rules['known-fragment-names'], { - valid: [ - { - filename: join(__dirname, 'mocks/user.graphql'), - code: ruleTester.fromMockFile('user.graphql'), - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), - }, - }, - { - filename: join(__dirname, 'mocks/known-fragment-names.ts/1_document.graphql'), - code: /* GraphQL */ ` - query User { - user { - ...UserFields - } - } - `, - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: join(__dirname, 'mocks/known-fragment-names.ts'), - }, - }, - { - name: 'should import all fragments inside fragments', - filename: join(__dirname, 'mocks/known-fragment-names/user.gql'), - code: ruleTester.fromMockFile('known-fragment-names/user.gql'), - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: [ - join(__dirname, 'mocks/known-fragment-names/user.gql'), - join(__dirname, 'mocks/known-fragment-names/user-fields.gql'), - ], - }, - }, - { - name: 'should work when interface implemented', - code: /* GraphQL */ ` - fragment Introduction on Introduction { - introText { - ...ContentUnit - } - } - `, - parserOptions: { - schema: /* GraphQL */ ` - interface ContentUnit { - contentSets: Int - } - - type IntroText implements ContentUnit { - contentSets: Int - } - - type Introduction { - introText: IntroText - } - - type Query { - foo: Int - } - `, - documents: /* GraphQL */ ` - fragment ContentUnit on ContentUnit { - contentSets { - id - } - } - `, - }, - }, - { - name: 'should work when with union', - code: /* GraphQL */ ` - query { - animal { - ...AnimalFields - } - } - `, - parserOptions: { - schema: /* GraphQL */ ` - type Cat { - name: String - } - - type Dog { - age: String - } - - union AnimalUnion = Cat | Dog - - type Animal { - animal: AnimalUnion - } - - type Query { - animal: Animal - } - `, - documents: /* GraphQL */ ` - fragment CatFields on Cat { - title - } - - fragment DogFields on Dog { - url - } - - fragment AnimalFields on AnimalUnion { - animal { - ...CatFields - ...DogFields - } - } - `, - }, - }, - ], - invalid: [ - { - name: 'should not throw an error on undefined fragment', - filename: join(__dirname, 'mocks/known-fragment-names/operation-with-undefined-fragment.gql'), - code: ruleTester.fromMockFile('known-fragment-names/operation-with-undefined-fragment.gql'), - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: join( - __dirname, - 'mocks/known-fragment-names/operation-with-undefined-fragment.gql', - ), - }, - errors: [{ message: 'Unknown fragment "DoesNotExist".' }], - }, - ], -}); diff --git a/packages/plugin/tests/lone-schema-definition.spec.ts b/packages/plugin/tests/lone-schema-definition.spec.ts deleted file mode 100644 index 43f658be668..00000000000 --- a/packages/plugin/tests/lone-schema-definition.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { GraphQLRuleTester } from '../src'; -import { GRAPHQL_JS_VALIDATIONS } from '../src/rules/graphql-js-validation'; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests( - 'lone-schema-definition', - GRAPHQL_JS_VALIDATIONS['lone-schema-definition'], - { - valid: [ - /* GraphQL */ ` - type Query { - foo: String - } - - schema { - query: Query - } - `, - ], - invalid: [ - { - code: /* GraphQL */ ` - type Query { - foo: String - } - - schema { - query: Query - } - - type RootQuery { - foo: String - } - - schema { - query: RootQuery - } - `, - errors: [{ message: 'Must provide only one schema definition.' }], - }, - ], - }, -); diff --git a/packages/plugin/tests/no-case-insensitive-enum-values-duplicates.spec.ts b/packages/plugin/tests/no-case-insensitive-enum-values-duplicates.spec.ts deleted file mode 100644 index 31ad7a96ecf..00000000000 --- a/packages/plugin/tests/no-case-insensitive-enum-values-duplicates.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GraphQLRuleTester } from '../src'; -import { rule } from '../src/rules/no-case-insensitive-enum-values-duplicates'; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-case-insensitive-enum-values-duplicates', rule, { - valid: [], - invalid: [ - { - code: 'enum A { TEST TesT }', - errors: 1, - }, - { - code: 'extend enum A { TEST TesT }', - errors: 1, - }, - ], -}); diff --git a/packages/plugin/tests/no-unused-fields.spec.ts b/packages/plugin/tests/no-unused-fields.spec.ts deleted file mode 100644 index fa0fab6b032..00000000000 --- a/packages/plugin/tests/no-unused-fields.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { GraphQLRuleTester } from '../src'; -import { rule } from '../src/rules/no-unused-fields'; - -const SCHEMA = /* GraphQL */ ` - type User { - id: ID! - firstName: String - lastName: String - age: Int - address: Address - } - - type Address { - country: String! - zip: String! - events: [Event!]! - } - - enum EventName { - CREATE - UPDATE - DELETE - } - - type Event { - by: User - name: EventName - data: String - } - - type Query { - user(id: ID!): User - } - - type Mutation { - createUser(firstName: String!): User - deleteUser(id: ID!): User - } -`; - -const ruleTester = new GraphQLRuleTester({ schema: SCHEMA }); - -ruleTester.runGraphQLTests('no-unused-fields', rule, { - valid: [ - { - code: SCHEMA, - parserOptions: { - documents: /* GraphQL */ ` - { - user(id: 1) { - ... on User { - address { - zip - events { - ... on Event { - by { - id - } - can_rename: name - data - } - } - } - } - } - } - - fragment UserFields on User { - can_rename: firstName - lastName - } - - mutation { - deleteUser(id: 2) { - age - } - createUser(firstName: "Foo") { - address { - country - } - } - } - `, - }, - }, - ], - invalid: [ - { - code: /* GraphQL */ ` - type User { - id: ID! - firstName: String - } - `, - parserOptions: { - documents: /* GraphQL */ ` - { - user(id: 1) { - id - } - } - `, - }, - errors: [{ message: 'Field "firstName" is unused' }], - }, - { - code: /* GraphQL */ ` - type Query { - user(id: ID!): User - } - - type Mutation { - deleteUser(id: ID!): User - } - `, - parserOptions: { - documents: /* GraphQL */ ` - { - user(id: 1) { - id - } - } - `, - }, - errors: [{ message: 'Field "deleteUser" is unused' }], - }, - ], -}); diff --git a/packages/plugin/tests/no-unused-fragments.spec.ts b/packages/plugin/tests/no-unused-fragments.spec.ts deleted file mode 100644 index 447b5794b6a..00000000000 --- a/packages/plugin/tests/no-unused-fragments.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { join } from 'node:path'; -import { GraphQLRuleTester, rules } from '../src'; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-unused-fragments', rules['no-unused-fragments'], { - valid: [ - { - name: 'should find file with operation definition that import current fragment', - filename: join(__dirname, 'mocks/user-fields.graphql'), - code: ruleTester.fromMockFile('user-fields.graphql'), - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: [ - join(__dirname, 'mocks/user-fields.graphql'), - join(__dirname, 'mocks/post-fields.graphql'), - join(__dirname, 'mocks/post.graphql'), - ], - }, - }, - ], - invalid: [], -}); diff --git a/packages/plugin/tests/no-unused-variables.spec.ts b/packages/plugin/tests/no-unused-variables.spec.ts deleted file mode 100644 index e4733e67b62..00000000000 --- a/packages/plugin/tests/no-unused-variables.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { join } from 'node:path'; -import { GraphQLRuleTester, rules } from '../src'; - -const ruleTester = new GraphQLRuleTester(); - -ruleTester.runGraphQLTests('no-unused-variables', rules['no-unused-variables'], { - valid: [ - { - filename: join(__dirname, 'mocks/no-unused-variables.gql'), - code: ruleTester.fromMockFile('no-unused-variables.gql'), - parserOptions: { - schema: join(__dirname, 'mocks/user-schema.graphql'), - documents: join(__dirname, 'mocks/user-fields-with-variables.gql'), - }, - }, - ], - invalid: [], -}); diff --git a/packages/plugin/tests/require-nullable-result-in-root.spec.ts b/packages/plugin/tests/require-nullable-result-in-root.spec.ts deleted file mode 100644 index cdd0d55aff6..00000000000 --- a/packages/plugin/tests/require-nullable-result-in-root.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { GraphQLRuleTester, ParserOptions } from '../src'; -import { rule } from '../src/rules/require-nullable-result-in-root'; - -const ruleTester = new GraphQLRuleTester(); - -function useSchema(code: string): { code: string; parserOptions: Omit } { - return { - code, - parserOptions: { schema: code }, - }; -} - -ruleTester.runGraphQLTests('require-nullable-result-in-root', rule, { - valid: [ - { - ...useSchema(/* GraphQL */ ` - type Query { - foo: User - baz: [User]! - bar: [User!]! - } - type User { - id: ID! - } - `), - }, - ], - invalid: [ - { - ...useSchema(/* GraphQL */ ` - type Query { - user: User! - } - type User { - id: ID! - } - `), - errors: 1, - }, - { - name: 'should work with extend query', - ...useSchema(/* GraphQL */ ` - type MyMutation - extend type MyMutation { - user: User! - } - interface User { - id: ID! - } - schema { - mutation: MyMutation - } - `), - errors: 1, - }, - { - name: 'should work with default scalars', - ...useSchema(/* GraphQL */ ` - type MySubscription - extend type MySubscription { - foo: Boolean! - } - schema { - subscription: MySubscription - } - `), - errors: 1, - }, - ], -}); diff --git a/packages/plugin/tsconfig.json b/packages/plugin/tsconfig.json index fa30e28cf9b..0ca6e3f629c 100644 --- a/packages/plugin/tsconfig.json +++ b/packages/plugin/tsconfig.json @@ -1,14 +1,19 @@ { "compilerOptions": { - "target": "es2019", + "target": "es2022", "module": "Node16", "moduleResolution": "node16", "declaration": false, "noEmit": true, "esModuleInterop": true, "strict": true, - "lib": ["ESNext"], + "lib": ["ESNext", "dom"], "types": ["vitest/globals"], - "resolveJsonModule": true - } + "resolveJsonModule": true, + "skipLibCheck": true, + "paths": { + "@graphql-eslint/eslint-plugin": ["./src/index.ts"] + } + }, + "exclude": ["dist"] } diff --git a/packages/plugin/tsup.config.ts b/packages/plugin/tsup.config.ts index af23aa38bf1..58e8b8726c1 100644 --- a/packages/plugin/tsup.config.ts +++ b/packages/plugin/tsup.config.ts @@ -4,20 +4,24 @@ import path from 'node:path'; import packageJson from './package.json'; const opts: Options = { - entry: ['src/**/*.ts'], + entry: ['src/**/*.ts', '!src/index.browser.ts'], clean: true, bundle: false, dts: true, env: { ...(process.env.NODE_ENV && { NODE_ENV: process.env.NODE_ENV }), }, + format: 'esm', + minifySyntax: true, + esbuildOptions(options, _context) { + options.define!.window = 'undefined'; + }, }; const CWD = process.cwd(); export default defineConfig([ { ...opts, - format: 'esm', outDir: 'dist/esm', outExtension: () => ({ js: '.js' }), async onSuccess() { @@ -38,11 +42,6 @@ export default defineConfig([ 2, ).replaceAll('dist/', ''), ); - addCreateRequireBanner([ - 'estree-converter/utils.js', - 'rules/graphql-js-validation.js', - 'testkit.js', - ]); console.log('✅ Success!'); }, }, @@ -51,19 +50,19 @@ export default defineConfig([ format: 'cjs', outDir: 'dist/cjs', }, + { + ...opts, + entry: { + 'index.browser': 'src/index.browser.ts', + }, + outDir: 'dist', + dts: false, + bundle: true, + env: { + NODE_ENV: 'production', + }, + esbuildOptions(options, _context) { + options.define!.window = 'true'; + }, + }, ]); - -async function addCreateRequireBanner(filePaths: string[]): Promise { - await Promise.all( - filePaths.map(async filePath => { - const fullPath = path.join(CWD, 'dist', 'esm', filePath); - const content = await fs.readFile(fullPath, 'utf8'); - await fs.writeFile( - fullPath, - `import { createRequire } from 'module'; -const require = createRequire(import.meta.url); -${content}`, - ); - }), - ); -} diff --git a/packages/plugin/vite.config.ts b/packages/plugin/vite.config.ts new file mode 100644 index 00000000000..d622d4474eb --- /dev/null +++ b/packages/plugin/vite.config.ts @@ -0,0 +1,26 @@ +import path from 'node:path'; +// @ts-expect-error -- add `"type": "module"` to `package.json` to fix this +import { defineConfig } from 'vitest/config'; + +const GRAPHQL_PATH = path.join(__dirname, 'node_modules', 'graphql'); + +export default defineConfig({ + test: { + globals: true, + resolveSnapshotPath: testPath => + testPath.replace('__tests__/', '__tests__/__snapshots__/').replace(/\.ts$/, '.md'), + setupFiles: ['./serializer.ts'], + alias: { + '@graphql-eslint/eslint-plugin': 'src/index.ts', + // fixes Duplicate "graphql" modules cannot be used at the same time since different + 'graphql/validation/index.js': path.join(GRAPHQL_PATH, 'validation', 'index.js'), + 'graphql/validation/validate.js': path.join(GRAPHQL_PATH, 'validation', 'validate.js'), + 'graphql/utilities/valueFromASTUntyped.js': path.join( + GRAPHQL_PATH, + 'utilities', + 'valueFromASTUntyped.js', + ), + graphql: path.join(GRAPHQL_PATH, 'index.js'), + }, + }, +}); diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json new file mode 100644 index 00000000000..9bd299d308c --- /dev/null +++ b/packages/rule-tester/package.json @@ -0,0 +1,32 @@ +{ + "name": "@theguild/eslint-rule-tester", + "version": "0.0.0", + "type": "module", + "private": true, + "engines": { + "node": ">=18" + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + } + }, + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "typecheck": "tsc --noEmit" + }, + "peerDependencies": { + "eslint": "^8.48.0" + }, + "dependencies": { + "@babel/code-frame": "^7.18.6" + }, + "devDependencies": { + "@types/babel__code-frame": "7.0.3", + "@types/node": "18.17.1", + "eslint": "^8.48.0" + } +} diff --git a/packages/rule-tester/src/index.ts b/packages/rule-tester/src/index.ts new file mode 100644 index 00000000000..641ada5a70e --- /dev/null +++ b/packages/rule-tester/src/index.ts @@ -0,0 +1,154 @@ +import { readFileSync } from 'node:fs'; +import { resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { codeFrameColumns } from '@babel/code-frame'; +import { AST, Linter, Rule, RuleTester as ESLintRuleTester } from 'eslint'; +import { GraphQLESLintRule } from '../../plugin/src/types.js'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +type ValidTestCase> = Omit< + ESLintRuleTester.ValidTestCase, + 'options' | 'parserOptions' +> & { + options?: Options; + parserOptions?: ParserOptions; +}; + +function indentCode(code: string, indent = 4): string { + return code.replace(/^/gm, ' '.repeat(indent)); +} + +// A simple version of `SourceCodeFixer.applyFixes` +// https://github.com/eslint/eslint/issues/14936#issuecomment-906746754 +function applyFix(code: string, { range, text }: Rule.Fix): string { + return [code.slice(0, range[0]), text, code.slice(range[1])].join(''); +} + +export class RuleTester extends ESLintRuleTester { + fromMockFile(path: string): string { + return readFileSync(resolve(__dirname, `../../plugin/__tests__/mocks/${path}`), 'utf-8'); + } + + // @ts-expect-error -- fix later + run( + ruleId: string, + rule: GraphQLESLintRule, + tests: { + valid: (string | ValidTestCase)[]; + invalid: (ValidTestCase & + Pick)[]; + }, + ): void { + // @ts-expect-error -- fix later + const { testerConfig, linter } = this; + + const getMessages = ( + testCase: ESLintRuleTester.InvalidTestCase, + messages: Linter.LintMessage[], + ) => { + const { options, code, filename, parserOptions } = testCase; + + const config = { + parser: testerConfig.parser, + parserOptions: { + ...testerConfig.parserOptions, + ...parserOptions, + }, + rules: { + [ruleId]: Array.isArray(options) ? ['error', ...options] : 'error', + }, + }; + const codeFrame = indentCode(printCode(code, { line: 0, column: 0 })); + const messageForSnapshot = ['#### ⌨️ Code', codeFrame]; + + if (options) { + const opts = JSON.stringify(options, null, 2).slice(1, -1); + messageForSnapshot.push('#### ⚙️ Options', indentCode(removeTrailingBlankLines(opts), 2)); + } + for (const [index, message] of messages.entries()) { + const codeWithMessage = printCode(code, message, 1); + messageForSnapshot.push( + printWithIndex('#### ❌ Error', index, messages.length), + indentCode(codeWithMessage), + ); + + // Don't print suggestions in snapshots for too big codes + if (message.suggestions && (code.match(/\n/g) || '').length < 1000) { + for (const [i, suggestion] of message.suggestions.entries()) { + const title = printWithIndex( + '#### 💡 Suggestion', + i, + message.suggestions.length, + suggestion.desc, + ); + const output = applyFix(code, suggestion.fix); + const codeFrame = printCode(output, { line: 0, column: 0 }); + messageForSnapshot.push(title, indentCode(codeFrame, 2)); + } + } + } + if (rule.meta.fixable) { + const { fixed, output } = linter.verifyAndFix(code, config, filename); + if (fixed) { + messageForSnapshot.push('#### 🔧 Autofix output', indentCode(printCode(output))); + } + } + expect(messageForSnapshot.join('\n\n')).toMatchSnapshot(); + }; + + for (const [id, testCase] of tests.invalid.entries()) { + testCase.name ||= `Invalid #${id + 1}`; + testCase.code = removeTrailingBlankLines(testCase.code); + Object.defineProperty(testCase, 'assertMessages', { + value: getMessages, + }); + } + + // @ts-expect-error -- fix later + super.run(ruleId, rule as any, tests); + } +} + +function removeTrailingBlankLines(text: string): string { + return text.replace(/^\s*\n/, '').trimEnd(); +} + +function printWithIndex(title: string, index: number, total: number, description?: string): string { + if (total > 1) { + title += ` ${index + 1}/${total}`; + } + if (description) { + title += `: ${description}`; + } + return title; +} + +function printCode( + code: string, + result: Partial = {}, + linesOffset = Number.POSITIVE_INFINITY, +): string { + const { line, column, endLine, endColumn, message } = result; + const location = {} as AST.SourceLocation; + + if (typeof line === 'number' && typeof column === 'number') { + location.start = { + line, + column, + }; + } + + if (typeof endLine === 'number' && typeof endColumn === 'number') { + location.end = { + line: endLine, + column: endColumn, + }; + } + + return codeFrameColumns(code, location, { + linesAbove: linesOffset, + linesBelow: linesOffset, + message, + }); +} diff --git a/packages/rule-tester/tsconfig.json b/packages/rule-tester/tsconfig.json new file mode 100644 index 00000000000..0ea7abf2b2f --- /dev/null +++ b/packages/rule-tester/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "Node16", + "moduleResolution": "node16", + "declaration": false, + "noEmit": true, + "esModuleInterop": true, + "strict": true, + "lib": ["ESNext"], + "types": ["vitest/globals"], + "resolveJsonModule": true, + "skipLibCheck": true + }, + "exclude": ["dist"] +} diff --git a/packages/rule-tester/tsup.config.ts b/packages/rule-tester/tsup.config.ts new file mode 100644 index 00000000000..ca1c92809cf --- /dev/null +++ b/packages/rule-tester/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + name: 'eslint-rule-tester', + entry: ['src/*.ts'], + clean: true, + format: 'esm', + dts: true, +}); diff --git a/patches/@vitest__runner@0.28.4.patch b/patches/@vitest__runner@0.28.4.patch deleted file mode 100644 index 2c8cb86e110..00000000000 --- a/patches/@vitest__runner@0.28.4.patch +++ /dev/null @@ -1,17 +0,0 @@ -# vitest's `--passWithNoTests` flag doesn't work when valid/invalid cases contain empty array 🤷‍ - -diff --git a/dist/index.js b/dist/index.js -index 14cbb2afd10bc64465281c25dc85a766fa3912ac..22dbf48554fcd2863871dfb003ee194af34532a9 100644 ---- a/dist/index.js -+++ b/dist/index.js -@@ -545,9 +545,7 @@ async function runSuite(suite, runner) { - if (!hasTests(suite)) { - suite.result.state = "fail"; - if (!suite.result.error) { -- const error = processError(new Error(`No test found in suite ${suite.name}`)); -- suite.result.error = error; -- suite.result.errors = [error]; -+ suite.result.state = "pass" - } - } else if (hasFailed(suite)) { - suite.result.state = "fail"; diff --git a/patches/eslint@8.31.0.patch b/patches/eslint@8.31.0.patch deleted file mode 100644 index 3ce101a2e77..00000000000 --- a/patches/eslint@8.31.0.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/lib/linter/linter.js b/lib/linter/linter.js -index a29ce92..a574871 100644 ---- a/lib/linter/linter.js -+++ b/lib/linter/linter.js -@@ -41,7 +41,8 @@ const { getRuleFromConfig } = require("../config/flat-config-helpers"); - const { FlatConfigArray } = require("../config/flat-config-array"); - - const debug = require("debug")("eslint:linter"); --const MAX_AUTOFIX_PASSES = 10; -+// 🚨 10 is not enough for alphabetize test with definitions sorting -+const MAX_AUTOFIX_PASSES = 20; - const DEFAULT_PARSER_NAME = "espree"; - const DEFAULT_ECMA_VERSION = 5; - const commentParser = new ConfigCommentParser(); -diff --git a/lib/rule-tester/rule-tester.js b/lib/rule-tester/rule-tester.js -index 2af272b..738f80f 100644 ---- a/lib/rule-tester/rule-tester.js -+++ b/lib/rule-tester/rule-tester.js -@@ -1005,11 +1005,12 @@ class RuleTester { - assert.strictEqual(result.output, item.output, "Output is incorrect."); - } - } else { -- assert.strictEqual( -- result.output, -- item.code, -- "The rule fixed the code. Please add 'output' property." -- ); -+ // 🚨 Don't need, as we assert autofix output with snapshots -+ // assert.strictEqual( -+ // result.output, -+ // item.code, -+ // "The rule fixed the code. Please add 'output' property." -+ // ); - } - - assertASTDidntChange(result.beforeAST, result.afterAST); diff --git a/patches/eslint@8.46.0.patch b/patches/eslint@8.46.0.patch new file mode 100644 index 00000000000..a03efdec702 --- /dev/null +++ b/patches/eslint@8.46.0.patch @@ -0,0 +1,51 @@ +diff --git a/lib/linter/linter.js b/lib/linter/linter.js +index 233cbed5b5ccdf89806df9786a0902a317dd451e..7db8fa9c1fca4183460164ca1fd8fa0a3c9e6206 100644 +--- a/lib/linter/linter.js ++++ b/lib/linter/linter.js +@@ -44,7 +44,8 @@ const { getRuleFromConfig } = require("../config/flat-config-helpers"); + const { FlatConfigArray } = require("../config/flat-config-array"); + + const debug = require("debug")("eslint:linter"); +-const MAX_AUTOFIX_PASSES = 10; ++// 🚨 10 is not enough for alphabetize test with definitions sorting ++const MAX_AUTOFIX_PASSES = 20; + const DEFAULT_PARSER_NAME = "espree"; + const DEFAULT_ECMA_VERSION = 5; + const commentParser = new ConfigCommentParser(); +diff --git a/lib/rule-tester/flat-rule-tester.js b/lib/rule-tester/flat-rule-tester.js +index f143873f7bc76737acc5ff00871e462ef058bf4b..a0b6283b653a9f9cd478711c34bbf4a07ad9008f 100644 +--- a/lib/rule-tester/flat-rule-tester.js ++++ b/lib/rule-tester/flat-rule-tester.js +@@ -998,11 +998,7 @@ class FlatRuleTester { + assert.strictEqual(result.output, item.output, "Output is incorrect."); + } + } else { +- assert.strictEqual( +- result.output, +- item.code, +- "The rule fixed the code. Please add 'output' property." +- ); ++ // 🚨 Don't need, as we assert autofix output with snapshots + } + + assertASTDidntChange(result.beforeAST, result.afterAST); +diff --git a/lib/rule-tester/rule-tester.js b/lib/rule-tester/rule-tester.js +index e4dc126783c8232a67268c72def615829c4508b9..6e1de73fd06e8bfec07e14c8779b050959f3add4 100644 +--- a/lib/rule-tester/rule-tester.js ++++ b/lib/rule-tester/rule-tester.js +@@ -1008,13 +1008,10 @@ class RuleTester { + assert.strictEqual(result.output, item.output, "Output is incorrect."); + } + } else { +- assert.strictEqual( +- result.output, +- item.code, +- "The rule fixed the code. Please add 'output' property." +- ); ++ // 🚨 Don't need, as we assert autofix output with snapshots + } + ++ item.assertMessages(item, messages) + assertASTDidntChange(result.beforeAST, result.afterAST); + } + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e39a3656965..537125607a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,19 +4,13 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - graphql: 16.8.0 - patchedDependencies: - '@vitest/runner@0.30.1': - hash: 22k4fsskoeieob62btkupydhfa - path: patches/@vitest__runner@0.28.4.patch eslint-plugin-eslint-plugin@5.0.7: hash: cdhdgvmsbh3fbusrlxsl6de2he path: patches/eslint-plugin-eslint-plugin@5.0.6.patch - eslint@8.44.0: - hash: v7lv2hbnxmm2b22qo3sob3rjvq - path: patches/eslint@8.31.0.patch + eslint@8.48.0: + hash: yi5cqffjk423hcgr7hl33kguwu + path: patches/eslint@8.46.0.patch json-schema-to-markdown@1.1.1: hash: beglqnggvhpsclgwbdw27hzvu4 path: patches/json-schema-to-markdown@1.1.1.patch @@ -36,7 +30,7 @@ importers: version: 9.2.1(graphql@16.8.0) '@theguild/eslint-config': specifier: 0.11.0 - version: 0.11.0(eslint@8.44.0)(typescript@5.2.2) + version: 0.11.0(eslint@8.48.0)(typescript@5.2.2) '@theguild/prettier-config': specifier: 1.2.0 version: 1.2.0(prettier@2.8.8) @@ -59,11 +53,11 @@ importers: specifier: 2.4.1 version: 2.4.1 eslint: - specifier: 8.44.0 - version: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-plugin-eslint-plugin: specifier: 5.0.7 - version: 5.0.7(patch_hash=cdhdgvmsbh3fbusrlxsl6de2he)(eslint@8.44.0) + version: 5.0.7(patch_hash=cdhdgvmsbh3fbusrlxsl6de2he)(eslint@8.48.0) eslint-plugin-tailwindcss: specifier: 3.13.0 version: 3.13.0(tailwindcss@3.3.3) @@ -91,6 +85,9 @@ importers: tsx: specifier: 3.12.7 version: 3.12.7 + turbo: + specifier: ^1.10.12 + version: 1.10.12 typescript: specifier: 5.2.2 version: 5.2.2 @@ -98,22 +95,6 @@ importers: specifier: 0.30.1 version: 0.30.1 - examples/basic: - dependencies: - graphql: - specifier: 16.8.0 - version: 16.8.0 - devDependencies: - '@eslint/js': - specifier: 8.48.0 - version: 8.48.0 - '@graphql-eslint/eslint-plugin': - specifier: workspace:* - version: link:../../packages/plugin/dist - eslint: - specifier: 8.38.0 - version: 8.38.0 - examples/code-file: dependencies: graphql: @@ -127,8 +108,8 @@ importers: specifier: workspace:* version: link:../../packages/plugin/dist eslint: - specifier: 8.38.0 - version: 8.38.0 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) examples/graphql-config: dependencies: @@ -143,27 +124,8 @@ importers: specifier: workspace:* version: link:../../packages/plugin/dist eslint: - specifier: 8.38.0 - version: 8.38.0 - - examples/graphql-config-code-file: - dependencies: - graphql: - specifier: 16.8.0 - version: 16.8.0 - graphql-tag: - specifier: 2.12.6 - version: 2.12.6(graphql@16.8.0) - devDependencies: - '@eslint/js': specifier: 8.48.0 - version: 8.48.0 - '@graphql-eslint/eslint-plugin': - specifier: workspace:* - version: link:../../packages/plugin/dist - eslint: - specifier: 8.38.0 - version: 8.38.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) examples/monorepo: dependencies: @@ -178,8 +140,8 @@ importers: specifier: workspace:* version: link:../../packages/plugin/dist eslint: - specifier: 8.38.0 - version: 8.38.0 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) examples/multiple-projects-graphql-config: dependencies: @@ -190,18 +152,9 @@ importers: '@graphql-eslint/eslint-plugin': specifier: workspace:* version: link:../../packages/plugin/dist - cosmiconfig-typescript-loader: - specifier: 5.0.0 - version: 5.0.0(@types/node@18.17.12)(cosmiconfig@8.2.0)(typescript@5.2.2) eslint: - specifier: 8.38.0 - version: 8.38.0 - ts-node: - specifier: 10.9.1 - version: 10.9.1(@types/node@18.17.12)(typescript@5.2.2) - typescript: - specifier: 5.2.2 - version: 5.2.2 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) examples/prettier: dependencies: @@ -216,18 +169,34 @@ importers: specifier: workspace:* version: link:../../packages/plugin/dist eslint: - specifier: 8.38.0 - version: 8.38.0 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-config-prettier: specifier: 9.0.0 - version: 9.0.0(eslint@8.38.0) + version: 9.0.0(eslint@8.48.0) eslint-plugin-prettier: specifier: 4.2.1 - version: 4.2.1(eslint-config-prettier@9.0.0)(eslint@8.38.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@9.0.0)(eslint@8.48.0)(prettier@2.8.8) prettier: specifier: 2.8.8 version: 2.8.8 + examples/programmatic: + dependencies: + graphql: + specifier: 16.8.0 + version: 16.8.0 + devDependencies: + '@eslint/js': + specifier: 8.48.0 + version: 8.48.0 + '@graphql-eslint/eslint-plugin': + specifier: workspace:* + version: link:../../packages/plugin/dist + eslint: + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + examples/svelte-code-file: dependencies: graphql: @@ -238,8 +207,8 @@ importers: specifier: workspace:* version: link:../../packages/plugin/dist eslint: - specifier: 8.38.0 - version: 8.38.0 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) svelte: specifier: 4.2.0 version: 4.2.0 @@ -263,17 +232,14 @@ importers: specifier: 3.3.4 version: 3.3.4 eslint: - specifier: 8.38.0 - version: 8.38.0 + specifier: 8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) vue-eslint-parser: specifier: 9.3.1 - version: 9.3.1(eslint@8.38.0) + version: 9.3.1(eslint@8.48.0) packages/plugin: dependencies: - '@babel/code-frame': - specifier: ^7.18.6 - version: 7.22.10 '@graphql-tools/code-file-loader': specifier: ^7.3.6 version: 7.3.23(@babel/core@7.22.11)(graphql@16.8.0) @@ -283,17 +249,17 @@ importers: '@graphql-tools/utils': specifier: ^9.0.0 version: 9.2.1(graphql@16.8.0) - chalk: - specifier: ^4.1.2 - version: 4.1.2 debug: specifier: ^4.3.4 version: 4.3.4 + eslint: + specifier: '>=8.44.0' + version: 8.46.0 fast-glob: specifier: ^3.2.12 version: 3.3.1 graphql-config: - specifier: ^4.4.0 + specifier: ^4.5.0 version: 4.5.0(@types/node@18.17.12)(graphql@16.8.0) graphql-depth-limit: specifier: ^1.1.0 @@ -301,19 +267,16 @@ importers: lodash.lowercase: specifier: ^4.3.0 version: 4.3.0 - tslib: - specifier: ^2.4.1 - version: 2.6.2 devDependencies: - '@types/babel__code-frame': - specifier: 7.0.3 - version: 7.0.3 + '@theguild/eslint-rule-tester': + specifier: workspace:* + version: link:../rule-tester '@types/debug': specifier: 4.1.8 version: 4.1.8 '@types/eslint': - specifier: 8.37.0 - version: 8.37.0 + specifier: 8.44.2 + version: 8.44.2 '@types/estree': specifier: 1.0.1 version: 1.0.1 @@ -334,6 +297,22 @@ importers: version: 2.9.2 publishDirectory: dist + packages/rule-tester: + dependencies: + '@babel/code-frame': + specifier: ^7.18.6 + version: 7.22.10 + devDependencies: + '@types/babel__code-frame': + specifier: 7.0.3 + version: 7.0.3 + '@types/node': + specifier: 18.17.1 + version: 18.17.1 + eslint: + specifier: ^8.48.0 + version: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + website: dependencies: '@graphql-eslint/eslint-plugin': @@ -350,7 +329,7 @@ importers: version: 1.2.2(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@theguild/components': specifier: 5.2.2 - version: 5.2.2(@algolia/client-search@4.19.1)(@types/react@18.2.21)(next@13.4.19)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(webpack@4.46.0) + version: 5.2.2(@algolia/client-search@4.19.1)(@types/react@18.2.21)(next@13.4.19)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(webpack@5.88.2) clsx: specifier: 2.0.0 version: 2.0.0 @@ -403,13 +382,15 @@ importers: tailwindcss-radix: specifier: 2.8.0 version: 2.8.0 + webpack: + specifier: ^5.88.2 + version: 5.88.2(esbuild@0.18.20) packages: /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - dev: true /@algolia/autocomplete-core@1.11.0(@algolia/client-search@4.19.1)(algoliasearch@4.19.1)(search-insights@2.7.0): resolution: {integrity: sha512-kFtn8XPMdE1QGDxyMTObGgaUpq5lcG2fLVsda6E88MoZZsfYkC8Oua6dwa0b06/GpgEWaliby/7AksUqz05uzw==} @@ -995,13 +976,6 @@ packages: resolution: {integrity: sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==} dev: false - /@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: true - /@esbuild-kit/cjs-loader@2.4.2: resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} dependencies: @@ -1038,7 +1012,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.17.19: @@ -1056,7 +1029,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.17.19: @@ -1074,7 +1046,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.17.19: @@ -1092,7 +1063,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.17.19: @@ -1110,7 +1080,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.17.19: @@ -1128,7 +1097,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.17.19: @@ -1146,7 +1114,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.17.19: @@ -1164,7 +1131,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.17.19: @@ -1182,7 +1148,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.17.19: @@ -1200,7 +1165,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.17.19: @@ -1218,7 +1182,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.17.19: @@ -1236,7 +1199,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.17.19: @@ -1254,7 +1216,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.17.19: @@ -1272,7 +1233,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.17.19: @@ -1290,7 +1250,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.17.19: @@ -1308,7 +1267,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.17.19: @@ -1326,7 +1284,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.17.19: @@ -1344,7 +1301,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.17.19: @@ -1362,7 +1318,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.17.19: @@ -1380,7 +1335,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.17.19: @@ -1398,7 +1352,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.17.19: @@ -1416,33 +1369,31 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.38.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.38.0 + eslint: 8.46.0 eslint-visitor-keys: 3.4.3 - dev: true + dev: false - /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.48.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-visitor-keys: 3.4.3 dev: true /@eslint-community/regexpp@4.8.0: resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true /@eslint/eslintrc@2.1.2: resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} @@ -1459,22 +1410,10 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - dev: true - - /@eslint/js@8.38.0: - resolution: {integrity: sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@eslint/js@8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true /@eslint/js@8.48.0: resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true /@floating-ui/core@1.4.1: resolution: {integrity: sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==} @@ -1518,7 +1457,7 @@ packages: /@graphql-tools/batch-execute@8.5.22(graphql@16.8.0): resolution: {integrity: sha512-hcV1JaY6NJQFQEwCKrYhpfLK8frSXDbtNMoTur98u10Cmecy1zrqNKSqhEyGetpgHxaJRqszGzKeI3RuroDN6A==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) dataloader: 2.2.2 @@ -1530,7 +1469,7 @@ packages: /@graphql-tools/code-file-loader@7.3.23(@babel/core@7.22.11)(graphql@16.8.0): resolution: {integrity: sha512-8Wt1rTtyTEs0p47uzsPJ1vAtfAx0jmxPifiNdmo9EOCuUPyQGEbMaik/YkqZ7QUFIEYEQu+Vgfo8tElwOPtx5Q==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/graphql-tag-pluck': 7.5.2(@babel/core@7.22.11)(graphql@16.8.0) '@graphql-tools/utils': 9.2.1(graphql@16.8.0) @@ -1546,7 +1485,7 @@ packages: /@graphql-tools/delegate@9.0.35(graphql@16.8.0): resolution: {integrity: sha512-jwPu8NJbzRRMqi4Vp/5QX1vIUeUPpWmlQpOkXQD2r1X45YsVceyUUBnktCrlJlDB4jPRVy7JQGwmYo3KFiOBMA==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/batch-execute': 8.5.22(graphql@16.8.0) '@graphql-tools/executor': 0.0.20(graphql@16.8.0) @@ -1561,7 +1500,7 @@ packages: /@graphql-tools/executor-graphql-ws@0.0.14(graphql@16.8.0): resolution: {integrity: sha512-P2nlkAsPZKLIXImFhj0YTtny5NQVGSsKnhi7PzXiaHSXc6KkzqbWZHKvikD4PObanqg+7IO58rKFpGXP7eeO+w==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) '@repeaterjs/repeater': 3.0.4 @@ -1579,7 +1518,7 @@ packages: /@graphql-tools/executor-http@0.1.10(@types/node@18.17.12)(graphql@16.8.0): resolution: {integrity: sha512-hnAfbKv0/lb9s31LhWzawQ5hghBfHS+gYWtqxME6Rl0Aufq9GltiiLBcl7OVVOnkLF0KhwgbYP1mB5VKmgTGpg==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) '@repeaterjs/repeater': 3.0.4 @@ -1597,7 +1536,7 @@ packages: /@graphql-tools/executor-legacy-ws@0.0.11(graphql@16.8.0): resolution: {integrity: sha512-4ai+NnxlNfvIQ4c70hWFvOZlSUN8lt7yc+ZsrwtNFbFPH/EroIzFMapAxM9zwyv9bH38AdO3TQxZ5zNxgBdvUw==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) '@types/ws': 8.5.5 @@ -1613,7 +1552,7 @@ packages: /@graphql-tools/executor@0.0.20(graphql@16.8.0): resolution: {integrity: sha512-GdvNc4vszmfeGvUqlcaH1FjBoguvMYzxAfT6tDd4/LgwymepHhinqLNA5otqwVLW+JETcDaK7xGENzFomuE6TA==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) @@ -1626,7 +1565,7 @@ packages: /@graphql-tools/graphql-file-loader@7.5.17(graphql@16.8.0): resolution: {integrity: sha512-hVwwxPf41zOYgm4gdaZILCYnKB9Zap7Ys9OhY1hbwuAuC4MMNY9GpUjoTU3CQc3zUiPoYStyRtUGkHSJZ3HxBw==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/import': 6.7.18(graphql@16.8.0) '@graphql-tools/utils': 9.2.1(graphql@16.8.0) @@ -1639,7 +1578,7 @@ packages: /@graphql-tools/graphql-tag-pluck@7.5.2(@babel/core@7.22.11)(graphql@16.8.0): resolution: {integrity: sha512-RW+H8FqOOLQw0BPXaahYepVSRjuOHw+7IL8Opaa5G5uYGOBxoXR7DceyQ7BcpMgktAOOmpDNQ2WtcboChOJSRA==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@babel/parser': 7.22.11 '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.11) @@ -1656,7 +1595,7 @@ packages: /@graphql-tools/import@6.7.18(graphql@16.8.0): resolution: {integrity: sha512-XQDdyZTp+FYmT7as3xRWH/x8dx0QZA2WZqfMF5EWb36a0PiH7WwlRQYIdyYXj8YCLpiWkeBXgBRHmMnwEYR8iQ==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) graphql: 16.8.0 @@ -1667,7 +1606,7 @@ packages: /@graphql-tools/json-file-loader@7.4.18(graphql@16.8.0): resolution: {integrity: sha512-AJ1b6Y1wiVgkwsxT5dELXhIVUPs/u3VZ8/0/oOtpcoyO/vAeM5rOvvWegzicOOnQw8G45fgBRMkkRfeuwVt6+w==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) globby: 11.1.0 @@ -1679,7 +1618,7 @@ packages: /@graphql-tools/load@7.8.14(graphql@16.8.0): resolution: {integrity: sha512-ASQvP+snHMYm+FhIaLxxFgVdRaM0vrN9wW2BKInQpktwWTXVyk+yP5nQUCEGmn0RTdlPKrffBaigxepkEAJPrg==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/schema': 9.0.19(graphql@16.8.0) '@graphql-tools/utils': 9.2.1(graphql@16.8.0) @@ -1691,7 +1630,7 @@ packages: /@graphql-tools/merge@8.4.2(graphql@16.8.0): resolution: {integrity: sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/utils': 9.2.1(graphql@16.8.0) graphql: 16.8.0 @@ -1701,7 +1640,7 @@ packages: /@graphql-tools/schema@9.0.19(graphql@16.8.0): resolution: {integrity: sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/merge': 8.4.2(graphql@16.8.0) '@graphql-tools/utils': 9.2.1(graphql@16.8.0) @@ -1713,7 +1652,7 @@ packages: /@graphql-tools/url-loader@7.17.18(@types/node@18.17.12)(graphql@16.8.0): resolution: {integrity: sha512-ear0CiyTj04jCVAxi7TvgbnGDIN2HgqzXzwsfcqiVg9cvjT40NcMlZ2P1lZDgqMkZ9oyLTV8Bw6j+SyG6A+xPw==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 9.0.35(graphql@16.8.0) @@ -1739,7 +1678,7 @@ packages: /@graphql-tools/utils@9.2.1(graphql@16.8.0): resolution: {integrity: sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.0) graphql: 16.8.0 @@ -1748,7 +1687,7 @@ packages: /@graphql-tools/wrap@9.4.2(graphql@16.8.0): resolution: {integrity: sha512-DFcd9r51lmcEKn0JW43CWkkI2D6T9XI1juW/Yo86i04v43O9w2/k4/nx2XTJv4Yv+iXwUw7Ok81PGltwGJSDSA==} peerDependencies: - graphql: 16.8.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@graphql-tools/delegate': 9.0.35(graphql@16.8.0) '@graphql-tools/schema': 9.0.19(graphql@16.8.0) @@ -1761,7 +1700,7 @@ packages: /@graphql-typed-document-node/core@3.2.0(graphql@16.8.0): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: - graphql: 16.8.0 + 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 || ^17.0.0 dependencies: graphql: 16.8.0 @@ -1786,16 +1725,13 @@ packages: minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - dev: true /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true /@ianvs/prettier-plugin-sort-imports@4.0.0-alpha.3(prettier@2.8.8): resolution: {integrity: sha512-3zUL/BQoNVoe1OHV7GQ5d4j51/QNvo4tvYNm0j87ZWzsj90jSPHIiI4KtQGM7ZCbmK+TXQBwJWSKVxkHl+iUPg==} @@ -1847,6 +1783,12 @@ packages: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} @@ -1856,13 +1798,6 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - /@lit-labs/ssr-dom-shim@1.1.1: resolution: {integrity: sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==} dev: false @@ -2772,7 +2707,7 @@ packages: remove-markdown: 0.5.0 dev: true - /@theguild/components@5.2.2(@algolia/client-search@4.19.1)(@types/react@18.2.21)(next@13.4.19)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(webpack@4.46.0): + /@theguild/components@5.2.2(@algolia/client-search@4.19.1)(@types/react@18.2.21)(next@13.4.19)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0)(webpack@5.88.2): resolution: {integrity: sha512-OOF/YrVOm0SN0Dngu8f10z7kW/p0M00IDIcZoiUmU/uw4f/5lH4SYOiLk1r7jqmqwuWgNEh55plO2iUeepwP6w==} peerDependencies: next: ^12.3.1 || ^13.0.0 @@ -2792,7 +2727,7 @@ packages: focus-trap-react: 10.2.1(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) fuzzy: 0.1.3 next: 13.4.19(@babel/core@7.22.11)(react-dom@18.2.0)(react@18.2.0) - next-videos: 1.5.0(webpack@4.46.0) + next-videos: 1.5.0(webpack@5.88.2) nextra: 2.9.0(next@13.4.19)(react-dom@18.2.0)(react@18.2.0) nextra-theme-docs: 2.9.0(next@13.4.19)(nextra@2.9.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 @@ -2815,28 +2750,28 @@ packages: - webpack dev: false - /@theguild/eslint-config@0.11.0(eslint@8.44.0)(typescript@5.2.2): + /@theguild/eslint-config@0.11.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-dxKcEb0uKZvkKBp9KwcKe/npuHZw789vrQPUJGJksz9ghjvAQOc9Kx4PMJTTrVWOzg/1lzFB9s070V9yviYkHg==} peerDependencies: eslint: ^8.24.0 dependencies: '@rushstack/eslint-patch': 1.3.3 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.44.0)(typescript@5.2.2) - '@typescript-eslint/parser': 5.62.0(eslint@8.44.0)(typescript@5.2.2) - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) - eslint-config-prettier: 8.10.0(eslint@8.44.0) - eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.44.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0) - eslint-plugin-jsonc: 2.9.0(eslint@8.44.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.44.0) - eslint-plugin-mdx: 2.2.0(eslint@8.44.0) - eslint-plugin-n: 16.0.2(eslint@8.44.0) - eslint-plugin-promise: 6.1.1(eslint@8.44.0) - eslint-plugin-react: 7.33.2(eslint@8.44.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.44.0) - eslint-plugin-sonarjs: 0.19.0(eslint@8.44.0) - eslint-plugin-unicorn: 47.0.0(eslint@8.44.0) - eslint-plugin-yml: 1.8.0(eslint@8.44.0) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-config-prettier: 8.10.0(eslint@8.48.0) + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.48.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) + eslint-plugin-jsonc: 2.9.0(eslint@8.48.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@8.48.0) + eslint-plugin-mdx: 2.2.0(eslint@8.48.0) + eslint-plugin-n: 16.0.2(eslint@8.48.0) + eslint-plugin-promise: 6.1.1(eslint@8.48.0) + eslint-plugin-react: 7.33.2(eslint@8.48.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.48.0) + eslint-plugin-sonarjs: 0.19.0(eslint@8.48.0) + eslint-plugin-unicorn: 47.0.0(eslint@8.48.0) + eslint-plugin-yml: 1.8.0(eslint@8.48.0) transitivePeerDependencies: - eslint-import-resolver-node - eslint-import-resolver-webpack @@ -2894,22 +2829,6 @@ packages: engines: {node: '>=10.13.0'} dev: true - /@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true - - /@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true - - /@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true - - /@tsconfig/node16@1.0.4: - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - dev: true - /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -2958,12 +2877,17 @@ packages: resolution: {integrity: sha512-EGlKlgMhnLt/cM4DbUSafFdrkeJoC9Mvnj0PUCU7tFmTjMjNRT957kXCx0wYm3JuEq4o4ZsS5vG+NlkM2DMd2A==} dev: true - /@types/eslint@8.37.0: - resolution: {integrity: sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ==} + /@types/eslint-scope@3.7.4: + resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} + dependencies: + '@types/eslint': 8.44.2 + '@types/estree': 1.0.1 + + /@types/eslint@8.44.2: + resolution: {integrity: sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==} dependencies: '@types/estree': 1.0.1 '@types/json-schema': 7.0.12 - dev: true /@types/estree-jsx@1.0.0: resolution: {integrity: sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ==} @@ -2976,7 +2900,7 @@ packages: /@types/graphql-depth-limit@1.1.3: resolution: {integrity: sha512-fvK0qXNvwKD5bSnMEkidi51EloYsz/E8JG/8Kzq1peoLRQAEGgLVauE1xGeT4W/nbSpecgG+34dcKPdwfGzFHQ==} dependencies: - graphql: 16.8.0 + graphql: 14.7.0 dev: true /@types/hast@2.3.5: @@ -3055,6 +2979,10 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true + /@types/node@18.17.1: + resolution: {integrity: sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==} + dev: true + /@types/node@18.17.12: resolution: {integrity: sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==} @@ -3100,7 +3028,7 @@ packages: '@types/node': 18.17.12 dev: false - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.44.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3112,12 +3040,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.8.0 - '@typescript-eslint/parser': 5.62.0(eslint@8.44.0)(typescript@5.2.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.44.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.44.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) graphemer: 1.4.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -3128,7 +3056,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.44.0)(typescript@5.2.2): + /@typescript-eslint/parser@5.62.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3142,7 +3070,7 @@ packages: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) debug: 4.3.4 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -3156,7 +3084,7 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.44.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3167,9 +3095,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.44.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) tsutils: 3.21.0(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -3202,19 +3130,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.44.0)(typescript@5.2.2): + /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: @@ -3238,7 +3166,7 @@ packages: chai: 4.3.8 dev: true - /@vitest/runner@0.30.1(patch_hash=22k4fsskoeieob62btkupydhfa): + /@vitest/runner@0.30.1: resolution: {integrity: sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==} dependencies: '@vitest/utils': 0.30.1 @@ -3246,7 +3174,6 @@ packages: p-limit: 4.0.0 pathe: 1.1.1 dev: true - patched: true /@vitest/snapshot@0.30.1: resolution: {integrity: sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==} @@ -3322,132 +3249,96 @@ packages: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: true - /@webassemblyjs/ast@1.9.0: - resolution: {integrity: sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==} + /@webassemblyjs/ast@1.11.6: + resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 - dev: false - - /@webassemblyjs/floating-point-hex-parser@1.9.0: - resolution: {integrity: sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==} - dev: false - - /@webassemblyjs/helper-api-error@1.9.0: - resolution: {integrity: sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==} - dev: false + '@webassemblyjs/helper-numbers': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 - /@webassemblyjs/helper-buffer@1.9.0: - resolution: {integrity: sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==} - dev: false + /@webassemblyjs/floating-point-hex-parser@1.11.6: + resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} - /@webassemblyjs/helper-code-frame@1.9.0: - resolution: {integrity: sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==} - dependencies: - '@webassemblyjs/wast-printer': 1.9.0 - dev: false + /@webassemblyjs/helper-api-error@1.11.6: + resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} - /@webassemblyjs/helper-fsm@1.9.0: - resolution: {integrity: sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==} - dev: false + /@webassemblyjs/helper-buffer@1.11.6: + resolution: {integrity: sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==} - /@webassemblyjs/helper-module-context@1.9.0: - resolution: {integrity: sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==} + /@webassemblyjs/helper-numbers@1.11.6: + resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} dependencies: - '@webassemblyjs/ast': 1.9.0 - dev: false + '@webassemblyjs/floating-point-hex-parser': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 + '@xtuc/long': 4.2.2 - /@webassemblyjs/helper-wasm-bytecode@1.9.0: - resolution: {integrity: sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==} - dev: false + /@webassemblyjs/helper-wasm-bytecode@1.11.6: + resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} - /@webassemblyjs/helper-wasm-section@1.9.0: - resolution: {integrity: sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==} + /@webassemblyjs/helper-wasm-section@1.11.6: + resolution: {integrity: sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - dev: false + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 - /@webassemblyjs/ieee754@1.9.0: - resolution: {integrity: sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==} + /@webassemblyjs/ieee754@1.11.6: + resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} dependencies: '@xtuc/ieee754': 1.2.0 - dev: false - /@webassemblyjs/leb128@1.9.0: - resolution: {integrity: sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==} + /@webassemblyjs/leb128@1.11.6: + resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} dependencies: '@xtuc/long': 4.2.2 - dev: false - - /@webassemblyjs/utf8@1.9.0: - resolution: {integrity: sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==} - dev: false - /@webassemblyjs/wasm-edit@1.9.0: - resolution: {integrity: sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==} - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/helper-wasm-section': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-opt': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - '@webassemblyjs/wast-printer': 1.9.0 - dev: false + /@webassemblyjs/utf8@1.11.6: + resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} - /@webassemblyjs/wasm-gen@1.9.0: - resolution: {integrity: sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==} + /@webassemblyjs/wasm-edit@1.11.6: + resolution: {integrity: sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: false + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/helper-wasm-section': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-opt': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + '@webassemblyjs/wast-printer': 1.11.6 - /@webassemblyjs/wasm-opt@1.9.0: - resolution: {integrity: sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==} + /@webassemblyjs/wasm-gen@1.11.6: + resolution: {integrity: sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - dev: false + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 - /@webassemblyjs/wasm-parser@1.9.0: - resolution: {integrity: sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==} + /@webassemblyjs/wasm-opt@1.11.6: + resolution: {integrity: sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: false + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 - /@webassemblyjs/wast-parser@1.9.0: - resolution: {integrity: sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==} + /@webassemblyjs/wasm-parser@1.11.6: + resolution: {integrity: sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/floating-point-hex-parser': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-code-frame': 1.9.0 - '@webassemblyjs/helper-fsm': 1.9.0 - '@xtuc/long': 4.2.2 - dev: false + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 - /@webassemblyjs/wast-printer@1.9.0: - resolution: {integrity: sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==} + /@webassemblyjs/wast-printer@1.11.6: + resolution: {integrity: sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==} dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 + '@webassemblyjs/ast': 1.11.6 '@xtuc/long': 4.2.2 - dev: false /@whatwg-node/events@0.0.3: resolution: {integrity: sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==} @@ -3475,17 +3366,22 @@ packages: /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} - dev: false /@xtuc/long@4.2.2: resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - dev: false /abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true + /acorn-import-assertions@1.9.0(acorn@8.10.0): + resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + peerDependencies: + acorn: ^8 + dependencies: + acorn: 8.10.0 + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -3497,32 +3393,17 @@ packages: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - /acorn@6.4.2: - resolution: {integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: false - /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true - /ajv-errors@1.0.1(ajv@6.12.6): - resolution: {integrity: sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==} - peerDependencies: - ajv: '>=5.0.0' - dependencies: - ajv: 6.12.6 - dev: false - /ajv-keywords@3.5.2(ajv@6.12.6): resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: ajv: ^6.9.1 dependencies: ajv: 6.12.6 - dev: false /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -3567,7 +3448,6 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: true /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} @@ -3604,27 +3484,13 @@ packages: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} dev: true - /anymatch@2.0.0: - resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} - requiresBuild: true - dependencies: - micromatch: 3.1.10 - normalize-path: 2.1.1 - transitivePeerDependencies: - - supports-color - dev: false - optional: true - /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - - /aproba@1.2.0: - resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} - dev: false + dev: true /arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} @@ -3634,10 +3500,6 @@ packages: resolution: {integrity: sha512-Wk7TEzl1KqvTGs/uyhmHO/3XLd3t1UeU4IstvPXVzGPM522cTjqjNZ99esCkcL52sjqjo8e8CTBcWhkxvGzoAw==} dev: false - /arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true - /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: true @@ -3663,21 +3525,6 @@ packages: dequal: 2.0.3 dev: true - /arr-diff@4.0.0: - resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} - engines: {node: '>=0.10.0'} - dev: false - - /arr-flatten@1.1.0: - resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} - engines: {node: '>=0.10.0'} - dev: false - - /arr-union@3.1.0: - resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} - engines: {node: '>=0.10.0'} - dev: false - /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -3700,11 +3547,6 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - /array-unique@0.3.2: - resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} - engines: {node: '>=0.10.0'} - dev: false - /array.prototype.findlastindex@1.2.2: resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} engines: {node: '>= 0.4'} @@ -3762,15 +3604,6 @@ packages: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} - /asn1.js@5.4.1: - resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} - dependencies: - bn.js: 4.12.0 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - safer-buffer: 2.1.2 - dev: false - /asn1js@3.0.5: resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} engines: {node: '>=12.0.0'} @@ -3780,22 +3613,10 @@ packages: tslib: 2.6.2 dev: false - /assert@1.5.0: - resolution: {integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==} - dependencies: - object-assign: 4.1.1 - util: 0.10.3 - dev: false - /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /assign-symbols@1.0.0: - resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} - engines: {node: '>=0.10.0'} - dev: false - /ast-types-flow@0.0.7: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} dev: true @@ -3805,24 +3626,12 @@ packages: hasBin: true dev: false - /async-each@1.0.6: - resolution: {integrity: sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==} - requiresBuild: true - dev: false - optional: true - /asynciterator.prototype@1.0.0: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} dependencies: has-symbols: 1.0.3 dev: true - /atob@2.1.2: - resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} - engines: {node: '>= 4.5.0'} - hasBin: true - dev: false - /autoprefixer@10.4.15(postcss@8.4.28): resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} @@ -3861,23 +3670,6 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - /base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false - - /base@0.11.2: - resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} - engines: {node: '>=0.10.0'} - dependencies: - cache-base: 1.0.1 - class-utils: 0.3.6 - component-emitter: 1.3.0 - define-property: 1.0.0 - isobject: 3.0.1 - mixin-deep: 1.3.2 - pascalcase: 0.1.1 - dev: false - /better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -3894,41 +3686,15 @@ packages: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} dev: false - /binary-extensions@1.13.1: - resolution: {integrity: sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==} - engines: {node: '>=0.10.0'} - requiresBuild: true - dev: false - optional: true - /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - - /bindings@1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - requiresBuild: true - dependencies: - file-uri-to-path: 1.0.0 - dev: false - optional: true - - /bluebird@3.7.2: - resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} - dev: false + dev: true /blueimp-md5@2.19.0: resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} dev: true - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - dev: false - - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: false - /bob-the-bundler@7.0.1(typescript@5.2.2): resolution: {integrity: sha512-TFpj2AcCzTNVyMZ5ixHqJndJ9KyIUGrgTMMciz88X0HCRDujoUQL+D+61shAY+K20bM4q5Yn/NunbdiPC9drjA==} engines: {node: '>=16', pnpm: '>=8'} @@ -3973,24 +3739,6 @@ packages: balanced-match: 1.0.2 dev: true - /braces@2.3.2: - resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} - engines: {node: '>=0.10.0'} - dependencies: - arr-flatten: 1.1.0 - array-unique: 0.3.2 - extend-shallow: 2.0.1 - fill-range: 4.0.0 - isobject: 3.0.1 - repeat-element: 1.1.4 - snapdragon: 0.8.2 - snapdragon-node: 2.1.1 - split-string: 3.1.0 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -4003,65 +3751,6 @@ packages: wcwidth: 1.0.1 dev: true - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - dev: false - - /browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-cipher@1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: false - - /browserify-des@1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - dependencies: - cipher-base: 1.0.4 - des.js: 1.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} - dependencies: - bn.js: 5.2.1 - randombytes: 2.1.0 - dev: false - - /browserify-sign@4.2.1: - resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} - dependencies: - bn.js: 5.2.1 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.4 - inherits: 2.0.4 - parse-asn1: 5.1.6 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: false - - /browserify-zlib@0.2.0: - resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} - dependencies: - pako: 1.0.11 - dev: false - /browserslist@4.21.10: resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -4075,27 +3764,11 @@ packages: /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - /buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: false - - /buffer@4.9.2: - resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - isarray: 1.0.0 - dev: false - /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} dev: true - /builtin-status-codes@3.0.0: - resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} - dev: false - /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: @@ -4131,46 +3804,12 @@ packages: engines: {node: '>=8'} dev: true - /cacache@12.0.4: - resolution: {integrity: sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==} - dependencies: - bluebird: 3.7.2 - chownr: 1.1.4 - figgy-pudding: 3.5.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - infer-owner: 1.0.4 - lru-cache: 5.1.1 - mississippi: 3.0.0 - mkdirp: 0.5.6 - move-concurrently: 1.0.1 - promise-inflight: 1.0.1(bluebird@3.7.2) - rimraf: 2.7.1 - ssri: 6.0.2 - unique-filename: 1.1.1 - y18n: 4.0.3 - dev: false - - /cache-base@1.0.1: - resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} - engines: {node: '>=0.10.0'} - dependencies: - collection-visit: 1.0.0 - component-emitter: 1.3.0 - get-value: 2.0.6 - has-value: 1.0.0 - isobject: 3.0.1 - set-value: 2.0.1 - to-object-path: 0.3.0 - union-value: 1.0.1 - unset-value: 1.0.0 - dev: false - /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 get-intrinsic: 1.2.1 + dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -4279,29 +3918,6 @@ packages: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true - /chokidar@2.1.8: - resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} - deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies - requiresBuild: true - dependencies: - anymatch: 2.0.0 - async-each: 1.0.6 - braces: 2.3.2 - glob-parent: 3.1.0 - inherits: 2.0.4 - is-binary-path: 1.0.1 - is-glob: 4.0.3 - normalize-path: 3.0.0 - path-is-absolute: 1.0.1 - readdirp: 2.2.1 - upath: 1.2.0 - optionalDependencies: - fsevents: 1.2.13 - transitivePeerDependencies: - - supports-color - dev: false - optional: true - /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -4315,38 +3931,17 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 - - /chownr@1.1.4: - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - dev: false + dev: true /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} - dev: false /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} dev: true - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - - /class-utils@0.3.6: - resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} - engines: {node: '>=0.10.0'} - dependencies: - arr-union: 3.1.0 - define-property: 0.2.5 - isobject: 3.0.1 - static-extend: 0.1.2 - dev: false - /classnames@2.3.2: resolution: {integrity: sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==} dev: false @@ -4412,14 +4007,6 @@ packages: periscopic: 3.1.0 dev: true - /collection-visit@1.0.0: - resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} - engines: {node: '>=0.10.0'} - dependencies: - map-visit: 1.0.0 - object-visit: 1.0.1 - dev: false - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -4452,7 +4039,6 @@ packages: /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: false /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} @@ -4468,14 +4054,6 @@ packages: engines: {node: '>= 12'} dev: false - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: false - - /component-emitter@1.3.0: - resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} - dev: false - /compute-scroll-into-view@3.0.3: resolution: {integrity: sha512-nadqwNxghAGTamwIqQSG433W6OADZx2vCo3UXHNrzTRHK/htu+7+L0zhjEoaeaQVNAi3YgqWDv8+tzf0hRfR+A==} dev: false @@ -4483,16 +4061,6 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - /concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 2.3.8 - typedarray: 0.0.6 - dev: false - /concat-stream@2.0.0: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} @@ -4522,37 +4090,9 @@ packages: engines: {node: ^14.18.0 || >=16.10.0} dev: true - /console-browserify@1.2.0: - resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} - dev: false - - /constants-browserify@1.0.0: - resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} - dev: false - /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - /copy-concurrently@1.0.5: - resolution: {integrity: sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==} - dependencies: - aproba: 1.2.0 - fs-write-stream-atomic: 1.0.10 - iferr: 0.1.5 - mkdirp: 0.5.6 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: false - - /copy-descriptor@0.1.1: - resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} - engines: {node: '>=0.10.0'} - dev: false - - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: false - /cose-base@1.0.3: resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} dependencies: @@ -4565,20 +4105,6 @@ packages: layout-base: 2.0.1 dev: false - /cosmiconfig-typescript-loader@5.0.0(@types/node@18.17.12)(cosmiconfig@8.2.0)(typescript@5.2.2): - resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} - engines: {node: '>=v16'} - peerDependencies: - '@types/node': '*' - cosmiconfig: '>=8.2' - typescript: '>=4' - dependencies: - '@types/node': 18.17.12 - cosmiconfig: 8.2.0 - jiti: 1.19.3 - typescript: 5.2.2 - dev: true - /cosmiconfig@8.0.0: resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==} engines: {node: '>=14'} @@ -4589,48 +4115,6 @@ packages: path-type: 4.0.0 dev: false - /cosmiconfig@8.2.0: - resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} - engines: {node: '>=14'} - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - dev: true - - /create-ecdh@4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.4 - dev: false - - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - dev: false - - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true - /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -4645,23 +4129,6 @@ packages: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true - - /crypto-browserify@3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.1 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.2 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: false /css-declaration-sorter@6.4.1(postcss@8.4.28): resolution: {integrity: sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==} @@ -4799,10 +4266,6 @@ packages: stream-transform: 2.1.3 dev: true - /cyclist@1.0.2: - resolution: {integrity: sha512-0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA==} - dev: false - /cytoscape-cose-bilkent@4.1.0(cytoscape@3.26.0): resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} peerDependencies: @@ -5130,17 +4593,6 @@ packages: resolution: {integrity: sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==} dev: false - /debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: false - /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -5181,11 +4633,6 @@ packages: dependencies: character-entities: 2.0.2 - /decode-uri-component@0.2.2: - resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} - engines: {node: '>=0.10'} - dev: false - /dedent-js@1.0.1: resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} dev: true @@ -5208,7 +4655,6 @@ packages: /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} @@ -5252,28 +4698,6 @@ packages: object-keys: 1.1.1 dev: true - /define-property@0.2.5: - resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} - engines: {node: '>=0.10.0'} - dependencies: - is-descriptor: 0.1.6 - dev: false - - /define-property@1.0.0: - resolution: {integrity: sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==} - engines: {node: '>=0.10.0'} - dependencies: - is-descriptor: 1.0.2 - dev: false - - /define-property@2.0.2: - resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==} - engines: {node: '>=0.10.0'} - dependencies: - is-descriptor: 1.0.2 - isobject: 3.0.1 - dev: false - /delaunator@5.0.0: resolution: {integrity: sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==} dependencies: @@ -5284,13 +4708,6 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - /des.js@1.1.0: - resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -5304,23 +4721,10 @@ packages: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: true - /diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true - /diff@5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} - /diffie-hellman@5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} - dependencies: - bn.js: 4.12.0 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: false - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -5343,7 +4747,6 @@ packages: engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 - dev: true /dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} @@ -5353,11 +4756,6 @@ packages: entities: 4.5.0 dev: true - /domain-browser@1.2.0: - resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} - engines: {node: '>=0.4', npm: '>=1.2'} - dev: false - /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true @@ -5395,15 +4793,6 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: false - /duplexify@3.7.1: - resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} - dependencies: - end-of-stream: 1.4.4 - inherits: 2.0.4 - readable-stream: 2.3.8 - stream-shift: 1.0.1 - dev: false - /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true @@ -5415,18 +4804,6 @@ packages: resolution: {integrity: sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ==} dev: false - /elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false - /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -5440,28 +4817,12 @@ packages: engines: {node: '>= 4'} dev: false - /end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - dependencies: - once: 1.4.0 - dev: false - - /enhanced-resolve@4.5.0: - resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==} - engines: {node: '>=6.9.0'} - dependencies: - graceful-fs: 4.2.11 - memory-fs: 0.5.0 - tapable: 1.1.3 - dev: false - /enhanced-resolve@5.15.0: resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 - dev: true /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} @@ -5475,13 +4836,6 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - /errno@0.1.8: - resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} - hasBin: true - dependencies: - prr: 1.0.1 - dev: false - /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -5551,6 +4905,9 @@ packages: safe-array-concat: 1.0.0 dev: true + /es-module-lexer@1.3.0: + resolution: {integrity: sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==} + /es-set-tostringtag@2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} @@ -5633,7 +4990,6 @@ packages: '@esbuild/win32-arm64': 0.18.20 '@esbuild/win32-ia32': 0.18.20 '@esbuild/win32-x64': 0.18.20 - dev: true /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -5646,29 +5002,28 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: true /escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} dev: false - /eslint-config-prettier@8.10.0(eslint@8.44.0): + /eslint-config-prettier@8.10.0(eslint@8.48.0): resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true - /eslint-config-prettier@9.0.0(eslint@8.38.0): + /eslint-config-prettier@9.0.0(eslint@8.48.0): resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.38.0 + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true /eslint-import-resolver-node@0.3.9: @@ -5681,7 +5036,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.44.0): + /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.48.0): resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -5690,9 +5045,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.15.0 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) fast-glob: 3.3.1 get-tsconfig: 4.7.0 is-core-module: 2.13.0 @@ -5704,7 +5059,7 @@ packages: - supports-color dev: true - /eslint-mdx@2.2.0(eslint@8.44.0): + /eslint-mdx@2.2.0(eslint@8.48.0): resolution: {integrity: sha512-AriN6lCW6KhWQ9GEiXapR1DokKHefOUqKvCmHxnE9puCWYhWiycU2SNKH8jmrasDBreZ+RtJDLi+RcUNLJatjg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: @@ -5712,7 +5067,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) espree: 9.6.1 estree-util-visit: 1.2.1 remark-mdx: 2.3.0 @@ -5729,7 +5084,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -5750,39 +5105,39 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.44.0)(typescript@5.2.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.44.0) + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.1)(eslint@8.48.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es-x@7.2.0(eslint@8.44.0): + /eslint-plugin-es-x@7.2.0(eslint@8.48.0): resolution: {integrity: sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) '@eslint-community/regexpp': 4.8.0 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true - /eslint-plugin-eslint-plugin@5.0.7(patch_hash=cdhdgvmsbh3fbusrlxsl6de2he)(eslint@8.44.0): + /eslint-plugin-eslint-plugin@5.0.7(patch_hash=cdhdgvmsbh3fbusrlxsl6de2he)(eslint@8.48.0): resolution: {integrity: sha512-hcz4Bze1ECwv3Q/Bi/ZMZZNiuvI2YclNuxjnczkblQ0skrlPhdO83rSM7felf5n+7ZJOZi4GS8y8gNiRtvI0hA==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) - eslint-utils: 3.0.0(eslint@8.44.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-utils: 3.0.0(eslint@8.48.0) estraverse: 5.3.0 dev: true patched: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -5792,16 +5147,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.44.0)(typescript@5.2.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) array-includes: 3.1.6 array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.44.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -5817,19 +5172,19 @@ packages: - supports-color dev: true - /eslint-plugin-jsonc@2.9.0(eslint@8.44.0): + /eslint-plugin-jsonc@2.9.0(eslint@8.48.0): resolution: {integrity: sha512-RK+LeONVukbLwT2+t7/OY54NJRccTXh/QbnXzPuTLpFMVZhPuq1C9E07+qWenGx7rrQl0kAalAWl7EmB+RjpGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) jsonc-eslint-parser: 2.3.0 natural-compare: 1.4.0 dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.44.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.48.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -5844,7 +5199,7 @@ packages: axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) has: 1.0.3 jsx-ast-utils: 3.3.5 language-tags: 1.0.5 @@ -5854,27 +5209,27 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-markdown@3.0.1(eslint@8.44.0): + /eslint-plugin-markdown@3.0.1(eslint@8.48.0): resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-mdx@2.2.0(eslint@8.44.0): + /eslint-plugin-mdx@2.2.0(eslint@8.48.0): resolution: {integrity: sha512-OseoMXUIr8iy3E0me+wJLVAxuB0kxHP1plxuYAJDynzorzOj2OKv8Fhr+rIOJ32zfl3bnEWsqFnUiCnyznr1JQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8.0.0' dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) - eslint-mdx: 2.2.0(eslint@8.44.0) - eslint-plugin-markdown: 3.0.1(eslint@8.44.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-mdx: 2.2.0(eslint@8.48.0) + eslint-plugin-markdown: 3.0.1(eslint@8.48.0) remark-mdx: 2.3.0 remark-parse: 10.0.2 remark-stringify: 10.0.3 @@ -5885,16 +5240,16 @@ packages: - supports-color dev: true - /eslint-plugin-n@16.0.2(eslint@8.44.0): + /eslint-plugin-n@16.0.2(eslint@8.48.0): resolution: {integrity: sha512-Y66uDfUNbBzypsr0kELWrIz+5skicECrLUqlWuXawNSLUq3ltGlCwu6phboYYOTSnoTdHgTLrc+5Ydo6KjzZog==} engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) builtins: 5.0.1 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) - eslint-plugin-es-x: 7.2.0(eslint@8.44.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-plugin-es-x: 7.2.0(eslint@8.48.0) ignore: 5.2.4 is-core-module: 2.13.0 minimatch: 3.1.2 @@ -5902,7 +5257,7 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@9.0.0)(eslint@8.38.0)(prettier@2.8.8): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@9.0.0)(eslint@8.48.0)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -5913,31 +5268,31 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.38.0 - eslint-config-prettier: 9.0.0(eslint@8.38.0) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) + eslint-config-prettier: 9.0.0(eslint@8.48.0) prettier: 2.8.8 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-promise@6.1.1(eslint@8.44.0): + /eslint-plugin-promise@6.1.1(eslint@8.48.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.44.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.48.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true - /eslint-plugin-react@7.33.2(eslint@8.44.0): + /eslint-plugin-react@7.33.2(eslint@8.48.0): resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: @@ -5948,7 +5303,7 @@ packages: array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 es-iterator-helpers: 1.0.14 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -5962,13 +5317,13 @@ packages: string.prototype.matchall: 4.0.8 dev: true - /eslint-plugin-sonarjs@0.19.0(eslint@8.44.0): + /eslint-plugin-sonarjs@0.19.0(eslint@8.48.0): resolution: {integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw==} engines: {node: '>=14'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) dev: true /eslint-plugin-tailwindcss@3.13.0(tailwindcss@3.3.3): @@ -5982,17 +5337,17 @@ packages: tailwindcss: 3.3.3 dev: true - /eslint-plugin-unicorn@47.0.0(eslint@8.44.0): + /eslint-plugin-unicorn@47.0.0(eslint@8.48.0): resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.38.0' dependencies: '@babel/helper-validator-identifier': 7.22.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) ci-info: 3.8.0 clean-regexp: 1.0.0 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -6007,14 +5362,14 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-yml@1.8.0(eslint@8.44.0): + /eslint-plugin-yml@1.8.0(eslint@8.48.0): resolution: {integrity: sha512-fgBiJvXD0P2IN7SARDJ2J7mx8t0bLdG6Zcig4ufOqW5hOvSiFxeUyc2g5I1uIm8AExbo26NNYCcTGZT0MXTsyg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.2 @@ -6022,21 +5377,12 @@ packages: - supports-color dev: true - /eslint-scope@4.0.3: - resolution: {integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==} - engines: {node: '>=4.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: false - /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - dev: true /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} @@ -6044,15 +5390,14 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - dev: true - /eslint-utils@3.0.0(eslint@8.44.0): + /eslint-utils@3.0.0(eslint@8.48.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq) + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-visitor-keys: 2.1.0 dev: true @@ -6064,17 +5409,16 @@ packages: /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /eslint@8.38.0: - resolution: {integrity: sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==} + /eslint@8.46.0: + resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.38.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) '@eslint-community/regexpp': 4.8.0 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.38.0 + '@eslint/js': 8.48.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -6094,13 +5438,11 @@ packages: find-up: 5.0.0 glob-parent: 6.0.2 globals: 13.21.0 - grapheme-splitter: 1.0.4 + graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.4.2 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -6109,21 +5451,20 @@ packages: natural-compare: 1.4.0 optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color - dev: true + dev: false - /eslint@8.44.0(patch_hash=v7lv2hbnxmm2b22qo3sob3rjvq): - resolution: {integrity: sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==} + /eslint@8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu): + resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) '@eslint-community/regexpp': 4.8.0 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.44.0 + '@eslint/js': 8.48.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -6145,7 +5486,6 @@ packages: globals: 13.21.0 graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -6157,7 +5497,6 @@ packages: natural-compare: 1.4.0 optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color @@ -6171,7 +5510,6 @@ packages: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) eslint-visitor-keys: 3.4.3 - dev: true /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -6183,7 +5521,6 @@ packages: engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 - dev: true /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} @@ -6249,19 +5586,10 @@ packages: /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - dev: true /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - dev: false - - /evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - dev: false /execa@0.8.0: resolution: {integrity: sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==} @@ -6321,35 +5649,12 @@ packages: strip-final-newline: 3.0.0 dev: true - /expand-brackets@2.1.4: - resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} - engines: {node: '>=0.10.0'} - dependencies: - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - posix-character-classes: 0.1.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} dependencies: is-extendable: 0.1.1 - /extend-shallow@3.0.2: - resolution: {integrity: sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==} - engines: {node: '>=0.10.0'} - dependencies: - assign-symbols: 1.0.0 - is-extendable: 1.0.1 - dev: false - /extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -6366,22 +5671,6 @@ packages: tmp: 0.0.33 dev: true - /extglob@2.0.4: - resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} - engines: {node: '>=0.10.0'} - dependencies: - array-unique: 0.3.2 - define-property: 1.0.0 - expand-brackets: 2.1.4 - extend-shallow: 2.0.1 - fragment-cache: 0.2.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /extract-files@11.0.0: resolution: {integrity: sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ==} engines: {node: ^12.20 || >= 14.13} @@ -6413,7 +5702,6 @@ packages: /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true /fast-querystring@1.1.2: resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} @@ -6438,18 +5726,13 @@ packages: format: 0.2.2 dev: true - /figgy-pudding@3.5.2: - resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} - dev: false - /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.1.0 - dev: true - /file-loader@4.3.0(webpack@4.46.0): + /file-loader@4.3.0(webpack@5.88.2): resolution: {integrity: sha512-aKrYPYjF1yG3oX0kWRrqrSMfgftm7oJW5M+m4owoldH5C51C0RkIwB++JbRvEW3IU6/ZG5n8UvEcdgwOt2UOWA==} engines: {node: '>= 8.9.0'} peerDependencies: @@ -6457,23 +5740,7 @@ packages: dependencies: loader-utils: 1.4.2 schema-utils: 2.7.1 - webpack: 4.46.0 - dev: false - - /file-uri-to-path@1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - requiresBuild: true - dev: false - optional: true - - /fill-range@4.0.0: - resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 2.0.1 - is-number: 3.0.0 - repeat-string: 1.6.1 - to-regex-range: 2.1.1 + webpack: 5.88.2(esbuild@0.18.20) dev: false /fill-range@7.0.1: @@ -6482,22 +5749,6 @@ packages: dependencies: to-regex-range: 5.0.1 - /find-cache-dir@2.1.0: - resolution: {integrity: sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==} - engines: {node: '>=6'} - dependencies: - commondir: 1.0.1 - make-dir: 2.1.0 - pkg-dir: 3.0.0 - dev: false - - /find-up@3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - dependencies: - locate-path: 3.0.0 - dev: false - /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -6512,7 +5763,6 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true /find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} @@ -6528,23 +5778,14 @@ packages: flatted: 3.2.7 keyv: 4.5.3 rimraf: 3.0.2 - dev: true /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true /flexsearch@0.7.31: resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==} dev: false - /flush-write-stream@1.1.1: - resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.8 - dev: false - /focus-trap-react@10.2.1(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UrAKOn52lvfHF6lkUMfFhlQxFgahyNW5i6FpHWkDxAeD4FSk3iwx9n4UEA4Sims0G5WiGIi0fAyoq3/UVeNCYA==} peerDependencies: @@ -6575,11 +5816,6 @@ packages: is-callable: 1.2.7 dev: true - /for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - dev: false - /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -6597,20 +5833,6 @@ packages: resolution: {integrity: sha512-/KxoyCnPM0GwYI4NN0Iag38Tqt+od3/mLuguepLgCAKPn0ZhC544nssAW0tG2/00zXEYl9W+7hwAIpLHo6Oc7Q==} dev: true - /fragment-cache@0.2.1: - resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} - engines: {node: '>=0.10.0'} - dependencies: - map-cache: 0.2.2 - dev: false - - /from2@2.3.0: - resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.8 - dev: false - /fs-extra@11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -6638,39 +5860,20 @@ packages: universalify: 0.1.2 dev: true - /fs-write-stream-atomic@1.0.10: - resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==} - dependencies: - graceful-fs: 4.2.11 - iferr: 0.1.5 - imurmurhash: 0.1.4 - readable-stream: 2.3.8 - dev: false - /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents@1.2.13: - resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} - engines: {node: '>= 4.0'} - os: [darwin] - deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 - requiresBuild: true - dependencies: - bindings: 1.5.0 - nan: 2.17.0 - dev: false - optional: true - /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true + dev: true optional: true /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true /function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} @@ -6711,6 +5914,7 @@ packages: has: 1.0.3 has-proto: 1.0.1 has-symbols: 1.0.3 + dev: true /get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} @@ -6741,11 +5945,6 @@ packages: resolve-pkg-maps: 1.0.0 dev: true - /get-value@2.0.6: - resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} - engines: {node: '>=0.10.0'} - dev: false - /giscus@1.3.0: resolution: {integrity: sha512-A3tVLgSmpnh2sX9uGjo9MbzmTTEJirSyFUPRvkipvy37y9rhxUYDoh9kO37QVrP7Sc7QuJ+gihB6apkO0yDyTw==} dependencies: @@ -6768,15 +5967,6 @@ packages: /github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} - /glob-parent@3.1.0: - resolution: {integrity: sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==} - requiresBuild: true - dependencies: - is-glob: 3.1.0 - path-dirname: 1.0.2 - dev: false - optional: true - /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -6788,11 +5978,9 @@ packages: engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 - dev: true /glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - dev: false /glob@10.3.3: resolution: {integrity: sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==} @@ -6847,7 +6035,6 @@ packages: engines: {node: '>=8'} dependencies: type-fest: 0.20.2 - dev: true /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} @@ -6893,14 +6080,13 @@ packages: /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: true /graphql-config@4.5.0(@types/node@18.17.12)(graphql@16.8.0): resolution: {integrity: sha512-x6D0/cftpLUJ0Ch1e5sj1TZn6Wcxx4oMfmhaG9shM0DKajA9iR+j1z86GSTQ19fShbGvrSSvbIQsHku6aQ6BBw==} engines: {node: '>= 10.0.0'} peerDependencies: cosmiconfig-toml-loader: ^1.0.0 - graphql: 16.8.0 + graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 peerDependenciesMeta: cosmiconfig-toml-loader: optional: true @@ -6928,31 +6114,28 @@ packages: resolution: {integrity: sha512-+3B2BaG8qQ8E18kzk9yiSdAa75i/hnnOwgSeAxVJctGQPvmeiLtqKOYF6HETCyRjiF7Xfsyal0HbLlxCQkgkrw==} engines: {node: '>=6.0.0'} peerDependencies: - graphql: 16.8.0 + graphql: '*' dependencies: arrify: 1.0.1 graphql: 16.8.0 dev: false - /graphql-tag@2.12.6(graphql@16.8.0): - resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} - engines: {node: '>=10'} - peerDependencies: - graphql: 16.8.0 - dependencies: - graphql: 16.8.0 - tslib: 2.6.2 - dev: false - /graphql-ws@5.12.1(graphql@16.8.0): resolution: {integrity: sha512-umt4f5NnMK46ChM2coO36PTFhHouBrK9stWWBczERguwYrGnPNxJ9dimU6IyOBfOkC6Izhkg4H8+F51W/8CYDg==} engines: {node: '>=10'} peerDependencies: - graphql: 16.8.0 + graphql: '>=0.11 <=16' dependencies: graphql: 16.8.0 dev: false + /graphql@14.7.0: + resolution: {integrity: sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==} + engines: {node: '>= 6.x'} + dependencies: + iterall: 1.3.0 + dev: true + /graphql@16.8.0: resolution: {integrity: sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -7004,10 +6187,12 @@ packages: /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} + dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + dev: true /has-tostringtag@1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} @@ -7016,51 +6201,12 @@ packages: has-symbols: 1.0.3 dev: true - /has-value@0.3.1: - resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} - engines: {node: '>=0.10.0'} - dependencies: - get-value: 2.0.6 - has-values: 0.1.4 - isobject: 2.1.0 - dev: false - - /has-value@1.0.0: - resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} - engines: {node: '>=0.10.0'} - dependencies: - get-value: 2.0.6 - has-values: 1.0.0 - isobject: 3.0.1 - dev: false - - /has-values@0.1.4: - resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} - engines: {node: '>=0.10.0'} - dev: false - - /has-values@1.0.0: - resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} - engines: {node: '>=0.10.0'} - dependencies: - is-number: 3.0.0 - kind-of: 4.0.0 - dev: false - /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 - - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: false + dev: true /hash-obj@4.0.0: resolution: {integrity: sha512-FwO1BUVWkyHasWDW4S8o0ssQXjvyghLV2rfVhnN36b2bbcj45eGiuzdn9XOvOpjV3TKQD7Gm2BWNXdE9V4KKYg==} @@ -7071,13 +6217,6 @@ packages: type-fest: 1.4.0 dev: false - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: false - /hast-util-from-dom@4.2.0: resolution: {integrity: sha512-t1RJW/OpJbCAJQeKi3Qrj1cAOLA0+av/iPFori112+0X7R3wng+jxLA+kXec8K4szqPRGI8vPxbbpEYvvpwaeQ==} dependencies: @@ -7178,14 +6317,6 @@ packages: resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} dev: false - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: false - /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -7194,10 +6325,6 @@ packages: resolution: {integrity: sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==} dev: false - /https-browserify@1.0.0: - resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} - dev: false - /human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} dev: true @@ -7232,14 +6359,6 @@ packages: safer-buffer: 2.1.2 dev: false - /ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - - /iferr@0.1.5: - resolution: {integrity: sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==} - dev: false - /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -7264,24 +6383,12 @@ packages: engines: {node: '>=8'} dev: true - /infer-owner@1.0.4: - resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - dev: false - /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 - /inherits@2.0.1: - resolution: {integrity: sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==} - dev: false - - /inherits@2.0.3: - resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} - dev: false - /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -7322,20 +6429,6 @@ packages: loose-envify: 1.4.0 dev: false - /is-accessor-descriptor@0.1.6: - resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - - /is-accessor-descriptor@1.0.0: - resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 6.0.3 - dev: false - /is-alphabetical@1.0.4: resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} dev: true @@ -7380,20 +6473,12 @@ packages: has-bigints: 1.0.2 dev: true - /is-binary-path@1.0.1: - resolution: {integrity: sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==} - engines: {node: '>=0.10.0'} - requiresBuild: true - dependencies: - binary-extensions: 1.13.1 - dev: false - optional: true - /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 + dev: true /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} @@ -7403,10 +6488,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - dev: false - /is-buffer@2.0.5: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} @@ -7436,20 +6517,6 @@ packages: has: 1.0.3 dev: true - /is-data-descriptor@0.1.4: - resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - - /is-data-descriptor@1.0.0: - resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 6.0.3 - dev: false - /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -7464,24 +6531,6 @@ packages: /is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} - /is-descriptor@0.1.6: - resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} - engines: {node: '>=0.10.0'} - dependencies: - is-accessor-descriptor: 0.1.6 - is-data-descriptor: 0.1.4 - kind-of: 5.1.0 - dev: false - - /is-descriptor@1.0.2: - resolution: {integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==} - engines: {node: '>=0.10.0'} - dependencies: - is-accessor-descriptor: 1.0.0 - is-data-descriptor: 1.0.0 - kind-of: 6.0.3 - dev: false - /is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -7502,13 +6551,6 @@ packages: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} - /is-extendable@1.0.1: - resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} - engines: {node: '>=0.10.0'} - dependencies: - is-plain-object: 2.0.4 - dev: false - /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -7531,15 +6573,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-glob@3.1.0: - resolution: {integrity: sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==} - engines: {node: '>=0.10.0'} - requiresBuild: true - dependencies: - is-extglob: 2.1.1 - dev: false - optional: true - /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -7577,13 +6610,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-number@3.0.0: - resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -7596,7 +6622,6 @@ packages: /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - dev: true /is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} @@ -7612,13 +6637,6 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - /is-plain-object@2.0.4: - resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} - engines: {node: '>=0.10.0'} - dependencies: - isobject: 3.0.1 - dev: false - /is-reference@3.0.1: resolution: {integrity: sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w==} dependencies: @@ -7711,11 +6729,7 @@ packages: /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} - - /is-wsl@1.1.0: - resolution: {integrity: sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==} - engines: {node: '>=4'} - dev: false + dev: true /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} @@ -7724,10 +6738,6 @@ packages: is-docker: 2.2.1 dev: true - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: false - /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -7735,18 +6745,6 @@ packages: /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - /isobject@2.1.0: - resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} - engines: {node: '>=0.10.0'} - dependencies: - isarray: 1.0.0 - dev: false - - /isobject@3.0.1: - resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} - engines: {node: '>=0.10.0'} - dev: false - /isomorphic-ws@5.0.0(ws@8.13.0): resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} peerDependencies: @@ -7755,6 +6753,10 @@ packages: ws: 8.13.0 dev: false + /iterall@1.3.0: + resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==} + dev: true + /iterator.prototype@1.1.0: resolution: {integrity: sha512-rjuhAk1AJ1fssphHD0IFV6TWL40CwRZ53FrztKx43yk2v6rguBYsY4Bj1VU4HmoMmKwZUlx7mfnhDf9cOp4YTw==} dependencies: @@ -7779,6 +6781,14 @@ packages: engines: {node: '>=16'} dev: true + /jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + dependencies: + '@types/node': 18.17.12 + merge-stream: 2.0.0 + supports-color: 8.1.1 + /jiti@1.17.1: resolution: {integrity: sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw==} hasBin: true @@ -7794,10 +6804,6 @@ packages: engines: {node: '>=10'} dev: true - /js-sdsl@4.4.2: - resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} - dev: true - /js-string-escape@1.0.1: resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} engines: {node: '>= 0.8'} @@ -7837,11 +6843,6 @@ packages: /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - dev: true - - /json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - dev: false /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -7870,7 +6871,6 @@ packages: /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} @@ -7931,31 +6931,11 @@ packages: resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} dependencies: json-buffer: 3.0.1 - dev: true /khroma@2.0.0: resolution: {integrity: sha512-2J8rDNlQWbtiNYThZRvmMv5yt44ZakX+Tz5ZIp/mN1pt4snn+m030Va5Z4v8xA0cQFDXBwO/8i42xL4QPsVk3g==} dev: false - /kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - dependencies: - is-buffer: 1.1.6 - dev: false - - /kind-of@4.0.0: - resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} - engines: {node: '>=0.10.0'} - dependencies: - is-buffer: 1.1.6 - dev: false - - /kind-of@5.1.0: - resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} - engines: {node: '>=0.10.0'} - dev: false - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -7988,7 +6968,6 @@ packages: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} @@ -8051,10 +7030,9 @@ packages: strip-bom: 3.0.0 dev: true - /loader-runner@2.4.0: - resolution: {integrity: sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==} - engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} - dev: false + /loader-runner@4.3.0: + resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} + engines: {node: '>=6.11.5'} /loader-utils@1.4.2: resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} @@ -8074,14 +7052,6 @@ packages: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} dev: true - /locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: false - /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -8094,7 +7064,6 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - dev: true /lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -8125,7 +7094,6 @@ packages: /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true /lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -8196,23 +7164,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /make-dir@2.1.0: - resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} - engines: {node: '>=6'} - dependencies: - pify: 4.0.1 - semver: 5.7.2 - dev: false - - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - - /map-cache@0.2.2: - resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} - engines: {node: '>=0.10.0'} - dev: false - /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -8223,13 +7174,6 @@ packages: engines: {node: '>=8'} dev: true - /map-visit@1.0.0: - resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} - engines: {node: '>=0.10.0'} - dependencies: - object-visit: 1.0.1 - dev: false - /markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} engines: {node: '>=0.10.0'} @@ -8253,14 +7197,6 @@ packages: blueimp-md5: 2.19.0 dev: true - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - /mdast-util-definitions@5.1.2: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} dependencies: @@ -8475,21 +7411,6 @@ packages: resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==} dev: false - /memory-fs@0.4.1: - resolution: {integrity: sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==} - dependencies: - errno: 0.1.8 - readable-stream: 2.3.8 - dev: false - - /memory-fs@0.5.0: - resolution: {integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==} - engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} - dependencies: - errno: 0.1.8 - readable-stream: 2.3.8 - dev: false - /meow@6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -8509,7 +7430,6 @@ packages: /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - dev: true /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} @@ -8881,27 +7801,6 @@ packages: transitivePeerDependencies: - supports-color - /micromatch@3.1.10: - resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} - engines: {node: '>=0.10.0'} - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - braces: 2.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - extglob: 2.0.4 - fragment-cache: 0.2.1 - kind-of: 6.0.3 - nanomatch: 1.2.13 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -8909,13 +7808,15 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /miller-rabin@4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true + /mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + /mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - dev: false + mime-db: 1.52.0 /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} @@ -8932,14 +7833,6 @@ packages: engines: {node: '>=4'} dev: true - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: false - - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - dev: false - /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -8983,42 +7876,11 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true - /mississippi@3.0.0: - resolution: {integrity: sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==} - engines: {node: '>=4.0.0'} - dependencies: - concat-stream: 1.6.2 - duplexify: 3.7.1 - end-of-stream: 1.4.4 - flush-write-stream: 1.1.1 - from2: 2.3.0 - parallel-transform: 1.2.0 - pump: 3.0.0 - pumpify: 1.5.1 - stream-each: 1.2.3 - through2: 2.0.5 - dev: false - - /mixin-deep@1.3.2: - resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} - engines: {node: '>=0.10.0'} - dependencies: - for-in: 1.0.2 - is-extendable: 1.0.1 - dev: false - /mixme@0.5.9: resolution: {integrity: sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==} engines: {node: '>= 8.0.0'} dev: true - /mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - dependencies: - minimist: 1.2.8 - dev: false - /mlly@1.4.1: resolution: {integrity: sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg==} dependencies: @@ -9032,17 +7894,6 @@ packages: resolution: {integrity: sha512-1o4olnZJsiLmv5pwLEAmzHTE/5geLKQ07BrGxlF4Ri/AXAc2yyDGZwHjiTqD8D/ROKUZmwMA28A+yEowLNOEcA==} dev: false - /move-concurrently@1.0.1: - resolution: {integrity: sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==} - dependencies: - aproba: 1.2.0 - copy-concurrently: 1.0.5 - fs-write-stream-atomic: 1.0.10 - mkdirp: 0.5.6 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: false - /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -9052,10 +7903,6 @@ packages: engines: {node: '>=10'} dev: false - /ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: false - /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -9075,47 +7922,20 @@ packages: thenify-all: 1.6.0 dev: true - /nan@2.17.0: - resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==} - requiresBuild: true - dev: false - optional: true - /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /nanomatch@1.2.13: - resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} - engines: {node: '>=0.10.0'} - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - fragment-cache: 0.2.1 - is-windows: 1.0.2 - kind-of: 6.0.3 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - dev: false /next-mdx-remote@4.4.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-1BvyXaIou6xy3XoNF4yaMZUCb6vD2GTAa5ciOa6WoO+gAUTYsb1K4rI/HSC2ogAWLrb/7VSV52skz07vOzmqIQ==} @@ -9185,10 +8005,10 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /next-videos@1.5.0(webpack@4.46.0): + /next-videos@1.5.0(webpack@5.88.2): resolution: {integrity: sha512-U6HY68UDxsDMMRgjABYq1S2EIStqZNp8FFtL8LKXJrhGFIO1nM2a3Afy0jw3JI2nK1HSXq4s4anQ96Yn4ukceA==} dependencies: - file-loader: 4.3.0(webpack@4.46.0) + file-loader: 4.3.0(webpack@5.88.2) transitivePeerDependencies: - webpack dev: false @@ -9316,34 +8136,6 @@ packages: dependencies: whatwg-url: 5.0.0 - /node-libs-browser@2.2.1: - resolution: {integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==} - dependencies: - assert: 1.5.0 - browserify-zlib: 0.2.0 - buffer: 4.9.2 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - domain-browser: 1.2.0 - events: 3.3.0 - https-browserify: 1.0.0 - os-browserify: 0.3.0 - path-browserify: 0.0.1 - process: 0.11.10 - punycode: 1.4.1 - querystring-es3: 0.2.1 - readable-stream: 2.3.8 - stream-browserify: 2.0.2 - stream-http: 2.8.3 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.0 - url: 0.11.1 - util: 0.11.1 - vm-browserify: 1.1.2 - dev: false - /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} @@ -9378,6 +8170,7 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + dev: true /normalize-range@0.1.2: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} @@ -9425,15 +8218,6 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - /object-copy@0.1.0: - resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} - engines: {node: '>=0.10.0'} - dependencies: - copy-descriptor: 0.1.1 - define-property: 0.2.5 - kind-of: 3.2.2 - dev: false - /object-hash@3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} @@ -9441,19 +8225,13 @@ packages: /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: true /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} dev: true - /object-visit@1.0.1: - resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} - engines: {node: '>=0.10.0'} - dependencies: - isobject: 3.0.1 - dev: false - /object.assign@4.1.4: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} @@ -9498,13 +8276,6 @@ packages: es-abstract: 1.22.1 dev: true - /object.pick@1.3.0: - resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} - engines: {node: '>=0.10.0'} - dependencies: - isobject: 3.0.1 - dev: false - /object.values@1.1.6: resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} @@ -9558,11 +8329,6 @@ packages: levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true - - /os-browserify@0.3.0: - resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} - dev: false /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} @@ -9590,6 +8356,7 @@ packages: engines: {node: '>=6'} dependencies: p-try: 2.2.0 + dev: true /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -9604,13 +8371,6 @@ packages: yocto-queue: 1.0.0 dev: true - /p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - dependencies: - p-limit: 2.3.0 - dev: false - /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -9623,7 +8383,6 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - dev: true /p-map@2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} @@ -9633,18 +8392,7 @@ packages: /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - - /pako@1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - dev: false - - /parallel-transform@1.2.0: - resolution: {integrity: sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==} - dependencies: - cyclist: 1.0.2 - inherits: 2.0.4 - readable-stream: 2.3.8 - dev: false + dev: true /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -9652,16 +8400,6 @@ packages: dependencies: callsites: 3.1.0 - /parse-asn1@5.1.6: - resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} - dependencies: - asn1.js: 5.4.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - pbkdf2: 3.1.2 - safe-buffer: 5.2.1 - dev: false - /parse-entities@2.0.0: resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} dependencies: @@ -9733,30 +8471,9 @@ packages: tslib: 2.6.2 dev: true - /pascalcase@0.1.1: - resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} - engines: {node: '>=0.10.0'} - dev: false - - /path-browserify@0.0.1: - resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} - dev: false - - /path-dirname@1.0.2: - resolution: {integrity: sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==} - requiresBuild: true - dev: false - optional: true - - /path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - dev: false - /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -9770,7 +8487,6 @@ packages: /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - dev: true /path-key@4.0.0: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} @@ -9801,17 +8517,6 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: false - /periscopic@3.1.0: resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} dependencies: @@ -9834,19 +8539,13 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + dev: true /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} dev: true - /pkg-dir@3.0.0: - resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} - engines: {node: '>=6'} - dependencies: - find-up: 3.0.0 - dev: false - /pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -9867,11 +8566,6 @@ packages: engines: {node: '>=4'} dev: true - /posix-character-classes@0.1.1: - resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} - engines: {node: '>=0.10.0'} - dev: false - /postcss-calc@9.0.1(postcss@8.4.28): resolution: {integrity: sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==} engines: {node: ^14 || ^16 || >=18.0} @@ -10259,7 +8953,6 @@ packages: /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - dev: true /prettier-linter-helpers@1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} @@ -10361,26 +9054,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: false - - /process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - dev: false - - /promise-inflight@1.0.1(bluebird@3.7.2): - resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} - peerDependencies: - bluebird: '*' - peerDependenciesMeta: - bluebird: - optional: true - dependencies: - bluebird: 3.7.2 - dev: false - /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -10396,46 +9069,9 @@ packages: resolution: {integrity: sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==} dev: false - /prr@1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - dev: false - /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - /public-encrypt@4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} - dependencies: - bn.js: 4.12.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false - - /pump@2.0.1: - resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: false - - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: false - - /pumpify@1.5.1: - resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} - dependencies: - duplexify: 3.7.1 - inherits: 2.0.4 - pump: 2.0.1 - dev: false - /punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} dev: false @@ -10455,18 +9091,6 @@ packages: engines: {node: '>=6.0.0'} dev: false - /qs@6.11.2: - resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} - engines: {node: '>=0.6'} - dependencies: - side-channel: 1.0.4 - dev: false - - /querystring-es3@0.2.1: - resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} - engines: {node: '>=0.4.x'} - dev: false - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -10479,14 +9103,6 @@ packages: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 - dev: false - - /randomfill@1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: false /react-dom@18.2.0(react@18.2.0): resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} @@ -10666,18 +9282,6 @@ packages: strip-bom: 3.0.0 dev: true - /readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: false - /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -10685,25 +9289,14 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - - /readdirp@2.2.1: - resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} - engines: {node: '>=0.10'} - requiresBuild: true - dependencies: - graceful-fs: 4.2.11 - micromatch: 3.1.10 - readable-stream: 2.3.8 - transitivePeerDependencies: - - supports-color - dev: false - optional: true + dev: true /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 + dev: true /reading-time@1.5.0: resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==} @@ -10732,14 +9325,6 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - /regex-not@1.0.2: - resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 3.0.2 - safe-regex: 1.1.0 - dev: false - /regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -10867,16 +9452,6 @@ packages: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} dev: false - /repeat-element@1.1.4: - resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} - engines: {node: '>=0.10.0'} - dev: false - - /repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - dev: false - /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -10898,11 +9473,6 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true - /resolve-url@0.2.1: - resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} - deprecated: https://github.com/lydell/resolve-url#deprecated - dev: false - /resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} @@ -10926,28 +9496,15 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /ret@0.1.15: - resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} - engines: {node: '>=0.12'} - dev: false - /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - /rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: false - /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 - dev: true /rimraf@5.0.1: resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} @@ -10957,13 +9514,6 @@ packages: glob: 10.3.3 dev: true - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - dev: false - /robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} dev: false @@ -10988,12 +9538,6 @@ packages: dependencies: queue-microtask: 1.2.3 - /run-queue@1.0.3: - resolution: {integrity: sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==} - dependencies: - aproba: 1.2.0 - dev: false - /rw@1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} dev: false @@ -11014,10 +9558,6 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false - /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -11029,12 +9569,6 @@ packages: is-regex: 1.1.4 dev: true - /safe-regex@1.1.0: - resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} - dependencies: - ret: 0.1.15 - dev: false - /safe-regex@2.1.1: resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} dependencies: @@ -11050,23 +9584,22 @@ packages: loose-envify: 1.4.0 dev: false - /schema-utils@1.0.0: - resolution: {integrity: sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==} - engines: {node: '>= 4'} + /schema-utils@2.7.1: + resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} + engines: {node: '>= 8.9.0'} dependencies: + '@types/json-schema': 7.0.12 ajv: 6.12.6 - ajv-errors: 1.0.1(ajv@6.12.6) ajv-keywords: 3.5.2(ajv@6.12.6) dev: false - /schema-utils@2.7.1: - resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} - engines: {node: '>= 8.9.0'} + /schema-utils@3.3.0: + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + engines: {node: '>= 10.13.0'} dependencies: '@types/json-schema': 7.0.12 ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) - dev: false /scroll-into-view-if-needed@3.0.10: resolution: {integrity: sha512-t44QCeDKAPf1mtQH3fYpWz8IM/DyvHLjs8wUvvwMYxk5moOqCzrMSxK6HQVD0QVmVjXFavoFIPRVrMuJPKAvtg==} @@ -11089,6 +9622,7 @@ packages: /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true + dev: true /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} @@ -11101,11 +9635,10 @@ packages: dependencies: lru-cache: 6.0.0 - /serialize-javascript@4.0.0: - resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} + /serialize-javascript@6.0.1: + resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} dependencies: randombytes: 2.1.0 - dev: false /serialize-query-params@2.0.2: resolution: {integrity: sha512-1chMo1dST4pFA9RDXAtF0Rbjaut4is7bzFbI1Z26IuMub68pNCILku85aYmeFhvnY//BXUPUhoRMjYcsT93J/Q==} @@ -11115,20 +9648,6 @@ packages: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true - /set-value@2.0.1: - resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 2.0.1 - is-extendable: 0.1.1 - is-plain-object: 2.0.4 - split-string: 3.1.0 - dev: false - - /setimmediate@1.0.5: - resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - dev: false - /sh-syntax@0.3.7: resolution: {integrity: sha512-xIB/uRniZ9urxAuXp1Ouh/BKSI1VK8RSqfwGj7cV57HvGrFo3vHdJfv8Tdp/cVcxJgXQTkmHr5mG5rqJW8r4wQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -11136,14 +9655,6 @@ packages: tslib: 2.6.2 dev: true - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: false - /shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -11155,7 +9666,6 @@ packages: engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 - dev: true /shebang-regex@1.0.0: resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} @@ -11164,7 +9674,6 @@ packages: /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - dev: true /shiki@0.14.3: resolution: {integrity: sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==} @@ -11181,6 +9690,7 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.1 object-inspect: 1.12.3 + dev: true /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -11225,38 +9735,6 @@ packages: yargs: 15.4.1 dev: true - /snapdragon-node@2.1.1: - resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} - engines: {node: '>=0.10.0'} - dependencies: - define-property: 1.0.0 - isobject: 3.0.1 - snapdragon-util: 3.0.1 - dev: false - - /snapdragon-util@3.0.1: - resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - - /snapdragon@0.8.2: - resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} - engines: {node: '>=0.10.0'} - dependencies: - base: 0.11.2 - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - map-cache: 0.2.2 - source-map: 0.5.7 - source-map-resolve: 0.5.3 - use: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: false - /sort-keys@5.0.0: resolution: {integrity: sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==} engines: {node: '>=12'} @@ -11264,41 +9742,16 @@ packages: is-plain-obj: 4.1.0 dev: false - /source-list-map@2.0.1: - resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==} - dev: false - /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - /source-map-resolve@0.5.3: - resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} - deprecated: See https://github.com/lydell/source-map-resolve#deprecated - dependencies: - atob: 2.1.2 - decode-uri-component: 0.2.2 - resolve-url: 0.2.1 - source-map-url: 0.4.1 - urix: 0.1.0 - dev: false - /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - /source-map-url@0.4.1: - resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} - deprecated: See https://github.com/lydell/source-map-url#deprecated - dev: false - - /source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - dev: false - /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -11348,22 +9801,9 @@ packages: resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} dev: true - /split-string@3.1.0: - resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 3.0.2 - dev: false - /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - /ssri@6.0.2: - resolution: {integrity: sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==} - dependencies: - figgy-pudding: 3.5.2 - dev: false - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -11372,46 +9812,10 @@ packages: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} dev: false - /static-extend@0.1.2: - resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} - engines: {node: '>=0.10.0'} - dependencies: - define-property: 0.2.5 - object-copy: 0.1.0 - dev: false - /std-env@3.4.3: resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} dev: true - /stream-browserify@2.0.2: - resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.8 - dev: false - - /stream-each@1.2.3: - resolution: {integrity: sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==} - dependencies: - end-of-stream: 1.4.4 - stream-shift: 1.0.1 - dev: false - - /stream-http@2.8.3: - resolution: {integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==} - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 2.3.8 - to-arraybuffer: 1.0.1 - xtend: 4.0.2 - dev: false - - /stream-shift@1.0.1: - resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} - dev: false - /stream-transform@2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: @@ -11483,16 +9887,11 @@ packages: es-abstract: 1.22.1 dev: true - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: false - /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 + dev: true /stringify-entities@4.0.3: resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==} @@ -11505,7 +9904,6 @@ packages: engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: true /strip-ansi@7.1.0: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} @@ -11548,7 +9946,6 @@ packages: /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - dev: true /strip-literal@1.3.0: resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} @@ -11628,6 +10025,12 @@ packages: dependencies: has-flag: 4.0.0 + /supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + /supports-color@9.4.0: resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} engines: {node: '>=12'} @@ -11746,53 +10149,51 @@ packages: - ts-node dev: true - /tapable@1.1.3: - resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} - engines: {node: '>=6'} - dev: false - /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - dev: true /term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} dev: true - /terser-webpack-plugin@1.4.5(webpack@4.46.0): - resolution: {integrity: sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==} - engines: {node: '>= 6.9.0'} + /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.88.2): + resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} + engines: {node: '>= 10.13.0'} peerDependencies: - webpack: ^4.0.0 + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true dependencies: - cacache: 12.0.4 - find-cache-dir: 2.1.0 - is-wsl: 1.1.0 - schema-utils: 1.0.0 - serialize-javascript: 4.0.0 - source-map: 0.6.1 - terser: 4.8.1 - webpack: 4.46.0 - webpack-sources: 1.4.3 - worker-farm: 1.7.0 - dev: false - - /terser@4.8.1: - resolution: {integrity: sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==} - engines: {node: '>=6.0.0'} + '@jridgewell/trace-mapping': 0.3.19 + esbuild: 0.18.20 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.19.3 + webpack: 5.88.2(esbuild@0.18.20) + + /terser@5.19.3: + resolution: {integrity: sha512-pQzJ9UJzM0IgmT4FAtYI6+VqFf0lj/to58AV0Xfgg0Up37RyPG7Al+1cepC6/BVuAxR9oNb41/DL4DEoHJvTdg==} + engines: {node: '>=10'} hasBin: true dependencies: + '@jridgewell/source-map': 0.3.5 acorn: 8.10.0 commander: 2.20.3 - source-map: 0.6.1 source-map-support: 0.5.21 - dev: false /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true /thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} @@ -11807,25 +10208,11 @@ packages: any-promise: 1.3.0 dev: true - /through2@2.0.5: - resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} - dependencies: - readable-stream: 2.3.8 - xtend: 4.0.2 - dev: false - /time-zone@1.0.0: resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} engines: {node: '>=4'} dev: true - /timers-browserify@2.0.12: - resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} - engines: {node: '>=0.6.0'} - dependencies: - setimmediate: 1.0.5 - dev: false - /tinybench@2.5.0: resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} dev: true @@ -11867,45 +10254,16 @@ packages: os-tmpdir: 1.0.2 dev: true - /to-arraybuffer@1.0.1: - resolution: {integrity: sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==} - dev: false - /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} - /to-object-path@0.3.0: - resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 - dev: false - - /to-regex-range@2.1.1: - resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} - engines: {node: '>=0.10.0'} - dependencies: - is-number: 3.0.0 - repeat-string: 1.6.1 - dev: false - /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 - /to-regex@3.0.2: - resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} - engines: {node: '>=0.10.0'} - dependencies: - define-property: 2.0.2 - extend-shallow: 3.0.2 - regex-not: 1.0.2 - safe-regex: 1.1.0 - dev: false - /to-vfile@7.2.4: resolution: {integrity: sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==} dependencies: @@ -11957,37 +10315,6 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-node@10.9.1(@types/node@18.17.12)(typescript@5.2.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 18.17.12 - acorn: 8.10.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.2.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -12061,10 +10388,6 @@ packages: fsevents: 2.3.3 dev: true - /tty-browserify@0.0.0: - resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} - dev: false - /tty-table@4.2.1: resolution: {integrity: sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==} engines: {node: '>=8.0.0'} @@ -12079,12 +10402,72 @@ packages: yargs: 17.7.2 dev: true + /turbo-darwin-64@1.10.12: + resolution: {integrity: sha512-vmDfGVPl5/aFenAbOj3eOx3ePNcWVUyZwYr7taRl0ZBbmv2TzjRiFotO4vrKCiTVnbqjQqAFQWY2ugbqCI1kOQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-darwin-arm64@1.10.12: + resolution: {integrity: sha512-3JliEESLNX2s7g54SOBqqkqJ7UhcOGkS0ywMr5SNuvF6kWVTbuUq7uBU/sVbGq8RwvK1ONlhPvJne5MUqBCTCQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-64@1.10.12: + resolution: {integrity: sha512-siYhgeX0DidIfHSgCR95b8xPee9enKSOjCzx7EjTLmPqPaCiVebRYvbOIYdQWRqiaKh9yfhUtFmtMOMScUf1gg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-linux-arm64@1.10.12: + resolution: {integrity: sha512-K/ZhvD9l4SslclaMkTiIrnfcACgos79YcAo4kwc8bnMQaKuUeRpM15sxLpZp3xDjDg8EY93vsKyjaOhdFG2UbA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-64@1.10.12: + resolution: {integrity: sha512-7FSgSwvktWDNOqV65l9AbZwcoueAILeE4L7JvjauNASAjjbuzXGCEq5uN8AQU3U5BOFj4TdXrVmO2dX+lLu8Zg==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo-windows-arm64@1.10.12: + resolution: {integrity: sha512-gCNXF52dwom1HLY9ry/cneBPOKTBHhzpqhMylcyvJP0vp9zeMQQkt6yjYv+6QdnmELC92CtKNp2FsNZo+z0pyw==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /turbo@1.10.12: + resolution: {integrity: sha512-WM3+jTfQWnB9W208pmP4oeehZcC6JQNlydb/ZHMRrhmQa+htGhWLCzd6Q9rLe0MwZLPpSPFV2/bN5egCLyoKjQ==} + hasBin: true + requiresBuild: true + optionalDependencies: + turbo-darwin-64: 1.10.12 + turbo-darwin-arm64: 1.10.12 + turbo-linux-64: 1.10.12 + turbo-linux-arm64: 1.10.12 + turbo-windows-64: 1.10.12 + turbo-windows-arm64: 1.10.12 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 - dev: true /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} @@ -12099,7 +10482,6 @@ packages: /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - dev: true /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} @@ -12156,6 +10538,7 @@ packages: /typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + dev: true /typescript@5.2.2: resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} @@ -12216,28 +10599,6 @@ packages: trough: 2.1.0 vfile: 5.3.7 - /union-value@1.0.1: - resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} - engines: {node: '>=0.10.0'} - dependencies: - arr-union: 3.1.0 - get-value: 2.0.6 - is-extendable: 0.1.1 - set-value: 2.0.1 - dev: false - - /unique-filename@1.1.1: - resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} - dependencies: - unique-slug: 2.0.2 - dev: false - - /unique-slug@2.0.2: - resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==} - dependencies: - imurmurhash: 0.1.4 - dev: false - /unist-util-find-after@4.0.1: resolution: {integrity: sha512-QO/PuPMm2ERxC6vFXEPtmAutOopy5PknD+Oq64gGwxKtk4xwo9Z97t9Av1obPmGU0IyTa6EKYUfTrK2QJS3Ozw==} dependencies: @@ -12362,26 +10723,11 @@ packages: normalize-path: 2.1.1 dev: false - /unset-value@1.0.0: - resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} - engines: {node: '>=0.10.0'} - dependencies: - has-value: 0.3.1 - isobject: 3.0.1 - dev: false - /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} dev: true - /upath@1.2.0: - resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} - engines: {node: '>=4'} - requiresBuild: true - dev: false - optional: true - /update-browserslist-db@1.0.11(browserslist@4.21.10): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true @@ -12397,18 +10743,6 @@ packages: dependencies: punycode: 2.3.0 - /urix@0.1.0: - resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} - deprecated: Please see https://github.com/lydell/urix#deprecated - dev: false - - /url@0.11.1: - resolution: {integrity: sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==} - dependencies: - punycode: 1.4.1 - qs: 6.11.2 - dev: false - /urlpattern-polyfill@8.0.2: resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} dev: false @@ -12471,25 +10805,9 @@ packages: tslib: 2.6.2 dev: false - /use@3.1.1: - resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} - engines: {node: '>=0.10.0'} - dev: false - /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - - /util@0.10.3: - resolution: {integrity: sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==} - dependencies: - inherits: 2.0.1 - dev: false - - /util@0.11.1: - resolution: {integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==} - dependencies: - inherits: 2.0.3 - dev: false + dev: true /uuid@9.0.0: resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} @@ -12506,10 +10824,6 @@ packages: kleur: 4.1.5 sade: 1.8.1 - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true - /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -12671,7 +10985,7 @@ packages: '@types/chai-subset': 1.3.3 '@types/node': 18.17.12 '@vitest/expect': 0.30.1 - '@vitest/runner': 0.30.1(patch_hash=22k4fsskoeieob62btkupydhfa) + '@vitest/runner': 0.30.1 '@vitest/snapshot': 0.30.1 '@vitest/spy': 0.30.1 '@vitest/utils': 0.30.1 @@ -12703,10 +11017,6 @@ packages: - terser dev: true - /vm-browserify@1.1.2: - resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} - dev: false - /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: false @@ -12715,14 +11025,14 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: false - /vue-eslint-parser@9.3.1(eslint@8.38.0): + /vue-eslint-parser@9.3.1(eslint@8.48.0): resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.38.0 + eslint: 8.48.0(patch_hash=yi5cqffjk423hcgr7hl33kguwu) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -12737,35 +11047,12 @@ packages: resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} dev: true - /watchpack-chokidar2@2.0.1: - resolution: {integrity: sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==} - requiresBuild: true - dependencies: - chokidar: 2.1.8 - transitivePeerDependencies: - - supports-color - dev: false - optional: true - - /watchpack@1.7.5: - resolution: {integrity: sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==} - dependencies: - graceful-fs: 4.2.11 - neo-async: 2.6.2 - optionalDependencies: - chokidar: 3.5.3 - watchpack-chokidar2: 2.0.1 - transitivePeerDependencies: - - supports-color - dev: false - /watchpack@2.4.0: resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} engines: {node: '>=10.13.0'} dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - dev: false /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} @@ -12822,52 +11109,48 @@ packages: - utf-8-validate dev: false - /webpack-sources@1.4.3: - resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==} - dependencies: - source-list-map: 2.0.1 - source-map: 0.6.1 - dev: false + /webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} - /webpack@4.46.0: - resolution: {integrity: sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==} - engines: {node: '>=6.11.5'} + /webpack@5.88.2(esbuild@0.18.20): + resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} + engines: {node: '>=10.13.0'} hasBin: true peerDependencies: webpack-cli: '*' - webpack-command: '*' peerDependenciesMeta: webpack-cli: optional: true - webpack-command: - optional: true dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/wasm-edit': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - acorn: 6.4.2 - ajv: 6.12.6 - ajv-keywords: 3.5.2(ajv@6.12.6) + '@types/eslint-scope': 3.7.4 + '@types/estree': 1.0.1 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/wasm-edit': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + acorn: 8.10.0 + acorn-import-assertions: 1.9.0(acorn@8.10.0) + browserslist: 4.21.10 chrome-trace-event: 1.0.3 - enhanced-resolve: 4.5.0 - eslint-scope: 4.0.3 - json-parse-better-errors: 1.0.2 - loader-runner: 2.4.0 - loader-utils: 1.4.2 - memory-fs: 0.4.1 - micromatch: 3.1.10 - mkdirp: 0.5.6 + enhanced-resolve: 5.15.0 + es-module-lexer: 1.3.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 neo-async: 2.6.2 - node-libs-browser: 2.2.1 - schema-utils: 1.0.0 - tapable: 1.1.3 - terser-webpack-plugin: 1.4.5(webpack@4.46.0) - watchpack: 1.7.5 - webpack-sources: 1.4.3 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.9(esbuild@0.18.20)(webpack@5.88.2) + watchpack: 2.4.0 + webpack-sources: 3.2.3 transitivePeerDependencies: - - supports-color - dev: false + - '@swc/core' + - esbuild + - uglify-js /well-known-symbols@2.0.0: resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} @@ -12960,7 +11243,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: true /why-is-node-running@2.2.2: resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} @@ -12971,12 +11253,6 @@ packages: stackback: 0.0.2 dev: true - /worker-farm@1.7.0: - resolution: {integrity: sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==} - dependencies: - errno: 0.1.8 - dev: false - /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -13033,13 +11309,9 @@ packages: optional: true dev: false - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false - /y18n@4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} @@ -13112,11 +11384,6 @@ packages: yargs-parser: 21.1.1 dev: true - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} diff --git a/scripts/create-rule.ts b/scripts/create-rule.ts index e9d4e44a5c7..f99addf74bf 100644 --- a/scripts/create-rule.ts +++ b/scripts/create-rule.ts @@ -99,7 +99,7 @@ export const rule: GraphQLESLintRule = { await writeFile(RULE_PATH, RULE_CONTENT.trimStart()); -const TEST_PATH = join(CWD, `packages/plugin/tests/${ruleId}.spec.ts`); +const TEST_PATH = join(CWD, `packages/plugin/__tests__/${ruleId}.spec.ts`); const TEST_CONTENT = ` import { GraphQLRuleTester, ParserOptions } from '../src'; import { rule } from '../src/rules/${ruleId}'; diff --git a/scripts/generate-configs.ts b/scripts/generate-configs.ts index d5521e36e46..956a94e4deb 100644 --- a/scripts/generate-configs.ts +++ b/scripts/generate-configs.ts @@ -23,7 +23,7 @@ type WriteFile = { const writeFormattedFile: WriteFile = async (filePath, code) => { if (filePath.startsWith('configs')) { - code = `export default ${JSON.stringify(code)}`; + code = `export = ${JSON.stringify(code)}`; } const formattedCode = [ diff --git a/scripts/generate-docs.ts b/scripts/generate-docs.ts index 9ccf91fbe5f..c243b6b95c7 100644 --- a/scripts/generate-docs.ts +++ b/scripts/generate-docs.ts @@ -135,13 +135,13 @@ async function generateDocs(): Promise { if (graphQLJSRuleName) { blocks.push( - `- [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/${graphQLJSRuleName}Rule.ts)`, - `- [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/${graphQLJSRuleName}Rule-test.ts)`, + `- [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/${graphQLJSRuleName}.ts)`, + `- [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/${graphQLJSRuleName}-test.ts)`, ); } else { blocks.push( `- [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/${ruleName}.ts)`, - `- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/${ruleName}.spec.ts)`, + `- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/${ruleName}.spec.ts)`, ); } return { @@ -194,7 +194,8 @@ async function generateDocs(): Promise { `- ${Icon.FIXABLE} if some problems reported by the rule are automatically fixable by the \`--fix\` [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) option`, `- ${Icon.HAS_SUGGESTIONS} if some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions)`, BR, - // '', + '', + '', printMarkdownTable( [ `Name${NBSP.repeat(20)}`, diff --git a/scripts/match-graphql.js b/scripts/match-graphql.js deleted file mode 100644 index cc6c56f2b16..00000000000 --- a/scripts/match-graphql.js +++ /dev/null @@ -1,18 +0,0 @@ -import { appendFile, writeFile } from 'node:fs/promises'; -import path from 'node:path'; -import pkg from '../package.json' assert { type: 'json' }; - -const CWD = process.cwd(); -const pkgPath = path.join(CWD, 'package.json'); -const version = process.argv[2]; - -if (pkg.resolutions.graphql.startsWith(version)) { - console.info(`GraphQL v${version} is match! Skipping.`); - process.exit(); -} - -const npmVersion = version.includes('-') ? version : `^${version}`; -pkg.resolutions.graphql = npmVersion; - -await writeFile(pkgPath, JSON.stringify(pkg, null, 2), 'utf8'); -await appendFile(path.join(CWD, '.prettierignore'), '\npackage.json'); diff --git a/scripts/patch-graphql-eslint-browser.ts b/scripts/patch-graphql-eslint-browser.ts deleted file mode 100644 index 865a2f9ee79..00000000000 --- a/scripts/patch-graphql-eslint-browser.ts +++ /dev/null @@ -1,61 +0,0 @@ -import fs from 'node:fs/promises'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; - -const __dirname = fileURLToPath(new URL('.', import.meta.url)); -const CWD = path.resolve(__dirname, '..'); -const ROOT_DIR = path.join(CWD, 'packages', 'plugin', 'dist', 'esm'); - -async function patch(filePath: string, replace: (fileContent: string) => string): Promise { - const fullPath = `${ROOT_DIR}${filePath}`; - const fileContent = await fs.readFile(fullPath, 'utf8'); - const patchComment = '// GRAPHQL-ESLINT BROWSER PATCH\n'; - const isAlreadyPatched = fileContent.startsWith(patchComment); - const newContent = isAlreadyPatched ? fileContent : patchComment + replace(fileContent); - await fs.writeFile(fullPath, newContent, 'utf8'); - console.log(`✅ ${path.relative(CWD, fullPath)} ${isAlreadyPatched ? 'already ' : ''}patched!`); -} - -function commentLine(str: string): string { - return `// ${str}`; -} - -await patch('/index.js', str => str.replace('export * from "./testkit.js"', commentLine)); - -await patch('/parser.js', str => - str - .replace('const gqlConfig = loadGraphQLConfig(options)', commentLine) - .replace('const project = gqlConfig.getProjectForFile(realFilepath)', 'let project'), -); - -await patch('/estree-converter/utils.js', str => - str - .replace("import { createRequire } from 'module'", commentLine) - .replace('const require = createRequire(import.meta.url)', commentLine) - .replace( - 'function getLexer(source) {', - m => `import { Lexer } from 'graphql'\n${m}\n return new Lexer(source)`, - ), -); - -await patch( - '/rules/graphql-js-validation.js', - str => - "import * as allGraphQLJSRules from 'graphql/validation/index.js'\n" + - str - .replace("import { createRequire } from 'module'", commentLine) - .replace('const require = createRequire(import.meta.url)', commentLine) - .replace( - ` let ruleFn = null; - try { - ruleFn = require(\`graphql/validation/rules/\${ruleName}Rule\`)[\`\${ruleName}Rule\`]; - } catch { - try { - ruleFn = require(\`graphql/validation/rules/\${ruleName}\`)[\`\${ruleName}Rule\`]; - } catch { - ruleFn = require("graphql/validation")[\`\${ruleName}Rule\`]; - } - }`, - ' let ruleFn = allGraphQLJSRules[`${ruleName}Rule`]', - ), -); diff --git a/scripts/patch-graphql.ts b/scripts/patch-graphql.ts deleted file mode 100644 index 02eebb525c6..00000000000 --- a/scripts/patch-graphql.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * This script fixes an error from vite - * Duplicate "graphql" modules cannot be used at the same time since different - * taken from https://github.com/vitejs/vite/issues/7879#issuecomment-1156166452 - */ - -import { unlink } from 'node:fs/promises'; -import { createRequire } from 'node:module'; -import path from 'node:path'; - -const require = createRequire(path.resolve('./packages/plugin/src')); - -try { - await unlink(require.resolve('graphql').replace(/\.js$/, '.mjs')); -} catch { - // ignore if file not exist (was already patched) -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0891dc8628e..323152af616 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -6,6 +6,11 @@ // ensure that nobody can accidentally use this config for a build "noEmit": true }, - "include": ["scripts/*.ts", "packages/plugin/tests/**/*.ts", "vite.config.ts", "serializer.ts"], + "include": [ + "scripts/*.ts", + "packages/plugin/__tests__/**/*.ts", + "vite.config.ts", + "serializer.ts" + ], "exclude": [] } diff --git a/tsconfig.json b/tsconfig.json index f0de7763cc8..fe20e9c0ce5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,11 +21,7 @@ "noImplicitReturns": true, "noUnusedLocals": true, "resolveJsonModule": true, - "skipLibCheck": true, - "paths": { - "@graphql-eslint/eslint-plugin": ["packages/plugin/src/index.ts"] - } + "skipLibCheck": true }, - "include": ["packages"], - "exclude": ["**/tests"] + "include": ["packages"] } diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000000..72490ff6746 --- /dev/null +++ b/turbo.json @@ -0,0 +1,32 @@ +{ + "pipeline": { + "build": { + "outputs": ["dist/**"], + "dependsOn": [ + // Run `build` in workspaces I depend on first + "^build" + ] + }, + "dev": { + "dependsOn": [ + // Run `dev` in workspaces I depend on first + "^dev" + ], + // Never cache anything (including logs) emitted by a `dev` task + "cache": false, + "persistent": true + }, + "typecheck": { + "dependsOn": [ + // Run `build` in workspaces I depend on first + "^build" + ] + }, + "test": { + "dependsOn": [ + // A workspace's `test` command depends on its own `build` commands first being completed + "build" + ] + } + } +} diff --git a/vite.config.ts b/vite.config.ts deleted file mode 100644 index ea843fba4ed..00000000000 --- a/vite.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - test: { - globals: true, - resolveSnapshotPath: testPath => - testPath.replace('tests/', 'tests/__snapshots__/').replace(/\.ts$/, '.md'), - setupFiles: ['./serializer.ts'], - alias: { - '@graphql-eslint/eslint-plugin': 'packages/plugin/src/index.ts', - }, - }, -}); diff --git a/website/next.config.js b/website/next.config.js index 52d11bbb82e..492f965f91d 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -1,5 +1,6 @@ import { createRequire } from 'node:module'; import { withGuildDocs } from '@theguild/components/next.config'; +import webpack from 'webpack'; const require = createRequire(import.meta.url); @@ -20,14 +21,18 @@ export default withGuildDocs({ esquery: require.resolve('esquery'), // fixes for @eslint/eslintrc TypeError: __webpack_require__(...).pathToFileURL is not a function eslint: require.resolve('eslint').replace('lib/api.js', 'lib/linter/index.js'), - // fixes for processor.js Module not found: Can't resolve 'velocityjs' and other 36 modules - '@graphql-tools/graphql-tag-pluck': false, - '@graphql-tools/code-file-loader': false, - // fixes for graphql-config.js TypeError: (0 , module__WEBPACK_IMPORTED_MODULE_0__.createRequire) is not a function - 'graphql-config': false, - // fixes for schema.js and documents.js TypeError: Cannot read properties of undefined (reading 'split') - 'fast-glob': false, + '@graphql-eslint/eslint-plugin/package.json': require.resolve( + '@graphql-eslint/eslint-plugin/package.json', + ), + '@graphql-eslint/eslint-plugin': require + .resolve('@graphql-eslint/eslint-plugin') + .replace('cjs/index.js', 'index.browser.mjs'), }; + config.plugins.push( + new webpack.NormalModuleReplacementPlugin(/^node:/, resource => { + resource.request = resource.request.replace('node:', ''); + }), + ); return config; }, eslint: { diff --git a/website/package.json b/website/package.json index db69b3b3605..ecd5c8ca021 100644 --- a/website/package.json +++ b/website/package.json @@ -6,9 +6,8 @@ "scripts": { "analyze": "ANALYZE=true yarn build", "build": "next build && next-sitemap --config next-sitemap.config.cjs && next export", - "dev": "pnpm patch-browser && next", - "patch-browser": "tsx ../scripts/patch-graphql-eslint-browser.ts", - "prebuild": "tsx ../scripts/generate-docs.ts && pnpm patch-browser", + "dev": "next", + "prebuild": "tsx ../scripts/generate-docs.ts", "start": "next start", "theguild-nextra-algolia": "theguild-nextra-algolia" }, @@ -36,7 +35,8 @@ "@types/lodash.uniqwith": "4.5.7", "@types/node": "18.17.12", "@types/react": "18.2.21", - "tailwindcss-radix": "2.8.0" + "tailwindcss-radix": "2.8.0", + "webpack": "^5.88.2" }, "browserslist": { "production": [ diff --git a/website/src/components/graphql-editor.tsx b/website/src/components/graphql-editor.tsx index d1b83c760a4..58b3f71f034 100644 --- a/website/src/components/graphql-editor.tsx +++ b/website/src/components/graphql-editor.tsx @@ -41,7 +41,9 @@ export function GraphQLEditor({ { parser: '@graphql-eslint/eslint-plugin', // extends: `plugin:@graphql-eslint/schema-recommended`, - parserOptions: { schema, documents }, + parserOptions: { + graphQLConfig: { schema, documents }, + }, rules: selectedRules, }, fileName, diff --git a/website/src/components/play-page.tsx b/website/src/components/play-page.tsx index 795096e9d3a..3eb3a81592a 100644 --- a/website/src/components/play-page.tsx +++ b/website/src/components/play-page.tsx @@ -1,5 +1,5 @@ import { ReactElement, useRef } from 'react'; -import { flatConfigs, rules } from '@graphql-eslint/eslint-plugin'; +import { flatConfigs, rules, ConfigName } from '@graphql-eslint/eslint-plugin'; import graphqlESLintPkgJson from '@graphql-eslint/eslint-plugin/package.json'; import { asArray } from '@graphql-tools/utils'; import { clsx } from 'clsx'; @@ -9,8 +9,15 @@ import { StringParam, useQueryParam, withDefault } from 'use-query-params'; import { GraphQLEditor } from './graphql-editor'; import { Select } from './select'; -const schemaConfigs = ['schema-recommended', 'schema-all', 'relay'] as const; -const operationsConfigs = ['operations-recommended', 'operations-all'] as const; +const schemaConfigs: ReadonlyArray = [ + 'schema-recommended', + 'schema-all', + 'schema-relay', +] as const; +const operationsConfigs: ReadonlyArray = [ + 'operations-recommended', + 'operations-all', +] as const; const schemaRulesOptions = Object.entries(rules) .filter(([, rule]) => asArray(rule.meta.docs!.category).includes('Schema')) diff --git a/website/src/pages/docs/configs.mdx b/website/src/pages/docs/configs.mdx index 35701c269bb..86eb4ac6f2e 100644 --- a/website/src/pages/docs/configs.mdx +++ b/website/src/pages/docs/configs.mdx @@ -9,7 +9,7 @@ import { Callout } from '@theguild/components' |[`schema-all`](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/configs/schema-all.ts)|enables all rules for schema (SDL) development, except for those that require `parserOptions.operations` option| |[`operations-recommended`](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/configs/operations-recommended.ts) |enables recommended rules for consuming GraphQL (operations) development| |[`operations-all`](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/configs/operations-all.ts)|enables all rules for consuming GraphQL (operations) development| -|[`relay`](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/configs/relay.ts)|enables rules from Relay specification for schema (SDL) development| +|[`schema-relay`](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/configs/schema-relay.ts)|enables rules from Relay specification for schema (SDL) development| {/* prettier-ignore-end */} diff --git a/website/src/pages/rules/_meta.json b/website/src/pages/rules/_meta.json index 417e0bff96c..d632240cc53 100644 --- a/website/src/pages/rules/_meta.json +++ b/website/src/pages/rules/_meta.json @@ -14,7 +14,6 @@ "description-style": "", "input-name": "", "lone-schema-definition": "", - "no-case-insensitive-enum-values-duplicates": "", "no-hashtag-description": "", "no-root-type": "", "no-scalar-result-type-on-mutation": "", @@ -58,8 +57,8 @@ "one-field-subscriptions": "", "overlapping-fields-can-be-merged": "", "possible-fragment-spread": "", - "require-id-when-available": "", "require-import-fragment": "", + "require-selections": "", "scalar-leafs": "", "selection-set-depth": "", "unique-argument-names": "", diff --git a/website/src/pages/rules/alphabetize.md b/website/src/pages/rules/alphabetize.md index f1546839e47..b0cab34300b 100644 --- a/website/src/pages/rules/alphabetize.md +++ b/website/src/pages/rules/alphabetize.md @@ -45,7 +45,7 @@ type User { ### Incorrect ```graphql -# eslint @graphql-eslint/alphabetize: ['error', { values: ['EnumTypeDefinition'] }] +# eslint @graphql-eslint/alphabetize: ['error', { values: true }] enum Role { SUPER_ADMIN @@ -58,7 +58,7 @@ enum Role { ### Correct ```graphql -# eslint @graphql-eslint/alphabetize: ['error', { values: ['EnumTypeDefinition'] }] +# eslint @graphql-eslint/alphabetize: ['error', { values: true }] enum Role { ADMIN @@ -115,19 +115,10 @@ Additional restrictions: - Minimum items: `1` - Unique items: `true` -### `values` (array) +### `values` (boolean) Values of `enum`. -The elements of the array can contain the following enum values: - -- `EnumTypeDefinition` - -Additional restrictions: - -- Minimum items: `1` -- Unique items: `true` - ### `selections` (array) Selections of `fragment` and operations `query`, `mutation` and `subscription`. @@ -142,19 +133,10 @@ Additional restrictions: - Minimum items: `1` - Unique items: `true` -### `variables` (array) +### `variables` (boolean) Variables of operations `query`, `mutation` and `subscription`. -The elements of the array can contain the following enum values: - -- `OperationDefinition` - -Additional restrictions: - -- Minimum items: `1` -- Unique items: `true` - ### `arguments` (array) Arguments of fields and directives. @@ -175,8 +157,6 @@ Additional restrictions: Definitions – `type`, `interface`, `enum`, `scalar`, `input`, `union` and `directive`. -Default: `false` - ### `groups` (array) Custom order group. Example: `['id', '*', 'createdAt', 'updatedAt']` where `*` says for everything @@ -192,4 +172,4 @@ Additional restrictions: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/alphabetize.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/alphabetize.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/alphabetize.spec.ts) diff --git a/website/src/pages/rules/deprecated-rules.mdx b/website/src/pages/rules/deprecated-rules.md similarity index 73% rename from website/src/pages/rules/deprecated-rules.mdx rename to website/src/pages/rules/deprecated-rules.md index efe89ad8f38..94c532c1033 100644 --- a/website/src/pages/rules/deprecated-rules.mdx +++ b/website/src/pages/rules/deprecated-rules.md @@ -22,3 +22,11 @@ This rule was removed because the same things can be validated using This rule was removed because the same things can be validated using [`naming-convention`](/rules/naming-convention). + +## `require-id-when-available` + +This rule was renamed to [`require-selections`](/rules/require-selections). + +## `no-case-insensitive-enum-values-duplicates` + +This rule was renamed to [`unique-enum-value-names`](/rules/unique-enum-value-names). diff --git a/website/src/pages/rules/description-style.md b/website/src/pages/rules/description-style.md index 0721f2fe9d6..de0dadb65e9 100644 --- a/website/src/pages/rules/description-style.md +++ b/website/src/pages/rules/description-style.md @@ -55,4 +55,4 @@ Default: `"block"` ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/description-style.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/description-style.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/description-style.spec.ts) diff --git a/website/src/pages/rules/index.md b/website/src/pages/rules/index.md index f8c58fa0d89..46cebc9b1b5 100644 --- a/website/src/pages/rules/index.md +++ b/website/src/pages/rules/index.md @@ -11,73 +11,74 @@ Each rule has emojis denoting: - 💡 if some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) -| Name                     | Description |     Config     | 📄 / 📦 | 🚀 / 🔮 | 🔧 / 💡 | -| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------: | :---------------: | :---------------: | :---------------: | -| [alphabetize](/rules/alphabetize) | Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more. | ![all][] | 📄 📦 | 🚀 | 🔧 | -| [description-style](/rules/description-style) | Require all comments to follow the same style (either block or inline). | ![recommended][] | 📄 | 🚀 | 💡 | -| [executable-definitions](/rules/executable-definitions) | A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions. | ![recommended][] | 📦 | 🔮 | -| [fields-on-correct-type](/rules/fields-on-correct-type) | A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`. | ![recommended][] | 📦 | 🔮 | 💡 | -| [fragments-on-composite-type](/rules/fragments-on-composite-type) | Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type. | ![recommended][] | 📦 | 🔮 | -| [input-name](/rules/input-name) | Require mutation argument to be always called "input" and input type to be called Mutation name + "Input". | ![all][] | 📄 | 🚀 | 💡 | -| [known-argument-names](/rules/known-argument-names) | A GraphQL field is only valid if all supplied arguments are defined by that field. | ![recommended][] | 📄 📦 | 🔮 | 💡 | -| [known-directives](/rules/known-directives) | A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned. | ![recommended][] | 📄 📦 | 🔮 | -| [known-fragment-names](/rules/known-fragment-names) | A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document. | ![recommended][] | 📦 | 🔮 | -| [known-type-names](/rules/known-type-names) | A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema. | ![recommended][] | 📄 📦 | 🔮 | 💡 | -| [lone-anonymous-operation](/rules/lone-anonymous-operation) | A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition. | ![recommended][] | 📦 | 🔮 | -| [lone-executable-definition](/rules/lone-executable-definition) | Require queries, mutations, subscriptions or fragments to be located in separate files. | ![all][] | 📦 | 🚀 | -| [lone-schema-definition](/rules/lone-schema-definition) | A GraphQL document is only valid if it contains only one schema definition. | ![recommended][] | 📄 | 🔮 | -| [match-document-filename](/rules/match-document-filename) | This rule allows you to enforce that the file name should match the operation name. | ![all][] | 📦 | 🚀 | -| [naming-convention](/rules/naming-convention) | Require names to follow specified conventions. | ![recommended][] | 📄 📦 | 🚀 | 💡 | -| [no-anonymous-operations](/rules/no-anonymous-operations) | Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes. | ![recommended][] | 📦 | 🚀 | 💡 | -| [no-case-insensitive-enum-values-duplicates](/rules/no-case-insensitive-enum-values-duplicates) | Disallow case-insensitive enum values duplicates. | ![recommended][] | 📄 | 🚀 | 💡 | -| [no-deprecated](/rules/no-deprecated) | Enforce that deprecated fields or enum values are not in use by operations. | ![recommended][] | 📦 | 🚀 | 💡 | -| [no-duplicate-fields](/rules/no-duplicate-fields) | Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field. | ![recommended][] | 📦 | 🚀 | 💡 | -| [no-fragment-cycles](/rules/no-fragment-cycles) | A GraphQL fragment is only valid when it does not have cycles in fragments usage. | ![recommended][] | 📦 | 🔮 | -| [no-hashtag-description](/rules/no-hashtag-description) | Requires to use `"""` or `"` for adding a GraphQL description instead of `#`. | ![recommended][] | 📄 | 🚀 | 💡 | -| [no-one-place-fragments](/rules/no-one-place-fragments) | Disallow fragments that are used only in one place. | ![all][] | 📦 | 🚀 | -| [no-root-type](/rules/no-root-type) | Disallow using root types `mutation` and/or `subscription`. | | 📄 | 🚀 | 💡 | -| [no-scalar-result-type-on-mutation](/rules/no-scalar-result-type-on-mutation) | Avoid scalar result type on mutation type to make sure to return a valid state. | ![all][] | 📄 | 🚀 | 💡 | -| [no-typename-prefix](/rules/no-typename-prefix) | Enforces users to avoid using the type name in a field name while defining your schema. | ![recommended][] | 📄 | 🚀 | 💡 | -| [no-undefined-variables](/rules/no-undefined-variables) | A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation. | ![recommended][] | 📦 | 🔮 | -| [no-unreachable-types](/rules/no-unreachable-types) | Requires all types to be reachable at some level by root level fields. | ![recommended][] | 📄 | 🚀 | 💡 | -| [no-unused-fields](/rules/no-unused-fields) | Requires all fields to be used at some level by siblings operations. | | 📄 | 🚀 | 💡 | -| [no-unused-fragments](/rules/no-unused-fragments) | A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations. | ![recommended][] | 📦 | 🔮 | -| [no-unused-variables](/rules/no-unused-variables) | A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment. | ![recommended][] | 📦 | 🔮 | -| [one-field-subscriptions](/rules/one-field-subscriptions) | A GraphQL subscription is valid only if it contains a single root field. | ![recommended][] | 📦 | 🔮 | -| [overlapping-fields-can-be-merged](/rules/overlapping-fields-can-be-merged) | A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity. | ![recommended][] | 📦 | 🔮 | -| [possible-fragment-spread](/rules/possible-fragment-spread) | A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition. | ![recommended][] | 📦 | 🔮 | -| [possible-type-extension](/rules/possible-type-extension) | A type extension is only valid if the type is defined and has the same kind. | | 📄 | 🔮 | 💡 | -| [provided-required-arguments](/rules/provided-required-arguments) | A field or directive is only valid if all required (non-null without a default value) field arguments have been provided. | ![recommended][] | 📄 📦 | 🔮 | -| [relay-arguments](/rules/relay-arguments) | Set of rules to follow Relay specification for Arguments. | ![relay][] | 📄 | 🚀 | -| [relay-connection-types](/rules/relay-connection-types) | Set of rules to follow Relay specification for Connection types. | ![relay][] | 📄 | 🚀 | -| [relay-edge-types](/rules/relay-edge-types) | Set of rules to follow Relay specification for Edge types. | ![relay][] | 📄 | 🚀 | -| [relay-page-info](/rules/relay-page-info) | Set of rules to follow Relay specification for `PageInfo` object. | ![relay][] | 📄 | 🚀 | -| [require-deprecation-date](/rules/require-deprecation-date) | Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date. | ![all][] | 📄 | 🚀 | 💡 | -| [require-deprecation-reason](/rules/require-deprecation-reason) | Require all deprecation directives to specify a reason. | ![recommended][] | 📄 | 🚀 | -| [require-description](/rules/require-description) | Enforce descriptions in type definitions and operations. | ![recommended][] | 📄 | 🚀 | -| [require-field-of-type-query-in-mutation-result](/rules/require-field-of-type-query-in-mutation-result) | Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application. | ![all][] | 📄 | 🚀 | -| [require-id-when-available](/rules/require-id-when-available) | Enforce selecting specific fields when they are available on the GraphQL type. | ![recommended][] | 📦 | 🚀 | 💡 | -| [require-import-fragment](/rules/require-import-fragment) | Require fragments to be imported via an import expression. | | 📦 | 🚀 | 💡 | -| [require-nullable-fields-with-oneof](/rules/require-nullable-fields-with-oneof) | Require `input` or `type` fields to be non-nullable with `@oneOf` directive. | ![all][] | 📄 | 🚀 | -| [require-nullable-result-in-root](/rules/require-nullable-result-in-root) | Require nullable fields in root types. | ![all][] | 📄 | 🚀 | 💡 | -| [require-type-pattern-with-oneof](/rules/require-type-pattern-with-oneof) | Enforce types with `@oneOf` directive have `error` and `ok` fields. | ![all][] | 📄 | 🚀 | -| [scalar-leafs](/rules/scalar-leafs) | A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types. | ![recommended][] | 📦 | 🔮 | 💡 | -| [selection-set-depth](/rules/selection-set-depth) | Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit). | ![recommended][] | 📦 | 🚀 | 💡 | -| [strict-id-in-types](/rules/strict-id-in-types) | Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers. | ![recommended][] | 📄 | 🚀 | -| [unique-argument-names](/rules/unique-argument-names) | A GraphQL field or directive is only valid if all supplied arguments are uniquely named. | ![recommended][] | 📦 | 🔮 | -| [unique-directive-names](/rules/unique-directive-names) | A GraphQL document is only valid if all defined directives have unique names. | ![recommended][] | 📄 | 🔮 | -| [unique-directive-names-per-location](/rules/unique-directive-names-per-location) | A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named. | ![recommended][] | 📄 📦 | 🔮 | -| [unique-enum-value-names](/rules/unique-enum-value-names) | A GraphQL enum type is only valid if all its values are uniquely named. | | 📄 | 🔮 | -| [unique-field-definition-names](/rules/unique-field-definition-names) | A GraphQL complex type is only valid if all its fields are uniquely named. | ![recommended][] | 📄 | 🔮 | -| [unique-fragment-name](/rules/unique-fragment-name) | Enforce unique fragment names across your project. | ![all][] | 📦 | 🚀 | -| [unique-input-field-names](/rules/unique-input-field-names) | A GraphQL input object value is only valid if all supplied fields are uniquely named. | ![recommended][] | 📦 | 🔮 | -| [unique-operation-name](/rules/unique-operation-name) | Enforce unique operation names across your project. | ![all][] | 📦 | 🚀 | -| [unique-operation-types](/rules/unique-operation-types) | A GraphQL document is only valid if it has only one type per operation. | ![recommended][] | 📄 | 🔮 | -| [unique-type-names](/rules/unique-type-names) | A GraphQL document is only valid if all defined types have unique names. | ![recommended][] | 📄 | 🔮 | -| [unique-variable-names](/rules/unique-variable-names) | A GraphQL operation is only valid if all its variables are uniquely named. | ![recommended][] | 📦 | 🔮 | -| [value-literals-of-correct-type](/rules/value-literals-of-correct-type) | A GraphQL document is only valid if all value literals are of the type expected at their position. | ![recommended][] | 📦 | 🔮 | 💡 | -| [variables-are-input-types](/rules/variables-are-input-types) | A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object). | ![recommended][] | 📦 | 🔮 | -| [variables-in-allowed-position](/rules/variables-in-allowed-position) | Variables passed to field arguments conform to type. | ![recommended][] | 📦 | 🔮 | + + +Name                    |Description|    Config    |📄 / 📦|🚀 / 🔮|🔧 / 💡 +-|-|:-:|:-:|:-:|:-: +[alphabetize](/rules/alphabetize)|Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more.|![all][]|📄 📦|🚀|🔧 +[description-style](/rules/description-style)|Require all comments to follow the same style (either block or inline).|![recommended][]|📄|🚀|💡 +[executable-definitions](/rules/executable-definitions)|A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.|![recommended][]|📦|🔮| +[fields-on-correct-type](/rules/fields-on-correct-type)|A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`.|![recommended][]|📦|🔮|💡 +[fragments-on-composite-type](/rules/fragments-on-composite-type)|Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.|![recommended][]|📦|🔮| +[input-name](/rules/input-name)|Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".|![all][]|📄|🚀|💡 +[known-argument-names](/rules/known-argument-names)|A GraphQL field is only valid if all supplied arguments are defined by that field.|![recommended][]|📄 📦|🔮|💡 +[known-directives](/rules/known-directives)|A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.|![recommended][]|📄 📦|🔮| +[known-fragment-names](/rules/known-fragment-names)|A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.|![recommended][]|📦|🔮| +[known-type-names](/rules/known-type-names)|A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.|![recommended][]|📄 📦|🔮|💡 +[lone-anonymous-operation](/rules/lone-anonymous-operation)|A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.|![recommended][]|📦|🔮| +[lone-executable-definition](/rules/lone-executable-definition)|Require queries, mutations, subscriptions or fragments to be located in separate files.|![all][]|📦|🚀| +[lone-schema-definition](/rules/lone-schema-definition)|A GraphQL document is only valid if it contains only one schema definition.|![recommended][]|📄|🔮| +[match-document-filename](/rules/match-document-filename)|This rule allows you to enforce that the file name should match the operation name.|![all][]|📦|🚀| +[naming-convention](/rules/naming-convention)|Require names to follow specified conventions.|![recommended][]|📄 📦|🚀|💡 +[no-anonymous-operations](/rules/no-anonymous-operations)|Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.|![recommended][]|📦|🚀|💡 +[no-deprecated](/rules/no-deprecated)|Enforce that deprecated fields or enum values are not in use by operations.|![recommended][]|📦|🚀|💡 +[no-duplicate-fields](/rules/no-duplicate-fields)|Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.|![recommended][]|📦|🚀|💡 +[no-fragment-cycles](/rules/no-fragment-cycles)|A GraphQL fragment is only valid when it does not have cycles in fragments usage.|![recommended][]|📦|🔮| +[no-hashtag-description](/rules/no-hashtag-description)|Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.|![recommended][]|📄|🚀|💡 +[no-one-place-fragments](/rules/no-one-place-fragments)|Disallow fragments that are used only in one place.|![all][]|📦|🚀| +[no-root-type](/rules/no-root-type)|Disallow using root types `mutation` and/or `subscription`.|![all][]|📄|🚀|💡 +[no-scalar-result-type-on-mutation](/rules/no-scalar-result-type-on-mutation)|Avoid scalar result type on mutation type to make sure to return a valid state.|![all][]|📄|🚀|💡 +[no-typename-prefix](/rules/no-typename-prefix)|Enforces users to avoid using the type name in a field name while defining your schema.|![recommended][]|📄|🚀|💡 +[no-undefined-variables](/rules/no-undefined-variables)|A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.|![recommended][]|📦|🔮| +[no-unreachable-types](/rules/no-unreachable-types)|Requires all types to be reachable at some level by root level fields.|![recommended][]|📄|🚀|💡 +[no-unused-fields](/rules/no-unused-fields)|Requires all fields to be used at some level by siblings operations.||📄|🚀|💡 +[no-unused-fragments](/rules/no-unused-fragments)|A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.|![recommended][]|📦|🔮| +[no-unused-variables](/rules/no-unused-variables)|A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.|![recommended][]|📦|🔮| +[one-field-subscriptions](/rules/one-field-subscriptions)|A GraphQL subscription is valid only if it contains a single root field.|![recommended][]|📦|🔮| +[overlapping-fields-can-be-merged](/rules/overlapping-fields-can-be-merged)|A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.|![recommended][]|📦|🔮| +[possible-fragment-spread](/rules/possible-fragment-spread)|A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.|![recommended][]|📦|🔮| +[possible-type-extension](/rules/possible-type-extension)|A type extension is only valid if the type is defined and has the same kind.|![recommended][]|📄|🔮|💡 +[provided-required-arguments](/rules/provided-required-arguments)|A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.|![recommended][]|📄 📦|🔮| +[relay-arguments](/rules/relay-arguments)|Set of rules to follow Relay specification for Arguments.|![relay][]|📄|🚀| +[relay-connection-types](/rules/relay-connection-types)|Set of rules to follow Relay specification for Connection types.|![relay][]|📄|🚀| +[relay-edge-types](/rules/relay-edge-types)|Set of rules to follow Relay specification for Edge types.|![relay][]|📄|🚀| +[relay-page-info](/rules/relay-page-info)|Set of rules to follow Relay specification for `PageInfo` object.|![relay][]|📄|🚀| +[require-deprecation-date](/rules/require-deprecation-date)|Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.|![all][]|📄|🚀|💡 +[require-deprecation-reason](/rules/require-deprecation-reason)|Require all deprecation directives to specify a reason.|![recommended][]|📄|🚀| +[require-description](/rules/require-description)|Enforce descriptions in type definitions and operations.|![recommended][]|📄|🚀| +[require-field-of-type-query-in-mutation-result](/rules/require-field-of-type-query-in-mutation-result)|Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.|![all][]|📄|🚀| +[require-import-fragment](/rules/require-import-fragment)|Require fragments to be imported via an import expression.|![all][]|📦|🚀|💡 +[require-nullable-fields-with-oneof](/rules/require-nullable-fields-with-oneof)|Require `input` or `type` fields to be non-nullable with `@oneOf` directive.|![all][]|📄|🚀| +[require-nullable-result-in-root](/rules/require-nullable-result-in-root)|Require nullable fields in root types.|![all][]|📄|🚀|💡 +[require-selections](/rules/require-selections)|Enforce selecting specific fields when they are available on the GraphQL type.|![recommended][]|📦|🚀|💡 +[require-type-pattern-with-oneof](/rules/require-type-pattern-with-oneof)|Enforce types with `@oneOf` directive have `error` and `ok` fields.|![all][]|📄|🚀| +[scalar-leafs](/rules/scalar-leafs)|A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.|![recommended][]|📦|🔮|💡 +[selection-set-depth](/rules/selection-set-depth)|Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).|![recommended][]|📦|🚀|💡 +[strict-id-in-types](/rules/strict-id-in-types)|Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers.|![recommended][]|📄|🚀| +[unique-argument-names](/rules/unique-argument-names)|A GraphQL field or directive is only valid if all supplied arguments are uniquely named.|![recommended][]|📦|🔮| +[unique-directive-names](/rules/unique-directive-names)|A GraphQL document is only valid if all defined directives have unique names.|![recommended][]|📄|🔮| +[unique-directive-names-per-location](/rules/unique-directive-names-per-location)|A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.|![recommended][]|📄 📦|🔮| +[unique-enum-value-names](/rules/unique-enum-value-names)|A GraphQL enum type is only valid if all its values are uniquely named.|![recommended][]|📄|🚀|💡 +[unique-field-definition-names](/rules/unique-field-definition-names)|A GraphQL complex type is only valid if all its fields are uniquely named.|![recommended][]|📄|🔮| +[unique-fragment-name](/rules/unique-fragment-name)|Enforce unique fragment names across your project.|![recommended][]|📦|🚀| +[unique-input-field-names](/rules/unique-input-field-names)|A GraphQL input object value is only valid if all supplied fields are uniquely named.|![recommended][]|📦|🔮| +[unique-operation-name](/rules/unique-operation-name)|Enforce unique operation names across your project.|![recommended][]|📦|🚀| +[unique-operation-types](/rules/unique-operation-types)|A GraphQL document is only valid if it has only one type per operation.|![recommended][]|📄|🔮| +[unique-type-names](/rules/unique-type-names)|A GraphQL document is only valid if all defined types have unique names.|![recommended][]|📄|🔮| +[unique-variable-names](/rules/unique-variable-names)|A GraphQL operation is only valid if all its variables are uniquely named.|![recommended][]|📦|🔮| +[value-literals-of-correct-type](/rules/value-literals-of-correct-type)|A GraphQL document is only valid if all value literals are of the type expected at their position.|![recommended][]|📦|🔮|💡 +[variables-are-input-types](/rules/variables-are-input-types)|A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).|![recommended][]|📦|🔮| +[variables-in-allowed-position](/rules/variables-in-allowed-position)|Variables passed to field arguments conform to type.|![recommended][]|📦|🔮| [recommended]: https://img.shields.io/badge/-recommended-green.svg [all]: https://img.shields.io/badge/-all-blue.svg diff --git a/website/src/pages/rules/input-name.md b/website/src/pages/rules/input-name.md index 7a6ad0d0ecf..8ea8dd2ac5a 100644 --- a/website/src/pages/rules/input-name.md +++ b/website/src/pages/rules/input-name.md @@ -78,4 +78,4 @@ Default: `true` ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/input-name.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/input-name.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/input-name.spec.ts) diff --git a/website/src/pages/rules/lone-executable-definition.md b/website/src/pages/rules/lone-executable-definition.md index 90ca6defd4e..40115628dcd 100644 --- a/website/src/pages/rules/lone-executable-definition.md +++ b/website/src/pages/rules/lone-executable-definition.md @@ -57,4 +57,4 @@ Additional restrictions: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/lone-executable-definition.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/lone-executable-definition.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/lone-executable-definition.spec.ts) diff --git a/website/src/pages/rules/match-document-filename.md b/website/src/pages/rules/match-document-filename.md index edc3268f46a..6b35b9430a9 100644 --- a/website/src/pages/rules/match-document-filename.md +++ b/website/src/pages/rules/match-document-filename.md @@ -179,4 +179,4 @@ This element must be one of the following enum values: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/match-document-filename.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/match-document-filename.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/match-document-filename.spec.ts) diff --git a/website/src/pages/rules/naming-convention.md b/website/src/pages/rules/naming-convention.md index 04386d09971..ba603ff5413 100644 --- a/website/src/pages/rules/naming-convention.md +++ b/website/src/pages/rules/naming-convention.md @@ -360,4 +360,4 @@ Option to skip validation of some words, e.g. acronyms ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/naming-convention.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/naming-convention.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/naming-convention.spec.ts) diff --git a/website/src/pages/rules/no-anonymous-operations.md b/website/src/pages/rules/no-anonymous-operations.md index b3eafc98e95..e8695be21d2 100644 --- a/website/src/pages/rules/no-anonymous-operations.md +++ b/website/src/pages/rules/no-anonymous-operations.md @@ -41,4 +41,4 @@ query user { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-anonymous-operations.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-anonymous-operations.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-anonymous-operations.spec.ts) diff --git a/website/src/pages/rules/no-case-insensitive-enum-values-duplicates.md b/website/src/pages/rules/no-case-insensitive-enum-values-duplicates.md deleted file mode 100644 index 18ce650a4c2..00000000000 --- a/website/src/pages/rules/no-case-insensitive-enum-values-duplicates.md +++ /dev/null @@ -1,47 +0,0 @@ -# `no-case-insensitive-enum-values-duplicates` - -✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file -enables this rule. - -💡 This rule provides -[suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) - -- Category: `Schema` -- Rule name: `@graphql-eslint/no-case-insensitive-enum-values-duplicates` -- Requires GraphQL Schema: `false` - [ℹ️](/docs/getting-started#extended-linting-rules-with-graphql-schema) -- Requires GraphQL Operations: `false` - [ℹ️](/docs/getting-started#extended-linting-rules-with-siblings-operations) - -Disallow case-insensitive enum values duplicates. - -## Usage Examples - -### Incorrect - -```graphql -# eslint @graphql-eslint/no-case-insensitive-enum-values-duplicates: 'error' - -enum MyEnum { - Value - VALUE - ValuE -} -``` - -### Correct - -```graphql -# eslint @graphql-eslint/no-case-insensitive-enum-values-duplicates: 'error' - -enum MyEnum { - Value1 - Value2 - Value3 -} -``` - -## Resources - -- [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-case-insensitive-enum-values-duplicates.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-case-insensitive-enum-values-duplicates.spec.ts) diff --git a/website/src/pages/rules/no-deprecated.md b/website/src/pages/rules/no-deprecated.md index 3582e1b5299..e18cdc790e0 100644 --- a/website/src/pages/rules/no-deprecated.md +++ b/website/src/pages/rules/no-deprecated.md @@ -86,4 +86,4 @@ query user { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-deprecated.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-deprecated.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-deprecated.spec.ts) diff --git a/website/src/pages/rules/no-duplicate-fields.md b/website/src/pages/rules/no-duplicate-fields.md index 4927d8c1540..473c94243b3 100644 --- a/website/src/pages/rules/no-duplicate-fields.md +++ b/website/src/pages/rules/no-duplicate-fields.md @@ -67,4 +67,4 @@ query ( ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-duplicate-fields.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-duplicate-fields.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-duplicate-fields.spec.ts) diff --git a/website/src/pages/rules/no-hashtag-description.md b/website/src/pages/rules/no-hashtag-description.md index dbe1bd82a28..26fd0e38d43 100644 --- a/website/src/pages/rules/no-hashtag-description.md +++ b/website/src/pages/rules/no-hashtag-description.md @@ -60,4 +60,4 @@ type User { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-hashtag-description.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-hashtag-description.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-hashtag-description.spec.ts) diff --git a/website/src/pages/rules/no-one-place-fragments.md b/website/src/pages/rules/no-one-place-fragments.md index 3c7f19d9f7e..f143dca5333 100644 --- a/website/src/pages/rules/no-one-place-fragments.md +++ b/website/src/pages/rules/no-one-place-fragments.md @@ -49,4 +49,4 @@ fragment UserFields on User { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-one-place-fragments.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-one-place-fragments.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-one-place-fragments.spec.ts) diff --git a/website/src/pages/rules/no-root-type.md b/website/src/pages/rules/no-root-type.md index edd6b3dc228..73ef7acc8e1 100644 --- a/website/src/pages/rules/no-root-type.md +++ b/website/src/pages/rules/no-root-type.md @@ -53,4 +53,4 @@ Additional restrictions: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-root-type.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-root-type.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-root-type.spec.ts) diff --git a/website/src/pages/rules/no-scalar-result-type-on-mutation.md b/website/src/pages/rules/no-scalar-result-type-on-mutation.md index d30371b439e..c5c7a86d611 100644 --- a/website/src/pages/rules/no-scalar-result-type-on-mutation.md +++ b/website/src/pages/rules/no-scalar-result-type-on-mutation.md @@ -37,4 +37,4 @@ type Mutation { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-scalar-result-type-on-mutation.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-scalar-result-type-on-mutation.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-scalar-result-type-on-mutation.spec.ts) diff --git a/website/src/pages/rules/no-typename-prefix.md b/website/src/pages/rules/no-typename-prefix.md index b7b7e43f7b7..d274a65770f 100644 --- a/website/src/pages/rules/no-typename-prefix.md +++ b/website/src/pages/rules/no-typename-prefix.md @@ -40,4 +40,4 @@ type User { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-typename-prefix.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-typename-prefix.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-typename-prefix.spec.ts) diff --git a/website/src/pages/rules/no-unreachable-types.md b/website/src/pages/rules/no-unreachable-types.md index 07c65dc4b65..34dee2fe905 100644 --- a/website/src/pages/rules/no-unreachable-types.md +++ b/website/src/pages/rules/no-unreachable-types.md @@ -50,4 +50,4 @@ type Query { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-unreachable-types.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-unreachable-types.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-unreachable-types.spec.ts) diff --git a/website/src/pages/rules/no-unused-fields.md b/website/src/pages/rules/no-unused-fields.md index 3d3051fd1e7..9d9ac1df456 100644 --- a/website/src/pages/rules/no-unused-fields.md +++ b/website/src/pages/rules/no-unused-fields.md @@ -62,4 +62,4 @@ query { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/no-unused-fields.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/no-unused-fields.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/no-unused-fields.spec.ts) diff --git a/website/src/pages/rules/possible-type-extension.md b/website/src/pages/rules/possible-type-extension.md index d777d912001..8688630c6fd 100644 --- a/website/src/pages/rules/possible-type-extension.md +++ b/website/src/pages/rules/possible-type-extension.md @@ -1,5 +1,8 @@ # `possible-type-extension` +✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file +enables this rule. + 💡 This rule provides [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) diff --git a/website/src/pages/rules/prettier.mdx b/website/src/pages/rules/prettier.md similarity index 100% rename from website/src/pages/rules/prettier.mdx rename to website/src/pages/rules/prettier.md diff --git a/website/src/pages/rules/relay-arguments.md b/website/src/pages/rules/relay-arguments.md index 72fa5ba6c99..fe9024730a3 100644 --- a/website/src/pages/rules/relay-arguments.md +++ b/website/src/pages/rules/relay-arguments.md @@ -57,4 +57,4 @@ Default: `true` ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/relay-arguments.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/relay-arguments.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/relay-arguments.spec.ts) diff --git a/website/src/pages/rules/relay-connection-types.md b/website/src/pages/rules/relay-connection-types.md index 20b478bebdc..826f747e1ff 100644 --- a/website/src/pages/rules/relay-connection-types.md +++ b/website/src/pages/rules/relay-connection-types.md @@ -41,4 +41,4 @@ type UserConnection { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/relay-connection-types.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/relay-connection-types.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/relay-connection-types.spec.ts) diff --git a/website/src/pages/rules/relay-edge-types.md b/website/src/pages/rules/relay-edge-types.md index 1a5fa10afca..5ea110f305c 100644 --- a/website/src/pages/rules/relay-edge-types.md +++ b/website/src/pages/rules/relay-edge-types.md @@ -58,4 +58,4 @@ Default: `true` ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/relay-edge-types.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/relay-edge-types.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/relay-edge-types.spec.ts) diff --git a/website/src/pages/rules/relay-page-info.md b/website/src/pages/rules/relay-page-info.md index c507d5c981a..7cc5aba2f3e 100644 --- a/website/src/pages/rules/relay-page-info.md +++ b/website/src/pages/rules/relay-page-info.md @@ -32,4 +32,4 @@ type PageInfo { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/relay-page-info.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/relay-page-info.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/relay-page-info.spec.ts) diff --git a/website/src/pages/rules/require-deprecation-date.md b/website/src/pages/rules/require-deprecation-date.md index 72581d5af38..a63b1871915 100644 --- a/website/src/pages/rules/require-deprecation-date.md +++ b/website/src/pages/rules/require-deprecation-date.md @@ -57,4 +57,4 @@ The schema defines the following properties: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-deprecation-date.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-deprecation-date.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-deprecation-date.spec.ts) diff --git a/website/src/pages/rules/require-deprecation-reason.md b/website/src/pages/rules/require-deprecation-reason.md index fd9aa6c895d..669124dfc06 100644 --- a/website/src/pages/rules/require-deprecation-reason.md +++ b/website/src/pages/rules/require-deprecation-reason.md @@ -47,4 +47,4 @@ type MyType { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-deprecation-reason.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-deprecation-reason.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-deprecation-reason.spec.ts) diff --git a/website/src/pages/rules/require-description.md b/website/src/pages/rules/require-description.md index 9e8d0e74417..9eea8764a59 100644 --- a/website/src/pages/rules/require-description.md +++ b/website/src/pages/rules/require-description.md @@ -145,4 +145,4 @@ Read more about this kind on ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-description.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-description.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-description.spec.ts) diff --git a/website/src/pages/rules/require-field-of-type-query-in-mutation-result.md b/website/src/pages/rules/require-field-of-type-query-in-mutation-result.md index 816cf37392a..ceb2aa562df 100644 --- a/website/src/pages/rules/require-field-of-type-query-in-mutation-result.md +++ b/website/src/pages/rules/require-field-of-type-query-in-mutation-result.md @@ -48,4 +48,4 @@ type Mutation { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-field-of-type-query-in-mutation-result.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-field-of-type-query-in-mutation-result.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-field-of-type-query-in-mutation-result.spec.ts) diff --git a/website/src/pages/rules/require-import-fragment.md b/website/src/pages/rules/require-import-fragment.md index a87b4e9647d..0162cc996da 100644 --- a/website/src/pages/rules/require-import-fragment.md +++ b/website/src/pages/rules/require-import-fragment.md @@ -68,4 +68,4 @@ query { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-import-fragment.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-import-fragment.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-import-fragment.spec.ts) diff --git a/website/src/pages/rules/require-nullable-fields-with-oneof.md b/website/src/pages/rules/require-nullable-fields-with-oneof.md index 7bd88349ea7..2294563513f 100644 --- a/website/src/pages/rules/require-nullable-fields-with-oneof.md +++ b/website/src/pages/rules/require-nullable-fields-with-oneof.md @@ -36,4 +36,4 @@ input Input @oneOf { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-nullable-fields-with-oneof.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-nullable-fields-with-oneof.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-nullable-fields-with-oneof.spec.ts) diff --git a/website/src/pages/rules/require-nullable-result-in-root.md b/website/src/pages/rules/require-nullable-result-in-root.md index 1a3d0ad4849..00369c8f8e8 100644 --- a/website/src/pages/rules/require-nullable-result-in-root.md +++ b/website/src/pages/rules/require-nullable-result-in-root.md @@ -39,4 +39,4 @@ type Query { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-nullable-result-in-root.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-nullable-result-in-root.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-nullable-result-in-root.spec.ts) diff --git a/website/src/pages/rules/require-id-when-available.md b/website/src/pages/rules/require-selections.md similarity index 80% rename from website/src/pages/rules/require-id-when-available.md rename to website/src/pages/rules/require-selections.md index 7b1026bba04..ae58dc4b49b 100644 --- a/website/src/pages/rules/require-id-when-available.md +++ b/website/src/pages/rules/require-selections.md @@ -1,4 +1,4 @@ -# `require-id-when-available` +# `require-selections` ✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file enables this rule. @@ -7,7 +7,7 @@ enables this rule. [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) - Category: `Operations` -- Rule name: `@graphql-eslint/require-id-when-available` +- Rule name: `@graphql-eslint/require-selections` - Requires GraphQL Schema: `true` [ℹ️](/docs/getting-started#extended-linting-rules-with-graphql-schema) - Requires GraphQL Operations: `true` @@ -20,7 +20,7 @@ Enforce selecting specific fields when they are available on the GraphQL type. ### Incorrect ```graphql -# eslint @graphql-eslint/require-id-when-available: 'error' +# eslint @graphql-eslint/require-selections: 'error' # In your schema type User { @@ -39,7 +39,7 @@ query { ### Correct ```graphql -# eslint @graphql-eslint/require-id-when-available: 'error' +# eslint @graphql-eslint/require-selections: 'error' # In your schema type User { @@ -88,5 +88,5 @@ The schema defines the following additional types: ## Resources -- [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-id-when-available.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-id-when-available.spec.ts) +- [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-selections.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-selections.spec.ts) diff --git a/website/src/pages/rules/require-type-pattern-with-oneof.md b/website/src/pages/rules/require-type-pattern-with-oneof.md index b1e79ccbf9a..990f1e23d63 100644 --- a/website/src/pages/rules/require-type-pattern-with-oneof.md +++ b/website/src/pages/rules/require-type-pattern-with-oneof.md @@ -37,4 +37,4 @@ type DoSomethingSuccess { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/require-type-pattern-with-oneof.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/require-type-pattern-with-oneof.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/require-type-pattern-with-oneof.spec.ts) diff --git a/website/src/pages/rules/selection-set-depth.md b/website/src/pages/rules/selection-set-depth.md index 0335b173792..d58adda9dd8 100644 --- a/website/src/pages/rules/selection-set-depth.md +++ b/website/src/pages/rules/selection-set-depth.md @@ -84,4 +84,4 @@ Additional restrictions: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/selection-set-depth.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/selection-set-depth.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/selection-set-depth.spec.ts) diff --git a/website/src/pages/rules/strict-id-in-types.md b/website/src/pages/rules/strict-id-in-types.md index 0e5ff884f3e..a7b0ef8580d 100644 --- a/website/src/pages/rules/strict-id-in-types.md +++ b/website/src/pages/rules/strict-id-in-types.md @@ -127,4 +127,4 @@ Additional restrictions: ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/strict-id-in-types.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/strict-id-in-types.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/strict-id-in-types.spec.ts) diff --git a/website/src/pages/rules/unique-enum-value-names.md b/website/src/pages/rules/unique-enum-value-names.md index bfac0692c6e..b630ff4e378 100644 --- a/website/src/pages/rules/unique-enum-value-names.md +++ b/website/src/pages/rules/unique-enum-value-names.md @@ -1,5 +1,11 @@ # `unique-enum-value-names` +✅ The `"extends": "plugin:@graphql-eslint/schema-recommended"` property in a configuration file +enables this rule. + +💡 This rule provides +[suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions) + - Category: `Schema` - Rule name: `@graphql-eslint/unique-enum-value-names` - Requires GraphQL Schema: `false` @@ -9,9 +15,35 @@ A GraphQL enum type is only valid if all its values are uniquely named. -> This rule is a wrapper around a `graphql-js` validation function. +> This rule disallows case-insensitive enum values duplicates too. + +## Usage Examples + +### Incorrect + +```graphql +# eslint @graphql-eslint/unique-enum-value-names: 'error' + +enum MyEnum { + Value + VALUE + ValuE +} +``` + +### Correct + +```graphql +# eslint @graphql-eslint/unique-enum-value-names: 'error' + +enum MyEnum { + Value1 + Value2 + Value3 +} +``` ## Resources -- [Rule source](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueEnumValueNamesRule.ts) -- [Test source](https://github.com/graphql/graphql-js/tree/main/src/validation/__tests__/UniqueEnumValueNamesRule-test.ts) +- [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/unique-enum-value-names.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/unique-enum-value-names.spec.ts) diff --git a/website/src/pages/rules/unique-fragment-name.md b/website/src/pages/rules/unique-fragment-name.md index 17dd56adb75..0ee61bed76c 100644 --- a/website/src/pages/rules/unique-fragment-name.md +++ b/website/src/pages/rules/unique-fragment-name.md @@ -1,5 +1,8 @@ # `unique-fragment-name` +✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file +enables this rule. + - Category: `Operations` - Rule name: `@graphql-eslint/unique-fragment-name` - Requires GraphQL Schema: `false` @@ -50,4 +53,4 @@ fragment UserFields on User { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/unique-fragment-name.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/unique-fragment-name.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/unique-fragment-name.spec.ts) diff --git a/website/src/pages/rules/unique-operation-name.md b/website/src/pages/rules/unique-operation-name.md index dc882e577d0..34742d12d0f 100644 --- a/website/src/pages/rules/unique-operation-name.md +++ b/website/src/pages/rules/unique-operation-name.md @@ -1,5 +1,8 @@ # `unique-operation-name` +✅ The `"extends": "plugin:@graphql-eslint/operations-recommended"` property in a configuration file +enables this rule. + - Category: `Operations` - Rule name: `@graphql-eslint/unique-operation-name` - Requires GraphQL Schema: `false` @@ -54,4 +57,4 @@ query me { ## Resources - [Rule source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/src/rules/unique-operation-name.ts) -- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/tests/unique-operation-name.spec.ts) +- [Test source](https://github.com/B2o5T/graphql-eslint/tree/master/packages/plugin/__tests__/unique-operation-name.spec.ts)