@commitlint/ensure 19.8.1 → 20.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"max-line-length.d.ts","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"yBAEgB,OAAO,MAAM,EAAE,KAAK,MAAM,KAAG,OAAO;AAApD,wBAEyD"}
1
+ {"version":3,"file":"max-line-length.d.ts","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"yBAQgB,OAAO,MAAM,EAAE,KAAK,MAAM,KAAG,OAAO;AAApD,wBAI8D"}
@@ -1,4 +1,11 @@
1
1
  import ensure from "./max-length.js";
2
+ // Allow an exception for long lines which contain URLs.
3
+ //
4
+ // This is overly lenient, in order to avoid costly regexps which
5
+ // have to worry about all the many edge cases of valid URLs.
6
+ const URL_REGEX = /\bhttps?:\/\/\S+/;
2
7
  export default (value, max) => typeof value === "string" &&
3
- value.split(/\r?\n/).every((line) => ensure(line, max));
8
+ value
9
+ .split(/\r?\n/)
10
+ .every((line) => URL_REGEX.test(line) || ensure(line, max));
4
11
  //# sourceMappingURL=max-line-length.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"max-line-length.js","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,eAAe,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,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"max-line-length.js","sourceRoot":"","sources":["../src/max-line-length.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,6DAA6D;AAC7D,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAErC,eAAe,CAAC,KAAa,EAAE,GAAW,EAAW,EAAE,CACtD,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK;SACH,KAAK,CAAC,OAAO,CAAC;SACd,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commitlint/ensure",
3
3
  "type": "module",
4
- "version": "19.8.1",
4
+ "version": "20.0.0",
5
5
  "description": "Lint your commit messages",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "license": "MIT",
38
38
  "devDependencies": {
39
- "@commitlint/utils": "^19.8.1",
39
+ "@commitlint/utils": "^20.0.0",
40
40
  "@types/lodash.camelcase": "^4.3.8",
41
41
  "@types/lodash.kebabcase": "^4.1.8",
42
42
  "@types/lodash.snakecase": "^4.1.8",
@@ -45,12 +45,12 @@
45
45
  "glob": "^10.3.10"
46
46
  },
47
47
  "dependencies": {
48
- "@commitlint/types": "^19.8.1",
48
+ "@commitlint/types": "^20.0.0",
49
49
  "lodash.camelcase": "^4.3.0",
50
50
  "lodash.kebabcase": "^4.1.1",
51
51
  "lodash.snakecase": "^4.1.1",
52
52
  "lodash.startcase": "^4.4.0",
53
53
  "lodash.upperfirst": "^4.3.1"
54
54
  },
55
- "gitHead": "3c302008cabeb0b08cd246b2417a51a9d745a918"
55
+ "gitHead": "407be6c96b1a108ee012ed5330b0d80a165952d5"
56
56
  }