@commitlint/ensure 8.1.0 → 8.3.6
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/CHANGELOG.md +32 -0
- package/lib/to-case.d.ts +3 -0
- package/lib/to-case.d.ts.map +1 -0
- package/lib/to-case.js +38 -0
- package/lib/to-case.js.map +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.3.6](https://github.com/conventional-changelog/commitlint/compare/v8.3.5...v8.3.6) (2021-11-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [8.3.4](https://github.com/conventional-changelog/commitlint/compare/v8.3.3...v8.3.4) (2020-01-03)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [8.2.0](https://github.com/conventional-changelog/commitlint/compare/v8.1.0...v8.2.0) (2019-09-16)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [8.1.0](https://github.com/conventional-changelog/commitlint/compare/v8.0.0...v8.1.0) (2019-07-15)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @commitlint/ensure
|
package/lib/to-case.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-case.d.ts","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAOjD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAyB5E"}
|
package/lib/to-case.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
|
7
|
+
const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
|
|
8
|
+
const snakeCase_1 = __importDefault(require("lodash/snakeCase"));
|
|
9
|
+
const upperFirst_1 = __importDefault(require("lodash/upperFirst"));
|
|
10
|
+
const startCase_1 = __importDefault(require("lodash/startCase"));
|
|
11
|
+
function toCase(input, target) {
|
|
12
|
+
switch (target) {
|
|
13
|
+
case 'camel-case':
|
|
14
|
+
return (0, camelCase_1.default)(input);
|
|
15
|
+
case 'kebab-case':
|
|
16
|
+
return (0, kebabCase_1.default)(input);
|
|
17
|
+
case 'snake-case':
|
|
18
|
+
return (0, snakeCase_1.default)(input);
|
|
19
|
+
case 'pascal-case':
|
|
20
|
+
return (0, upperFirst_1.default)((0, camelCase_1.default)(input));
|
|
21
|
+
case 'start-case':
|
|
22
|
+
return (0, startCase_1.default)(input);
|
|
23
|
+
case 'upper-case':
|
|
24
|
+
case 'uppercase':
|
|
25
|
+
return input.toUpperCase();
|
|
26
|
+
case 'sentence-case':
|
|
27
|
+
case 'sentencecase':
|
|
28
|
+
return (0, upperFirst_1.default)(input);
|
|
29
|
+
case 'lower-case':
|
|
30
|
+
case 'lowercase':
|
|
31
|
+
case 'lowerCase': // Backwards compat config-angular v4
|
|
32
|
+
return input.toLowerCase();
|
|
33
|
+
default:
|
|
34
|
+
throw new TypeError(`to-case: Unknown target case "${target}"`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = toCase;
|
|
38
|
+
//# sourceMappingURL=to-case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-case.js","sourceRoot":"","sources":["../src/to-case.ts"],"names":[],"mappings":";;;;;AACA,iEAAyC;AACzC,iEAAyC;AACzC,iEAAyC;AACzC,mEAA2C;AAC3C,iEAAyC;AAEzC,SAAwB,MAAM,CAAC,KAAa,EAAE,MAAsB;IACnE,QAAQ,MAAM,EAAE;QACf,KAAK,YAAY;YAChB,OAAO,IAAA,mBAAS,EAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,IAAA,mBAAS,EAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY;YAChB,OAAO,IAAA,mBAAS,EAAC,KAAK,CAAC,CAAC;QACzB,KAAK,aAAa;YACjB,OAAO,IAAA,oBAAU,EAAC,IAAA,mBAAS,EAAC,KAAK,CAAC,CAAC,CAAC;QACrC,KAAK,YAAY;YAChB,OAAO,IAAA,mBAAS,EAAC,KAAK,CAAC,CAAC;QACzB,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW;YACf,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B,KAAK,eAAe,CAAC;QACrB,KAAK,cAAc;YAClB,OAAO,IAAA,oBAAU,EAAC,KAAK,CAAC,CAAC;QAC1B,KAAK,YAAY,CAAC;QAClB,KAAK,WAAW,CAAC;QACjB,KAAK,WAAW,EAAE,qCAAqC;YACtD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;QAC5B;YACC,MAAM,IAAI,SAAS,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;KACjE;AACF,CAAC;AAzBD,yBAyBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/ensure",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.6",
|
|
4
4
|
"description": "Lint your commit messages",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commitlint/utils": "^8.
|
|
37
|
+
"@commitlint/utils": "^8.3.6",
|
|
38
38
|
"globby": "10.0.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"lodash": "4.17.
|
|
41
|
+
"lodash": "4.17.21"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9ef77c205ce9338850b15374fd003f2052211803"
|
|
44
44
|
}
|