Skip to content

Commit c8149f9

Browse files
authored
Merge pull request #41 from supabase/rc
feat: Release V2
2 parents aa4f3b5 + 55d38ca commit c8149f9

25 files changed

+14459
-5241
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
node: ['14']
17+
node: ['18']
1818

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

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323

2424
- name: Set up Node
25-
uses: actions/setup-node@v1
25+
uses: actions/setup-node@v3
2626
with:
2727
node-version: ${{ matrix.node }}
2828

2929
- run: |
3030
npm ci
31-
npm run v1:docs
32-
npm run v1:docs:json
31+
npm run docs
32+
npm run docs:json
3333
3434
- name: Publish
3535
uses: peaceiris/actions-gh-pages@v3

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
name: Release / Node ${{ matrix.node }}
1414
strategy:
1515
matrix:
16-
node: ['14']
16+
node: ['18']
1717

1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222

2323
- name: Set up Node
24-
uses: actions/setup-node@v1
24+
uses: actions/setup-node@v3
2525
with:
2626
node-version: ${{ matrix.node }}
2727

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- rc
9+
workflow_dispatch:
10+
11+
jobs:
12+
autotests:
13+
name: Run tests
14+
strategy:
15+
matrix:
16+
node: ['18']
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Set up Node
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node }}
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Run Test
32+
run: npm run test
33+
continue-on-error: true

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,13 @@ dist
103103

104104
# TernJS port file
105105
.tern-port
106+
107+
# Generated docs
108+
docs/v2
109+
110+
# Test reports
111+
allure-results
112+
allure-report
113+
114+
# IDE specific
115+
.vscode

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
# `functions-js`
22

3-
JS Client library to interact with Supabase Edge Functions.
3+
JS Client library to interact with Supabase Functions.
4+
5+
## Docs
6+
https://supabase.github.io/functions-js/index.html
7+
8+
## testing
9+
10+
To run tests you will need Node 18+.
11+
12+
You are going to need docker daemon running to execute tests.
13+
14+
To start test run use the following command:
15+
16+
```sh
17+
npm i
18+
npm run test
19+
```

jest.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { Config } from '@jest/types'
2+
3+
const config: Config.InitialOptions = {
4+
preset: 'ts-jest',
5+
transform: {
6+
'^.+\\.ts?$': 'ts-jest',
7+
},
8+
moduleFileExtensions: ['ts', 'js', 'cjs', 'json', 'node'],
9+
setupFilesAfterEnv: ['./test/utils/jest-custom-reporter.ts'],
10+
testTimeout: 60000,
11+
coverageThreshold: {
12+
global: {
13+
branches: 0,
14+
functions: 0,
15+
lines: 0,
16+
statements: 0,
17+
},
18+
},
19+
}
20+
export default config

0 commit comments

Comments
 (0)