@commitlint/ensure 13.2.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/CHANGELOG.md +312 -0
- package/lib/case.d.ts +4 -0
- package/lib/case.d.ts.map +1 -0
- package/lib/case.js +50 -0
- package/lib/case.js.map +1 -0
- package/lib/enum.d.ts +3 -0
- package/lib/enum.d.ts.map +1 -0
- package/lib/enum.js +12 -0
- package/lib/enum.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/max-length.d.ts +3 -0
- package/lib/max-length.d.ts.map +1 -0
- package/lib/max-length.js +4 -0
- package/lib/max-length.js.map +1 -0
- package/lib/max-line-length.d.ts +3 -0
- package/lib/max-line-length.d.ts.map +1 -0
- package/lib/max-line-length.js +9 -0
- package/lib/max-line-length.js.map +1 -0
- package/lib/min-length.d.ts +3 -0
- package/lib/min-length.d.ts.map +1 -0
- package/lib/min-length.js +4 -0
- package/lib/min-length.js.map +1 -0
- package/lib/not-empty.d.ts +3 -0
- package/lib/not-empty.d.ts.map +1 -0
- package/lib/not-empty.js +4 -0
- package/lib/not-empty.js.map +1 -0
- package/license.md +21 -0
- package/package.json +46 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [13.2.0](https://github.com/conventional-changelog/commitlint/compare/v13.1.0...v13.2.0) (2021-09-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [13.1.0](https://github.com/conventional-changelog/commitlint/compare/v13.0.0...v13.1.0) (2021-07-24)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [13.0.0](https://github.com/conventional-changelog/commitlint/compare/v12.1.4...v13.0.0) (2021-05-24)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* chore!: remove node 10 support (#2596) ([4db4ba1](https://github.com/conventional-changelog/commitlint/commit/4db4ba1b0b312410a0f62100a93a80c246a6c410)), closes [#2596](https://github.com/conventional-changelog/commitlint/issues/2596)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
* minimum node version is 12
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [12.1.3](https://github.com/conventional-changelog/commitlint/compare/v12.1.2...v12.1.3) (2021-05-12)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [12.1.2](https://github.com/conventional-changelog/commitlint/compare/v12.1.1...v12.1.2) (2021-04-29)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [12.1.1](https://github.com/conventional-changelog/commitlint/compare/v12.1.0...v12.1.1) (2021-04-02)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [12.0.1](https://github.com/conventional-changelog/commitlint/compare/v12.0.0...v12.0.1) (2021-02-23)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# [12.0.0](https://github.com/conventional-changelog/commitlint/compare/v11.0.0...v12.0.0) (2021-01-18)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# [11.0.0](https://github.com/conventional-changelog/commitlint/compare/v10.0.0...v11.0.0) (2020-09-05)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# [10.0.0](https://github.com/conventional-changelog/commitlint/compare/v9.1.2...v10.0.0) (2020-08-16)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
* refactor!: drop support for node 8 (#1999) ([751f39f](https://github.com/conventional-changelog/commitlint/commit/751f39f284ef232574a176c3c11b1982ee544166)), closes [#1999](https://github.com/conventional-changelog/commitlint/issues/1999)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### BREAKING CHANGES
|
|
91
|
+
|
|
92
|
+
* remove node 8 from circle-ci checks
|
|
93
|
+
|
|
94
|
+
also remove node 13 because we do not support experimental versions
|
|
95
|
+
|
|
96
|
+
* docs: update node v10 to latest LTS 10 version
|
|
97
|
+
|
|
98
|
+
Co-authored-by: Cedric van Putten <me@bycedric.com>
|
|
99
|
+
|
|
100
|
+
Co-authored-by: Cedric van Putten <me@bycedric.com>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
# [9.1.0](https://github.com/conventional-changelog/commitlint/compare/v9.0.1...v9.1.0) (2020-06-21)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## [9.0.1](https://github.com/conventional-changelog/commitlint/compare/v9.0.0...v9.0.1) (2020-05-26)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# [9.0.0](https://github.com/conventional-changelog/commitlint/compare/v8.3.5...v9.0.0) (2020-05-21)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* [#840](https://github.com/conventional-changelog/commitlint/issues/840) add caret to lodash versions ([#843](https://github.com/conventional-changelog/commitlint/issues/843)) ([ffc0bac](https://github.com/conventional-changelog/commitlint/commit/ffc0bac26993acb2ab6a8fa51065f93c92b0d644))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## [8.3.4](https://github.com/conventional-changelog/commitlint/compare/v8.3.3...v8.3.4) (2020-01-03)
|
|
150
|
+
|
|
151
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)
|
|
158
|
+
|
|
159
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# [8.2.0](https://github.com/conventional-changelog/commitlint/compare/v8.1.0...v8.2.0) (2019-09-16)
|
|
166
|
+
|
|
167
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
# [8.1.0](https://github.com/conventional-changelog/commitlint/compare/v8.0.0...v8.1.0) (2019-07-15)
|
|
174
|
+
|
|
175
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
# [7.6.0](https://github.com/conventional-changelog/commitlint/compare/v7.5.2...v7.6.0) (2019-05-06)
|
|
182
|
+
|
|
183
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## [7.5.2](https://github.com/conventional-changelog/commitlint/compare/v7.5.1...v7.5.2) (2019-02-11)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
### Bug Fixes
|
|
193
|
+
|
|
194
|
+
* failing sentence-case for subjects with slashes ([#574](https://github.com/conventional-changelog/commitlint/issues/574)) ([48a8602](https://github.com/conventional-changelog/commitlint/commit/48a8602))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
<a name="7.5.0"></a>
|
|
201
|
+
# [7.5.0](https://github.com/conventional-changelog/commitlint/compare/v7.4.0...v7.5.0) (2019-01-31)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### Bug Fixes
|
|
205
|
+
|
|
206
|
+
* `sentence-case` allow upper-case characters in first word ([#531](https://github.com/conventional-changelog/commitlint/issues/531)) ([5a6a4a8](https://github.com/conventional-changelog/commitlint/commit/5a6a4a8)), closes [#211](https://github.com/conventional-changelog/commitlint/issues/211)
|
|
207
|
+
* replace all repository references with conventional changelog ([#561](https://github.com/conventional-changelog/commitlint/issues/561)) ([6c3afcd](https://github.com/conventional-changelog/commitlint/commit/6c3afcd))
|
|
208
|
+
* slash in scope [#291](https://github.com/conventional-changelog/commitlint/issues/291) ([#529](https://github.com/conventional-changelog/commitlint/issues/529)) ([b2b63e5](https://github.com/conventional-changelog/commitlint/commit/b2b63e5))
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<a name="7.3.1"></a>
|
|
214
|
+
## [7.3.1](https://github.com/conventional-changelog/commitlint/compare/v7.3.0...v7.3.1) (2019-01-11)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
220
|
+
|
|
221
|
+
<a name="7.3.0"></a>
|
|
222
|
+
# [7.3.0](https://github.com/conventional-changelog/commitlint/compare/v7.2.1...v7.3.0) (2019-01-11)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### Bug Fixes
|
|
226
|
+
|
|
227
|
+
* fall back to conventional commit-parser settings for missing keys ([#496](https://github.com/conventional-changelog/commitlint/issues/496)) ([831a141](https://github.com/conventional-changelog/commitlint/commit/831a141)), closes [#399](https://github.com/conventional-changelog/commitlint/issues/399)
|
|
228
|
+
* update to security-patched dependency versions ([97c033b](https://github.com/conventional-changelog/commitlint/commit/97c033b))
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<a name="7.2.0"></a>
|
|
234
|
+
# [7.2.0](https://github.com/conventional-changelog/commitlint/compare/v7.1.2...v7.2.0) (2018-10-05)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Bug Fixes
|
|
238
|
+
|
|
239
|
+
* handle case rules for numerics correctly ([cadcfed](https://github.com/conventional-changelog/commitlint/commit/cadcfed))
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<a name="7.1.2"></a>
|
|
245
|
+
## [7.1.2](https://github.com/conventional-changelog/commitlint/compare/v7.1.1...v7.1.2) (2018-09-04)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
251
|
+
|
|
252
|
+
<a name="7.1.0"></a>
|
|
253
|
+
# [7.1.0](https://github.com/conventional-changelog/commitlint/compare/v7.0.1...v7.1.0) (2018-08-29)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Features
|
|
257
|
+
|
|
258
|
+
* add max line length to body/footer ([542f50e](https://github.com/conventional-changelog/commitlint/commit/542f50e))
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
<a name="6.1.1"></a>
|
|
264
|
+
## [6.1.1](https://github.com/conventional-changelog/commitlint/compare/v6.1.0...v6.1.1) (2018-02-22)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
### Bug Fixes
|
|
268
|
+
|
|
269
|
+
* **ensure:** ignore word delimiters for case matching [#291](https://github.com/conventional-changelog/commitlint/issues/291) ([fa69299](https://github.com/conventional-changelog/commitlint/commit/fa69299))
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<a name="6.1.0"></a>
|
|
275
|
+
# [6.1.0](https://github.com/conventional-changelog/commitlint/compare/v6.0.5...v6.1.0) (2018-02-03)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
281
|
+
|
|
282
|
+
<a name="6.0.4"></a>
|
|
283
|
+
## [6.0.4](https://github.com/conventional-changelog/commitlint/compare/v6.0.3...v6.0.4) (2018-01-31)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
289
|
+
|
|
290
|
+
<a name="6.0.3"></a>
|
|
291
|
+
## [6.0.3](https://github.com/conventional-changelog/commitlint/compare/v6.0.2...v6.0.3) (2018-01-31)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
297
|
+
|
|
298
|
+
<a name="6.0.2"></a>
|
|
299
|
+
## [6.0.2](https://github.com/conventional-changelog/commitlint/compare/v6.0.0...v6.0.2) (2018-01-12)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
**Note:** Version bump only for package @commitlint/ensure
|
|
305
|
+
|
|
306
|
+
<a name="6.0.0"></a>
|
|
307
|
+
# [6.0.0](https://github.com/conventional-changelog/commitlint/compare/v5.2.6...v6.0.0) (2018-01-09)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
### Bug Fixes
|
|
311
|
+
|
|
312
|
+
* sanitize ensure.case [#211](https://github.com/conventional-changelog/commitlint/issues/211) ([#217](https://github.com/conventional-changelog/commitlint/issues/217)) ([03aeefc](https://github.com/conventional-changelog/commitlint/commit/03aeefc))
|
package/lib/case.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../src/case.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,eAAe,UAAU,CAAC;AAE1B,iBAAS,UAAU,CAClB,GAAG,GAAE,MAAW,EAChB,MAAM,GAAE,cAA4B,GAClC,OAAO,CAcT"}
|
package/lib/case.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
exports.default = ensureCase;
|
|
12
|
+
function ensureCase(raw = '', target = 'lowercase') {
|
|
13
|
+
// We delete any content together with quotes because he can contains proper names (example `refactor: `Eslint` configuration`).
|
|
14
|
+
// We need trim string because content with quotes can be at the beginning or end of a line
|
|
15
|
+
const input = String(raw)
|
|
16
|
+
.replace(/`.*?`|".*?"|'.*?'/g, '')
|
|
17
|
+
.trim();
|
|
18
|
+
const transformed = toCase(input, target);
|
|
19
|
+
if (transformed === '' || transformed.match(/^\d/)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
return transformed === input;
|
|
23
|
+
}
|
|
24
|
+
function toCase(input, target) {
|
|
25
|
+
switch (target) {
|
|
26
|
+
case 'camel-case':
|
|
27
|
+
return (0, camelCase_1.default)(input);
|
|
28
|
+
case 'kebab-case':
|
|
29
|
+
return (0, kebabCase_1.default)(input);
|
|
30
|
+
case 'snake-case':
|
|
31
|
+
return (0, snakeCase_1.default)(input);
|
|
32
|
+
case 'pascal-case':
|
|
33
|
+
return (0, upperFirst_1.default)((0, camelCase_1.default)(input));
|
|
34
|
+
case 'start-case':
|
|
35
|
+
return (0, startCase_1.default)(input);
|
|
36
|
+
case 'upper-case':
|
|
37
|
+
case 'uppercase':
|
|
38
|
+
return input.toUpperCase();
|
|
39
|
+
case 'sentence-case':
|
|
40
|
+
case 'sentencecase':
|
|
41
|
+
return input.charAt(0).toUpperCase() + input.slice(1);
|
|
42
|
+
case 'lower-case':
|
|
43
|
+
case 'lowercase':
|
|
44
|
+
case 'lowerCase': // Backwards compat config-angular v4
|
|
45
|
+
return input.toLowerCase();
|
|
46
|
+
default:
|
|
47
|
+
throw new TypeError(`ensure-case: Unknown target case "${target}"`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=case.js.map
|
package/lib/case.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.js","sourceRoot":"","sources":["../src/case.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AACzC,iEAAyC;AACzC,iEAAyC;AACzC,mEAA2C;AAC3C,iEAAyC;AAGzC,kBAAe,UAAU,CAAC;AAE1B,SAAS,UAAU,CAClB,MAAc,EAAE,EAChB,SAAyB,WAAW;IAEpC,gIAAgI;IAChI,2FAA2F;IAC3F,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;SACvB,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;SACjC,IAAI,EAAE,CAAC;IAET,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE1C,IAAI,WAAW,KAAK,EAAE,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACnD,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,WAAW,KAAK,KAAK,CAAC;AAC9B,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,MAAsB;IACpD,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,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvD,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,qCAAqC,MAAM,GAAG,CAAC,CAAC;KACrE;AACF,CAAC"}
|
package/lib/enum.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":"gCAAuB,GAAG,UAAS,GAAG,EAAE,KAAQ,OAAO;AAAvD,wBAQE"}
|
package/lib/enum.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = (value, enums = []) => {
|
|
4
|
+
if (value === undefined) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
if (!Array.isArray(enums)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return enums.indexOf(value) > -1;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=enum.js.map
|
package/lib/enum.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAU,EAAE,QAAe,EAAE,EAAW,EAAE;IACzD,IAAI,KAAK,KAAK,SAAS,EAAE;QACxB,OAAO,KAAK,CAAC;KACb;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1B,OAAO,KAAK,CAAC;KACb;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ensureCase from './case';
|
|
2
|
+
import ensureEnum from './enum';
|
|
3
|
+
import maxLength from './max-length';
|
|
4
|
+
import maxLineLength from './max-line-length';
|
|
5
|
+
import minLength from './min-length';
|
|
6
|
+
import notEmpty from './not-empty';
|
|
7
|
+
export { ensureCase as case };
|
|
8
|
+
export { ensureEnum as enum };
|
|
9
|
+
export { maxLength, maxLineLength, minLength, notEmpty };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,QAAQ,CAAC;AAChC,OAAO,UAAU,MAAM,QAAQ,CAAC;AAChC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,UAAU,IAAI,IAAI,EAAC,CAAC;AAC5B,OAAO,EAAC,UAAU,IAAI,IAAI,EAAC,CAAC;AAC5B,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAC,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
exports.notEmpty = exports.minLength = exports.maxLineLength = exports.maxLength = exports.enum = exports.case = void 0;
|
|
7
|
+
const case_1 = __importDefault(require("./case"));
|
|
8
|
+
exports.case = case_1.default;
|
|
9
|
+
const enum_1 = __importDefault(require("./enum"));
|
|
10
|
+
exports.enum = enum_1.default;
|
|
11
|
+
const max_length_1 = __importDefault(require("./max-length"));
|
|
12
|
+
exports.maxLength = max_length_1.default;
|
|
13
|
+
const max_line_length_1 = __importDefault(require("./max-line-length"));
|
|
14
|
+
exports.maxLineLength = max_line_length_1.default;
|
|
15
|
+
const min_length_1 = __importDefault(require("./min-length"));
|
|
16
|
+
exports.minLength = min_length_1.default;
|
|
17
|
+
const not_empty_1 = __importDefault(require("./not-empty"));
|
|
18
|
+
exports.notEmpty = not_empty_1.default;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgC;AAOV,eAPf,cAAU,CAOS;AAN1B,kDAAgC;AAOV,eAPf,cAAU,CAOS;AAN1B,8DAAqC;AAO7B,oBAPD,oBAAS,CAOC;AANjB,wEAA8C;AAM3B,wBANZ,yBAAa,CAMY;AALhC,8DAAqC;AAKH,oBAL3B,oBAAS,CAK2B;AAJ3C,4DAAmC;AAIU,mBAJtC,mBAAQ,CAIsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max-length.d.ts","sourceRoot":"","sources":["../src/max-length.ts"],"names":[],"mappings":"gCAAuB,MAAM,OAAO,MAAM,KAAG,OAAO;AAApD,wBACkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max-length.js","sourceRoot":"","sources":["../src/max-length.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAE,GAAW,EAAW,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max-line-length.d.ts","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"gCAEuB,MAAM,OAAO,MAAM,KAAG,OAAO;AAApD,wBAEyD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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 max_length_1 = __importDefault(require("./max-length"));
|
|
7
|
+
exports.default = (value, max) => typeof value === 'string' &&
|
|
8
|
+
value.split(/\r?\n/).every((line) => (0, max_length_1.default)(line, max));
|
|
9
|
+
//# sourceMappingURL=max-line-length.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max-line-length.js","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":";;;;;AAAA,8DAAkC;AAElC,kBAAe,CAAC,KAAa,EAAE,GAAW,EAAW,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oBAAM,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min-length.d.ts","sourceRoot":"","sources":["../src/min-length.ts"],"names":[],"mappings":"gCAAuB,MAAM,OAAO,MAAM,KAAG,OAAO;AAApD,wBACkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min-length.js","sourceRoot":"","sources":["../src/min-length.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAE,GAAW,EAAW,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-empty.d.ts","sourceRoot":"","sources":["../src/not-empty.ts"],"names":[],"mappings":"gCAAuB,MAAM,KAAG,OAAO;AAAvC,wBAC+C"}
|
package/lib/not-empty.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-empty.js","sourceRoot":"","sources":["../src/not-empty.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAW,EAAE,CACzC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC"}
|
package/license.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 - present Mario Nebl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@commitlint/ensure",
|
|
3
|
+
"version": "13.2.0",
|
|
4
|
+
"description": "Lint your commit messages",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"deps": "dep-check",
|
|
12
|
+
"pkg": "pkg-check"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=v12"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/conventional-changelog/commitlint.git"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/conventional-changelog/commitlint/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/conventional-changelog/commitlint#readme",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"conventional-changelog",
|
|
27
|
+
"commitlint",
|
|
28
|
+
"library",
|
|
29
|
+
"core"
|
|
30
|
+
],
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "Mario Nebl",
|
|
33
|
+
"email": "hello@herebecode.com"
|
|
34
|
+
},
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@commitlint/utils": "^13.2.0",
|
|
38
|
+
"@types/lodash": "^4.14.161",
|
|
39
|
+
"globby": "^11.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@commitlint/types": "^13.2.0",
|
|
43
|
+
"lodash": "^4.17.19"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "65e45339c79e46d01e35ec067edf14d225a3528a"
|
|
46
|
+
}
|