diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..c0d20008ea8 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ +## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. + +YES/NO + +## What kind of change does this PR introduce? + +Bug fix, feature, docs update, ... + +## What is the current behavior? + +Please link any relevant issues here. + +## What is the new behavior? + +Feel free to include screenshots if it includes visual changes. + +## Additional context + +Add any other context or screenshots. diff --git a/.github/workflows/ai-tests.yml b/.github/workflows/ai-tests.yml index 96bc283c6d5..9a960557928 100644 --- a/.github/workflows/ai-tests.yml +++ b/.github/workflows/ai-tests.yml @@ -24,10 +24,6 @@ jobs: env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} - strategy: - matrix: - node-version: [18.x] - defaults: run: working-directory: ./packages/ai-commands @@ -37,10 +33,10 @@ jobs: with: sparse-checkout: | packages - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - name: Install deps run: npm ci diff --git a/.github/workflows/docs-tests.yml b/.github/workflows/docs-tests.yml index d1b6ab48b00..7d402e444b4 100644 --- a/.github/workflows/docs-tests.yml +++ b/.github/workflows/docs-tests.yml @@ -15,10 +15,6 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - steps: - uses: actions/checkout@v4 with: @@ -26,10 +22,10 @@ jobs: apps/docs packages - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - name: Install deps diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index fde83f5826d..2ab350c96ee 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -21,16 +21,12 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - uses: supabase/setup-cli@v1 - name: Install dependencies diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 886a2d41b40..c589ba58afa 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -19,9 +19,9 @@ jobs: with: sparse-checkout: apps - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.nvmrc' # Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps - name: Download dependencies run: | @@ -42,9 +42,9 @@ jobs: sparse-checkout: | i18n - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.nvmrc' # Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps - name: Download dependencies run: | diff --git a/.github/workflows/search.yml b/.github/workflows/search.yml index b1dd9b1d57a..8f60b73aa91 100644 --- a/.github/workflows/search.yml +++ b/.github/workflows/search.yml @@ -42,9 +42,9 @@ jobs: supabase - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: '.nvmrc' - name: Download dependencies run: npm ci diff --git a/.github/workflows/studio-tests.yml b/.github/workflows/studio-tests.yml index edb17574b6b..1dbc0bd8dd6 100644 --- a/.github/workflows/studio-tests.yml +++ b/.github/workflows/studio-tests.yml @@ -25,29 +25,23 @@ jobs: # Uses larger hosted runner as it significantly decreases build times runs-on: [larger-runner-4cpu] - strategy: - matrix: - node-version: [18.x] - cmd: - - npm run test:studio - steps: - uses: actions/checkout@v4 with: sparse-checkout: | apps/studio packages - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - name: Install deps run: npm ci working-directory: ./ - - name: Run ${{ matrix.cmd }} + - name: Run Tests env: # Default is 2 GB, increase to have less frequent OOM errors NODE_OPTIONS: '--max_old_space_size=3072' - run: ${{ matrix.cmd }} + run: npm run test:studio working-directory: ./ diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index fd3feee51ed..eb4e5885a55 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -15,18 +15,14 @@ jobs: # Uses larger hosted runner as it significantly decreases build times runs-on: [larger-runner-4cpu] - strategy: - matrix: - node-version: [18.x] - steps: - name: Checkout uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - name: Install deps diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index f312f2130d4..126edd5b9a5 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -15,20 +15,16 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - steps: - uses: actions/checkout@v4 with: sparse-checkout: | packages - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: '.nvmrc' cache: 'npm' - name: Install deps diff --git a/.nvmrc b/.nvmrc index 25bf17fc5aa..2edeafb09db 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 \ No newline at end of file +20 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..b5d3188a5b3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# CONTRIBUTING.md + +Thank you for contributing to Supabase! We’re a big, exciting open source project and we’d love to have you contribute! Here’s some resources and guidance to help you get started: + +[1. Getting Started](#getting-started) +[2. Issues](#issues) +[3. Pull Requests](#pull-requests) + +## Getting Started + +To ensure a positive and inclusive environment, please read our [code of conduct](https://github.com/supabase/.github/blob/main/CODE_OF_CONDUCT.md) before contributing. For help setting up the code in this repo, please follow our [DEVELOPERS.md](https://github.com/supabase/supabase/blob/master/DEVELOPERS.md) file. For the [docs](https://supabase.com/docs) site, follow this [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md) guide. + +## Issues + +If you find a bug, please create an Issue and we’ll triage it. + +- Please search [existing Issues](https://github.com/supabase/supabase/issues) before creating a new one. +- Please include a clear description of the problem along with steps to reproduce it. Exact steps with screenshots and urls really help here. + +## Pull Requests + +We actively welcome your Pull Requests! A couple of things to keep in mind before you submit: + +- If you’re fixing an Issue, make sure someone else hasn’t already created a PR fixing the same issue. Likewise, make sure to link your PR to the related Issue(s). +- We will always try to accept the first viable PR that resolves the Issue. +- If you're new, we encourage you to take a look at issues tagged with [good first issue](https://github.com/supabase/supabase/labels/good%20first%20issue). +- If you’re submitting a new feature, make sure you have opened a [Discussion](https://github.com/orgs/supabase/discussions/new/choose) to discuss the new feature before opening a PR. We’d love to accept your hard work, but unfortunately if a feature hasn’t gone through a proper design process, your PR will be closed. +- Please use the PR message template and provide detailed context for quicker review. PRs without clear problem statements will be closed. + +Prior to submitting your PR, please conduct the following pre-flight checks: + +- Run `npm run build` locally to ensure that your code builds successfully without having to wait on us to approve Vercel Preview deploys. +- Ensure that the Prettier tests run successfully on your PR. + +Running these before you create the PR will help reduce back and forth with the team. diff --git a/DEVELOPERS.md b/DEVELOPERS.md index b1eefec714b..a42c0a057b1 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -1,6 +1,7 @@ # Developing Supabase - [Developing Supabase](#developing-supabase) + - [Getting started](#getting-started) - [Install dependencies](#install-dependencies) - [Local development](#local-development) @@ -11,8 +12,8 @@ - [Shared components](#shared-components) - [Installing packages](#installing-packages) - [Running Docker for Supabase Studio](#running-docker-for-supabase-studio) - - [Prerequsites](#prerequsites) - - [Get Started](#get-started) + - [Prerequsites](#prerequsites) + - [Get Started](#get-started) - [Create a pull request](#create-a-pull-request) - [Issue assignment](#issue-assignment) - [Common tasks](#common-tasks) @@ -36,8 +37,8 @@ To ensure a positive and inclusive environment, please read our [code of conduct You will need to install and configure the following dependencies on your machine to build [Supabase](https://supabase.com): - [Git](http://git-scm.com/) -- [Node.js v18.x (LTS)](http://nodejs.org) -- [npm](https://www.npmjs.com/) version 9.x.x +- [Node.js v20.x (LTS)](http://nodejs.org) +- [npm](https://www.npmjs.com/) version 9.x.x or higher - [Docker](https://docs.docker.com/get-docker/) (to run studio locally) ## Local development diff --git a/README.md b/README.md index a3cd29f08a3..d63f425b65d 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,15 @@ Our approach for client libraries is modular. Each sub-library is a standalone i