Skip to content

fix(driver-sql): add vitest.config.ts to resolve @objectstack/spec subpath imports - #1231

Merged
hotlong merged 1 commit into
mainfrom
copilot/fix-ci-test-errors
May 7, 2026
Merged

fix(driver-sql): add vitest.config.ts to resolve @objectstack/spec subpath imports#1231
hotlong merged 1 commit into
mainfrom
copilot/fix-ci-test-errors

Conversation

CopilotAI commented May 7, 2026

Copy link
Copy Markdown
Contributor

@objectstack/driver-sql#test fails in CI with ERR_MODULE_NOT_FOUND: Cannot find package '@objectstack/spec/system' — all 81 tests fail before executing.

The package exports in @objectstack/spec point to ./dist/ artifacts, but vitest needs source-level resolution. Other packages (e.g. plugin-hono-server) already solve this with a vitest.config.ts that aliases subpath exports to source entry points. driver-sql was missing this config.

  • Added packages/plugins/driver-sql/vitest.config.ts with resolve aliases for @objectstack/spec, @objectstack/spec/data, @objectstack/spec/contracts, @objectstack/spec/system
resolve: {alias: {'@objectstack/spec/contracts': path.resolve(__dirname,'../../spec/src/contracts/index.ts'),'@objectstack/spec/data': path.resolve(__dirname,'../../spec/src/data/index.ts'),'@objectstack/spec/system': path.resolve(__dirname,'../../spec/src/system/index.ts'),'@objectstack/spec': path.resolve(__dirname,'../../spec/src/index.ts'),},},

@vercel

vercelBot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
objectstack-cloudBuildingBuildingPreview, CommentMay 7, 2026 6:25am
objectstack-objectosBuildingBuildingPreview, CommentMay 7, 2026 6:25am
specBuildingBuildingPreview, CommentMay 7, 2026 6:25am

Request Review

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong