Skip to content

Commit c14945d

Browse files
committed
feat: update conventional-changelog packages
BREAKING CHANGE: update all conventional-changelog packages - conventional-changelog-angular to v8 - conventional-changelog-atom to v5 - conventional-changelog-conventionalcommits to v8 - conventional-commits-parser to v6
1 parent 756e6d6 commit c14945d

File tree

15 files changed

+61
-62
lines changed

15 files changed

+61
-62
lines changed

@commitlint/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"lodash.merge": "^4.6.2"
4949
},
5050
"dependencies": {
51+
"conventional-commits-parser": "^6.0.0",
5152
"@commitlint/format": "^19.3.0",
5253
"@commitlint/lint": "^19.2.2",
5354
"@commitlint/load": "^19.2.0",

@commitlint/cli/src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
QualifiedConfig,
1515
UserConfig,
1616
} from '@commitlint/types';
17-
import type {Options} from 'conventional-commits-parser';
17+
import type {ParserOptions} from 'conventional-commits-parser';
1818
import {execa, type ExecaError} from 'execa';
1919
import yargs, {type Arguments} from 'yargs';
2020

@@ -263,7 +263,7 @@ async function main(args: MainArgs): Promise<void> {
263263
file: flags.config,
264264
});
265265
const parserOpts = selectParserOpts(loaded.parserPreset);
266-
const opts: LintOptions & {parserOpts: Options} = {
266+
const opts: LintOptions & {parserOpts: ParserOptions} = {
267267
parserOpts: {},
268268
plugins: {},
269269
ignores: [],

@commitlint/config-conventional/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
"dependencies": {
4242
"@commitlint/types": "^19.0.3",
43-
"conventional-changelog-conventionalcommits": "^7.0.2"
43+
"conventional-changelog-conventionalcommits": "^8.0.0"
4444
},
4545
"gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc"
4646
}

@commitlint/load/fixtures/parser-preset-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "parser-preset-angular",
33
"version": "1.0.0",
44
"devDependencies": {
5-
"conventional-changelog-angular": "^7.0.0"
5+
"conventional-changelog-angular": "^8.0.0"
66
}
77
}

@commitlint/load/fixtures/parser-preset-conventional-without-factory/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "parser-preset-conventional-without-factory",
33
"version": "1.0.0",
44
"devDependencies": {
5-
"conventional-changelog-conventionalcommits": "^7.0.2"
5+
"conventional-changelog-conventionalcommits": "^8.0.0"
66
}
77
}

@commitlint/load/fixtures/parser-preset-conventionalcommits/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "parser-preset-conventionalcommits",
33
"version": "1.0.0",
44
"devDependencies": {
5-
"conventional-changelog-conventionalcommits": "^7.0.2"
5+
"conventional-changelog-conventionalcommits": "^8.0.0"
66
}
77
}

@commitlint/load/fixtures/recursive-parser-preset-conventional-atom/first-extended/second-extended/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "@second-extend/recursive-parser-preset-conventional-atom",
33
"version": "1.0.0",
44
"devDependencies": {
5-
"conventional-changelog-atom": "^2.0.3"
5+
"conventional-changelog-atom": "^5.0.0"
66
}
77
}

@commitlint/load/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@types/lodash.merge": "^4.6.8",
4242
"@types/lodash.uniq": "^4.5.8",
4343
"@types/node": "^18.19.17",
44-
"conventional-changelog-atom": "^4.0.0",
44+
"conventional-changelog-atom": "^5.0.0",
4545
"typescript": "^5.2.2"
4646
},
4747
"dependencies": {

@commitlint/parse/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@
3737
"license": "MIT",
3838
"devDependencies": {
3939
"@commitlint/test": "^19.0.0",
40-
"@commitlint/utils": "^19.0.0",
41-
"@types/conventional-commits-parser": "^5.0.0"
40+
"@commitlint/utils": "^19.0.0"
4241
},
4342
"dependencies": {
4443
"@commitlint/types": "^19.0.3",
45-
"conventional-changelog-angular": "^7.0.0",
46-
"conventional-commits-parser": "^5.0.0"
44+
"conventional-changelog-angular": "^8.0.0",
45+
"conventional-commits-parser": "^6.0.0"
4746
},
4847
"gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc"
4948
}

