Fix supabase test imports to use TypeScript source files for bun execution#7834
Fix supabase test imports to use TypeScript source files for bun execution#7834Copilot wants to merge 5 commits intofeature/supabase-ts-testfrom
Conversation
Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot fix the ci |
Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Fixed the CI failures in commit 8b5e961. The issue was that my previous commit incorrectly changed storage plugin imports from The fix reverts those imports back to use compiled CI should now pass. |
|
@copilot ci still broken. Ensure the supabase tests work. Check the ci scripts to learn how they are run. |
Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Fixed in commit 5376d88. The issue was that the supabase test runs directly as TypeScript with bun (not transpiled), so it needs The supabase test is unique - it's the only replication test that runs TypeScript directly: # Supabase (direct .ts)
bun run mocha ./test/replication-supabase.test.ts
# Other tests (transpiled)
npm run transpile && mocha ./test_tmp/replication-*.test.jsAll imports are now correctly using |
Summary
Fixed CI failures caused by incorrect import paths in the supabase replication test file.
Root Cause
The supabase test runs directly as TypeScript using bun (
bun run mocha ./test/replication-supabase.test.ts), unlike other replication tests which are transpiled first. This unique execution model requires importing from TypeScript source files (.tsinsrc/), not compiled modules (.mjsinplugins/).Changes Made
test/replication-supabase.test.ts: Fixed all imports to use
.tspaths from../src/directory../plugins/core/index.mjs→../src/index.ts../plugins/utils/index.mjs→../src/plugins/utils/index.ts../plugins/test-utils/index.mjs→../src/plugins/test-utils/index.ts../plugins/dev-mode/index.mjs→../src/plugins/dev-mode/index.ts../plugins/replication-supabase/index.mjs→../src/plugins/replication-supabase/index.tstest/unit/config.ts: Fixed test-utils import path
../../src/plugins/test-utils/index.ts→../../plugins/test-utils/index.mjs.mjsfrom../../plugins/(they were already correct)Key Difference
Supabase test (runs directly with bun):
→ Must import from
../src/*.ts(TypeScript sources)Other replication tests (transpiled first):
→ Must import from
../plugins/*.mjs(compiled modules)The supabase test is the only replication test that runs TypeScript directly without transpilation, requiring a different import pattern than other test files.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.