Skip to content

fix(postgrest): narrow tstyche testFileMatch to only type test files#2193

Merged
mandarini merged 4 commits intomasterfrom
fix/test-config
Mar 26, 2026
Merged

fix(postgrest): narrow tstyche testFileMatch to only type test files#2193
mandarini merged 4 commits intomasterfrom
fix/test-config

Conversation

@mandarini
Copy link
Copy Markdown
Contributor

@mandarini mandarini commented Mar 26, 2026

PR #2183 broke CI in three ways. This fixes all of them.

Fix 1: tstyche picking up jest test files (postgrest-js)

tstyche.config.json had testFileMatch set to ["./test/**/*.test.ts", "./test/**/*.test-d.ts"], which caused tstyche to pick up regular jest test files in addition to the intended type-level test files (.test-d.ts).

This was dormant until the flatted 3.3.3 to 3.4.2 bump, which shipped typescript@^5.9.3 as a devDependency, signaling that TypeScript 5.9 was released and making tstyche's --target latest in CI resolve to it. TypeScript 5.9 is stricter about global type resolution, so the jest test files now fail under tstyche because tsconfig.tstyche.json has no @types/jest or @types/node.

The fix removes ./test/**/*.test.ts from testFileMatch. Jest tests are not tstyche type tests and should never have been included.

Fix 2: Deno browser test failing to find puppeteer (supabase-js)

The CI workflow uses deno-version: 2.x, which always installs the latest Deno 2.x release. A new Deno 2.x version (2.7.8) shipped around the same time as the flatted bump and changed how it resolves npm packages: it no longer traverses up to the workspace root to find hoisted packages, and instead requires a local node_modules/.

The fix uses --node-modules-dir=manual, which tells Deno to read existing node_modules/ directories (traversing up to the workspace root where puppeteer lives) without creating or modifying anything. This avoids the node_modules/.deno/ pollution that --node-modules-dir=auto caused, which was breaking Nx's project graph builder.

The puppeteer import in the test is also updated from 24.9.0 to 24.19.0 to match the version installed in the workspace, so the Chrome version pre-installed by the workflow matches what the test expects.

Fix 3: supabase binary not found in the browser test beforeAll (supabase-js)

new Deno.Command('supabase', ...) in the test's beforeAll fails because Deno does not add node_modules/.bin to PATH when spawning subprocesses. The call is redundant in CI since supabase is already started by the setup step, but is useful for local development.

The fix wraps it in a try/catch using npx supabase so it works locally and fails silently in CI where supabase is already running.

@mandarini mandarini requested review from a team as code owners March 26, 2026 08:32
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 26, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2193

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2193

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2193

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2193

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2193

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2193

commit: 4b2cdd3

@mandarini mandarini changed the title fix(misc): update tstyche config fix(postgrest): update tstyche config Mar 26, 2026
@mandarini mandarini changed the title fix(postgrest): update tstyche config fix(postgrest): narrow tstyche testFileMatch to only type test files Mar 26, 2026
@mandarini mandarini self-assigned this Mar 26, 2026
@mandarini mandarini requested a review from avallete March 26, 2026 08:42
grdsdev
grdsdev previously approved these changes Mar 26, 2026
@mandarini mandarini merged commit 9f487bd into master Mar 26, 2026
24 checks passed
@mandarini mandarini deleted the fix/test-config branch March 26, 2026 10:17
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