@commitlint/parse/src/index.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
import {
2+
type Commit,
3+
type ParserOptions,
4+
CommitParser,
5+
} from 'conventional-commits-parser';
16
import type {Parser} from '@commitlint/types';
27

3-
import {type Commit, type Options, sync} from 'conventional-commits-parser';
48
// @ts-expect-error -- no typings
59
import defaultChangelogOpts from 'conventional-changelog-angular';
610

711
export async function parse(
812
message: string,
9-
parser: Parser = sync,
10-
parserOpts?: Options
13+
parser?: Parser,
14+
parserOpts?: ParserOptions
1115
): Promise<Commit> {
1216
const preset = await defaultChangelogOpts();
1317
const defaultOpts = preset.parserOpts;
@@ -16,7 +20,16 @@ export async function parse(
1620
fieldPattern: null,
1721
...(parserOpts || {}),
1822
};
19-
const parsed = parser(message, opts) as Commit;
23+
24+
let parsed;
25+
26+
if (parser) {
27+
parsed = parser(message, opts) as Commit;
28+
} else {
29+
const defaultParser = new CommitParser(opts);
30+
parsed = defaultParser.parse(message) as Commit;
31+
}
32+
2033
parsed.raw = message;
2134
return parsed;
2235
}

@commitlint/rules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@commitlint/parse": "^19.0.3",
4040
"@commitlint/test": "^19.0.0",
4141
"@commitlint/utils": "^19.0.0",
42-
"conventional-changelog-angular": "^7.0.0",
42+
"conventional-changelog-angular": "^8.0.0",
4343
"glob": "^10.3.10"
4444
},
4545
"dependencies": {

@commitlint/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"license": "MIT",
3131
"dependencies": {
32-
"@types/conventional-commits-parser": "^5.0.0",
32+
"conventional-commits-parser": "^6.0.0",
3333
"chalk": "^5.3.0"
3434
},
3535
"devDependencies": {

@commitlint/types/src/lint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {Options} from 'conventional-commits-parser';
1+
import type {ParserOptions} from 'conventional-commits-parser';
22
import {IsIgnoredOptions} from './is-ignored.js';
33
import {PluginRecords} from './load.js';
44
import {RuleConfigSeverity, RuleConfigTuple} from './rules.js';
@@ -16,7 +16,7 @@ export interface LintOptions {
1616
/** Additional commits to ignore, defined by ignore matchers */
1717
ignores?: IsIgnoredOptions['ignores'];
1818
/** The parser configuration to use when linting the commit */
19-
parserOpts?: Options;
19+
parserOpts?: ParserOptions;
2020

2121
plugins?: PluginRecords;
2222
helpUrl?: string;

@commitlint/types/src/parse.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
import type {Commit, Options} from 'conventional-commits-parser';
1+
import type {Commit, ParserOptions} from 'conventional-commits-parser';
22

3-
export type Parser = (message: string, options: Options) => Omit<Commit, 'raw'>;
3+
export type Parser = (
4+
message: string,
5+
options: ParserOptions
6+
) => Omit<Commit, 'raw'>;

yarn.lock

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,13 +1912,6 @@
19121912
resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz"
19131913
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
19141914

1915-
"@types/conventional-commits-parser@^5.0.0":
1916-
version "5.0.0"
1917-
resolved "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz#8c9d23e0b415b24b91626d07017303755d542dc8"
1918-
integrity sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==
1919-
dependencies:
1920-
"@types/node" "*"
1921-
19221915
"@types/[email protected]", "@types/estree@^1.0.0":
19231916
version "1.0.5"
19241917
resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
@@ -2492,7 +2485,7 @@
24922485
dependencies:
24932486
argparse "^2.0.1"
24942487

2495-
JSONStream@^1.0.4, JSONStream@^1.3.5:
2488+
JSONStream@^1.0.4:
24962489
version "1.3.5"
24972490
resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz"
24982491
integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==
@@ -3277,22 +3270,22 @@ conventional-changelog-angular@^5.0.12:
32773270
compare-func "^2.0.0"
32783271
q "^1.5.1"
32793272

3280-
conventional-changelog-angular@^7.0.0:
3281-
version "7.0.0"
3282-
resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz"
3283-
integrity sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==
3273+
conventional-changelog-angular@^8.0.0:
3274+
version "8.0.0"
3275+
resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz#5701386850f0e0c2e630b43ee7821d322d87e7a6"
3276+
integrity sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==
32843277
dependencies:
32853278
compare-func "^2.0.0"
32863279

3287-
conventional-changelog-atom@^4.0.0:
3288-
version "4.0.0"
3289-
resolved "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-4.0.0.tgz"
3290-
integrity sha512-q2YtiN7rnT1TGwPTwjjBSIPIzDJCRE+XAUahWxnh+buKK99Kks4WLMHoexw38GXx9OUxAsrp44f9qXe5VEMYhw==
3280+
conventional-changelog-atom@^5.0.0:
3281+
version "5.0.0"
3282+
resolved "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-5.0.0.tgz#f3e06e06244bd0aef2e5f09ed590933d948e809c"
3283+
integrity sha512-WfzCaAvSCFPkznnLgLnfacRAzjgqjLUjvf3MftfsJzQdDICqkOOpcMtdJF3wTerxSpv2IAAjX8doM3Vozqle3g==
32913284

3292-
conventional-changelog-conventionalcommits@^7.0.2:
3293-
version "7.0.2"
3294-
resolved "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz"
3295-
integrity sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==
3285+
conventional-changelog-conventionalcommits@^8.0.0:
3286+
version "8.0.0"
3287+
resolved "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-8.0.0.tgz#3fa2857c878701e7f0329db5a1257cb218f166fe"
3288+
integrity sha512-eOvlTO6OcySPyyyk8pKz2dP4jjElYunj9hn9/s0OB+gapTO8zwS9UQWrZ1pmF2hFs3vw1xhonOLGcGjy/zgsuA==
32963289
dependencies:
32973290
compare-func "^2.0.0"
32983291

@@ -3361,15 +3354,12 @@ conventional-commits-parser@^3.2.0:
33613354
split2 "^3.0.0"
33623355
through2 "^4.0.0"
33633356

3364-
conventional-commits-parser@^5.0.0:
3365-
version "5.0.0"
3366-
resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz"
3367-
integrity sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==
3357+
conventional-commits-parser@^6.0.0:
3358+
version "6.0.0"
3359+
resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.0.0.tgz#74e3be5344d8cd99f7c3353da2efa1d1dd618061"
3360+
integrity sha512-TbsINLp48XeMXR8EvGjTnKGsZqBemisPoyWESlpRyR8lif0lcwzqz+NMtYSj1ooF/WYjSuu7wX0CtdeeMEQAmA==
33683361
dependencies:
3369-
JSONStream "^1.3.5"
3370-
is-text-path "^2.0.0"
3371-
meow "^12.0.1"
3372-
split2 "^4.0.0"
3362+
meow "^13.0.0"
33733363

33743364
conventional-recommended-bump@^6.1.0:
33753365
version "6.1.0"
@@ -5162,13 +5152,6 @@ is-text-path@^1.0.1:
51625152
dependencies:
51635153
text-extensions "^1.0.0"
51645154

5165-
is-text-path@^2.0.0:
5166-
version "2.0.0"
5167-
resolved "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz"
5168-
integrity sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==
5169-
dependencies:
5170-
text-extensions "^2.0.0"
5171-
51725155
is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9:
51735156
version "1.1.12"
51745157
resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz"
@@ -5861,6 +5844,11 @@ meow@^12.0.1:
58615844
resolved "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz"
58625845
integrity sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==
58635846

5847+
meow@^13.0.0:
5848+
version "13.2.0"
5849+
resolved "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f"
5850+
integrity sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==
5851+
58645852
meow@^8.0.0:
58655853
version "8.1.2"
58665854
resolved "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz"
@@ -7774,11 +7762,6 @@ text-extensions@^1.0.0:
77747762
resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz"
77757763
integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==
77767764

7777-
text-extensions@^2.0.0:
7778-
version "2.4.0"
7779-
resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz"
7780-
integrity sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==
7781-
77827765
text-table@^0.2.0:
77837766
version "0.2.0"
77847767
resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"

0 commit comments

Comments
 (0)