Skip to content

Commit 1cd1c87

Browse files
committed
chore: prepare for v2.0.0
1 parent 6064504 commit 1cd1c87

49 files changed

Lines changed: 799 additions & 46609 deletions

Some content is hidden

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

.bun-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3.10

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/codeql/codeql-config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,26 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7-
cooldown:
8-
default-days: 7
7+
open-pull-requests-limit: 2
98
groups:
109
actions-minor:
1110
update-types:
1211
- minor
1312
- patch
1413

15-
- package-ecosystem: npm
14+
- package-ecosystem: bun
1615
directory: /
1716
schedule:
18-
interval: daily
17+
interval: weekly
18+
open-pull-requests-limit: 2
1919
groups:
20-
npm-development:
20+
bun-development:
2121
dependency-type: development
2222
update-types:
2323
- minor
2424
- patch
25-
npm-production:
25+
bun-production:
2626
dependency-type: production
2727
update-types:
28+
- minor
2829
- patch
29-
ignore:
30-
# nodejs types is pinned to runtime version
31-
- dependency-name: '@types/node'
32-
update-types:
33-
- version-update:semver-major

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
validate:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 15
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
persist-credentials: false
28+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
29+
with:
30+
bun-version-file: .bun-version
31+
- run: bun install --frozen-lockfile
32+
- run: bun run ci
33+
34+
test:
35+
runs-on: ${{ matrix.os }}
36+
timeout-minutes: 20
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [macos-latest, windows-latest, ubuntu-latest]
41+
version: [1.0.0, latest]
42+
steps:
43+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44+
- uses: ./
45+
with:
46+
version: ${{ matrix.version }}
47+
- run: supabase -h
48+
49+
check:
50+
if: ${{ always() && github.event.pull_request }}
51+
runs-on: ubuntu-latest
52+
needs: [validate, test]
53+
timeout-minutes: 5
54+
steps:
55+
- run: |
56+
validate_result="${{ needs.validate.result }}"
57+
test_result="${{ needs.test.result }}"
58+
[[ "$validate_result" == "success" || "$validate_result" == "skipped" ]]
59+
[[ "$test_result" == "success" || "$test_result" == "skipped" ]]

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ on:
66
branches:
77
- main
88
schedule:
9-
- cron: '31 7 * * 3'
9+
- cron: "31 7 * * 3"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
1014

1115
permissions:
1216
actions: read
@@ -18,12 +22,7 @@ jobs:
1822
analyze:
1923
name: Analyze
2024
runs-on: ubuntu-latest
21-
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
language:
26-
- typescript
25+
timeout-minutes: 30
2726

2827
steps:
2928
- name: Checkout
@@ -34,16 +33,11 @@ jobs:
3433

3534
- name: Initialize CodeQL
3635
id: initialize
37-
uses: github/codeql-action/init@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
36+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
3837
with:
39-
config-file: .github/codeql/codeql-config.yml
40-
languages: ${{ matrix.language }}
38+
languages: javascript-typescript
4139
source-root: src
4240

43-
- name: Autobuild
44-
id: autobuild
45-
uses: github/codeql-action/autobuild@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
46-
4741
- name: Perform CodeQL Analysis
4842
id: analyze
49-
uses: github/codeql-action/analyze@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
43+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1

.github/workflows/dependabot.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@ name: Dependabot auto-merge
33

44
on: pull_request
55

6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
610
permissions:
711
pull-requests: write
812
contents: write
913

1014
jobs:
1115
dependabot:
1216
runs-on: ubuntu-latest
13-
# Checking the actor will prevent your Action run failing on non-Dependabot
14-
# PRs but also ensures that it only does work for Dependabot PRs.
17+
timeout-minutes: 10
18+
# Only act on PRs opened by Dependabot from branches in this repository.
1519
if: github.actor == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
1620
steps:
17-
# This first step will fail if there's no metadata and so the approval
18-
# will not occur.
21+
# Metadata drives the non-major gating used for approval and auto-merge.
1922
- id: meta
2023
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
2124
with:
22-
github-token: '${{ secrets.GITHUB_TOKEN }}'
25+
github-token: "${{ secrets.GITHUB_TOKEN }}"
2326

24-
# Here the PR gets approved.
2527
- name: Approve a PR
26-
if: ${{steps.meta.outputs.update-type != 'version-update:semver-major'}}
28+
if: ${{ steps.meta.outputs.update-type != 'version-update:semver-major' }}
2729
run: gh pr review --approve "$PR_URL"
2830
env:
2931
PR_URL: ${{ github.event.pull_request.html_url }}
3032
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3133

