Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to node 16, npm 7. #3773

Merged
merged 25 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
eafa665
Migrate to node 16 and nmp 7.
dvkruchinin Oct 5, 2021
1563aed
Step 2
dvkruchinin Oct 5, 2021
d3fb22a
Moving eslint to one package.json
dvkruchinin Oct 5, 2021
55c1f6a
Fix package for 3D
dvkruchinin Oct 5, 2021
3e1a5c8
Update package files
dvkruchinin Oct 5, 2021
60d0bd8
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
dvkruchinin Oct 6, 2021
bc5cd52
Fix package.json. Update package-lock.json. Update DockeFile.ui
dvkruchinin Oct 6, 2021
200af1e
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
dvkruchinin Oct 6, 2021
feea6a1
Change "node-sass" to "sass" due to snyk issues
dvkruchinin Oct 7, 2021
7d1076c
Automatically update your stylesheets due to DEPRECATION WARNING from…
dvkruchinin Oct 7, 2021
7dc2386
Moving all dev dependencies to root package.json
dvkruchinin Oct 7, 2021
3773c28
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
dvkruchinin Oct 7, 2021
95b5df0
Remove unnecessary dependence from cvat-core-package.json
dvkruchinin Oct 7, 2021
3e2eee7
Update of the year in copyrights
dvkruchinin Oct 7, 2021
84038b5
Update CHANGELOG.md
dvkruchinin Oct 7, 2021
41c5cd0
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
dvkruchinin Oct 8, 2021
3dd2f0a
Define workspaces
dvkruchinin Oct 8, 2021
3b3c25d
Update npm command to root package.json
dvkruchinin Oct 11, 2021
b04cab3
Update npm commands and corresponding files
dvkruchinin Oct 11, 2021
702889f
Update npm command.
dvkruchinin Oct 11, 2021
5ab64be
Fix Dockerfile.ui
dvkruchinin Oct 11, 2021
8910394
Merge branch 'develop' into dkru/migrate-node16
Oct 12, 2021
5b7eef9
Fix error loading rule '@typescript-eslint/dot-notation'
dvkruchinin Oct 12, 2021
f583100
Merge remote-tracking branch 'origin/dkru/migrate-node16' into dkru/m…
dvkruchinin Oct 12, 2021
98537c2
Fix eslint check issue
dvkruchinin Oct 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand All @@ -21,10 +21,8 @@ jobs:
done

if [[ ! -z ${changed_files_eslint} ]]; then
for package_files in `find -maxdepth 2 -name "package.json" -type f`; do
cd $(dirname $package_files) && npm ci && cd ${{ github.workspace }}
done
npm install eslint-detailed-reporter --save-dev
npm ci
npm install eslint-detailed-reporter --save-dev --legacy-peer-deps
mkdir -p eslint_report

echo "ESLint version: "`npx eslint --version`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: '16.x'

- name: Install npm packages
working-directory: ./site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
key: ${{ runner.os }}-build-ui-${{ steps.get-sha.outputs.sha }}
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Building CVAT server image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Run end-to-end tests
env:
DJANGO_SU_NAME: 'admin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'
- name: Build CVAT
env:
DJANGO_SU_NAME: "admin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: '16.x'

- name: Run checks
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- UI tracking has been reworked (<https://github.com/openvinotoolkit/cvat/pull/3571>)
- Manifest generation: Reduce creating time (<https://github.com/openvinotoolkit/cvat/pull/3712>)
- Migration from NPM 6 to NPM 7 (<https://github.com/openvinotoolkit/cvat/pull/3773>)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
&& \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \
curl https://deb.nodesource.com/setup_12.x | bash - && \
curl https://deb.nodesource.com/setup_16.x | bash - && \
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -yq \
google-chrome-stable \
nodejs \
Expand Down
27 changes: 6 additions & 21 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-buster AS cvat-ui
FROM node:stretch AS cvat-ui

ARG http_proxy
ARG https_proxy
Expand All @@ -16,39 +16,24 @@ ENV TERM=xterm \
LC_ALL='C.UTF-8'

# Install dependencies
COPY package*.json /tmp/
COPY cvat-core/package*.json /tmp/cvat-core/
COPY cvat-canvas/package*.json /tmp/cvat-canvas/
COPY cvat-canvas3d/package*.json /tmp/cvat-canvas3d/
COPY cvat-ui/package*.json /tmp/cvat-ui/
COPY cvat-data/package*.json /tmp/cvat-data/

# Install cvat-data dependencies
WORKDIR /tmp/cvat-data/
RUN npm ci

# Install cvat-core dependencies
WORKDIR /tmp/cvat-core/
RUN npm ci

# Install cvat-canvas dependencies
WORKDIR /tmp/cvat-canvas/
RUN npm ci

# Install cvat-canvas dependencies
WORKDIR /tmp/cvat-canvas3d/
RUN npm ci

# Install cvat-ui dependencies
WORKDIR /tmp/cvat-ui/
RUN npm ci
# Install common dependencies
WORKDIR /tmp/
RUN npm ci --ignore-scripts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need --ignore-scripts flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this flag I got an error rm: cannot remove '.husky/pre-commit': No such file or directory


# Build source code
COPY cvat-data/ /tmp/cvat-data/
COPY cvat-core/ /tmp/cvat-core/
COPY cvat-canvas3d/ /tmp/cvat-canvas3d/
COPY cvat-canvas/ /tmp/cvat-canvas/
COPY cvat-ui/ /tmp/cvat-ui/
RUN npm run build
RUN npm run build:cvat-ui

FROM nginx:mainline-alpine
# Replace default.conf configuration to remove unnecessary rules
Expand Down
5 changes: 4 additions & 1 deletion cvat-canvas/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Intel Corporation
// Copyright (C) 2019-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

Expand All @@ -9,6 +9,8 @@ module.exports = {
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 6,
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'import'],
extends: [
Expand All @@ -18,6 +20,7 @@ module.exports = {
'plugin:import/warnings',
'plugin:import/typescript',
],
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/indent': ['warn', 4],
Expand Down
Loading