Skip to content

Commit 27f9f96

Browse files
authored
chore: upgrade to node 20 (supabase#22240)
1 parent 67e1c33 commit 27f9f96

Some content is hidden

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

55 files changed

+3355
-1562
lines changed

.github/workflows/ai-tests.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ jobs:
2424
env:
2525
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
2626

27-
strategy:
28-
matrix:
29-
node-version: [18.x]
30-
3127
defaults:
3228
run:
3329
working-directory: ./packages/ai-commands
@@ -37,10 +33,10 @@ jobs:
3733
with:
3834
sparse-checkout: |
3935
packages
40-
- name: Use Node.js ${{ matrix.node-version }}
41-
uses: actions/setup-node@v3
36+
- name: Use Node.js
37+
uses: actions/setup-node@v4
4238
with:
43-
node-version: ${{ matrix.node-version }}
39+
node-version-file: '.nvmrc'
4440
cache: 'npm'
4541
- name: Install deps
4642
run: npm ci

.github/workflows/docs-tests.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,17 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717

18-
strategy:
19-
matrix:
20-
node-version: [18.x]
21-
2218
steps:
2319
- uses: actions/checkout@v4
2420
with:
2521
sparse-checkout: |
2622
apps/docs
2723
packages
2824
29-
- name: Use Node.js ${{ matrix.node-version }}
30-
uses: actions/setup-node@v3
25+
- name: Use Node.js
26+
uses: actions/setup-node@v4
3127
with:
32-
node-version: ${{ matrix.node-version }}
28+
node-version-file: '.nvmrc'
3329
cache: 'npm'
3430

3531
- name: Install deps

.github/workflows/playwright.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ jobs:
2121
timeout-minutes: 60
2222
runs-on: ubuntu-latest
2323

24-
strategy:
25-
matrix:
26-
node-version: [18.x]
27-
2824
steps:
2925
- uses: actions/checkout@v4
30-
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v3
26+
- name: Use Node.js
27+
uses: actions/setup-node@v4
3228
with:
33-
node-version: ${{ matrix.node-version }}
29+
node-version-file: '.nvmrc'
3430
cache: 'npm'
3531
- uses: supabase/setup-cli@v1
3632
- name: Install dependencies

.github/workflows/prettier.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
with:
2020
sparse-checkout: apps
2121
- name: Setup node
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
24-
node-version: 18
24+
node-version-file: '.nvmrc'
2525
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps
2626
- name: Download dependencies
2727
run: |
@@ -42,9 +42,9 @@ jobs:
4242
sparse-checkout: |
4343
i18n
4444
- name: Setup node
45-
uses: actions/setup-node@v3
45+
uses: actions/setup-node@v4
4646
with:
47-
node-version: 18
47+
node-version-file: '.nvmrc'
4848
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps
4949
- name: Download dependencies
5050
run: |

.github/workflows/search.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
supabase
4343
4444
- name: Setup node
45-
uses: actions/setup-node@v3
45+
uses: actions/setup-node@v4
4646
with:
47-
node-version: 18
47+
node-version-file: '.nvmrc'
4848

4949
- name: Download dependencies
5050
run: npm ci

.github/workflows/studio-tests.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,23 @@ jobs:
2525
# Uses larger hosted runner as it significantly decreases build times
2626
runs-on: [larger-runner-4cpu]
2727

28-
strategy:
29-
matrix:
30-
node-version: [18.x]
31-
cmd:
32-
- npm run test:studio
33-
3428
steps:
3529
- uses: actions/checkout@v4
3630
with:
3731
sparse-checkout: |
3832
apps/studio
3933
packages
40-
- name: Use Node.js ${{ matrix.node-version }}
41-
uses: actions/setup-node@v3
34+
- name: Use Node.js
35+
uses: actions/setup-node@v4
4236
with:
43-
node-version: ${{ matrix.node-version }}
37+
node-version-file: '.nvmrc'
4438
cache: 'npm'
4539
- name: Install deps
4640
run: npm ci
4741
working-directory: ./
48-
- name: Run ${{ matrix.cmd }}
42+
- name: Run Tests
4943
env:
5044
# Default is 2 GB, increase to have less frequent OOM errors
5145
NODE_OPTIONS: '--max_old_space_size=3072'
52-
run: ${{ matrix.cmd }}
46+
run: npm run test:studio
5347
working-directory: ./

.github/workflows/typecheck.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@ jobs:
1515
# Uses larger hosted runner as it significantly decreases build times
1616
runs-on: [larger-runner-4cpu]
1717

18-
strategy:
19-
matrix:
20-
node-version: [18.x]
21-
2218
steps:
2319
- name: Checkout
2420
uses: actions/checkout@v4
2521

26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
22+
- name: Use Node.js
23+
uses: actions/setup-node@v4
2824
with:
29-
node-version: ${{ matrix.node-version }}
25+
node-version-file: '.nvmrc'
3026
cache: 'npm'
3127

3228
- name: Install deps

.github/workflows/ui-tests.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,16 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717

18-
strategy:
19-
matrix:
20-
node-version: [18.x]
21-
2218
steps:
2319
- uses: actions/checkout@v4
2420
with:
2521
sparse-checkout: |
2622
packages
2723
28-
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v3
24+
- name: Use Node.js
25+
uses: actions/setup-node@v4
3026
with:
31-
node-version: ${{ matrix.node-version }}
27+
node-version-file: '.nvmrc'
3228
cache: 'npm'
3329

3430
- name: Install deps

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

apps/database-new/app/[thread_id]/[message_id]/MessageItem.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { Message as MessageItem } from 'ai/react'
3+
import type { Message as MessageItem } from 'ai/react'
44
import Link from 'next/link'
55
import { useParams, usePathname } from 'next/navigation'
66
import { cn } from 'ui'

apps/database-new/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@gregnr/libpg-query": "13.4.0-dev.12",
1515
"@monaco-editor/react": "^4.6.0",
1616
"@supabase/ssr": "^0.1.0",
17-
"@tanstack/react-query": "^5.7.2",
17+
"@tanstack/react-query": "^5.13.4",
1818
"ai": "^2.2.31",
1919
"common": "*",
2020
"config": "*",
@@ -23,7 +23,7 @@
2323
"lodash": "^4.17.21",
2424
"lucide-react": "^0.338.0",
2525
"next": "^14.0.3",
26-
"openai": "^4.17.0",
26+
"openai": "^4.20.1",
2727
"react": "^18.2.0",
2828
"react-dom": "^18.2.0",
2929
"react-flow": "^1.0.3",
@@ -34,12 +34,12 @@
3434
"zod": "^3.22.4"
3535
},
3636
"devDependencies": {
37-
"@types/node": "^18.11.9",
37+
"@types/node": "^20.11.16",
3838
"@types/react": "^18.2.24",
3939
"@types/react-dom": "^18.2.8",
40-
"autoprefixer": "10.4.14",
40+
"autoprefixer": "^10.4.14",
4141
"nextjs-node-loader": "^1.1.5-alpha.0",
42-
"postcss": "8.4.31",
43-
"typescript": "^5.2.2"
42+
"postcss": "^8.4.31",
43+
"typescript": "^5.4.3"
4444
}
4545
}

