Skip to content

Commit 1227923

Browse files
authored
Merge pull request #1285 from supabase/feat/postgrest-js-1.17.0-rc.1
feat: postgrest-js 1.17.0-rc.1
2 parents 9ff1b61 + 59d1898 commit 1227923

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+4182
-60021
lines changed

.github/workflows/ci.yml

+26-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '**/*.md'
8+
- '.prettierrc'
9+
- '**/*ignore'
10+
push:
11+
branches:
12+
- master
13+
- next
14+
- rc
15+
paths-ignore:
16+
- 'docs/**'
17+
- '**/*.md'
18+
- '.prettierrc'
19+
- '**/*ignore'
420

521
jobs:
622
test:
723
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }}
824
strategy:
925
matrix:
1026
os: [ubuntu-latest]
11-
node: ['14']
27+
node: ['20']
1228

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

1531
steps:
16-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v4
1733

1834
- name: Set up Node
19-
uses: actions/setup-node@v2
35+
uses: actions/setup-node@v4
2036
with:
2137
node-version: ${{ matrix.node }}
2238

2339
- name: Run tests
2440
run: |
25-
npm ci
26-
npm t
41+
npm clean-install
42+
npm run test:coverage
2743
28-
- name: Test & publish code coverage
29-
uses: paambaati/codeclimate-action@v3.0.0
30-
env:
31-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
44+
- name: Upload coverage results to Coveralls
45+
uses: coverallsapp/github-action@master
3246
with:
33-
coverageCommand: yarn run coverage
34-
coverageLocations: |
35-
${{github.workspace}}/test/coverage/lcov.info:lcov
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
path-to-lcov: ./test/coverage/lcov.info

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest]
15-
node: ['14']
15+
node: ['20']
1616

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

.github/workflows/release.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,30 @@ jobs:
1313
name: Release / Node ${{ matrix.node }}
1414
strategy:
1515
matrix:
16-
node: ['14']
16+
node: ['20']
1717

1818
runs-on: ubuntu-latest
1919

20+
permissions:
21+
contents: write
22+
issues: write
23+
id-token: write
24+
2025
steps:
21-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2227

2328
- name: Set up Node
24-
uses: actions/setup-node@v2
29+
uses: actions/setup-node@v4
2530
with:
2631
node-version: ${{ matrix.node }}
2732

2833
- run: |
2934
npm ci
3035
npm run build
3136
32-
- name: Create a release
33-
run: npx semantic-release@^18.0.0
37+
- uses: cycjimmy/semantic-release-action@v4
38+
with:
39+
semantic_version: 19
3440
env:
3541
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
3642
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ yarn.lock
1616
src
1717
test
1818
examples
19-
example
2019
example-next-js
2120
umd_temp
2221
CHANGELOG.md

.releaserc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"addReleases": false
3131
}
3232
],
33-
"@semantic-release/npm"
33+
"@semantic-release/npm",
34+
"@sebbo2002/semantic-release-jsr"
3435
]
3536
}

README.md

+22-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# `supabase-js`
1+
# `supabase-js` - Isomorphic JavaScript Client for Supabase.
22

3-
An isomorphic JavaScript client for Supabase.
4-
5-
- **Documentation:** https://supabase.com/docs/client/supabase-client
6-
- TypeDoc: https://supabase.github.io/supabase-js
3+
- **Documentation:** https://supabase.com/docs/reference/javascript/start
4+
- TypeDoc: https://supabase.github.io/supabase-js/v2/
75

86
## Usage
97

@@ -24,16 +22,16 @@ const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key
2422

2523
### UMD
2624

27-
You can now use plain `<script>`s to import supabase-js from CDNs, like:
25+
You can use plain `<script>`s to import supabase-js from CDNs, like:
2826

2927
```html
30-
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>
28+
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
3129
```
3230

3331
or even:
3432

3533
```html
36-
<script src="https://unpkg.com/@supabase/supabase-js"></script>
34+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
3735
```
3836

3937
Then you can use it from a global `supabase` variable:
@@ -50,7 +48,7 @@ Then you can use it from a global `supabase` variable:
5048

5149
### ESM
5250

53-
You can now use type="module" `<script>`s to import supabase-js from CDNs, like:
51+
You can use `<script type="module">` to import supabase-js from CDNs, like:
5452

