Skip to content

Conversation

mandarini
Copy link
Contributor

@mandarini mandarini commented Oct 15, 2025

What Changed

TypeScript Project References

  • Add composite: true and declaration: true to tsconfig.base.json for incremental builds
  • Configure project references in root tsconfig.json to link all packages
  • Update core packages (auth-js, realtime-js, postgrest-js, functions-js, storage-js) to:
    • Override moduleResolution: "Node" for CommonJS compatibility
    • Override isolatedModules: false to avoid requiring export type for type re-exports
    • Override noImplicitOverride: false for existing code compatibility
    • Add project references pointing to dependencies (managed by nx sync)

Nx Local Caching

  • Enable caching for all build targets (build, build:main, build:module, build:umd, webpack:build)
  • Enable caching for all test targets (test, test:unit, test:coverage, test:integration, test:ci, vite:test)
  • Enable caching for code quality targets (lint, format, typecheck)
  • Enable caching for documentation targets (docs, docs:json)
  • Configure proper output paths for cache restoration:
    • Build outputs: {projectRoot}/dist, .tsbuildinfo files
    • Test outputs: {projectRoot}/coverage
    • Docs outputs: {projectRoot}/docs

PostgreSQL Docker Image Optimization

  • Replace supabase/postgres:15.1.0.37 (1.184GB) with postgis/postgis:15-3.4-alpine (~300MB) for postgrest-js tests
    • 74% size reduction eliminates CI timeout failures caused by slow Docker image downloads
    • Audited test database schema and confirmed only PostGIS extension is needed (for .geojson() test with geometry columns)
    • The Supabase Postgres image includes 20+ extensions (pgsodium, pgvector, pg_graphql, etc.) that are not tested by postgrest-js
    • PostgREST is an open-source project independent of Supabase - tests only require standard PostgreSQL 15 + PostGIS
    • Added compute_query_id=on configuration to maintain PostgreSQL EXPLAIN test compatibility
    • Updated test snapshots to reflect minor differences in PostgreSQL default settings between images

Breaking Changes

None - This is purely a build optimization:

  • No changes to public APIs
  • No changes to build outputs
  • No changes to package.json dependencies
  • Fully backward compatible

@mandarini mandarini requested review from a team as code owners October 15, 2025 18:15
@mandarini mandarini marked this pull request as draft October 15, 2025 18:15
@mandarini mandarini added the do-not-merge Do not merge this PR. label Oct 15, 2025
@mandarini mandarini self-assigned this Oct 15, 2025
@mandarini mandarini force-pushed the chore/ts-project-refs branch 5 times, most recently from 36ec153 to d165d3c Compare October 16, 2025 09:34
@coveralls
Copy link

coveralls commented Oct 16, 2025

Coverage Status

coverage: 95.455% (+12.8%) from 82.663%
when pulling 821753d on chore/ts-project-refs
into 698c306 on master.

@mandarini mandarini marked this pull request as ready for review October 16, 2025 09:58
@mandarini mandarini removed the do-not-merge Do not merge this PR. label Oct 16, 2025
@mandarini mandarini enabled auto-merge (squash) October 16, 2025 10:04
Copy link

pkg-pr-new bot commented Oct 16, 2025

Open in StackBlitz

@supabase/auth-js

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

@supabase/functions-js

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

@supabase/postgrest-js

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

@supabase/realtime-js

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

@supabase/storage-js

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

@supabase/supabase-js

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

commit: 821753d

@mandarini mandarini force-pushed the chore/ts-project-refs branch 6 times, most recently from d646ecd to fe2156b Compare October 16, 2025 13:42
@mandarini mandarini disabled auto-merge October 16, 2025 15:05
@mandarini mandarini force-pushed the chore/ts-project-refs branch from 78fd6ad to 821753d Compare October 16, 2025 17:28
@mandarini mandarini requested a review from grdsdev October 16, 2025 17:32
@mandarini mandarini requested a review from avallete October 16, 2025 18:04
@mandarini mandarini enabled auto-merge (squash) October 16, 2025 18:09
@mandarini mandarini merged commit 6da4417 into master Oct 16, 2025
29 checks passed
@mandarini mandarini deleted the chore/ts-project-refs branch October 16, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants