Skip to content

Commit ae834c1

Browse files
authored
Chore/deps 20230625 2 (conventional-changelog#3622)
* chore: update some deps incl. eslint fixes * chore: update cosmicconfig * revert: dep updates to test CI * chore: update some deps * chore: update some deps
1 parent 890a931 commit ae834c1

File tree

7 files changed

+118
-166
lines changed

7 files changed

+118
-166
lines changed

@commitlint/config-validator/src/validate.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const invalidSchemas: Record<string, any> = {
5454

5555
describe('validation should pass for', () => {
5656
test.each(Object.entries(validSchemas))('%s', (file, config) => {
57-
expect(() => validateConfig(`${file}.js`, config)).not.toThrowError();
57+
expect(() => validateConfig(`${file}.js`, config)).not.toThrow();
5858
});
5959
});
6060

@commitlint/cz-commitlint/src/Process.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ describe('conventional-changlog', () => {
233233
};
234234
return process(rules as any, prompts, InquirerFactory(answers) as any).then(
235235
() => {
236-
expect(mockShowValidation).toBeCalledWith('subject can not be empty');
237-
expect(mockShowTitle).toBeCalledTimes(3);
236+
expect(mockShowValidation).toHaveBeenCalledWith(
237+
'subject can not be empty'
238+
);
239+
expect(mockShowTitle).toHaveBeenCalledTimes(3);
238240
}
239241
);
240242
});

@commitlint/ensure/src/case.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,5 +334,5 @@ test('true for numeric on lowercase', () => {
334334

335335
test('throw TypeError for invalid case name', () => {
336336
const actualFn = () => ensure('anything', 'someweirdcase' as any);
337-
expect(actualFn).toThrowError(TypeError);
337+
expect(actualFn).toThrow(TypeError);
338338
});

@commitlint/parse/src/index.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import parse from '.';
22

33
test('throws when called without params', async () => {
4-
await expect((parse as any)()).rejects.toThrowError('Expected a raw commit');
4+
await expect((parse as any)()).rejects.toThrow('Expected a raw commit');
55
});
66

77
test('throws when called with empty message', async () => {
8-
await expect(parse('')).rejects.toThrowError('Expected a raw commit');
8+
await expect(parse('')).rejects.toThrow('Expected a raw commit');
99
});
1010

1111
test('returns object with raw message', async () => {

@commitlint/resolve-extends/src/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test('falls back to global install', async () => {
2121
const ctx = {resolveGlobal, require} as ResolveExtendsContext;
2222

2323
resolveExtends({extends: ['@commitlint/foo-bar']}, ctx);
24-
expect(ctx.resolveGlobal).toBeCalledWith('@commitlint/foo-bar');
24+
expect(ctx.resolveGlobal).toHaveBeenCalledWith('@commitlint/foo-bar');
2525
});
2626

2727
test('fails for missing extends', async () => {

@commitlint/rules/src/subject-full-stop.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export const subjectFullStop: SyncRule<string> = (
66
when = 'always',
77
value = '.'
88
) => {
9-
10-
let colonIndex = parsed.header.indexOf(':');
9+
const colonIndex = parsed.header.indexOf(':');
1110
if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {
1211
return [true];
1312
}

yarn.lock

+108-157
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)