Skip to content

Commit

Permalink
commitlint.sh,CI: use a previous version to fix CI
Browse files Browse the repository at this point in the history
The last version of commitlint is making our tests fail. My
suspicions for why are the following:

* After their massive refactoring migrating to ESM [1], they
somehow changed their sub-package @commitlint/types, which I
reported as bug 3942 [2].

* When fixing bug 3942 [3], they updated their dependency to
`@types/conventional-commits-parser` to a higher version (from
3.0.6 to 5.0.0). Version 5.0.0 of that package is about 18
days old, however, version 5.0.0 of package
`conventional-commits-parser` [4] is 6 months old! But the
worst is that the previous version 3.0.6 (which is the one
that commitlint was using before this update) was published
about 4 years ago! So I'm guessing our plugins were compatible
with very old versions of this internal component and now its
update has exposed bugs.

[1] conventional-changelog/commitlint@3423735
[2] conventional-changelog/commitlint#3942
[3] conventional-changelog/commitlint@5a01f59
[4] https://www.npmjs.com/package/conventional-commits-parser
  • Loading branch information
knocte committed Mar 12, 2024
1 parent b2c1056 commit db33a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
npm install --verboase --global yarn
yarn add --dev jest typescript ts-jest @types/jest
- name: Install commitlint dependencies
run: npm install --verbose @commitlint/types
run: npm install --verbose @commitlint/types@18.6.1
- name: Print versions
run: |
git --version
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
npm install --verbose --global yarn
yarn add --dev jest typescript ts-jest @types/jest ts-node
- name: Install commitlint dependencies
run: npm install --verbose @commitlint/types
run: npm install --verbose @commitlint/types@18.6.1
- name: Run typescript compiler
run: npx tsc
- name: Print versions
Expand Down
2 changes: 1 addition & 1 deletion commitlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -euxo pipefail
# cd to directory of this script
cd "$(dirname "$0")"
npm install --verbose
npm install --verbose @commitlint/config-conventional
npm install --verbose @commitlint/config-conventional@18.6.1
npx commitlint --version
npx commitlint $@

0 comments on commit db33a6c

Please sign in to comment.