Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pnpm #30

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bbc6cc7
chore: pnpm
alaister Sep 13, 2024
9bf3700
.github to pnpm
alaister Sep 16, 2024
833d64e
Merge branch 'master' into chore/pnpm
alaister Sep 16, 2024
6aac778
install pnpm in github actions
alaister Sep 16, 2024
0f6e3d1
chore: update pnpm version in GitHub Actions workflows
alaister Sep 16, 2024
0ec3cd5
install jest
alaister Sep 16, 2024
fa0b01a
missing pnpm installs
alaister Sep 16, 2024
b4a3c07
remove hacky prettier installs
alaister Sep 16, 2024
2b28ab1
add missing ts-node
alaister Sep 16, 2024
1f5ee53
fix ai-commands tests
alaister Sep 16, 2024
2ecb964
fix prettier errors
alaister Sep 16, 2024
36af60e
fix playwright install
alaister Sep 16, 2024
5552073
install playwright command
alaister Sep 16, 2024
35d40d0
more test fixes
alaister Sep 16, 2024
80cc43f
fix circular dep
alaister Sep 16, 2024
cb8f0ef
add playwright command to root
alaister Sep 16, 2024
d5269cd
add missing lodash types
alaister Sep 16, 2024
25ba741
fix studio tests
alaister Sep 16, 2024
126bd9c
fix ui types
alaister Sep 16, 2024
7fe836f
fix ui-patterns types
alaister Sep 16, 2024
671a0f2
fix missing design-system packages
alaister Sep 16, 2024
2801a60
fix www deps
alaister Sep 16, 2024
85def44
try a different version of libpg-query
alaister Sep 16, 2024
2898c4a
swap libpg-query back
alaister Sep 16, 2024
7771837
Don't search for package-jsons in child folders. Don't export the sql…
ivasilov Sep 23, 2024
95162fa
Clean up the dependencies in design-system app.
ivasilov Sep 23, 2024
ab5042a
Add tsx to the design-system app.
ivasilov Sep 23, 2024
d2ae8b9
Merge branch 'master' into chore/pnpm
ivasilov Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ai-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@ jobs:
with:
sparse-checkout: |
packages
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: 'pnpm'
- name: Install deps
run: npm ci
run: pnpm i
- name: Type check
run: npm run typecheck
run: pnpm run typecheck
- name: Run tests
run: npm run test
run: pnpm run test
13 changes: 9 additions & 4 deletions .github/workflows/autofix_linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,33 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && (github.event.label.name == 'autofix') }}
steps:

- uses: actions/checkout@v4
with:
sparse-checkout: apps

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install required dependencies
run: npm ci
run: pnpm i

- name: Run Prettier in fix mode
run: npm run format
run: pnpm run format

- name: Commit changes and push to existing branch
run: |
git config --global user.name 'github-tidy-bot'
git config --global user.email '[email protected]'
if [[ `git status --porcelain` ]]; then
echo "[bot] Changes detected, committing."

