mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
feat!: Node v16 as minimum for verdaccio 6 (#2833)
This commit is contained in:
parent
7ec9c8772b
commit
22093ebffe
19
.babelrc
19
.babelrc
@ -1,15 +1,14 @@
|
||||
{
|
||||
"presets": [ [
|
||||
"@babel/env",
|
||||
{
|
||||
"targets": {
|
||||
"node": 14
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"targets": {
|
||||
"node": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
],
|
||||
"@babel/typescript"
|
||||
],
|
||||
"ignore": [
|
||||
"**/*.d.ts"
|
||||
]
|
||||
"ignore": ["**/*.d.ts"]
|
||||
}
|
||||
|
70
.github/workflows/ci.yml
vendored
70
.github/workflows/ci.yml
vendored
@ -25,10 +25,10 @@ jobs:
|
||||
- 4873:4873
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- name: Use Node 14
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- name: set store
|
||||
@ -84,43 +84,6 @@ jobs:
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: Lint
|
||||
run: pnpm format:check
|
||||
|
||||
build14:
|
||||
runs-on: ubuntu-latest
|
||||
name: build-node-14
|
||||
needs: [format, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: Install
|
||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||
- name: crowdin download
|
||||
env:
|
||||
CROWDIN_VERDACCIO_PROJECT_ID: ${{ secrets.CROWDIN_VERDACCIO_PROJECT_ID }}
|
||||
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
|
||||
CONTEXT: production
|
||||
run: pnpm crowdin:download
|
||||
## this step is optional, translations are not mandatory for PR
|
||||
## secrets keys are not available on forks, the failure here is guaranteed
|
||||
continue-on-error: true
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: tar packages
|
||||
run: |
|
||||
tar -czvf ${{ github.workspace }}/pkg.tar.gz -C ${{ github.workspace }}/packages .
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
path: pkg.tar.gz
|
||||
build:
|
||||
needs: [format, lint]
|
||||
strategy:
|
||||
@ -128,7 +91,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
## Node 16 breaks UI test, jest issue
|
||||
node_version: [14, 16, 17]
|
||||
node_version: [16, 17]
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@ -150,19 +113,14 @@ jobs:
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
ci-e2e-ui:
|
||||
needs: build14
|
||||
needs: [format, lint]
|
||||
runs-on: ubuntu-latest
|
||||
name: UI Test E2E Node 14
|
||||
name: UI Test E2E Node 16
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
node-version: 16
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
@ -172,24 +130,22 @@ jobs:
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
# env:
|
||||
# DEBUG: verdaccio:e2e*
|
||||
ci-e2e-cli:
|
||||
needs: build14
|
||||
needs: [format, lint]
|
||||
runs-on: ubuntu-latest
|
||||
# TODO: fails on migrate to node 16, we need to check why
|
||||
name: CLI Test E2E Node 14
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
- name: untar packages
|
||||
run: tar -xzvf pkg.tar.gz -C ${{ github.workspace }}/packages
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@6.24.1 -g
|
||||
- uses: actions/cache@v2
|
||||
@ -199,12 +155,14 @@ jobs:
|
||||
- name: Install
|
||||
## we need scripts, pupetter downloads aditional content
|
||||
run: pnpm recursive install --frozen-lockfile
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Test CLI
|
||||
run: pnpm test:e2e:cli
|
||||
env:
|
||||
DEBUG: verdaccio*
|
||||
sync-translations:
|
||||
needs: [ci-e2e-cli, ci-e2e-ui, build14]
|
||||
needs: [ci-e2e-cli, ci-e2e-ui]
|
||||
runs-on: ubuntu-latest
|
||||
name: synchronize translations
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
@ -212,7 +170,7 @@ jobs:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: verdaccio-artifact
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:14.18.1-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:16.13.1-alpine as builder
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
||||
@ -11,7 +11,7 @@ RUN apk --no-cache add openssl ca-certificates wget && \
|
||||
|
||||
WORKDIR /opt/verdaccio-build
|
||||
COPY . .
|
||||
RUN npm -g i pnpm@6.10.3 && \
|
||||
RUN npm -g i pnpm@6.24.1 && \
|
||||
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
|
||||
pnpm recursive install --frozen-lockfile --ignore-scripts && \
|
||||
rm -Rf test && \
|
||||
@ -20,7 +20,7 @@ RUN npm -g i pnpm@6.10.3 && \
|
||||
# FIXME: need to remove devDependencies from the build
|
||||
# RUN pnpm install --prod --ignore-scripts
|
||||
|
||||
FROM node:14.18.1-alpine
|
||||
FROM node:16.13.1-alpine
|
||||
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||
|
||||
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
||||
|
@ -29,7 +29,7 @@ Google Cloud Storage** or create your own plugin.
|
||||
|
||||
## Install
|
||||
|
||||
> Latest Node.js v14
|
||||
> Latest Node.js v16 required
|
||||
|
||||
Install with npm:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user