apps/database-new/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "ES2021",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

apps/docs/content/guides/functions/cicd-workflow.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
Here is the sample pipeline configuration to deploy via GitLab CI.
4747
4848
```yaml
49-
image: node:18
49+
image: node:20
5050

5151
# List of stages for jobs, and their order of execution
5252
stages:
@@ -82,7 +82,7 @@ deploy-function:
8282
Here is the sample pipeline configuration to deploy via Bitbucket.
8383
8484
```yaml
85-
image: node:18
85+
image: node:20
8686

8787
pipelines:
8888
default:

apps/docs/lib/fetch/branches.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ResponseError } from '~/types/fetch'
1+
import type { ResponseError } from '~/types/fetch'
22
import { get } from './fetchWrappers'
33
import { UseQueryOptions, useQuery } from '@tanstack/react-query'
44

apps/docs/lib/fetch/organizations.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useQuery, UseQueryOptions } from '@tanstack/react-query'
22
import { get } from './fetchWrappers'
3-
import { components } from '~/types/api'
4-
import { ResponseError } from '~/types/fetch'
3+
import type { components } from '~/types/api'
4+
import type { ResponseError } from '~/types/fetch'
55

66
const organizationKeys = {
77
list: () => ['organizations'] as const,

apps/docs/lib/fetch/projectApi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ResponseError } from '~/types/fetch'
1+
import type { ResponseError } from '~/types/fetch'
22
import { get } from './fetchWrappers'
33
import { UseQueryOptions, useQuery } from '@tanstack/react-query'
44

apps/docs/lib/fetch/projects.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useQuery, UseQueryOptions } from '@tanstack/react-query'
2-
import { ResponseError } from '~/types/fetch'
2+
import type { ResponseError } from '~/types/fetch'
33
import { get } from './fetchWrappers'
44

