-
-
Couldn't load subscription status.
- Fork 126
merge dev to main (v2.2.0) #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughWalkthroughThe updates involve a range of enhancements and fixes across various files. Key changes include version updates, improvements to database and query functionalities, refinements in handling policy and permission checks, and added support for integration tests. Additionally, there are updates to documentation, configuration files, and test cases to ensure consistency and clarity. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 28
Outside diff range and nitpick comments (33)
packages/runtime/src/enhancements/types.ts (1)
Line range hint
19-30: Replaceanywith more specific types to enhance type safety.// Example of replacing `any` with a more specific type - prismaModule?: any; + prismaModule?: PrismaClient; - export type EntityCheckerFunc = (input: any, context: QueryContext) => boolean; + export type EntityCheckerFunc = (input: unknown, context: QueryContext) => boolean;Tools
Biome
[error] 30-30: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/src/runtime-v5/svelte.ts (1)
Line range hint
76-176: Replaceanywith more specific types to enhance type safety.// Example of replacing `any` with a more specific type - R = any, + R = ResponseType, - const mutationFn = (data: any) => { + const mutationFn = (data: DataType) => {packages/plugins/tanstack-query/src/runtime/vue.ts (1)
Line range hint
116-116: Consider replacinganywith more specific types to enhance type safety.- const queryOptions: any = computed(() => ({ + const queryOptions: ComputedRef<UseInfiniteQueryOptions<TQueryFnData, TError, InfiniteData<TData>>> = computed(() => ({Also applies to: 145-145, 162-162, 180-180
packages/plugins/tanstack-query/src/runtime-v5/react.ts (1)
Line range hint
180-180: Consider replacinganywith more specific types to enhance type safety.- const mutationFn = (data: any) => { + const mutationFn = (data: TArgs) => {Also applies to: 193-193
tests/integration/tests/enhancements/with-policy/fluent-api.test.ts (1)
Line range hint
145-145: Consider replacinganywith more specific types to enhance type safety in test assertions.- expect((db1.post.findMany() as any).author).toBeUndefined(); + expect((db1.post.findMany() as unknown as { author?: Function }).author).toBeUndefined();Also applies to: 257-257
tests/integration/tests/enhancements/with-policy/subscription.test.ts (1)
Line range hint
62-64: Replaceanytype with more specific types to enhance type safety.- const rawEvents: any[] = []; - const authEvents: any[] = []; - const anonEvents: any[] = []; + const rawEvents: Array<{ event: string }> = []; + const authEvents: Array<{ event: string }> = []; + const anonEvents: Array<{ event: string }> = [];Also applies to: 119-120, 173-174, 242-243, 254-254
packages/schema/src/plugins/zod/utils/schema-gen.ts (1)
Line range hint
31-33: Remove unnecessaryelseclauses to simplify the control flow.- } else { - return field.type.optional ? `z.record(z.unknown()).optional()` : `z.record(z.unknown())`; - } + return field.type.optional ? `z.record(z.unknown()).optional()` : `z.record(z.unknown())`;Also applies to: 242-244, 276-284
packages/schema/src/utils/ast-utils.ts (1)
Line range hint
129-142: Consider removing unnecessaryelseclauses to streamline the code.- } else { - return undefined; - } + return undefined;Also applies to: 157-161, 159-161
packages/sdk/src/typescript-expression-transformer.ts (4)
Line range hint
28-30: Remove the unnecessary constructor.- constructor(private readonly options: Options) {}
Line range hint
46-51: Convert the function expression to an arrow function for better consistency and reduced verbosity.- function func(name: string) { - return function (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) { - if (!functionHandlers.get(name)) { - functionHandlers.set(name, descriptor); - } - return descriptor; - }; - } + const func = (name: string) => (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => { + if (!functionHandlers.get(name)) { + functionHandlers.set(name, descriptor); + } + return descriptor; + };
Line range hint
123-130: Remove the unnecessary else clause to simplify the control flow.- } else { - if (normalizeUndefined) { - // normalize field access to null instead of undefined to avoid accidentally use undefined in filter - return `(${this.transform(expr.operand, normalizeUndefined)}?.${expr.member.ref.name} ?? null)`; - } else { - return `${this.transform(expr.operand, normalizeUndefined)}?.${expr.member.ref.name}`; - } - } + if (normalizeUndefined) { + // normalize field access to null instead of undefined to avoid accidentally use undefined in filter + return `(${this.transform(expr.operand, normalizeUndefined)}?.${expr.member.ref.name} ?? null)`; + } + return `${this.transform(expr.operand, normalizeUndefined)}?.${expr.member.ref.name}`;
Line range hint
311-322: Remove the unnecessary else clauses to simplify the control flow.- } else { - if (isDataModelFieldReference(expr.left)) { - _default = this.ensureBooleanTernary(expr.left, left, _default); - } - if (isDataModelFieldReference(expr.right)) { - _default = this.ensureBooleanTernary(expr.right, right, _default); - } - } + if (isDataModelFieldReference(expr.left)) { + _default = this.ensureBooleanTernary(expr.left, left, _default); + } + if (isDataModelFieldReference(expr.right)) { + _default = this.ensureBooleanTernary(expr.right, right, _default); + }packages/schema/src/language-server/validator/datamodel-validator.ts (3)
Line range hint
286-304: Remove unnecessary else clause.- } else { - // if there's any allow rule, we deny unless any allow rule evaluates to true - writer.write(`return ${FALSE};`); - }This else clause can be omitted because previous branches break early, simplifying the control flow.
Line range hint
317-319: Remove unnecessary else clause.- } else { - // for model-level rules, the default is always deny unless for 'postUpdate' - writer.write(`return ${kind === 'postUpdate' ? TRUE : FALSE};`); - }This else clause can be omitted because previous branches break early, simplifying the control flow.
Line range hint
326-328: Remove unnecessary else clause.- } else { - // LHS is not rooted from the current model, - // only keep RHS items that contains '$this' - return rhs.filter((r) => r.includes('$this')); - }This else clause can be omitted because previous branches break early, simplifying the control flow.
packages/plugins/tanstack-query/tests/react-hooks.test.tsx (1)
Line range hint
150-150: Replaceanywith more specific types to improve type safety across various test cases.- const cacheData: any = queryClient.getQueryData( + const cacheData: SpecificType = queryClient.getQueryData(Adjust
SpecificTypeto match the expected data structure in each case.Also applies to: 193-193, 238-238, 249-249, 294-294, 400-400, 443-443, 532-532, 576-576, 621-621, 629-629
packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx (2)
Line range hint
700-702: Theelseclause here can be omitted as the previous branches break early, simplifying the control flow.- else { - return { kind: 'ProceedDefault' }; - }
Line range hint
734-736: Similar to the previous comment, consider removing this unnecessaryelseclause to clean up the code.- else { - return { kind: 'ProceedDefault' }; - }packages/plugins/tanstack-query/src/generator.ts (3)
Line range hint
346-346: Replace usage ofanywith more specific types to enhance type safety and maintainability.- if (mapping.create || (mapping as any).createOne) { + if (mapping.create || (mapping as unknown as { createOne?: boolean }).createOne) {Repeat similar changes for other occurrences.
Also applies to: 413-413, 425-425, 432-432
Line range hint
651-653: Theelseclause is unnecessary here due to the earlythrowin the previous branches. Removing it can simplify the control flow.- } else { - throw new PluginError(name, `Unsupported target: ${target}`); - }
Line range hint
542-553: These standalone block statements are redundant and can be safely removed to simplify the code.- { - // Redundant block - }Repeat similar changes for other occurrences.
Also applies to: 555-558
packages/schema/src/plugins/prisma/schema-generator.ts (1)
Line range hint
176-181: Consider removing the unnecessary else clause to simplify the control flow.- else { - return this.configArrayToText(expr); - }tests/integration/tests/enhancements/with-policy/field-level-policy.test.ts (4)
Line range hint
41-41: Add explicit type annotations to avoid implicit 'any' type.- let r; + let r: any; // Consider replacing 'any' with a more specific type if possible
Line range hint
236-236: Add explicit type annotations to avoid implicit 'any' type.- let r; + let r: any; // Consider replacing 'any' with a more specific type if possible
Line range hint
337-337: Add explicit type annotations to avoid implicit 'any' type.- let r; + let r: any; // Consider replacing 'any' with a more specific type if possible
Line range hint
424-424: Add explicit type annotations to avoid implicit 'any' type.- let r; + let r: any; // Consider replacing 'any' with a more specific type if possiblepackages/runtime/src/enhancements/delegate.ts (2)
Line range hint
45-45: Consider replacinganywith more specific types.Using
anydisables TypeScript's static type checking, which can lead to runtime errors. Where possible, replaceanywith more specific types to enhance code safety and maintainability.Also applies to: 49-49, 53-53, 57-57, 61-61, 69-69, 97-97, 121-121, 140-140, 159-159, 180-180, 187-187, 221-221, 223-223, 253-253, 254-254, 270-270
Line range hint
92-94: Remove unnecessaryelseclauses.These
elseclauses are redundant as the preceding branches terminate early (either byreturnorbreak). Removing them can simplify the code and improve readability.Also applies to: 132-135, 170-173
packages/runtime/src/enhancements/policy/policy-utils.ts (3)
Line range hint
65-69: Remove unnecessaryelseclauses to simplify control flow.- else { - return this.reduce({ OR: filtered }); - } + return this.reduce({ OR: filtered });This change makes the code cleaner and easier to read by removing unnecessary nesting.
Also applies to: 67-69, 79-83, 81-83, 92-96, 94-96, 105-110, 116-118, 378-380
Line range hint
142-142: Replaceanywith more specific types to enhance type safety.The use of
anytype should be minimized as it disables TypeScript's type checking. Consider defining specific types or interfaces for these instances.Also applies to: 143-143, 157-157, 174-174, 191-191, 265-265, 388-388
Line range hint
162-162: Simplify computed expressions by using literal keys.- 'AND' in condition + condition.ANDThis change simplifies the code by directly accessing the property instead of using a computed string literal.
Also applies to: 179-179, 200-200
packages/runtime/src/enhancements/policy/handler.ts (2)
Line range hint
216-225: Theelseclause can be omitted for cleaner code, as previous branches break early.- } else { - // proceed with a complex create and collect post-write checks - const { result, postWriteChecks } = await this.doCreate(this.model, args, tx); - - // execute post-write checks - await this.runPostWriteChecks(postWriteChecks, tx); - - // filter the read-back data - return this.policyUtils.readBack(tx, this.model, 'create', origArgs, result); - }
Line range hint
230-232: Thiselseclause is unnecessary and can be removed for cleaner and more readable code.- } else { - // create entities in a transaction with post-create checks - return this.queryUtils.transaction(this.prisma, async (tx) => {
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (17)
package.jsonis excluded by!**/*.jsonpackages/ide/jetbrains/package.jsonis excluded by!**/*.jsonpackages/language/package.jsonis excluded by!**/*.jsonpackages/misc/redwood/package.jsonis excluded by!**/*.jsonpackages/plugins/openapi/package.jsonis excluded by!**/*.jsonpackages/plugins/swr/package.jsonis excluded by!**/*.jsonpackages/plugins/tanstack-query/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/package.jsonis excluded by!**/*.jsonpackages/runtime/package.jsonis excluded by!**/*.jsonpackages/schema/package.jsonis excluded by!**/*.jsonpackages/sdk/package.jsonis excluded by!**/*.jsonpackages/server/package.jsonis excluded by!**/*.jsonpackages/testtools/package.jsonis excluded by!**/*.jsonpnpm-lock.yamlis excluded by!pnpm-lock.yaml,!**/*.yamltests/integration/test-run/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/nextjs/test-project/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/trpc/test-project/package.jsonis excluded by!**/*.json
Files selected for processing (54)
- .gitattributes (1 hunks)
- CONTRIBUTING.md (1 hunks)
- packages/ide/jetbrains/build.gradle.kts (1 hunks)
- packages/plugins/tanstack-query/src/generator.ts (2 hunks)
- packages/plugins/tanstack-query/src/runtime-v5/react.ts (2 hunks)
- packages/plugins/tanstack-query/src/runtime-v5/svelte.ts (3 hunks)
- packages/plugins/tanstack-query/src/runtime/vue.ts (3 hunks)
- packages/plugins/tanstack-query/tests/plugin.test.ts (9 hunks)
- packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx (2 hunks)
- packages/plugins/tanstack-query/tests/react-hooks.test.tsx (2 hunks)
- packages/runtime/src/constants.ts (1 hunks)
- packages/runtime/src/enhancements/delegate.ts (3 hunks)
- packages/runtime/src/enhancements/policy/constraint-solver.ts (4 hunks)
- packages/runtime/src/enhancements/policy/handler.ts (14 hunks)
- packages/runtime/src/enhancements/policy/policy-utils.ts (22 hunks)
- packages/runtime/src/enhancements/proxy.ts (2 hunks)
- packages/runtime/src/enhancements/types.ts (4 hunks)
- packages/runtime/src/types.ts (2 hunks)
- packages/schema/README.md (1 hunks)
- packages/schema/src/language-server/validator/datamodel-validator.ts (3 hunks)
- packages/schema/src/language-server/validator/expression-validator.ts (5 hunks)
- packages/schema/src/plugins/enhancer/policy/index.ts (1 hunks)
- packages/schema/src/plugins/enhancer/policy/policy-guard-generator.ts (8 hunks)
- packages/schema/src/plugins/enhancer/policy/utils.ts (1 hunks)
- packages/schema/src/plugins/prisma/schema-generator.ts (15 hunks)
- packages/schema/src/plugins/zod/utils/schema-gen.ts (1 hunks)
- packages/schema/src/utils/ast-utils.ts (1 hunks)
- packages/schema/tests/generator/prisma-generator.test.ts (3 hunks)
- packages/schema/tests/schema/validation/attribute-validation.test.ts (1 hunks)
- packages/schema/tests/schema/validation/datamodel-validation.test.ts (1 hunks)
- packages/schema/tests/schema/validation/datasource-validation.test.ts (4 hunks)
- packages/sdk/src/policy.ts (1 hunks)
- packages/sdk/src/typescript-expression-transformer.ts (3 hunks)
- packages/testtools/src/db.ts (1 hunks)
- packages/testtools/src/schema.ts (4 hunks)
- tests/integration/tests/enhancements/with-delegate/enhanced-client.test.ts (7 hunks)
- tests/integration/tests/enhancements/with-delegate/policy-interaction.test.ts (2 hunks)
- tests/integration/tests/enhancements/with-policy/create-many-and-return.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/cross-model-field-comparison.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/field-level-policy.test.ts (2 hunks)
- tests/integration/tests/enhancements/with-policy/fluent-api.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/nested-to-one.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/post-update.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/prisma-omit.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/refactor.test.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/relation-one-to-many-filter.test.ts (2 hunks)
- tests/integration/tests/enhancements/with-policy/relation-one-to-one-filter.test.ts (6 hunks)
- tests/integration/tests/enhancements/with-policy/subscription.test.ts (4 hunks)
- tests/integration/tests/plugins/policy.test.ts (3 hunks)
- tests/integration/tests/plugins/zod.test.ts (2 hunks)
- tests/regression/tests/issue-1014.test.ts (1 hunks)
- tests/regression/tests/issue-1080.test.ts (1 hunks)
- tests/regression/tests/issue-1241.test.ts (1 hunks)
- tests/regression/tests/issue-1271.test.ts (1 hunks)
Files not processed due to max files limit (9)
- tests/regression/tests/issue-1435.test.ts
- tests/regression/tests/issue-1451.test.ts
- tests/regression/tests/issue-1454.test.ts
- tests/regression/tests/issue-1466.test.ts
- tests/regression/tests/issue-1474.test.ts
- tests/regression/tests/issue-1483.test.ts
- tests/regression/tests/issue-1487.test.ts
- tests/regression/tests/issue-961.test.ts
- tests/regression/tests/issues.test.ts
Files not summarized due to errors (1)
- packages/schema/src/plugins/enhancer/policy/policy-guard-generator.ts: Error: Message exceeds token limit
Files skipped from review due to trivial changes (14)
- .gitattributes
- packages/ide/jetbrains/build.gradle.kts
- packages/runtime/src/constants.ts
- packages/schema/tests/generator/prisma-generator.test.ts
- tests/integration/tests/enhancements/with-delegate/enhanced-client.test.ts
- tests/integration/tests/enhancements/with-delegate/policy-interaction.test.ts
- tests/integration/tests/enhancements/with-policy/nested-to-one.test.ts
- tests/integration/tests/enhancements/with-policy/post-update.test.ts
- tests/integration/tests/enhancements/with-policy/prisma-omit.test.ts
- tests/integration/tests/enhancements/with-policy/refactor.test.ts
- tests/integration/tests/enhancements/with-policy/relation-one-to-many-filter.test.ts
- tests/regression/tests/issue-1014.test.ts
- tests/regression/tests/issue-1080.test.ts
- tests/regression/tests/issue-1271.test.ts
Additional context used
LanguageTool
packages/schema/README.md
[uncategorized] ~19-~19: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’). (AUTO_HYPHEN)
Context: ...*.zmodel": "zmodel" }, ``` - Auto formatting - To automatically format on sav...CONTRIBUTING.md
[uncategorized] ~12-~12: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...stcommands. -ZENSTACK_TEST_DB_USER`: The postgres username, for a user with ...
[uncategorized] ~13-~13: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...t:postgres. -ZENSTACK_TEST_DB_PASS: Password for said user. Default: `abc12...
[uncategorized] ~14-~14: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...ult:abc123. -ZENSTACK_TEST_DB_NAME: Default database to connect onto. This ...
[uncategorized] ~15-~15: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...t:postgres. -ZENSTACK_TEST_DB_HOST: Hostname or IP to connect onto. Default...
[uncategorized] ~16-~16: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...:localhost. -ZENSTACK_TEST_DB_PORT: Port number to connect onto. Default: `...
[style] ~68-~68: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE)
Context: ...# Development workflow ZenStack adopts a very simple development workflow: 1. Changes shou...
[uncategorized] ~98-~98: A comma may be missing after the conjunctive/linking adverb ‘Currently’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ... routes in a framework-independent way. Currently supports "rpc" and "rest" styles. 1. F...
Markdownlint
packages/schema/README.md
11-11: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
21-21: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
27-27: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
28-28: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank linesCONTRIBUTING.md
120-120: null (MD034, no-bare-urls)
Bare URL used
Biome
packages/runtime/src/types.ts
[error] 3-3: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 3-3: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 9-9: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 10-10: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 11-11: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 12-12: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 13-13: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 14-14: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 17-17: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 19-19: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 20-20: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 22-22: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 23-23: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 24-24: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 25-25: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 27-27: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 60-60: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
tests/regression/tests/issue-1241.test.ts
[error] 75-75: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
tests/integration/tests/plugins/policy.test.ts
[error] 41-41: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 42-42: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 44-44: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 45-45: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 46-46: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 47-47: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 49-49: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 50-50: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 51-51: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 52-52: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 71-71: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 74-74: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 104-104: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 108-108: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
packages/runtime/src/enhancements/types.ts
[error] 19-19: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 30-30: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/src/runtime-v5/svelte.ts
[error] 76-76: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 147-147: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 163-163: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 176-176: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/src/runtime/vue.ts
[error] 116-116: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 145-145: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 162-162: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 180-180: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/src/runtime-v5/react.ts
[error] 180-180: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 193-193: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/runtime/src/enhancements/policy/constraint-solver.ts
[error] 173-175: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 202-205: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
tests/integration/tests/enhancements/with-policy/fluent-api.test.ts
[error] 145-145: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 257-257: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
tests/integration/tests/enhancements/with-policy/subscription.test.ts
[error] 62-62: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 63-63: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 64-64: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 119-119: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 120-120: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 173-173: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 174-174: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 242-242: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 243-243: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 254-254: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 254-254: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/schema/src/plugins/zod/utils/schema-gen.ts
[error] 31-33: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 242-244: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 276-284: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 278-284: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
packages/schema/src/utils/ast-utils.ts
[error] 129-142: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 157-161: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 159-161: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
packages/runtime/src/enhancements/proxy.ts
[error] 24-24: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 26-26: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 28-28: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 30-30: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 32-32: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 34-34: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 36-36: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 40-40: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 42-42: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 44-44: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 46-46: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 48-48: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 50-50: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 52-52: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 54-54: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 56-56: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 76-76: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/schema/src/language-server/validator/expression-validator.ts
[error] 169-169: Use !== instead of !=.
!= is only allowed when comparing againstnull(lint/suspicious/noDoubleEquals)!= is only allowed when comparing against null
Using != may be unsafe if you are relying on type coercion
Unsafe fix: Use !==
[error] 172-172: Use !== instead of !=.
!= is only allowed when comparing againstnull(lint/suspicious/noDoubleEquals)!= is only allowed when comparing against null
Using != may be unsafe if you are relying on type coercion
Unsafe fix: Use !==
[error] 227-227: Use !== instead of !=.
!= is only allowed when comparing againstnull(lint/suspicious/noDoubleEquals)!= is only allowed when comparing against null
Using != may be unsafe if you are relying on type coercion
Unsafe fix: Use !==packages/testtools/src/schema.ts
[error] 36-36: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 36-36: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 37-37: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 39-39: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 40-40: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 40-40: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 41-41: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 42-42: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 72-74: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 299-299: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 300-300: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 302-302: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 303-303: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 316-316: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/sdk/src/typescript-expression-transformer.ts
[error] 28-30: This constructor is unnecessary. (lint/complexity/noUselessConstructor)
Unsafe fix: Remove the unnecessary constructor.
[error] 46-51: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)
Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.
[error] 123-130: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 127-129: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 282-284: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 297-299: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 311-322: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 317-321: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 336-338: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 427-429: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 442-446: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 444-446: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
packages/schema/src/language-server/validator/datamodel-validator.ts
[error] 286-304: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 317-319: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 326-328: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 397-397: Change to an optional chain. (lint/complexity/useOptionalChain)
Unsafe fix: Change to an optional chain.
[error] 399-401: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
packages/schema/src/plugins/enhancer/policy/utils.ts
[error] 107-111: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 119-119: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 194-196: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 197-199: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 200-221: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 207-211: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 212-221: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 215-221: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 281-283: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
packages/plugins/tanstack-query/tests/react-hooks.test.tsx
[error] 95-95: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 150-150: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 193-193: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 238-238: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 249-249: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 294-294: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 400-400: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 443-443: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 532-532: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 576-576: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 621-621: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 629-629: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx
[error] 95-95: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 150-150: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 193-193: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 236-236: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 277-277: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 290-290: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 331-331: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 481-481: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 524-524: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 611-611: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 656-656: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 664-664: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 700-702: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 714-714: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 734-736: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 748-748: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/plugins/tanstack-query/src/generator.ts
[error] 346-346: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 413-413: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 425-425: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 432-432: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 651-653: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 542-553: This block statement doesn't serve any purpose and can be safely removed. (lint/complexity/noUselessLoneBlockStatements)
Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.
Safe fix: Remove redundant block.
[error] 555-558: This block statement doesn't serve any purpose and can be safely removed. (lint/complexity/noUselessLoneBlockStatements)
Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.
Safe fix: Remove redundant block.packages/schema/src/plugins/enhancer/policy/policy-guard-generator.ts
[error] 726-728: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
packages/schema/src/plugins/prisma/schema-generator.ts
[error] 176-181: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 179-181: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 191-198: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 562-571: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 566-570: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 714-716: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 717-719: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 793-795: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 796-801: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 816-834: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 821-834: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 829-834: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 832-834: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
tests/integration/tests/enhancements/with-policy/field-level-policy.test.ts
[error] 41-41: This variable implicitly has the any type. (lint/suspicious/noImplicitAnyLet)
Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value.
[error] 236-236: This variable implicitly has the any type. (lint/suspicious/noImplicitAnyLet)
Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value.
[error] 337-337: This variable implicitly has the any type. (lint/suspicious/noImplicitAnyLet)
Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value.
[error] 424-424: This variable implicitly has the any type. (lint/suspicious/noImplicitAnyLet)
Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value.
packages/runtime/src/enhancements/delegate.ts
[error] 45-45: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 49-49: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 53-53: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 57-57: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 61-61: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 69-69: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 92-94: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 97-97: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 121-121: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 132-135: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 140-140: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 159-159: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 170-173: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 180-180: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 187-187: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 221-221: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 223-223: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 253-253: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 254-254: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 270-270: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/runtime/src/enhancements/policy/policy-utils.ts
[error] 34-34: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 65-69: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 67-69: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 79-83: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 81-83: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 92-96: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 94-96: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
[error] 105-110: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 116-118: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 142-142: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 143-143: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 157-157: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 162-162: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)
Unsafe fix: Use a literal key instead.
[error] 174-174: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 179-179: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)
Unsafe fix: Use a literal key instead.
[error] 191-191: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 200-200: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)
Unsafe fix: Use a literal key instead.
[error] 265-265: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 378-380: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 388-388: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/runtime/src/enhancements/policy/handler.ts
[error] 36-36: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 37-37: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 56-56: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 82-82: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 97-97: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 114-114: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 118-118: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 124-124: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 129-129: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 129-129: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 139-139: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 139-139: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 163-163: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 207-207: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 216-225: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 230-232: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 237-237: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 249-249: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 339-339: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 381-381: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
Additional comments not posted (36)
packages/schema/src/plugins/enhancer/policy/index.ts (1)
7-7: The refactoring in thegeneratefunction looks clean and well-implemented.packages/testtools/src/db.ts (1)
20-24: Ensure proper error handling for database operations to prevent potential runtime exceptions.+ try { const pool = connect(); await pool.query(`DROP DATABASE IF EXISTS "${db}";`); await pool.query(`CREATE DATABASE "${db}";`); await pool.end(); return `postgresql://${USERNAME}:${PASSWORD}@${HOST}:${PORT}/${db}`; + } catch (error) { + console.error('Database operation failed:', error); + throw error; // rethrow the error after logging + }Also applies to: 28-30
packages/schema/README.md (1)
9-33: The updates to the README provide clear instructions for users. However, consider adjusting the indentation and spacing around fenced code blocks to adhere to markdown best practices.
[REFACTOR_SUGGESTion]- - In case the schema file is not recognized automatically, add the following to your settings.json file: + - In case the schema file is not recognized automatically, add the following to your settings.json file: - - To automatically format on save, add the following to your settings.json file: + - To automatically format on save, add the following to your settings.json file: - - To enable formatting in combination with prettier, add the following to your settings.json file: + - To enable formatting in combination with prettier, add the following to your settings.json file:Tools
LanguageTool
[uncategorized] ~19-~19: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’). (AUTO_HYPHEN)
Context: ...*.zmodel": "zmodel" }, ``` - Auto formatting - To automatically format on sav...Markdownlint
11-11: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
21-21: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
27-27: Expected: 2; Actual: 4 (MD007, ul-indent)
Unordered list indentation
28-28: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank linespackages/sdk/src/policy.ts (1)
5-6: The type definition forPolicyAnalysisResultis well-structured and enhances type safety.packages/runtime/src/types.ts (1)
66-66: RenamedCheckerContexttoPermissionCheckerContextto clarify its usage in permission checking.Verification successful
Renamed
CheckerContexttoPermissionCheckerContextto clarify its usage in permission checking.The integration of
PermissionCheckerContextappears to be consistent across the codebase. The old typeCheckerContextis not found, and the new type is used appropriately.
packages/schema/src/plugins/enhancer/policy/policy-guard-generator.tspackages/runtime/src/types.tspackages/runtime/src/enhancements/types.tsScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify integration of `PermissionCheckerContext` across the codebase. # Test: Search for the old type usage. Expect: No occurrences of the old type. rg --type typescript $'CheckerContext'Length of output: 72
Script:
#!/bin/bash # Description: Verify integration of `PermissionCheckerContext` across the codebase. # Test: Search for the old type usage. Expect: No occurrences of the old type. rg --type ts $'CheckerContext'Length of output: 629
packages/schema/tests/schema/validation/datasource-validation.test.ts (1)
16-18: Updated test case to include a new expected error message for missing fields in datasource configurations.Verification successful
The new error message "datasource must include a 'url' field" is integrated into the codebase in the following locations:
packages/schema/tests/schema/validation/datasource-validation.test.tspackages/schema/src/language-server/validator/datasource-validator.tsScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify integration of the new error message across the codebase. # Test: Search for the new error message usage. Expect: Occurrences in relevant parts of the codebase. rg --type typescript $'datasource must include a "url" field'Length of output: 97
Script:
#!/bin/bash # Description: Verify integration of the new error message across the codebase. # Test: Search for the new error message usage. Expect: Occurrences in relevant parts of the codebase. rg 'datasource must include a "url" field'Length of output: 329
tests/regression/tests/issue-1241.test.ts (1)
41-41: Updated regression test to include a new scenario for issue 1241.tests/integration/tests/enhancements/with-policy/create-many-and-return.test.ts (1)
1-105: Updated integration test to include new scenarios for thecreateManyAndReturnAPI with policy checks.Verification successful
The
createManyAndReturnmethod is used in the following files:
tests/integration/tests/enhancements/with-policy/create-many-and-return.test.tspackages/runtime/src/types.tspackages/runtime/src/enhancements/proxy.tspackages/runtime/src/enhancements/policy/handler.tsThe integration test updates are consistent with the implementation in the runtime files.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify integration of the new scenarios across the codebase. # Test: Search for the new scenarios usage. Expect: Occurrences in relevant parts of the codebase. rg --type typescript $'createManyAndReturn'Length of output: 77
Script:
#!/bin/bash # Description: Verify integration of the new scenarios across the codebase. # Test: Search for the new scenarios usage. Expect: Occurrences in relevant parts of the codebase. rg --type ts 'createManyAndReturn'Length of output: 1717
tests/integration/tests/plugins/policy.test.ts (2)
71-74: Refer to the previous comment about replacing 'Function' with a more specific type.Tools
Biome
[error] 71-71: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 74-74: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
104-109: Refer to the first comment about replacing 'Function' with a more specific type.Tools
Biome
[error] 104-104: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
[error] 108-108: Don't use 'Function' as a type. (lint/complexity/noBannedTypes)
Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.
packages/plugins/tanstack-query/src/runtime/vue.ts (1)
Line range hint
107-123: LGTM! Ensure that the newinitialPageParamis correctly integrated in all relevant calls.Verification successful
Let's correct the file type and re-run the search to verify the integration of the new
initialPageParam.
The search results indicate multiple occurrences of
useInfiniteModelQueryacross various files. To ensure that the newinitialPageParamis correctly integrated, we need to inspect these occurrences more closely.
The search results show multiple occurrences of
useInfiniteModelQueryacross various files, but they do not provide enough context to confirm the integration ofinitialPageParam. We need to inspect the specific lines whereuseInfiniteModelQueryis called to ensure thatinitialPageParamis correctly integrated.
The search results provide more context around the occurrences of
useInfiniteModelQuery. However, they do not conclusively show whetherinitialPageParamis integrated in all relevant calls. To ensure thorough verification, we need to specifically check the function definitions and calls for the presence ofinitialPageParam.
The extended context confirms that the
initialPageParamis integrated into theuseInfiniteModelQueryfunction calls in various files. Specifically, theinitialPageParamis present in theuseInfiniteModelQueryfunction definition inpackages/plugins/tanstack-query/src/runtime/vue.tsand other related files.Here are the key points confirming the integration:
- The
initialPageParamis included in theuseInfiniteModelQueryfunction definition inpackages/plugins/tanstack-query/src/runtime/vue.ts.- The
initialPageParamis used in thequeryOptionsobject within theuseInfiniteModelQueryfunction.Based on this information, the integration of
initialPageParamappears to be correctly implemented.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `useInfiniteModelQuery` include the new `initialPageParam`. # Test: Search for the function usage. Expect: Only occurances of the new signature. rg --type vue $'useInfiniteModelQuery'Length of output: 65
Script:
#!/bin/bash # Description: Verify all function calls to `useInfiniteModelQuery` include the new `initialPageParam`. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg 'useInfiniteModelQuery'Length of output: 1723
Script:
#!/bin/bash # Description: Verify the integration of `initialPageParam` in all `useInfiniteModelQuery` function calls. # Extract lines around each occurrence of `useInfiniteModelQuery` to check for `initialPageParam`. rg 'useInfiniteModelQuery' -A 5 -B 5Length of output: 12633
Script:
#!/bin/bash # Description: Verify the integration of `initialPageParam` in all `useInfiniteModelQuery` function calls. # Extract lines around each occurrence of `useInfiniteModelQuery` to check for `initialPageParam`. rg 'useInfiniteModelQuery' -A 10 -B 10Length of output: 23575
Script:
#!/bin/bash # Description: Verify the integration of `initialPageParam` in all `useInfiniteModelQuery` function calls. # Extract lines around each occurrence of `useInfiniteModelQuery` to check for `initialPageParam`. rg 'useInfiniteModelQuery' -A 20 -B 20Length of output: 43471
packages/plugins/tanstack-query/src/runtime-v5/react.ts (1)
123-131: LGTM! Ensure that the newinitialPageParamis correctly integrated in all relevant calls.packages/runtime/src/enhancements/policy/constraint-solver.ts (1)
Line range hint
7-107: LGTM! The renaming fromCheckerConstrainttoPermissionCheckerConstraintenhances clarity.Verification successful
The renaming from
CheckerConstrainttoPermissionCheckerConstrainthas been applied consistently across the codebase. There are no remaining instances of the old name.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `PermissionCheckerConstraint` are updated. # Test: Search for the old and new names. Expect: Only occurrences of the new name. rg --type ts $'CheckerConstraint|PermissionCheckerConstraint'Length of output: 1844
packages/plugins/tanstack-query/tests/plugin.test.ts (1)
Line range hint
21-35: Ensure that the test cases cover all new functionalities introduced in the plugin.Also applies to: 51-77, 97-97, 119-135, 140-166, 186-186, 208-208, 213-240, 260-260, 282-282
Verification successful
The search results indicate that there are numerous test files in the repository, including the specific file
packages/plugins/tanstack-query/tests/plugin.test.tsmentioned in the review comment. However, to ensure that all new functionalities introduced in the plugin are covered by tests, we need to inspect the contents of these test files, particularly focusing on theplugin.test.tsfile.To proceed, we should extract and review the test cases within
packages/plugins/tanstack-query/tests/plugin.test.tsto verify coverage of new functionalities.
The initial extraction shows that there is a test suite titled "Tanstack Query Plugin Tests" in the
plugin.test.tsfile. However, to ensure comprehensive verification, we need to extract all the test cases within this suite to confirm that all new functionalities are covered.Let's proceed by extracting all the test cases within this suite.
The extraction shows the setup for the "Tanstack Query Plugin Tests" suite but does not include the actual test cases. To verify that all new functionalities are covered, we need to extract the complete content of this test suite.
Let's proceed by extracting the entire content of the
plugin.test.tsfile to ensure we capture all test cases.
The extracted content of
plugin.test.tsshows a comprehensive set of test cases for various functionalities of the Tanstack Query Plugin, including different versions and frameworks (React, Vue, Svelte). The tests cover schema loading, plugin execution, and specific functionalities like infinite queries, mutations, and suspense queries.Based on this detailed inspection, it appears that the test cases do cover the new functionalities introduced in the plugin.
react-query run plugin v4react-query run plugin v5vue-query run plugin v4vue-query run plugin v5svelte-query run plugin v4svelte-query run plugin v5clear outputexisting output as fileThese tests ensure that the plugin works correctly across different versions and frameworks, and they cover various use cases and scenarios.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all new functionalities in the plugin are covered by tests. # Test: Search for test cases covering new functionalities. Expect: Test cases for each functionality. rg --type typescript --files-with-matches $'describe\\('Length of output: 91
Script:
#!/bin/bash # Description: Verify that all new functionalities in the plugin are covered by tests. # Test: Search for test cases covering new functionalities. Expect: Test cases for each functionality. rg --type ts --files-with-matches $'describe\\('Length of output: 7879
Script:
#!/bin/bash # Description: Extract and review test cases within the specified test file to verify coverage of new functionalities. # Extract test cases from the specified test file. rg --type ts --no-filename --line-number --context 5 $'describe\\(' packages/plugins/tanstack-query/tests/plugin.test.tsLength of output: 420
Script:
#!/bin/bash # Description: Extract all test cases within the "Tanstack Query Plugin Tests" suite to verify coverage of new functionalities. # Extract all test cases within the specified test suite. rg --type ts --no-filename --line-number --context 10 $'describe\\(\'Tanstack Query Plugin Tests\'' packages/plugins/tanstack-query/tests/plugin.test.tsLength of output: 578
Script:
#!/bin/bash # Description: Extract the entire content of the specified test file to verify coverage of new functionalities. # Extract the entire content of the specified test file. cat packages/plugins/tanstack-query/tests/plugin.test.tsLength of output: 10982
packages/runtime/src/enhancements/proxy.ts (2)
38-39: AddedcreateManyAndReturnmethod toPrismaProxyHandlerinterface to support returning detailed results from batch create operations.Tools
Biome
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 38-38: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
127-130: Implementation ofcreateManyAndReturninDefaultPrismaProxyHandlercorrectly uses deferred execution, aligning with the class's design pattern.packages/schema/src/language-server/validator/expression-validator.ts (1)
Line range hint
160-196: Refined validation logic for binary expressions to handle comparisons between fields of different models more robustly.packages/testtools/src/schema.ts (1)
Line range hint
301-313: Updated theloadSchemafunction to return additional schema-related information, enhancing its utility in testing scenarios.Tools
Biome
[error] 299-299: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 300-300: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 302-302: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
[error] 303-303: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)
any disables many type checking rules. Its use should be avoided.
packages/schema/src/language-server/validator/datamodel-validator.ts (1)
18-18: Import offindUpInheritancefrom../../utils/ast-utilsadded.This import is necessary for the new functionality introduced in the
isFieldInheritedFromDelegateModelmethod.packages/schema/tests/schema/validation/datamodel-validation.test.ts (1)
91-91: Correct usage ofthisin a collection predicate. Well done!packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx (2)
80-80: TheuseInfiniteModelQueryfunction now includes aninitialPageParamin its options, which aligns with the changes in the function's signature. This is a crucial update for handling pagination more effectively in infinite queries.
13-13: The import ofuseInfiniteModelQueryhas been updated to reflect the new function signature withinitialPageParam. Ensure that all usages of this function in the test file and potentially in other parts of the project are updated to match this new signature.packages/plugins/tanstack-query/src/generator.ts (1)
671-684: The handling of query options for different targets and versions is well-implemented. However, ensure that theinitialPageParamis appropriately managed across all frameworks to maintain consistency.tests/integration/tests/plugins/zod.test.ts (1)
64-64: Addition ofviewMillisecondsfield and its tests are correctly implemented.Also applies to: 192-192, 198-198
tests/integration/tests/enhancements/with-policy/relation-one-to-one-filter.test.ts (3)
176-185: The test case correctly checks that theisNotfilter works as expected by ensuring that no records are returned when the filter condition matches the actual value.
253-268: The nestedisNotfilter test form3withinm2correctly expects a falsy result, which aligns with the expected behavior when the filter condition matches the actual nested value.
286-286: The test case for anullm2correctly expects a falsy result when trying to filter by a non-existent value, which is a good validation of the filter's behavior in edge cases.packages/schema/src/plugins/prisma/schema-generator.ts (2)
Line range hint
103-145: The implementation of thegeneratemethod is robust, handling various scenarios effectively.
Line range hint
319-664: ThegenerateModelmethod and its auxiliary functions are well-implemented, covering a wide range of scenarios for model generation.Tools
Biome
[error] 562-571: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
[error] 566-570: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)
Unsafe fix: Omit the else clause.
packages/runtime/src/enhancements/delegate.ts (3)
1098-1098: Refine theisMergeableObjectfunction to handle special types more explicitly.This change is a good practice to ensure that the merge operation does not unintentionally alter special object types like
DecimalorDate.
1104-1106: Add null checks to improve robustness.Adding null checks before proceeding with operations prevents potential runtime errors and enhances the stability of the code.
1155-1157: Add null checks to improve robustness.Similar to the previous comment, these null checks are crucial for ensuring that the operations do not encounter null values unexpectedly, which can lead to crashes or unintended behavior.
tests/integration/tests/enhancements/with-policy/cross-model-field-comparison.test.ts (3)
3-135: The test case 'to-one relation' is well-structured and covers various policy enforcement scenarios effectively.
136-304: The test case 'nested inside to-one relation' effectively tests policy enforcement in nested scenarios within a one-to-one relationship.
305-479: The test case 'to-many relation' thoroughly tests policy enforcement across a one-to-many relationship with appropriate assertions.packages/runtime/src/enhancements/policy/handler.ts (1)
27-27: Import statement usesanytype. Specify a more precise type for better type safety.- import type { EntityCheckerFunc, PermissionCheckerConstraint } from '../types'; + import type { EntityCheckerFunc, PermissionCheckerConstraint, AnotherSpecificType } from '../types';Likely invalid or redundant comment.
No description provided.