mirror of
https://github.com/leon-ai/leon.git
synced 2024-09-11 18:27:21 +03:00
refactor: prerequisites Node.js >= 16.0.0 and npm >= 8.0.0 (#322)
BREAKING CHANGE: minimum supported Node.js v16.0.0 and npm v8.0.0
This commit is contained in:
parent
cf6d7d0749
commit
2f66f1c17b
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
@ -8,27 +8,27 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: leonai/ci:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Use Python
|
||||||
uses: actions/cache@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
python-version: 3.x
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: ${{ runner.os }}-npm-
|
- name: Use Node.js
|
||||||
- name: Cache Pipenv
|
uses: actions/setup-node@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
with:
|
||||||
path: ./bridges/python/.venv
|
node-version: 16.x
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile.lock') }}
|
cache: npm
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
|
- name: Install Pipenv
|
||||||
|
run: pip install --upgrade pip && pip install pipenv
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: npm ci
|
run: npm install
|
||||||
|
|
||||||
- name: Check setup
|
- name: Check setup
|
||||||
run: npm run check
|
run: npm run check
|
||||||
|
28
.github/workflows/lint.yml
vendored
28
.github/workflows/lint.yml
vendored
@ -8,27 +8,27 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: leonai/ci:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Use Python
|
||||||
uses: actions/cache@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
python-version: 3.x
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: ${{ runner.os }}-npm-
|
- name: Use Node.js
|
||||||
- name: Cache Pipenv
|
uses: actions/setup-node@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
with:
|
||||||
path: ./bridges/python/.venv
|
node-version: 16.x
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile.lock') }}
|
cache: npm
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
|
- name: Install Pipenv
|
||||||
|
run: pip install --upgrade pip && pip install pipenv
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: npm ci
|
run: npm install
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
30
.github/workflows/tests.yml
vendored
30
.github/workflows/tests.yml
vendored
@ -8,27 +8,27 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: leonai/ci:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Use Python
|
||||||
uses: actions/cache@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
python-version: 3.x
|
||||||
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: ${{ runner.os }}-npm-
|
- name: Use Node.js
|
||||||
- name: Cache Pipenv
|
uses: actions/setup-node@v2
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
with:
|
||||||
path: ./bridges/python/.venv
|
node-version: 16.x
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile.lock') }}
|
cache: npm
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
- name: Install npm dependencies
|
- name: Install Pipenv
|
||||||
run: npm ci
|
run: pip install --upgrade pip && pip install pipenv
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
- name: Run JSON tests
|
- name: Run JSON tests
|
||||||
run: npm run test:json
|
run: npm run test:json
|
||||||
|
17
Dockerfile
17
Dockerfile
@ -1,25 +1,20 @@
|
|||||||
FROM node:14-alpine
|
FROM node:16-alpine
|
||||||
ENV IS_DOCKER true
|
ENV IS_DOCKER true
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install system packages
|
# Install system packages
|
||||||
RUN apk add --no-cache --no-progress \
|
RUN apk add --no-cache --no-progress \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
python3 \
|
py3-pip \
|
||||||
git \
|
git \
|
||||||
tzdata
|
tzdata
|
||||||
|
|
||||||
# Upgrade pip and install Pipenv
|
# Upgrade pip and install Pipenv
|
||||||
RUN pip3 install --no-cache-dir --progress-bar off pipenv
|
RUN pip3 install --no-cache-dir --progress-bar off pipenv
|
||||||
|
|
||||||
# Install Leon
|
# Install Leon
|
||||||
# Need to explicitly run the npm preinstall and npm posinstall scripts (not needed with npm@7)
|
|
||||||
# because npm tries to downgrade its privileges, and these scripts are not executed
|
|
||||||
COPY ./package*.json ./
|
|
||||||
RUN npm clean-install
|
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
RUN npm run preinstall
|
RUN npm install
|
||||||
RUN npm run postinstall
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "start"]
|
||||||
|
@ -75,8 +75,8 @@ Gitpod will automatically setup an environment and run an instance for you.
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/) >= 14
|
- [Node.js](https://nodejs.org/) >= 16
|
||||||
- [npm](https://npmjs.com/) >= 5
|
- [npm](https://npmjs.com/) >= 8
|
||||||
- [Python](https://www.python.org/downloads/) >= 3
|
- [Python](https://www.python.org/downloads/) >= 3
|
||||||
- [Pipenv](https://docs.pipenv.org) >= 2020.11.15
|
- [Pipenv](https://docs.pipenv.org) >= 2020.11.15
|
||||||
- Supported OSes: Linux, macOS and Windows
|
- Supported OSes: Linux, macOS and Windows
|
||||||
|
24766
package-lock.json
generated
24766
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -17,8 +17,8 @@
|
|||||||
"url": "https://github.com/leon-ai/leon/issues"
|
"url": "https://github.com/leon-ai/leon/issues"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": ">=16.0.0",
|
||||||
"npm": ">=5.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "babel-node scripts/lint.js",
|
"lint": "babel-node scripts/lint.js",
|
||||||
@ -80,10 +80,10 @@
|
|||||||
"superagent": "^6.1.0"
|
"superagent": "^6.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.14.3",
|
"@babel/cli": "^7.16.0",
|
||||||
"@babel/core": "^7.13.8",
|
"@babel/core": "^7.16.0",
|
||||||
"@babel/node": "^7.14.2",
|
"@babel/node": "^7.16.0",
|
||||||
"@babel/preset-env": "^7.14.5",
|
"@babel/preset-env": "^7.16.0",
|
||||||
"babel-plugin-module-resolver": "^4.1.0",
|
"babel-plugin-module-resolver": "^4.1.0",
|
||||||
"cli-spinner": "^0.2.10",
|
"cli-spinner": "^0.2.10",
|
||||||
"eslint": "^7.28.0",
|
"eslint": "^7.28.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user