5553
```html
5654
<script type="module">
@@ -62,6 +60,14 @@ You can now use type="module" `<script>`s to import supabase-js from CDNs, like:
6260
</script>
6361
```
6462

63+
### Deno
64+
65+
You can use supabase-js in the Deno runtime via [JSR](https://jsr.io/@supabase/supabase-js):
66+
67+
```js
68+
import { createClient } from 'jsr:@supabase/supabase-js@2'
69+
```
70+
6571
### Custom `fetch` implementation
6672

6773
`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
@@ -71,7 +77,9 @@ import { createClient } from '@supabase/supabase-js'
7177

7278
// Provide a custom `fetch` implementation as an option
7379
const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {
74-
fetch: (...args) => fetch(...args),
80+
global: {
81+
fetch: (...args) => fetch(...args),
82+
},
7583
})
7684
```
7785

@@ -80,3 +88,7 @@ const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key
8088
We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.
8189

8290
[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)
91+
92+
## Badges
93+
94+
[![Coverage Status](https://coveralls.io/repos/github/supabase/supabase-js/badge.svg?branch=master)](https://coveralls.io/github/supabase/supabase-js?branch=master)

docs/v1/.gitkeep

Whitespace-only changes.

docs/v1/modules/lib_types.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ <h5>
325325
</h5>
326326
<div class="tsd-comment tsd-typography">
327327
<div class="lead">
328-
<p>Automatically refreshes the token for logged in users.</p>
328+
<p>Automatically refreshes the token for logged in users. Defaults to <code>true</code>.</p>
329329
</div>
330330
</div>
331331
</li>
@@ -359,7 +359,7 @@ <h5>
359359
</h5>
360360
<div class="tsd-comment tsd-typography">
361361
<div class="lead">
362-
<p>Detect a session from the URL. Used for OAuth login callbacks.</p>
362+
<p>Detect a session from the URL. Used for OAuth login callbacks. Defaults to <code>true</code>.</p>
363363
</div>
364364
</div>
365365
</li>
@@ -440,7 +440,7 @@ <h5>
440440
</h5>
441441
<div class="tsd-comment tsd-typography">
442442
<div class="lead">
443-
<p>Whether to persist a logged in session to storage.</p>
443+
<p>Whether to persist a logged in session to storage. Defaults to <code>true</code>.</p>
444444
</div>
445445
</div>
446446
</li>
@@ -473,7 +473,7 @@ <h5>
473473
<div class="lead">
474474
<p>
475475
The Postgres schema which your tables belong to. Must be on the list of
476-
exposed schemas in Supabase. Defaults to &#39;public&#39;.
476+
exposed schemas in Supabase. Defaults to <code>public</code>.
477477
</p>
478478
</div>
479479
</div>

docs/v1/spec.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3118,7 +3118,7 @@
31183118
"isOptional": true
31193119
},
31203120
"comment": {
3121-
"shortText": "Automatically refreshes the token for logged in users."
3121+
"shortText": "Automatically refreshes the token for logged in users. Defaults to `true`."
31223122
},
31233123
"sources": [
31243124
{
@@ -3172,7 +3172,7 @@
31723172
"isOptional": true
31733173
},
31743174
"comment": {
3175-
"shortText": "Detect a session from the URL. Used for OAuth login callbacks."
3175+
"shortText": "Detect a session from the URL. Used for OAuth login callbacks. Defaults to `true`."
31763176
},
31773177
"sources": [
31783178
{
@@ -3297,7 +3297,7 @@
32973297
"isOptional": true
32983298
},
32993299
"comment": {
3300-
"shortText": "Whether to persist a logged in session to storage."
3300+
"shortText": "Whether to persist a logged in session to storage. Defaults to `true`."
33013301
},
33023302
"sources": [
33033303
{
@@ -3345,7 +3345,7 @@
33453345
"isOptional": true
33463346
},
33473347
"comment": {
3348-
"shortText": "The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'."
3348+
"shortText": "The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to `public`."
33493349
},
33503350
"sources": [
33513351
{

example/next-storage/.gitignore

-34
This file was deleted.

example/next-storage/README.md

-54
This file was deleted.

0 commit comments

Comments
 (0)