-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into allow-row-type-returns
- Loading branch information
Showing
86 changed files
with
9,968 additions
and
10,675 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @supabase/api | ||
* @supabase/api @supabase/frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,22 @@ on: | |
- master | ||
workflow_dispatch: | ||
|
||
# Cancel old builds on new commit for same workflow + branch/PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "16" | ||
node-version-file: '.nvmrc' | ||
|
||
|
||
- run: | | ||
npm clean-install | ||
|
@@ -25,25 +31,36 @@ jobs: | |
prettier-check: | ||
name: Prettier check | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actionsx/prettier@v2 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
args: --check "{src,test}/**/*.ts" | ||
|
||
node-version-file: '.nvmrc' | ||
|
||
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps | ||
- name: Download dependencies | ||
run: | | ||
rm package.json | ||
rm package-lock.json | ||
npm i prettier@3 [email protected] | ||
- name: Run prettier | ||
run: |- | ||
npx prettier -c '{src,test}/**/*.ts' | ||
docker: | ||
name: Build with docker | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
name: Checkout Repo | ||
|
||
- uses: docker/setup-buildx-action@v2 | ||
- uses: docker/setup-buildx-action@v3 | ||
name: Set up Docker Buildx | ||
|
||
- uses: docker/build-push-action@v4 | ||
- uses: docker/build-push-action@v5 | ||
with: | ||
push: false | ||
tags: pg-meta:test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/github", { | ||
"successComment": false, | ||
"failTitle": false | ||
} | ||
], | ||
"@semantic-release/npm" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing | ||
|
||
### Install deps | ||
|
||
- docker | ||
- `npm install` | ||
|
||
### Start services | ||
|
||
1. Run `docker compose up` in `/test/db` | ||
2. Run the tests: `npm run test:run` | ||
3. Make changes in code (`/src`) and tests (`/test/lib` and `/test/server`) | ||
4. Run the tests again: `npm run test:run` | ||
5. Commit + PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
FROM node:16-bullseye as build | ||
FROM node:20 as build | ||
WORKDIR /usr/src/app | ||
# Do `npm ci` separately so we can cache `node_modules` | ||
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ | ||
COPY package.json package-lock.json ./ | ||
RUN npm clean-install | ||
COPY . . | ||
RUN npm run build | ||
RUN npm run build && npm prune --omit=dev | ||
|
||
FROM node:16-bullseye-slim | ||
FROM node:20-slim | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /usr/src/app | ||
COPY --from=build /usr/src/app/node_modules node_modules | ||
COPY --from=build /usr/src/app/dist dist | ||
COPY package.json ./ | ||
ENV PG_META_PORT=8080 | ||
CMD ["npm", "run", "start"] | ||
# `npm run start` does not forward signals to child process | ||
CMD ["node", "dist/server/server.js"] | ||
EXPOSE 8080 | ||
# --start-period defaults to 0s, but can't be set to 0s (to be explicit) by now | ||
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "require('http').get('http://localhost:8080/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})" | ||
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "fetch('http://localhost:8080/health').then((r) => {if (r.status !== 200) throw new Error(r.status)})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.