From 49c22edd3498e9562b965e34dc915dd7b94a7154 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:43:10 +0000 Subject: [PATCH 1/2] chore(deps): update dependency @devoxa/eslint-config from 4.0.0 to 4.0.1 --- package.json | 2 +- yarn.lock | 115 ++++++++++++++++----------------------------------- 2 files changed, 36 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index b761aec..02fe80a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@prisma/client": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "devDependencies": { - "@devoxa/eslint-config": "4.0.0", + "@devoxa/eslint-config": "4.0.1", "@devoxa/prettier-config": "2.0.3", "@prisma/client": "6.0.1", "@swc/core": "1.10.0", diff --git a/yarn.lock b/yarn.lock index 24c8bfe..65ac687 100644 --- a/yarn.lock +++ b/yarn.lock @@ -515,17 +515,17 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@devoxa/eslint-config@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@devoxa/eslint-config/-/eslint-config-4.0.0.tgz#3d154c4fad97b18aaf6ee7061522af12c683847b" - integrity sha512-yFIXwNro9bTfxQMOw+Lw7+eHgN2os67VbL22dcRqGvUMNdY3RFMapPt0n+e/nAOs2R78Gcp/5NgRYBseiPg87w== +"@devoxa/eslint-config@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@devoxa/eslint-config/-/eslint-config-4.0.1.tgz#fa9ec359cdb453ca03414b4d6b9341073feafbcf" + integrity sha512-6DdyiAreX4K1o4XtkooGUuQwN11muaN3Hx5O5tvKpOMPV5uMSHqvz5nqvPDWuGQEdtXjLtB9g1ReKNiPV0GemA== dependencies: "@eslint/js" "9.16.0" "@stylistic/eslint-plugin" "2.11.0" eslint-config-prettier "9.1.0" eslint-plugin-react "7.37.2" parse-gitignore "2.0.0" - typescript-eslint "8.16.0" + typescript-eslint "8.17.0" "@devoxa/prettier-config@2.0.3": version "2.0.3" @@ -1227,40 +1227,32 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz#ac56825bcdf3b392fc76a94b1315d4a162f201a6" - integrity sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q== +"@typescript-eslint/eslint-plugin@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz#2ee073c421f4e81e02d10e731241664b6253b23c" + integrity sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.16.0" - "@typescript-eslint/type-utils" "8.16.0" - "@typescript-eslint/utils" "8.16.0" - "@typescript-eslint/visitor-keys" "8.16.0" + "@typescript-eslint/scope-manager" "8.17.0" + "@typescript-eslint/type-utils" "8.17.0" + "@typescript-eslint/utils" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.16.0.tgz#ee5b2d6241c1ab3e2e53f03fd5a32d8e266d8e06" - integrity sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w== +"@typescript-eslint/parser@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.17.0.tgz#2ee972bb12fa69ac625b85813dc8d9a5a053ff52" + integrity sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg== dependencies: - "@typescript-eslint/scope-manager" "8.16.0" - "@typescript-eslint/types" "8.16.0" - "@typescript-eslint/typescript-estree" "8.16.0" - "@typescript-eslint/visitor-keys" "8.16.0" + "@typescript-eslint/scope-manager" "8.17.0" + "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/typescript-estree" "8.17.0" + "@typescript-eslint/visitor-keys" "8.17.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz#ebc9a3b399a69a6052f3d88174456dd399ef5905" - integrity sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg== - dependencies: - "@typescript-eslint/types" "8.16.0" - "@typescript-eslint/visitor-keys" "8.16.0" - "@typescript-eslint/scope-manager@8.17.0": version "8.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz#a3f49bf3d4d27ff8d6b2ea099ba465ef4dbcaa3a" @@ -1269,40 +1261,21 @@ "@typescript-eslint/types" "8.17.0" "@typescript-eslint/visitor-keys" "8.17.0" -"@typescript-eslint/type-utils@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz#585388735f7ac390f07c885845c3d185d1b64740" - integrity sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg== +"@typescript-eslint/type-utils@8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz#d326569f498cdd0edf58d5bb6030b4ad914e63d3" + integrity sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw== dependencies: - "@typescript-eslint/typescript-estree" "8.16.0" - "@typescript-eslint/utils" "8.16.0" + "@typescript-eslint/typescript-estree" "8.17.0" + "@typescript-eslint/utils" "8.17.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737" - integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ== - "@typescript-eslint/types@8.17.0": version "8.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.17.0.tgz#ef84c709ef8324e766878834970bea9a7e3b72cf" integrity sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA== -"@typescript-eslint/typescript-estree@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz#9d741e56e5b13469b5190e763432ce5551a9300c" - integrity sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw== - dependencies: - "@typescript-eslint/types" "8.16.0" - "@typescript-eslint/visitor-keys" "8.16.0" - debug "^4.3.4" - fast-glob "^3.3.2" - is-glob "^4.0.3" - minimatch "^9.0.4" - semver "^7.6.0" - ts-api-utils "^1.3.0" - "@typescript-eslint/typescript-estree@8.17.0": version "8.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz#40b5903bc929b1e8dd9c77db3cb52cfb199a2a34" @@ -1317,17 +1290,7 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3" - integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.16.0" - "@typescript-eslint/types" "8.16.0" - "@typescript-eslint/typescript-estree" "8.16.0" - -"@typescript-eslint/utils@^8.13.0": +"@typescript-eslint/utils@8.17.0", "@typescript-eslint/utils@^8.13.0": version "8.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.17.0.tgz#41c05105a2b6ab7592f513d2eeb2c2c0236d8908" integrity sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w== @@ -1337,14 +1300,6 @@ "@typescript-eslint/types" "8.17.0" "@typescript-eslint/typescript-estree" "8.17.0" -"@typescript-eslint/visitor-keys@8.16.0": - version "8.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz#d5086afc060b01ff7a4ecab8d49d13d5a7b07705" - integrity sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ== - dependencies: - "@typescript-eslint/types" "8.16.0" - eslint-visitor-keys "^4.2.0" - "@typescript-eslint/visitor-keys@8.17.0": version "8.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz#4dbcd0e28b9bf951f4293805bf34f98df45e1aa8" @@ -4426,14 +4381,14 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" reflect.getprototypeof "^1.0.6" -typescript-eslint@8.16.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.16.0.tgz#d608c972d6b2461ca10ec30fd3fa62a080baba19" - integrity sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ== +typescript-eslint@8.17.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.17.0.tgz#fa4033c26b3b40f778287bc12918d985481b220b" + integrity sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA== dependencies: - "@typescript-eslint/eslint-plugin" "8.16.0" - "@typescript-eslint/parser" "8.16.0" - "@typescript-eslint/utils" "8.16.0" + "@typescript-eslint/eslint-plugin" "8.17.0" + "@typescript-eslint/parser" "8.17.0" + "@typescript-eslint/utils" "8.17.0" typescript@5.7.2: version "5.7.2" From 17de844c2ed1cb1117476328598dbb52e51fa922 Mon Sep 17 00:00:00 2001 From: queicherius Date: Thu, 5 Dec 2024 21:48:03 +0000 Subject: [PATCH 2/2] Fix lint errors --- src/index.ts | 2 +- src/interfaces.ts | 2 +- tests/fixtures.ts | 6 +++--- tests/index.spec.ts | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/index.ts b/src/index.ts index 412e4c2..eb8affb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,7 +15,7 @@ export async function findManyCursorConnection< Node = Record, CustomEdge extends Edge = Edge, >( - findMany: (args: PrismaFindManyArguments) => Promise, + findMany: (args: PrismaFindManyArguments) => Promise>, aggregate: () => Promise, args: ConnectionArguments = {}, pOptions?: Options diff --git a/src/interfaces.ts b/src/interfaces.ts index 3439cf8..d7a6ffa 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -28,7 +28,7 @@ export interface ConnectionArguments { // Relay Response export interface Connection = Edge> { - nodes: T[] + nodes: Array edges: Array pageInfo: PageInfo totalCount: number diff --git a/tests/fixtures.ts b/tests/fixtures.ts index 0b51600..27320b8 100644 --- a/tests/fixtures.ts +++ b/tests/fixtures.ts @@ -1,6 +1,6 @@ import { Prisma } from '@prisma/client' -export const TODO_FIXTURES: Prisma.TodoCreateInput[] = [ +export const TODO_FIXTURES: Array = [ { id: 'id_01', text: 'veritatis molestias qui', isCompleted: false }, { id: 'id_02', text: 'occaecati a dolor', isCompleted: false }, { id: 'id_03', text: 'ut enim quia', isCompleted: false }, @@ -23,7 +23,7 @@ export const TODO_FIXTURES: Prisma.TodoCreateInput[] = [ { id: 'id_20', text: 'dolorum deserunt quis', isCompleted: true }, ] -export const USER_FIXTURES: Prisma.UserCreateInput[] = [ +export const USER_FIXTURES: Array = [ { id: 1, email: 'user1@email.com' }, { id: 2, email: 'user2@email.com' }, { id: 3, email: 'user3@email.com' }, @@ -46,7 +46,7 @@ export const USER_FIXTURES: Prisma.UserCreateInput[] = [ { id: 20, email: 'user20@email.com' }, ] -export const PROFILE_FIXTURES: Prisma.ProfileCreateInput[] = [ +export const PROFILE_FIXTURES: Array = [ { firstname: 'foo1', lastname: 'bar1' }, { firstname: 'foo2', lastname: 'bar1' }, { firstname: 'foo3', lastname: 'bar1' }, diff --git a/tests/index.spec.ts b/tests/index.spec.ts index 6084f83..07cf2b8 100644 --- a/tests/index.spec.ts +++ b/tests/index.spec.ts @@ -573,7 +573,7 @@ export const typecheckForInferredTypes = async (): Promise => { () => client.todo.count(), {} )) satisfies { - edges: { cursor: string; node: { id: string; text: string; isCompleted: boolean } }[] + edges: Array<{ cursor: string; node: { id: string; text: string; isCompleted: boolean } }> } // Handles edge type additions @@ -585,11 +585,11 @@ export const typecheckForInferredTypes = async (): Promise => { recordToEdge: (record) => ({ node: record, extraEdgeField: 'Bar' }), } )) satisfies { - edges: { + edges: Array<{ cursor: string node: { id: string; text: string; isCompleted: boolean } extraEdgeField: string - }[] + }> } // Handles edge type additions @@ -603,9 +603,9 @@ export const typecheckForInferredTypes = async (): Promise => { }), } )) satisfies { - edges: { + edges: Array<{ cursor: string node: { id: string; text: string; isCompleted: boolean; extraNodeField: string } - }[] + }> } }