Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: feat/sourcegen-parser
Choose a base ref
...
head repository: supabase-community/postgres-language-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing 519 changed files with 54,678 additions and 7,000 deletions.
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

3 changes: 3 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
libpg_query/
lib/tree_sitter_sql/tree-sitter-sql/
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:5432/postgres
13 changes: 5 additions & 8 deletions .github/ISSUE_TEMPLATE/1.Bug_report.md
Original file line number Diff line number Diff line change
@@ -6,20 +6,20 @@ labels: bug

# Bug report

<!--
<!--
⚠️ We receive a lot of bug reports which have already been solved or discussed. If you are looking for help, please try these first:
- Docs: https://docs.supabase.com
- Discussions: https://github.com/supabase/supabase/discussions
- Discord: https://discord.supabase.com
Before opening a bug report, please verify the following:
Before opening a bug report, please verify the following:
-->

- [ ] I confirm this is a bug with Supabase, not with my own application.
- [ ] I confirm I have searched the [Docs](https://docs.supabase.com), GitHub [Discussions](https://github.com/supabase/supabase/discussions), and [Discord](https://discord.supabase.com).
- [ ] I confirm this is a bug with Supabase, not with my own application.
- [ ] I confirm I have searched the [Docs](https://docs.supabase.com), GitHub [Discussions](https://github.com/supabase/supabase/discussions), and [Discord](https://discord.supabase.com).

## Describe the bug

@@ -45,10 +45,7 @@ If applicable, add screenshots to help explain your problem.
## System information

- OS: [e.g. macOS, Windows]
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: [e.g. 6.0.2]
- Version of Node.js: [e.g. 10.10.0]

## Additional context

Add any other context about the problem here.
Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/4.Planned_work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Planned work
about: Planned feature work. Limited to contributors only.
labels: planned
---

# Planned Work
16 changes: 16 additions & 0 deletions .github/actions/free-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Free Disk Space
description: Free up disk space on the runner
runs:
using: composite
steps:
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
# We need to reclaim some space, but uninstalling everyting takes
# too long. So we'll just remove some of the larger packages.
# https://github.com/jlumbroso/free-disk-space/pull/26
android: true
dotnet: true
haskell: true
large-packages: false
18 changes: 0 additions & 18 deletions .github/actions/setup-monorepo/action.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/ci.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Deploy Documentation

on:
release:
types: [released]
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

- run: uv run mkdocs gh-deploy --force

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
72 changes: 72 additions & 0 deletions .github/workflows/publish.dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Publish NPM (Manual)

on:
workflow_dispatch:
inputs:
release-tag:
type: string
required: true
description: Release Tag to Publish

jobs:
validate_tag:
runs-on: ubuntu-latest
outputs:
is-prerelease: ${{ steps.validate-release.outputs.is-prerelease }}
steps:
- uses: actions/github-script@v7
id: validate-release
with:
script: |
/** the "core" module does not have access to workflow_dispatch inputs */
const tag = '${{ inputs.release-tag }}';
/** Releases don't have a guaranteed order, so we'll have to paginate */
let exhausted = false;
let page = 1;
while (!exhausted) {
const releases = await github.rest.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
page,
per_page: 100,
}).then(r => r.data);
const matchingRelease = releases.find(r => r.tag_name === tag);
if (matchingRelease) {
core.setOutput('has-release', 'true');
core.setOutput('is-prerelease', matchingRelease.prerelease.toString());
return;
}
if (releases.length < 100) {
exhausted = true;
} else if (page >= 10) {
throw new Error("We iterated over 10 pages. Does the script work?");
} else {
page++
}
}
core.setOutput('has-release', 'false');
core.setOutput('is-prerelease', 'false');
- name: Abort
if: steps.validate-release.outputs.has-release != 'true'
run: |
{
echo "Tag ${{ github.event.inputs.release-tag }} not found."
exit 1
}
publish_npm:
needs: validate_tag
uses: ./.github/workflows/publish.reusable.yml
permissions:
contents: write
id-token: write
with:
release-tag: ${{ github.event.inputs.release-tag }}
is-prerelease: ${{ needs.validate_tag.outputs.is-prerelease }}
secrets: inherit
66 changes: 66 additions & 0 deletions .github/workflows/publish.reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish to NPM & Brew

on:
workflow_call:
inputs:
release-tag:
type: string
required: true
is-prerelease:
type: string
required: true

jobs:
publish:
name: Publish All the Things
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

- name: Generate Packages
id: generate-packages
run: node packages/@postgrestools/postgrestools/scripts/generate-packages.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.release-tag }}
PRERELEASE: ${{ inputs.is-prerelease }}

- name: Verify NPM TOKEN exists
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "Secret is not defined"
exit 1
else
echo "Secret is defined"
fi
- name: Print package.json
run: |
cat packages/@postgrestools/postgrestools/package.json
- name: Publish npm packages as nightly
if: inputs.is-prerelease == 'true'
run: |
for package in packages/@postgrestools/*; do
npm publish "$package" --tag nightly --access public --provenance
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} #

- name: Publish npm packages as latest
if: inputs.is-prerelease != 'true'
run: |
for package in packages/@postgrestools/*; do
npm publish "$package" --tag latest --access public --provenance
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/publish.trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish NPM (Automatic)

on:
release:
types: [released, prereleased]

jobs:
publish_npm:
uses: ./.github/workflows/publish.reusable.yml
permissions:
contents: write
id-token: write
with:
release-tag: ${{ github.event.release.tag_name }}
is-prerelease: ${{ github.event.release.prerelease }}
secrets: inherit
Loading