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

Copilot AI 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

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
objectstack-cloud Building Building Preview, Comment May 7, 2026 6:25am
objectstack-objectos Building Building Preview, Comment May 7, 2026 6:25am
spec Building Building Preview, Comment May 7, 2026 6:25am

Request Review

@hotlong
hotlong marked this pull request as ready for review May 7, 2026 06:25
@hotlong
hotlong merged commit d550069 into main May 7, 2026
1 of 4 checks passed
Sign up for free to 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