fix(postgrest): narrow tstyche testFileMatch to only type test files#2193
Merged
fix(postgrest): narrow tstyche testFileMatch to only type test files#2193
Conversation
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
73912c1 to
9a334a0
Compare
grdsdev
previously approved these changes
Mar 26, 2026
5ce119d to
4b2cdd3
Compare
grdsdev
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #2183 broke CI in three ways. This fixes all of them.
Fix 1: tstyche picking up jest test files (postgrest-js)
tstyche.config.jsonhadtestFileMatchset 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
flatted3.3.3 to 3.4.2 bump, which shippedtypescript@^5.9.3as a devDependency, signaling that TypeScript 5.9 was released and making tstyche's--target latestin CI resolve to it. TypeScript 5.9 is stricter about global type resolution, so the jest test files now fail under tstyche becausetsconfig.tstyche.jsonhas no@types/jestor@types/node.The fix removes
./test/**/*.test.tsfromtestFileMatch. 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 localnode_modules/.The fix uses
--node-modules-dir=manual, which tells Deno to read existingnode_modules/directories (traversing up to the workspace root where puppeteer lives) without creating or modifying anything. This avoids thenode_modules/.deno/pollution that--node-modules-dir=autocaused, which was breaking Nx's project graph builder.The puppeteer import in the test is also updated from
24.9.0to24.19.0to 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'sbeforeAllfails because Deno does not addnode_modules/.binto 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 supabaseso it works locally and fails silently in CI where supabase is already running.