-
-
Notifications
You must be signed in to change notification settings - Fork 11
merge dev to main (v3.0.0-alpha.25) #174
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
Changes from all commits
b2ee223
edb0255
904a8aa
1ac89c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "extends": "@zenstackhq/typescript-config/base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist" | ||
| "baseUrl": "." | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "extends": "@zenstackhq/typescript-config/base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist" | ||
| "baseUrl": "." | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "extends": "@zenstackhq/typescript-config/base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist" | ||
| "baseUrl": "." | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "extends": "@zenstackhq/typescript-config/base.json", | ||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||
| "outDir": "dist" | ||||||||||||||||||||||||||
| "baseUrl": "." | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| "include": ["src/**/*", "test/**/*"] | ||||||||||||||||||||||||||
| "include": ["src/**/*"] | ||||||||||||||||||||||||||
|
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainbaseUrl addition is fine; consider explicitly excluding build and tests The narrowed include to src only is good for package builds. As a small hardening, you can explicitly exclude typical folders to avoid accidental type-checking if files land there in the future. Apply this diff: {
"extends": "@zenstackhq/typescript-config/base.json",
"compilerOptions": {
"baseUrl": "."
},
- "include": ["src/**/*"]
+ "include": ["src/**/*"],
+ "exclude": ["dist", "build", "coverage", "node_modules", "test", "tests"]
}Also ensure your test runner uses its own tsconfig if test files relied on the package tsconfig previously. Run to confirm tests have an explicit tsconfig or separate config: 🏁 Script executed: #!/bin/bash
# Look for a test-specific tsconfig under this package or repo-level config used by tests.
fd -a -i --type f '^tsconfig\.(test|spec)\.json$' | sed 's/^/found: /'
rg -n -C2 -g '!**/node_modules/**' -P '(vitest|jest).*config' Length of output: 6318 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- packages/dialects/sql.js/tsconfig.json ----"
sed -n '1,200p' packages/dialects/sql.js/tsconfig.json || echo "missing"
echo
echo "---- packages/dialects/sql.js/vitest.config.ts ----"
sed -n '1,200p' packages/dialects/sql.js/vitest.config.ts || echo "missing"
echo
echo "---- packages/vitest-config/base.config.js ----"
sed -n '1,200p' packages/vitest-config/base.config.js || echo "missing"
echo
echo "---- search for tsconfig.* in that package ----"
rg -n --hidden -g '!**/node_modules/**' 'tsconfig' packages/dialects/sql.js -S || true
echo
echo "---- all tsconfig.test/spec files in repo ----"
fd -a -i --type f '^tsconfig\.(test|spec)\.json$' | sed 's/^/found: /' || trueLength of output: 1534 baseUrl addition is fine; add explicit excludes and confirm test tsconfig Short check: packages/dialects/sql.js/tsconfig.json currently limits "include" to "src//*", and the package's Vitest config merges the workspace base (which includes '/*.test.ts'). There is no package-level tsconfig.test.json (only found packages/runtime/tsconfig.test.json), so tests in this package will still pick up the package tsconfig unless you add a test-specific tsconfig. Files to update / inspect:
Apply this diff: {
"extends": "@zenstackhq/typescript-config/base.json",
"compilerOptions": {
"baseUrl": "."
},
- "include": ["src/**/*"]
+ "include": ["src/**/*"],
+ "exclude": ["dist", "build", "coverage", "node_modules", "test", "tests"]
}Note: excluding "test" / "tests" won't remove test files that live under src (src/**/*.test.ts). If you need that, create a package-level tsconfig.test.json or point Vitest to a different tsconfig. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "extends": "@zenstackhq/typescript-config/base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist" | ||
| "baseUrl": "." | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import type { ValidationAcceptor } from 'langium'; | ||
| import type { TypeDef, TypeDefField } from '../generated/ast'; | ||
| import type { DataField, TypeDef } from '../generated/ast'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainImport switch to DataField is correct and consistent with generated AST Matches the generated AST where DataField can be contained by TypeDef. Good alignment with the model changes. Run this to confirm there are no straggling TypeDefField references and that TypeDef.fields is typed to DataField: 🏁 Script executed: #!/bin/bash
set -e
# 1) Ensure no residual TypeDefField usages remain
rg -nP --type=ts -C2 '\bTypeDefField\b' || echo "OK: No TypeDefField references found."
# 2) Inspect TypeDef.fields type in the generated AST
# Expectation: fields: Array<DataField>
rg -nPU --type=ts -C3 '(?s)^\s*export\s+interface\s+TypeDef\b.*?^\s*fields\s*:\s*Array<[^>]+>' packages/language/src/generated/ast.ts || \
rg -nPU --type=ts -C3 '(?s)^\s*export\s+interface\s+TypeDef\b.*?^\s*fields\s*:\s*Array<[^>]+>' Length of output: 1240 Import to DataField is correct — one leftover 'TypeDefField' reference must be fixed TypeDef.fields is already typed to Array in the generated AST, but there is at least one remaining reference to "TypeDefField" that should be updated. Files to fix:
🤖 Prompt for AI Agents |
||
| import { validateAttributeApplication } from './attribute-application-validator'; | ||
| import { validateDuplicatedDeclarations, type AstValidator } from './common'; | ||
|
|
||
|
|
@@ -21,7 +21,7 @@ export default class TypeDefValidator implements AstValidator<TypeDef> { | |
| typeDef.fields.forEach((field) => this.validateField(field, accept)); | ||
| } | ||
|
|
||
| private validateField(field: TypeDefField, accept: ValidationAcceptor): void { | ||
| private validateField(field: DataField, accept: ValidationAcceptor): void { | ||
| field.attributes.forEach((attr) => validateAttributeApplication(attr, accept)); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "extends": "@zenstackhq/typescript-config/base.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist" | ||
| "baseUrl": "." | ||
| }, | ||
| "include": ["src/**/*.ts"] | ||
| } |
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.
💡 Verification agent
🧩 Analysis chain
Resolve subcommand wiring LGTM; confirm whether both flags can be used together
The action accepts either or both of --applied and --rolled-back. Prisma typically allows multiple resolve operations in one call, but please confirm this is intended and supported to avoid surprising UX; otherwise, consider marking the options as conflicting in Commander.
🌐 Web query:
💡 Result:
Short answer: No — you cannot use both at the same time. prisma migrate resolve requires you to specify either --applied or --rolled-back (they are mutually exclusive). (prisma.io)
Citations:
🏁 Script executed:
Length of output: 987
Make --applied and --rolled-back mutually exclusive (fix required)
Prisma's CLI does not allow using both flags at once for
migrate resolve— the command requires either --applied or --rolled-back, not both (prisma docs). Prevent both being selected in our CLI to avoid runtime errors.Suggested minimal change:
🤖 Prompt for AI Agents