Skip to content

Commit 78d55ae

Browse files
authored
Merge pull request #255 from vidavidorra/renovate/commitlint-monorepo
chore(deps): update commitlint monorepo to v20.3.1
2 parents 6f80a2b + 3ac6c6c commit 78d55ae

3 files changed

Lines changed: 99 additions & 88 deletions

File tree

package-lock.json

Lines changed: 81 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@
6767
},
6868
"devDependencies": {
6969
"@ava/typescript": "6.0.0",
70-
"@commitlint/cli": "20.3.0",
71-
"@commitlint/config-conventional": "20.3.0",
70+
"@commitlint/cli": "20.3.1",
71+
"@commitlint/config-conventional": "20.3.1",
7272
"@commitlint/lint-19.x": "npm:@commitlint/lint@19.8.1",
73-
"@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.0",
73+
"@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.1",
7474
"@commitlint/load-19.x": "npm:@commitlint/load@19.8.1",
75-
"@commitlint/load-20.x": "npm:@commitlint/load@20.3.0",
76-
"@commitlint/rules": "20.3.0",
77-
"@commitlint/types": "20.2.0",
75+
"@commitlint/load-20.x": "npm:@commitlint/load@20.3.1",
76+
"@commitlint/rules": "20.3.1",
77+
"@commitlint/types": "20.3.1",
7878
"@types/sinon": "21.0.0",
7979
"@vidavidorra/eslint-config": "1.0.3",
8080
"@vidavidorra/prettier-config": "1.0.6",

src/index.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ const loadPlugin = test.macro<[keyof typeof versions]>({
3737
test(loadPlugin, '19.x');
3838
test(loadPlugin, '20.x');
3939

40+
/**
41+
* The type of the `RulesConfig` have changed in [commitlint v20.3.1](
42+
* https://github.com/conventional-changelog/commitlint/releases/tag/v20.3.1),
43+
* and are no longer compatible with those from v19. Specifically the types of
44+
* the `scope-case` and `scope-enum` rules have been changed to also accept a
45+
* rule object. While the individual versions are able process this test without
46+
* runtime or type errors, the combined signature causes type errors. To keep
47+
* the test, a relatively long one, the same for both versions, the type of the
48+
* rule config is cast.
49+
*/
4050
const lintUsingPluginRules = test.macro<[keyof typeof versions]>({
4151
async exec(t, version) {
4252
// eslint-disable-next-line @typescript-eslint/await-thenable
@@ -52,6 +62,7 @@ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({
5262
for await (const config of configs) {
5363
const report = await versions[version].lint(
5464
'chore: basic commit message',
65+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5566
{
5667
[rule]: [
5768
2,
@@ -60,7 +71,7 @@ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({
6071
? async () => config.ruleOutcome
6172
: () => config.ruleOutcome,
6273
],
63-
},
74+
} as unknown as any,
6475
{plugins: {'function-rules': plugin}},
6576
);
6677

0 commit comments

Comments
 (0)