32-
# Finally, this sets the PR to allow auto-merging for patch and minor
33-
# updates if all checks pass
3434
- name: Enable auto-merge for Dependabot PRs
35-
if: ${{steps.meta.outputs.update-type != 'version-update:semver-major'}}
35+
if: ${{ steps.meta.outputs.update-type != 'version-update:semver-major' }}
3636
run: gh pr merge --auto --squash "$PR_URL"
3737
env:
3838
PR_URL: ${{ github.event.pull_request.html_url }}
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
name: CLI Start
1+
name: E2E
22
on:
33
push:
44
branches:
55
- main
66
tags:
7-
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
- "v[0-9]+.[0-9]+.[0-9]+"
88
schedule:
99
# * is a special character in YAML so you have to quote this string
10-
- cron: '30 1,9 * * *'
10+
- cron: "30 1,9 * * *"
1111
workflow_dispatch:
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
1317
defaults:
1418
run:
1519
shell: bash
@@ -20,7 +24,9 @@ permissions:
2024
jobs:
2125
e2e: # make sure the action works on a clean machine without building
2226
runs-on: ubuntu-latest
27+
timeout-minutes: 45
2328
strategy:
29+
fail-fast: false
2430
matrix:
2531
version:
2632
- 1.178.2
@@ -41,7 +47,7 @@ jobs:
4147
with:
4248
version: ${{ matrix.version }}
4349
- run: supabase init
44-
- run:
50+
- run: |
4551
sed -i -E "s|^(major_version) .*|\1 = ${{ matrix.pg_major }}|"
4652
supabase/config.toml
4753
- run: supabase start

.github/workflows/licensed.yml

Lines changed: 72 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,92 @@ name: Licensed
66

77
on:
88
pull_request:
9+
paths:
10+
- .github/workflows/licensed.yml
11+
- .licensed.yml
12+
- .licenses/**
13+
- bun.lock
14+
- package.json
915
push:
1016
branches:
1117
- main
18+
paths:
19+
- .github/workflows/licensed.yml
20+
- .licensed.yml
21+
- .licenses/**
22+
- bun.lock
23+
- package.json
1224
workflow_dispatch:
1325

14-
permissions:
15-
contents: write
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
1629

1730
jobs:
18-
licensed:
31+
check-licenses:
32+
if: ${{ github.event_name != 'workflow_dispatch' }}
1933
name: Check Licenses
2034
runs-on: ubuntu-latest
35+
timeout-minutes: 15
36+
permissions:
37+
contents: read
2138

2239
steps:
2340
- name: Checkout
2441
id: checkout
2542
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
44+
- name: Setup Bun
45+
id: setup-bun
46+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
2647
with:
27-
persist-credentials: false
28-
- name: Setup Node.js
29-
id: setup-node
30-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
48+
bun-version-file: .bun-version
49+
50+
- name: Install Dependencies
51+
id: bun-install
52+
run: bun install --frozen-lockfile
53+
54+
- name: Setup Ruby
55+
id: setup-ruby
56+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
3157
with:
32-
node-version-file: .node-version
33-
cache: npm
58+
ruby-version: ruby
59+
60+
- uses: licensee/setup-licensed@0d52e575b3258417672be0dff2f115d7db8771d8 # v1.3.2
61+
with:
62+
version: 4.x
63+
github_token: ${{ secrets.GITHUB_TOKEN }}
64+
65+
- name: Check Licenses
66+
id: check-licenses
67+
run: licensed status
68+
69+
update-licenses:
70+
if: ${{ github.event_name == 'workflow_dispatch' }}
71+
name: Update Licenses
72+
runs-on: ubuntu-latest
73+
timeout-minutes: 15
74+
permissions:
75+
contents: write
76+
77+
steps:
78+
- name: Checkout
79+
id: checkout
80+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
81+
82+
- name: Setup Bun
83+
id: setup-bun
84+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
85+
with:
86+
bun-version-file: .bun-version
3487

3588
- name: Install Dependencies
36-
id: npm-ci
37-
run: npm ci
89+
id: bun-install
90+
run: bun install --frozen-lockfile
3891

3992
- name: Setup Ruby
4093
id: setup-ruby
41-
uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1.298.0
94+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
4295
with:
4396
ruby-version: ruby
4497

@@ -47,24 +100,19 @@ jobs:
47100
version: 4.x
48101
github_token: ${{ secrets.GITHUB_TOKEN }}
49102

50-
# If this is a workflow_dispatch event, update the cached licenses.
51-
- if: ${{ github.event_name == 'workflow_dispatch' }}
52-
name: Update Licenses
103+
- name: Update License Cache
53104
id: update-licenses
54105
run: licensed cache
55106

56-
# Then, commit the updated licenses to the repository.
57-
- if: ${{ github.event_name == 'workflow_dispatch' }}
58-
name: Commit Licenses
107+
- name: Commit Licenses
59108
id: commit-licenses
60109
run: |
61110
git config --local user.email "licensed-ci@users.noreply.github.com"
62111
git config --local user.name "licensed-ci"
63-
git add .
112+
git add .licenses .licensed.yml
113+
if git diff --cached --quiet; then
114+
echo "No license cache changes to commit."
115+
exit 0
116+
fi
64117
git commit -m "Auto-update license files"
65118
git push
66-
67-
# Last, check the status of the cached licenses.
68-
- name: Check Licenses
69-
id: check-licenses
70-
run: licensed status

0 commit comments

Comments
 (0)