echo "[bot] Running in non-squash mode."
git commit -am "ci: Autofix updates from GitHub workflow"
git push
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/avoid-typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
exclude: |
*.css
**/package.json
**/package-lock.json
**/pnpm-lock.yaml
./.git/*
*.ipynb
./i18n/README.*.md
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/docs-last-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,26 @@ jobs:
sparse-checkout: |
apps/docs

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Download dependencies
run: npm ci
run: pnpm i

- name: Update last-changed dates
working-directory: ./apps/docs
if: ${{ !inputs.reset }}
run: npm run last-changed
run: pnpm run last-changed

- name: Reset last-changed dates
working-directory: ./apps/docs
if: ${{ inputs.reset }}
run: npm run last-changed:reset
run: pnpm run last-changed:reset
62 changes: 34 additions & 28 deletions .github/workflows/docs-mgmt-api-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,37 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: master
sparse-checkout: |
apps/docs

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install deps
run: npm ci

- name: Change to apps/docs/spec directory and run make command
working-directory: apps/docs/spec
run: make download.api.v1 dereference.api.v1 generate.sections.api.v1 format

- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'feat: update mgmt api docs'
title: 'feat: update mgmt api docs'
body: 'This PR updates mgmt api docs automatically.'
branch: 'gha/auto-update-mgmt-api-docs'
base: 'master'
- uses: actions/checkout@v4
with:
ref: master
sparse-checkout: |
apps/docs

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install deps
run: pnpm i

- name: Change to apps/docs/spec directory and run make command
working-directory: apps/docs/spec
run: make download.api.v1 dereference.api.v1 generate.sections.api.v1 format

- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'feat: update mgmt api docs'
title: 'feat: update mgmt api docs'
body: 'This PR updates mgmt api docs automatically.'
branch: 'gha/auto-update-mgmt-api-docs'
base: 'master'
12 changes: 9 additions & 3 deletions .github/workflows/docs-tests-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ jobs:
apps/docs
packages

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: 'pnpm'

- name: Install deps
run: npm ci
run: pnpm i

- name: Run tests
run: npm --prefix="apps/docs" run test:smoke
run: pnpm --prefix="apps/docs" run test:smoke
12 changes: 9 additions & 3 deletions .github/workflows/docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ jobs:
apps/docs
packages

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: 'pnpm'

- name: Install deps
run: npm ci
run: pnpm i

- name: Run tests
run: npm run test:docs
run: pnpm run test:docs
17 changes: 11 additions & 6 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
- 'pnpm-lock.yaml'
pull_request:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
- 'pnpm-lock.yaml'

# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
Expand All @@ -23,18 +23,23 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: 'pnpm'
- uses: supabase/setup-cli@v1
- name: Install dependencies
run: npm ci
run: pnpm i
- name: Install Playwright Browsers
run: npx playwright install --with-deps
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: npm run test:playwright
run: pnpm run test:playwright
# mark the action as succeeded even if the tests failed. This is temporarily until we make the tests more stable.
# continue-on-error: true
- uses: actions/upload-artifact@v4
Expand Down
41 changes: 28 additions & 13 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@ jobs:
uses: actions/checkout@v4
with:
sparse-checkout: apps
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps
cache: 'pnpm'
- name: Download dependencies
run: |
npm ci
pnpm i
- name: Run prettier
run: |-
npm run test:prettier
pnpm run test:prettier

# i18n is not a node package, so we handle that one separately
format-i18n:
Expand All @@ -39,19 +44,22 @@ jobs:
with:
sparse-checkout: |
i18n
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps
cache: 'pnpm'
- name: Download dependencies
run: |
rm package.json
rm package-lock.json
npm i [email protected] prettier-plugin-sql-cst
pnpm i
- name: Run prettier
run: |-
npx prettier -c 'i18n/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'
pnpm exec prettier -c 'i18n/**/*.{js,jsx,ts,tsx,css,md,mdx,json}'

format-sql:
runs-on: ubuntu-latest
Expand All @@ -62,13 +70,20 @@ jobs:
sparse-checkout: |
apps/docs/pages
apps/docs/content
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Download dependencies
run: |
rm package.json
rm package-lock.json
npm i [email protected] prettier-plugin-sql-cst
pnpm i
- name: Run prettier
run: |-
# Check mdx files which contain sql code blocks
grep -lr '```sql' apps/docs/{pages,content}/**/*.mdx | xargs npx prettier -c
grep -lr '```sql' apps/docs/{pages,content}/**/*.mdx | xargs pnpm exec prettier -c
12 changes: 9 additions & 3 deletions .github/workflows/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ jobs:
apps/www/.env.local.example
supabase

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Download dependencies
run: npm ci
run: pnpm i

# Need the miscellaneous use API, which is available publicly (by design) in www
- name: Copy environment variables
Expand All @@ -53,9 +59,9 @@ jobs:
- name: Update embeddings
working-directory: ./apps/docs
if: ${{ !inputs.refresh }}
run: npm run embeddings
run: pnpm run embeddings

- name: Refresh embeddings
working-directory: ./apps/docs
if: ${{ inputs.refresh }}
run: npm run embeddings:refresh
run: pnpm run embeddings:refresh
Loading