chore(NodeJS): use Node.js v18 (#12650)

This commit is contained in:
Guido Iaquinti
2022-12-12 15:02:33 +01:00
committed by GitHub
parent ff1643e28d
commit 9acbb57623
10 changed files with 28 additions and 26 deletions

View File

@@ -30,9 +30,8 @@ RUN apt-get update \
"postgresql-client=13+*" \
&& rm -rf /var/lib/apt/lists/*
# Install node
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="16"
# Install node via NVM (https://github.com/nvm-sh/nvm)
ARG NODE_VERSION="18"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
WORKDIR /workspace
@@ -49,4 +48,3 @@ WORKDIR /workspace
COPY requirements.txt requirements-dev.txt ./
RUN pip install -r requirements-dev.txt --compile --no-cache-dir && \
pip install -r requirements.txt --compile --no-cache-dir

View File

@@ -18,10 +18,10 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
- name: Install package.json dependencies with pnpm
@@ -36,8 +36,8 @@ jobs:
- name: Serve Storybook and run tests
run: |
pnpm dlx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"pnpm dlx http-server storybook-static --port 6006 --silent" \
"pnpm dlx wait-on tcp:6006 && pnpm dlx playwright test"
"pnpm dlx http-server storybook-static --port 6006" \
"pnpm dlx wait-on http://127.0.0.1:6006 --timeout 60 && pnpm dlx playwright test"
- name: Upload Playwright report
uses: actions/upload-artifact@v3

View File

@@ -242,7 +242,7 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

View File

@@ -26,10 +26,10 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
- name: Install package.json dependencies with pnpm
@@ -56,11 +56,13 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile
- id: set-test-chunks
name: Set Chunks
@@ -93,10 +95,10 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
- name: Install package.json dependencies with pnpm

View File

@@ -54,7 +54,7 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
@@ -120,7 +120,7 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
@@ -195,7 +195,7 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

View File

@@ -19,7 +19,7 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

View File

@@ -16,10 +16,10 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
# there's no need to run chromatic on every commit,

View File

@@ -22,10 +22,10 @@ jobs:
with:
version: 7.x.x
- name: Set up Node 16
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm
cache-dependency-path: posthog/pnpm-lock.yaml

View File

@@ -13,7 +13,7 @@
"homepage": "https://github.com/posthog/posthog#readme",
"license": "MIT",
"engines": {
"node": ">=16 <19"
"node": ">=18 <19"
},
"packageManager": "pnpm@7.14.2",
"scripts": {
@@ -44,7 +44,7 @@
"format:js": "pnpm prettier && pnpm eslint --fix",
"format": "pnpm format:python && pnpm format:js",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"build-storybook": "export NODE_OPTIONS=--openssl-legacy-provider; build-storybook",
"dev:migrate:postgres": "export DEBUG=1 && source env/bin/activate && python manage.py migrate",
"dev:migrate:clickhouse": "export DEBUG=1 && source env/bin/activate && python manage.py migrate_clickhouse",
"prepare": "husky install"

View File

@@ -4,7 +4,9 @@
"@babel/preset-env",
{
"loose": true,
"targets": { "node": 16 }
"targets": {
"node": 18
}
}
],
"@babel/preset-typescript"