Skip to content

fix(types): export type utils for ssr use #1491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 91 commits into
base: rc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
5e1e477
fix: call set auth for realtime on token changes (#1329)
filipecabaco Dec 11, 2024
1c5b626
fix: revert set auth call (#1331)
filipecabaco Dec 11, 2024
f8e48ff
fix: Make the return value of accessToken nullable
dshukertjr Dec 12, 2024
a5dc3b0
fix: bump gotrue version to v2.67.0 (#1333)
kangmingtay Dec 12, 2024
315a420
fix: update auth version to 2.67.1
J0 Dec 13, 2024
322129c
Merge pull request #1337 from supabase/j0/bump_auth_2_67_1
J0 Dec 13, 2024
faa4f77
Merge pull request #1330 from supabase/rc
soedirgo Dec 16, 2024
7a2ba52
fix: update auth-js to v2.67.3 (#1339)
kangmingtay Dec 18, 2024
0f7434a
fix: bump functions-js to 2.4.4
laktek Dec 19, 2024
651ff12
Merge pull request #1342 from supabase/bump-functions-js-244
laktek Dec 19, 2024
e8cffda
fix: :bug: Fix nullish coalescing operator issue in hasCustomAuthoriz…
raghavyuva Dec 23, 2024
d2f0f6c
deps: Bump postgrest-js to 1.17.9 (#1346)
kamilogorek Jan 7, 2025
e50a86e
fix: release postgrest-js 1.17.9
soedirgo Jan 7, 2025
d9756f2
Merge pull request #1347 from supabase/fix/bump-postgrest-js
soedirgo Jan 7, 2025
80d3c76
fix: Bump postgrest-js to 1.17.10
kamilogorek Jan 8, 2025
7ba8408
fix: export PostgrestError as a class
soedirgo Jan 14, 2025
6822cdc
fix: bump postgrest-js to 1.17.11
avallete Jan 15, 2025
1661420
Merge pull request #1355 from supabase/chore/bump-postgrest-js-1-17-11
avallete Jan 15, 2025
a50725d
Merge pull request #1332 from supabase/fix/nullable-accessToken
dshukertjr Jan 16, 2025
76217a4
Merge pull request #1344 from raghavyuva/fix/nullish-coalescing-operator
avallete Jan 17, 2025
4397e57
feat(deps): bump postgrest-js to 1.18.0
avallete Jan 20, 2025
07cf12d
Merge pull request #1358 from supabase/chore/bump-postgrest-js-1-18-0
avallete Jan 20, 2025
da9e26d
fix(types): bump postgrest-js 1.18.1
avallete Jan 24, 2025
3316f24
Merge pull request #1361 from supabase/fix/chore-bump-postgrest-js-1-…
avallete Jan 24, 2025
3f01c3f
fix(deps): upgrade postgrest-js 1.19.2
avallete Feb 24, 2025
a9ece9a
feat: bump `@supabase/auth-js` to 2.68.0 (#1359)
hf Feb 24, 2025
fceca48
Merge pull request #1369 from supabase/avallete/chore-bump-postgrest-…
avallete Feb 24, 2025
a5219a8
chore: add open role to README.md (#1378)
grdsdev Mar 20, 2025
73ab30d
fix: bump auth-js to v2.69.0 (#1380)
kangmingtay Mar 24, 2025
f08bfd9
fix: bump auth-js to 2.69.1 (#1383)
hf Mar 24, 2025
692e8e8
fix(deps): upgrade postgrest-js to 1.19.4
avallete Mar 29, 2025
bb02a15
remove sponsors
kiwicopple Apr 2, 2025
70d7199
Merge pull request #1391 from supabase/kiwicopple-patch-1
mansueli Apr 2, 2025
2e5f26c
chore(wip): upgrade postgrest-js introduce services version options
avallete May 19, 2025
bc4bce1
fix: use URL type for manipulating urls (#1417)
grdsdev May 19, 2025
609dc51
chore: add comment for autocomplete
avallete May 20, 2025
02f2f0b
fix: Bump up realtime-js (#1418)
filipecabaco May 20, 2025
f254773
Revert "fix: Bump up realtime-js (#1418)" (#1424)
grdsdev May 20, 2025
288aff4
fix: preserve path segments in supabaseUrl when constructing endpoint…
etzelc May 21, 2025
ca6c44e
fix: handle ws browser error; add basic browser testing (#1428)
filipecabaco May 23, 2025
3bfd0ff
test: run integration tests in CI (#1430)
grdsdev May 27, 2025
84fd71a
fix: bump up realtime-js (#1433)
filipecabaco May 29, 2025
f44645e
remove deno.json
grdsdev May 29, 2025
d4b854e
merge next into master (#1438)
grdsdev Jun 4, 2025
79b33ea
Next (#1444)
filipecabaco Jun 4, 2025
51a42c2
fix: bump up realtime (#1446)
filipecabaco Jun 4, 2025
217473f
feat: bump auth-js to v2.70.0 (#1449)
hf Jun 5, 2025
146c822
fix: add @solana/wallet-standard-features as dev dependency (#1454)
grdsdev Jun 6, 2025
a7fe11a
chore: remove hiring link from README.md (#1458)
grdsdev Jun 12, 2025
d38413b
test(deno): add integration tests for deno (#1455)
grdsdev Jun 16, 2025
0e55cbc
test: add integration tests for next js (#1459)
grdsdev Jun 23, 2025
b393d68
test: add Expo compatibility CI job (#1432)
grdsdev Jun 23, 2025
008063e
fix: bump realtime-js to 2.11.13 (#1467)
grdsdev Jun 24, 2025
13239a4
fix: bump realtime-js to 2.11.15 (#1468)
grdsdev Jun 25, 2025
c131801
ci: improve workflow performance and reliability (#1469)
grdsdev Jun 26, 2025
e6bc2ae
test: add browser test to check websocket constructor (#1471)
georgRusanov Jun 30, 2025
a8ca670
fix: bump functions-js to 2.4.5
laktek Jul 2, 2025
6fbcfca
Merge pull request #1476 from supabase/bump-functions-js-245
laktek Jul 2, 2025
942ab4f
chore: sync types
avallete Jul 4, 2025
03dd288
chore(deps): upgrade postgrest-js to 1.21.0
avallete Jul 7, 2025
a9443a1
chore: add tests
avallete Jul 7, 2025
532121e
chore: fix tests
avallete Jul 7, 2025
b2c976b
Merge branch 'master' into chore/upgrade-postgrest-js-deps
avallete Jul 7, 2025
6767f4c
chore(deps): upgrade postgrest-js 1.21.0
avallete Jul 7, 2025
59abc2f
chore: fix tests
avallete Jul 7, 2025
a8b0d01
chore: upgrade deno deps
avallete Jul 7, 2025
b76bd41
chore: attempt deno fix
avallete Jul 7, 2025
62ee92a
test: add bun test (#1478)
georgRusanov Jul 8, 2025
3134467
Merge branch 'master' into chore/upgrade-postgrest-js-deps
avallete Jul 8, 2025
7859044
chore: update
avallete Jul 8, 2025
c7ee99e
chore: update lockfiles
avallete Jul 8, 2025
5275621
chore: update sha
avallete Jul 8, 2025
8780543
chore: fix expo package-lock
avallete Jul 8, 2025
d4f1cf8
chore: nuke and reinstall
avallete Jul 8, 2025
a4ec228
Merge pull request #1416 from supabase/chore/upgrade-postgrest-js-deps
avallete Jul 8, 2025
4316f7f
fix(deps): upgrade postgrest-js to 1.21.0
avallete Jul 9, 2025
4505a9b
Merge pull request #1480 from supabase/chore/upgrade-postgrest-js-deps
avallete Jul 9, 2025
dc9067b
fix(types): restore explicit return type
avallete Jul 9, 2025
7cc57c7
fix(deps): package-lock
avallete Jul 9, 2025
1cb2e82
fix: packages-lock
avallete Jul 9, 2025
1f65b59
chore: run pnpm install for updating lock file
grdsdev Jul 9, 2025
a82582d
Merge pull request #1481 from supabase/chore/upgrade-postgrest-js-deps
avallete Jul 9, 2025
6a44f79
chore: remove integration tests package-lock.json files (#1484) (#1485)
filipecabaco Jul 10, 2025
8a5a02a
fix: setAuth ran automatically for realtime; prioritize setAuth tasks…
filipecabaco Jul 10, 2025
9890097
verify jsr packaging rules (#1486)
filipecabaco Jul 10, 2025
0f65701
fix: trigger release next version (#1487)
filipecabaco Jul 10, 2025
d63063e
fix(types): export utils types for ssr uses
avallete Jul 10, 2025
4928724
fix(types): export CreateClientHelper and GenericSupabaseClient types
avallete Jul 10, 2025
9c51cee
test: add type testing for ssr package in next
avallete Jul 10, 2025
21e55ed
chore: skip ssr types testing until new release
avallete Jul 11, 2025
5ce8a59
chore: add some more tests
avallete Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
326 changes: 313 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,332 @@ on:
- '**/*.md'
- '.prettierrc'
- '**/*ignore'
workflow_call:

env:
NODE_VERSION: '20'

jobs:
build-package:
name: Build supabase-js package
runs-on: ubuntu-latest
outputs:
tgz-name: ${{ steps.pack.outputs.filename }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies and build
run: |
npm ci
npm run build
npm run build:umd

- name: Pack npm module
id: pack
run: |
PKG=$(npm pack)
echo "filename=$PKG" >> "$GITHUB_OUTPUT"

- name: Upload .tgz package
uses: actions/upload-artifact@v4
with:
name: supabase-tgz
path: ${{ steps.pack.outputs.filename }}

- name: Upload UMD build
uses: actions/upload-artifact@v4
with:
name: supabase-umd
path: dist/umd/supabase.js

test:
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }}
name: Unit + Type Check / Node.js ${{ matrix.node }} / OS ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: ['20']

runs-on: ${{ matrix.os }}

node: [20]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Run tests
run: |
npm clean-install
npm run test:coverage
- name: Install dependencies
run: npm ci

- name: Check JSR
run: npm run check:jsr

- name: Type Check
run: npm run test:types

- name: Run Unit Tests + Coverage
run: npm run test:coverage

- name: Upload coverage results to Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info

deno-tests:
name: Deno Tests / ${{ matrix.deno }}
runs-on: ubuntu-latest
needs: build-package
strategy:
matrix:
deno: ['1.x', '2.x']
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno }}

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: supabase-tgz
path: ./supabase-pkg

- name: Start Supabase
run: supabase start

- name: Install dependencies and build
run: |
npm ci
npm run build

- name: Run Deno Tests
run: |
cd test/deno
cp ../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz .
npm install
npm test || npm test

- name: Run integration and browser tests on Deno 2.x only
if: ${{ matrix.deno == '2.x' }}
run: npm run test:integration:browser

- name: Stop Supabase
if: always()
run: supabase stop

node-integration:
name: Node Integration
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Start Supabase
run: supabase start

- name: Install dependencies and build
run: |
npm ci
npm run build

- name: Run integration tests
run: npm run test:integration || npm run test:integration

- name: Stop Supabase
if: always()
run: supabase stop

next-integration:
name: Next.js Integration
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: supabase-tgz
path: ./supabase-pkg

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Start Supabase
run: supabase start

- name: Install Playwright browsers and dependencies
run: npx playwright install --with-deps

- name: Run integration tests
run: |
cd test/integration/next
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz .
npm install --legacy-peer-deps
npx playwright install
npm run test

- name: Stop Supabase
if: always()
run: supabase stop

expo-tests:
name: Expo Tests
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: supabase-tgz
path: ./supabase-pkg

- name: Start Supabase
run: supabase start

- name: Install dependencies and run tests
run: |
cd test/integration/expo
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz .
npm install
npm test || npm test

- name: Stop Supabase
if: always()
run: supabase stop

bun-integration:
name: Bun Integration
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: supabase-tgz
path: ./supabase-pkg

- name: Start Supabase
run: supabase start

- name: Install dependencies and run tests
run: |
cd test/integration/bun
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz .
bun install
bun test

- name: Stop Supabase
if: always()
run: supabase stop

websocket-browser-tests:
name: WebSocket Browser Tests
runs-on: ubuntu-latest
needs: build-package
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: supabase-umd
path: ./dist/umd

- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest

- name: Install Playwright browsers and dependencies
run: npx playwright install --with-deps

- name: Start Supabase
run: supabase start

- name: Run WebSocket tests
run: |
cd test/integration/node-browser
npm install
cp ../../../dist/umd/supabase.js .
npm run test

- name: Stop Supabase
if: always()
run: supabase stop
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ on:
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/ci.yml

release:
name: Release / Node ${{ matrix.node }}
needs: test
strategy:
matrix:
node: ['20']
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ dist
.tern-port

docs/v2

.cursor/
Loading