Skip to content

Commit 3a3c448

Browse files
authored
Merge pull request #969 from objectstack-ai/copilot/fix-ci-build-and-test-errors-again
2 parents 21ab578 + e60c344 commit 3a3c448

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Fixed
11+
- **`@objectstack/driver-sql` DTS build failure — knex type resolution** — Fixed a TypeScript
12+
declaration build failure caused by knex v3.2.3 declaring a non-existent `.d.mts` types file
13+
in its package.json `exports` field. With `moduleResolution: "bundler"`, TypeScript could not
14+
resolve knex's type declarations, resulting in TS7016 and TS7006 errors during DTS generation.
15+
Added a `paths` mapping in the driver-sql `tsconfig.json` to direct TypeScript to the correct
16+
`knex/types/index.d.ts` file. This also fixes cascade build failures in all downstream
17+
packages that depend on driver-sql.
1118
- **`SqlDriver.syncSchema()` — physical table name mismatch** — Fixed the root cause of the
1219
`no such table: sys_user` error: `syncSchema()` was ignoring the `object` parameter (physical
1320
table name like `sys_user`) and using `schema.name` (FQN like `sys__user`) for DDL operations.

packages/plugins/driver-sql/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
"skipLibCheck": true,
1212
"noUnusedLocals": false,
1313
"noUnusedParameters": false,
14-
"forceConsistentCasingInFileNames": true
14+
"forceConsistentCasingInFileNames": true,
15+
"paths": {
16+
"knex": ["./node_modules/knex/types/index.d.ts"]
17+
}
1518
},
1619
"include": ["src/**/*"],
1720
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)