Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit cbdbc29

Browse files
author
Pavel Ageev
committed
chore(deps): bump versions, remove yarn usage
1 parent 332c6e0 commit cbdbc29

File tree

9 files changed

+10117
-6256
lines changed

9 files changed

+10117
-6256
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
!jest.config.js
99
!jsconfig.json
1010
!package.json
11-
!yarn.lock
11+
!package-lock.json

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
- name: Setup node
1414
uses: actions/setup-node@v1
1515
with:
16-
node-version: 20.6
16+
node-version: 21.6
1717

18-
- name: yarn
19-
run: yarn --frozen-lockfile
18+
- name: npm install
19+
run: npm ci
2020

2121
- name: test
22-
run: yarn run test
22+
run: npm run test
2323

2424
- name: test check should succeed
2525
run: |
@@ -66,7 +66,7 @@ jobs:
6666
check_report
6767
6868
- name: 'lint configs'
69-
run: yarn prettier -c 'data/*'
69+
run: npm run prettier -- -c 'data/*'
7070

7171
- name: lint
72-
run: yarn run lint
72+
run: npm run lint

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
/storage_tmp/
66
.env
77
*.tgz
8-
/yarn-error.log
98
docker-compose.override.yaml

MAINTAINERS

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
Vyacheslav Artemiev <[email protected]>
2-
Alexei Kochetov <[email protected]>
3-
Ruslan Burkhanov <[email protected]>
4-
Daniil Mikhailov <[email protected]>
5-
Konstantin Sergievskiy <[email protected]>
6-
Aleksey Shirokih <[email protected]>
1+
Lev Galaktionov <[email protected]>
2+
Nikita Popov <[email protected]>
3+
Pavel Ageev <[email protected]>

Makefile

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
override APPLICATION_NAME=purr
2-
override NODE_VERSION=20.6
2+
override NODE_VERSION=21.6
33

44
DOCKER_IMAGE?=ghcr.io/semrush/purr
55
DOCKER_TAG?=latest
66
CHECK_NAME:=example-com
77
SUITE_NAME:=example-com-suite
88

9-
.PHONY: yarn-install
10-
yarn-install:
9+
.PHONY: npm-install
10+
npm-install:
1111
rm -r ${CURDIR}/node_modules || true
1212
docker run --rm \
1313
-v ${CURDIR}:/app \
1414
-w /app \
15-
--entrypoint yarn \
1615
node:${NODE_VERSION} \
17-
install --frozen-lockfile
16+
npm ci
1817

19-
.PHONY: yarn-lint
20-
yarn-lint:
18+
.PHONY: vendor
19+
vendor: npm-install
20+
21+
.PHONY: npm-lint
22+
npm-lint:
2123
docker run --rm \
2224
-v ${CURDIR}:/app \
2325
-w /app \
24-
--entrypoint yarn \
2526
node:${NODE_VERSION} \
26-
run lint
27+
npm run lint
2728

2829
.PHONY: lint
29-
lint: yarn-lint
30+
lint: npm-lint
3031

31-
.PHONY: yarn-test
32-
yarn-test:
32+
.PHONY: npm-test
33+
npm-test:
3334
docker run --rm \
3435
-v ${CURDIR}:/app \
3536
-w /app \
36-
-e PUPPETEER_SKIP_DOWNLOAD=true \
37-
--entrypoint yarn \
3837
node:${NODE_VERSION} \
39-
run test --bail
38+
npm run test
4039

4140
.PHONY: test
42-
test: yarn-test
41+
test: npm-test
4342

4443
.PHONY: docker-build
4544
docker-build:
@@ -61,7 +60,6 @@ docker-compose-down:
6160
run-check: docker-build
6261
rm -r ${CURDIR}/storage/* || true
6362
docker run --rm \
64-
-v ${CURDIR}:/app \
6563
--env-file ${CURDIR}/.env \
6664
${DOCKER_IMAGE}:${DOCKER_TAG} \
6765
check $(CHECK_NAME)

docker/Dockerfile

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
1-
ARG NODE_VERSION=20.6
1+
ARG NODE_VERSION=21.6
22

33
FROM node:${NODE_VERSION} as vendor
44

5+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
6+
57
WORKDIR /app
68

79
COPY package.json /app
8-
COPY yarn.lock /app
10+
COPY package-lock.json /app
911

10-
RUN yarn install --frozen-lockfile --production=true
12+
RUN npm ci --omit dev
1113

1214
FROM node:${NODE_VERSION}
1315

14-
RUN apt-get update && \
15-
apt-get install -y --no-install-recommends \
16-
chromium \
17-
chromium-sandbox && \
18-
apt-get clean && \
19-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* || true
20-
16+
ARG CHROMIUM_VERSION=121.0.6167.85-1~deb12u1
17+
ENV CHROMIUM_VERSION=${CHROMIUM_VERSION}
2118
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
2219

20+
RUN apt update && \
21+
apt install -y --no-install-recommends \
22+
chromium=${CHROMIUM_VERSION} \
23+
chromium-sandbox=${CHROMIUM_VERSION} && \
24+
apt clean && \
25+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* || true
26+
27+
USER node
2328
WORKDIR /app
2429

30+
COPY jsconfig.json /app
31+
COPY package.json /app
32+
COPY package-lock.json /app
2533
COPY --chown=node:node src /app/src
2634
COPY --chown=node:node data /app/data
27-
RUN chown node:node /app
35+
COPY --from=vendor --chown=node:node /app/node_modules /app/node_modules
2836

29-
COPY --from=vendor /app/node_modules /app/node_modules
3037

31-
USER node
3238
ENTRYPOINT ["/app/src/cli.js"]

0 commit comments

Comments
 (0)