Skip to content

Commit 9e74c4f

Browse files
committed
Upgrade commitlint and its dependencies
Upgrade commitlint and its dependencies to the latest version. I installed node 14 using curl because node version in apt is 12 and with this version I get this error in jest installation: ``` error @jest/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9" ```
1 parent 04a8d99 commit 9e74c4f

File tree

4 files changed

+14
-5790
lines changed

4 files changed

+14
-5790
lines changed

.github/workflows/CI.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ jobs:
1414
apt update
1515
apt install -y sudo
1616
sudo apt install -y git
17-
sudo DEBIAN_FRONTEND=noninteractive apt install --yes npm
18-
- name: Install commitlint
19-
run: npm install
17+
18+
sudo apt install -y curl
19+
# can't install ubuntu's default nodejs version because we would get this error:
20+
# error @jest/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9"
21+
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
22+
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
2023
- name: Print versions
2124
run: |
2225
git --version
@@ -25,7 +28,12 @@ jobs:
2528
npx commitlint --version
2629
- name: Install yarn
2730
run: |
28-
sudo npm install -g yarn
31+
npm install -g yarn
32+
yarn add --dev jest typescript ts-jest @types/jest
33+
- name: Install commitlint
34+
run: |
35+
npm install conventional-changelog-conventionalcommits
36+
npm install commitlint@latest
2937
- name: Print versions
3038
run: |
3139
git --version
@@ -80,8 +88,4 @@ jobs:
8088
# Since we changed file modes in the previous step we need the following command to
8189
# make git ignore mode changes in files and doesn't include them in the git diff command.
8290
git config core.fileMode false
83-
# Since after installing npm packages, package.json and package-lock.json change,
84-
# `git diff --exit-code` will always throw an error, so we need to restore those
85-
# files before running `git diff --exit-code` command.
86-
git restore package.json package-lock.json
8791
git diff --exit-code

commitlint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ set -euxo pipefail
33

44
# cd to directory of this script
55
cd "$(dirname "$0")"
6-
npm install
6+
npm install conventional-changelog-conventionalcommits
7+
npm install commitlint@latest
78
npx commitlint --version
89
npx commitlint $@
910
cd ..

0 commit comments

Comments
 (0)