mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
feat!: Node v16 as minimum for verdaccio 6 (#2833)
This commit is contained in:
parent
7ec9c8772b
commit
22093ebffe
4 changed files with 27 additions and 70 deletions
19
.babelrc
19
.babelrc
|
@ -1,15 +1,14 @@
|
||||||
{
|
{
|
||||||
"presets": [ [
|
"presets": [
|
||||||
"@babel/env",
|
[
|
||||||
{
|
"@babel/env",
|
||||||
"targets": {
|
{
|
||||||
"node": 14
|
"targets": {
|
||||||
|
"node": 16
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
],
|
|
||||||
"@babel/typescript"
|
"@babel/typescript"
|
||||||
],
|
],
|
||||||
"ignore": [
|
"ignore": ["**/*.d.ts"]
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
70
.github/workflows/ci.yml
vendored
70
.github/workflows/ci.yml
vendored
|
@ -25,10 +25,10 @@ jobs:
|
||||||
- 4873:4873
|
- 4873:4873
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- name: Use Node 14
|
- name: Use Node 16
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
run: npm i pnpm@6.24.1 -g
|
run: npm i pnpm@6.24.1 -g
|
||||||
- name: set store
|
- name: set store
|
||||||
|
@ -84,43 +84,6 @@ jobs:
|
||||||
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
run: pnpm recursive install --frozen-lockfile --ignore-scripts
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm format:check
|
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:
|
build:
|
||||||
needs: [format, lint]
|
needs: [format, lint]
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -128,7 +91,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
## Node 16 breaks UI test, jest issue
|
## Node 16 breaks UI test, jest issue
|
||||||
node_version: [14, 16, 17]
|
node_version: [16, 17]
|
||||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -150,19 +113,14 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
ci-e2e-ui:
|
ci-e2e-ui:
|
||||||
needs: build14
|
needs: [format, lint]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: UI Test E2E Node 14
|
name: UI Test E2E Node 16
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
- 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
|
- name: Install pnpm
|
||||||
run: npm i pnpm@6.24.1 -g
|
run: npm i pnpm@6.24.1 -g
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
|
@ -172,24 +130,22 @@ jobs:
|
||||||
- name: Install
|
- name: Install
|
||||||
## we need scripts, pupetter downloads aditional content
|
## we need scripts, pupetter downloads aditional content
|
||||||
run: pnpm recursive install --frozen-lockfile
|
run: pnpm recursive install --frozen-lockfile
|
||||||
|
- name: build
|
||||||
|
run: pnpm build
|
||||||
- name: Test UI
|
- name: Test UI
|
||||||
run: pnpm test:e2e:ui
|
run: pnpm test:e2e:ui
|
||||||
# env:
|
# env:
|
||||||
# DEBUG: verdaccio:e2e*
|
# DEBUG: verdaccio:e2e*
|
||||||
ci-e2e-cli:
|
ci-e2e-cli:
|
||||||
needs: build14
|
needs: [format, lint]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# TODO: fails on migrate to node 16, we need to check why
|
||||||
name: CLI Test E2E Node 14
|
name: CLI Test E2E Node 14
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
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
|
- name: Install pnpm
|
||||||
run: npm i pnpm@6.24.1 -g
|
run: npm i pnpm@6.24.1 -g
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
|
@ -199,12 +155,14 @@ jobs:
|
||||||
- name: Install
|
- name: Install
|
||||||
## we need scripts, pupetter downloads aditional content
|
## we need scripts, pupetter downloads aditional content
|
||||||
run: pnpm recursive install --frozen-lockfile
|
run: pnpm recursive install --frozen-lockfile
|
||||||
|
- name: build
|
||||||
|
run: pnpm build
|
||||||
- name: Test CLI
|
- name: Test CLI
|
||||||
run: pnpm test:e2e:cli
|
run: pnpm test:e2e:cli
|
||||||
env:
|
env:
|
||||||
DEBUG: verdaccio*
|
DEBUG: verdaccio*
|
||||||
sync-translations:
|
sync-translations:
|
||||||
needs: [ci-e2e-cli, ci-e2e-ui, build14]
|
needs: [ci-e2e-cli, ci-e2e-ui]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: synchronize translations
|
name: synchronize translations
|
||||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
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/checkout@v2.4.0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: verdaccio-artifact
|
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 \
|
ENV NODE_ENV=development \
|
||||||
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
|
||||||
|
@ -11,7 +11,7 @@ RUN apk --no-cache add openssl ca-certificates wget && \
|
||||||
|
|
||||||
WORKDIR /opt/verdaccio-build
|
WORKDIR /opt/verdaccio-build
|
||||||
COPY . .
|
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 config set registry $VERDACCIO_BUILD_REGISTRY && \
|
||||||
pnpm recursive install --frozen-lockfile --ignore-scripts && \
|
pnpm recursive install --frozen-lockfile --ignore-scripts && \
|
||||||
rm -Rf test && \
|
rm -Rf test && \
|
||||||
|
@ -20,7 +20,7 @@ RUN npm -g i pnpm@6.10.3 && \
|
||||||
# FIXME: need to remove devDependencies from the build
|
# FIXME: need to remove devDependencies from the build
|
||||||
# RUN pnpm install --prod --ignore-scripts
|
# 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"
|
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||||
|
|
||||||
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
||||||
|
|
|
@ -29,7 +29,7 @@ Google Cloud Storage** or create your own plugin.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
> Latest Node.js v14
|
> Latest Node.js v16 required
|
||||||
|
|
||||||
Install with npm:
|
Install with npm:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue