@commitlint/prompt 21.2.4 → 21.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/input.d.ts +3 -1
- package/lib/input.d.ts.map +1 -1
- package/lib/input.js +3 -2
- package/lib/input.js.map +1 -1
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { LoadOptions } from "@commitlint/types";
|
|
1
2
|
import inquirer from "inquirer";
|
|
2
3
|
type Commit = (input: string) => void;
|
|
3
4
|
/**
|
|
4
5
|
* Entry point for commitizen
|
|
5
6
|
* @param cz inquirer instance passed by commitizen, unused
|
|
6
7
|
* @param commit callback to execute with complete commit message
|
|
8
|
+
* @param options where to load the commitlint config from
|
|
7
9
|
* @return {void}
|
|
8
10
|
*/
|
|
9
|
-
export declare function prompter(cz: typeof inquirer, commit: Commit): void;
|
|
11
|
+
export declare function prompter(cz: typeof inquirer, commit: Commit, options?: LoadOptions): void;
|
|
10
12
|
export {};
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,KAAK,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,KAAK,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAIzF"}
|
package/lib/index.js
CHANGED
|
@@ -3,10 +3,11 @@ import { input } from "./input.js";
|
|
|
3
3
|
* Entry point for commitizen
|
|
4
4
|
* @param cz inquirer instance passed by commitizen, unused
|
|
5
5
|
* @param commit callback to execute with complete commit message
|
|
6
|
+
* @param options where to load the commitlint config from
|
|
6
7
|
* @return {void}
|
|
7
8
|
*/
|
|
8
|
-
export function prompter(cz, commit) {
|
|
9
|
-
input(cz.prompt).then((message) => {
|
|
9
|
+
export function prompter(cz, commit, options) {
|
|
10
|
+
input(cz.prompt, options).then((message) => {
|
|
10
11
|
commit(message);
|
|
11
12
|
});
|
|
12
13
|
}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAmB,EAAE,MAAc,EAAE,OAAqB;IAClF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QAC1C,MAAM,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/input.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { LoadOptions } from "@commitlint/types";
|
|
1
2
|
import type { PromptModule } from "inquirer";
|
|
2
3
|
/**
|
|
3
4
|
* Get user input by interactive prompt based on
|
|
4
5
|
* conventional-changelog-lint rules.
|
|
5
6
|
* @param prompter
|
|
7
|
+
* @param options where to load the commitlint config from
|
|
6
8
|
* @return commit message
|
|
7
9
|
*/
|
|
8
|
-
export declare function input(prompter: PromptModule): Promise<string>;
|
|
10
|
+
export declare function input(prompter: PromptModule, options?: LoadOptions): Promise<string>;
|
|
9
11
|
//# sourceMappingURL=input.d.ts.map
|
package/lib/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,UAAU,CAAC;AAS/D
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,UAAU,CAAC;AAS/D;;;;;;GAMG;AACH,wBAAsB,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgC9F"}
|
package/lib/input.js
CHANGED
|
@@ -8,10 +8,11 @@ import InputCustomPrompt from "./inquirer/InputCustomPrompt.js";
|
|
|
8
8
|
* Get user input by interactive prompt based on
|
|
9
9
|
* conventional-changelog-lint rules.
|
|
10
10
|
* @param prompter
|
|
11
|
+
* @param options where to load the commitlint config from
|
|
11
12
|
* @return commit message
|
|
12
13
|
*/
|
|
13
|
-
export async function input(prompter) {
|
|
14
|
-
const { rules } = await load();
|
|
14
|
+
export async function input(prompter, options = {}) {
|
|
15
|
+
const { rules } = await load({}, options);
|
|
15
16
|
const parts = ["type", "scope", "subject", "body", "footer"];
|
|
16
17
|
const headerParts = ["type", "scope", "subject"];
|
|
17
18
|
const headerLengthRule = getRules("header", rules).find(getHasName("max-length"));
|
package/lib/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","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,CAAC;YAC1C,IAAI,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE,CAAC;gBACzD,YAAY,CAAC,MAAM,GAAG;oBACrB,MAAM,EAAE,SAAS;iBACjB,CAAC;YACH,CAAC;YACD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;YAC5D,IAAI,QAAQ,EAAE,CAAC;gBACd,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;QACF,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAS,SAAS,CAAC,CAAC;QAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/prompt",
|
|
3
|
-
"version": "21.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "21.3.0",
|
|
4
|
+
"gitHead": "c0bce295b8c1fbc4f692ec05fb760c8b157fb708",
|
|
5
5
|
"description": "commitizen prompt using commitlint.config.js",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"commitizen",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"pkg": "pkg-check --skip-import"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@commitlint/ensure": "^21.
|
|
35
|
-
"@commitlint/load": "^21.
|
|
36
|
-
"@commitlint/types": "^21.
|
|
34
|
+
"@commitlint/ensure": "^21.3.0",
|
|
35
|
+
"@commitlint/load": "^21.3.0",
|
|
36
|
+
"@commitlint/types": "^21.3.0",
|
|
37
37
|
"inquirer": "^9.2.15",
|
|
38
38
|
"picocolors": "^1.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@commitlint/config-angular": "^21.
|
|
41
|
+
"@commitlint/config-angular": "^21.3.0",
|
|
42
42
|
"@commitlint/types": "workspace:^",
|
|
43
43
|
"@commitlint/utils": "^21.0.1",
|
|
44
44
|
"@types/inquirer": "^9.0.7",
|