55
const projectKeys = {

apps/docs/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
"next-plugin-yaml": "^1.0.1",
6060
"next-seo": "^5.14.1",
6161
"next-themes": "^0.2.1",
62-
"openai": "^4.17.0",
62+
"openai": "^4.20.1",
6363
"openapi-fetch": "^0.8.2",
6464
"react": "^18.2.0",
6565
"react-dom": "^18.2.0",
6666
"react-error-boundary": "^4.0.12",
67-
"react-intersection-observer": "^9.5.2",
67+
"react-intersection-observer": "^9.5.3",
6868
"react-markdown": "^8.0.3",
6969
"rehype-katex": "^7.0.0",
7070
"rehype-slug": "^5.1.0",
@@ -79,13 +79,13 @@
7979
"unist-util-filter": "^4.0.1",
8080
"unist-util-visit": "^4.1.2",
8181
"uuid": "^9.0.1",
82-
"valtio": "^1.11.2"
82+
"valtio": "^1.12.0"
8383
},
8484
"devDependencies": {
8585
"@aws-sdk/client-secrets-manager": "^3.410.0",
8686
"@types/hast": "^2.3.4",
8787
"@types/jsrsasign": "^10.5.12",
88-
"@types/node": "^18.11.9",
88+
"@types/node": "^20.11.16",
8989
"@types/react": "^18.2.24",
9090
"@types/unist": "^2.0.6",
9191
"acorn": "^8.11.3",
@@ -95,10 +95,10 @@
9595
"globby": "^13.2.2",
9696
"jest-environment-jsdom": "^29.7.0",
9797
"npm-run-all": "^4.1.5",
98-
"openapi-types": "^12.0.2",
98+
"openapi-types": "^12.1.3",
9999
"openapi-typescript": "^6.7.4",
100100
"tsconfig": "*",
101101
"tsx": "^4.6.2",
102-
"typescript": "^5.2.2"
102+
"typescript": "^5.4.3"
103103
}
104104
}

apps/docs/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"~/*": ["./*"],
88
"@ui/*": ["./../../packages/ui/src/*"] // handle ui package paths
99
},
10-
"target": "es2015",
10+
"target": "ES2021",
1111
"lib": ["dom", "dom.iterable", "esnext"],
1212
"allowJs": true,
1313
"skipLibCheck": true,

apps/storybook/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@storybook/test": "^8.0.0-rc.1",
2525
"react": "^18.2.0",
2626
"react-dom": "^18.2.0",
27-
"storybook": "^8.0.0-rc.1"
27+
"storybook": "^8.0.4"
2828
},
2929
"dependencies": {
3030
"@storybook/node-logger": "^8.0.0-rc.1"

apps/studio/.nvmrc

-1
This file was deleted.

apps/studio/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# docker builder prune
99
# docker build . -f studio/Dockerfile --target production -t studio:latest --no-cache
1010

11-
FROM node:18-slim as base
11+
FROM node:20-slim as base
1212

1313
# Fixes issues with Sentry CLI and SSL certificates during build
1414
# TODO: Git is added because it's needed to build libpg, remove it once they publish a binary on the S3 bucket
@@ -27,7 +27,7 @@ WORKDIR /app
2727
FROM base as turbo
2828
COPY . .
2929

30-
RUN npx turbo@1.12.3 prune --scope=studio --docker
30+
RUN npx turbo@1.30.0 prune --scope=studio --docker
3131

3232
# Install dev dependencies (only if needed)
3333
FROM base as deps
@@ -56,5 +56,5 @@ COPY --from=builder /app/apps/studio/.next/standalone ./
5656
COPY --from=builder /app/apps/studio/.next/static ./apps/studio/.next/static
5757
EXPOSE 3000
5858
ENTRYPOINT ["docker-entrypoint.sh"]
59-
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
59+
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD node -e "fetch('http://localhost:3000/api/profile').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
6060
CMD ["node", "apps/studio/server.js"]

apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/AIPolicyEditorPanel.utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PostgresPolicy } from '@supabase/postgres-meta'
2-
import { Message } from 'ai/react'
2+
import type { Message } from 'ai/react'
33
import { uuidv4 } from 'lib/helpers'
44
import { isEqual } from 'lodash'
55

apps/studio/components/interfaces/Database/Functions/CreateFunction/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useDatabaseExtensionsQuery } from 'data/database-extensions/database-ex
1414
import { useDatabaseFunctionCreateMutation } from 'data/database-functions/database-functions-create-mutation'
1515
import { useDatabaseFunctionUpdateMutation } from 'data/database-functions/database-functions-update-mutation'
1616
import { EXCLUDED_SCHEMAS } from 'lib/constants/schemas'
17-
import { FormSchema } from 'types'
17+
import type { FormSchema } from 'types'
1818
import {
1919
Button,
2020
FormControl_Shadcn_,

0 commit comments

Comments
 (0)