lerna-clean-changelogs 5.0.7 → 5.0.8
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
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [5.0.8](https://github.com/codsen/codsen/compare/lerna-clean-changelogs@5.0.7...lerna-clean-changelogs@5.0.8) (2023-04-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- tap `codsen-utils` ([514579e](https://github.com/codsen/codsen/commit/514579edb10d5877faed7b794e382cd17cd91fee))
|
|
11
|
+
|
|
6
12
|
## 5.0.0 (2022-12-01)
|
|
7
13
|
|
|
8
14
|
### BREAKING CHANGES
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name lerna-clean-changelogs
|
|
3
3
|
* @fileoverview Removes frivolous entries from commitizen generated changelogs
|
|
4
|
-
* @version 5.0.
|
|
4
|
+
* @version 5.0.8
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/lerna-clean-changelogs/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
${JSON.stringify(
|
|
12
|
-
|
|
13
|
-
`)?i
|
|
14
|
-
`:t.includes("\r")&&!t.includes(`
|
|
15
|
-
`)&&(i="\r");let a,o=!1;if(typeof t=="string"&&t?.trim()){let c=n(t)&&t.length&&(t[~-t.length]===`
|
|
16
|
-
`||t[~-t.length]==="\r");t=t?.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let s=t.split(/\r?\n/);u.extras&&s.forEach((e,r)=>{e?.startsWith("#")&&(s[r]=e.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),r&&s[r]?.startsWith("# ")&&(s[r]=`#${s[r]}`)});let l=[];for(let e=s.length;e--;){if(s[e]?.startsWith("**Note:** Version bump only")||u.extras&&s[e].toLowerCase().includes("wip")){for(;e&&n(s[~-e])&&!s[~-e]?.trim();)e-=1;for(e&&n(s[~-e])&&s[~-e]?.trim()?.startsWith("#")&&(e-=1);e&&n(s[~-e])&&!s[~-e]?.trim();)e-=1}else s[e]?.trim()?s[e][0]==="*"&&s[e][1]===" "?l.unshift(`- ${s[e].slice(2)}`):l.unshift(s[e]):o||(l.unshift(s[e]?.trim()),o=!0);s[e]?.trim()&&(o=!1)}a=`${l.join(i)}${c?i:""}`}return{version:f,res:a||t}}export{b as cleanChangelogs,$ as defaults,f as version};
|
|
10
|
+
import{isStr as n,detectEol as f}from"codsen-utils";var m="5.0.8";var $=m,y={extras:!1};function x(s,u){if(s===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!n(s))throw new Error(`lerna-clean-changelogs: [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(s)?"array":typeof s}, equal to:
|
|
11
|
+
${JSON.stringify(s,null,4)}`);let o={...y,...u},a=f(s)||`
|
|
12
|
+
`,p,l=!1;if(typeof s=="string"&&s?.trim()){let c=n(s)&&!!s.length&&(s[~-s.length]===`
|
|
13
|
+
`||s[~-s.length]==="\r");s=s?.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let t=s.split(/\r?\n/);o.extras&&t.forEach((e,r)=>{e?.startsWith("#")&&(t[r]=e.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),r&&t[r]?.startsWith("# ")&&(t[r]=`#${t[r]}`)});let i=[];for(let e=t.length;e--;){if(t[e]?.startsWith("**Note:** Version bump only")||o.extras&&t[e].toLowerCase().includes("wip")){for(;e&&n(t[~-e])&&!t[~-e]?.trim();)e-=1;for(e&&n(t[~-e])&&t[~-e]?.trim()?.startsWith("#")&&(e-=1);e&&n(t[~-e])&&!t[~-e]?.trim();)e-=1}else t[e]?.trim()?t[e][0]==="*"&&t[e][1]===" "?i.unshift(`- ${t[e].slice(2)}`):i.unshift(t[e]):l||(i.unshift(t[e]?.trim()),l=!0);t[e]?.trim()&&(l=!1)}p=`${i.join(a)}${c?a:""}`}return{version:$,res:p||s}}export{x as cleanChangelogs,y as defaults,$ as version};
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name lerna-clean-changelogs
|
|
3
3
|
* @fileoverview Removes frivolous entries from commitizen generated changelogs
|
|
4
|
-
* @version 5.0.
|
|
4
|
+
* @version 5.0.8
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/lerna-clean-changelogs/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var lernaCleanChangelogs=(()=>{var
|
|
11
|
-
|
|
12
|
-
`;e.includes(
|
|
13
|
-
`)
|
|
14
|
-
|
|
15
|
-
`)
|
|
16
|
-
|
|
10
|
+
"use strict";var lernaCleanChangelogs=(()=>{var c=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var v=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&v(e,n,t[n]);if(S)for(var n of S(t))B.call(t,n)&&v(e,n,t[n]);return e};var T=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},N=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of k(t))!w.call(e,i)&&i!==n&&c(e,i,{get:()=>t[i],enumerable:!(l=j(t,i))||l.enumerable});return e};var W=e=>N(c({},"__esModule",{value:!0}),e);var V={};T(V,{cleanChangelogs:()=>F,defaults:()=>O,version:()=>D});function u(e){return typeof e=="string"}function x(e){if(!(typeof e!="string"||!e)){if(e.includes(`\r
|
|
11
|
+
`))return`\r
|
|
12
|
+
`;if(e.includes(`
|
|
13
|
+
`))return`
|
|
14
|
+
`;if(e.includes("\r"))return"\r"}}var C="5.0.8";var D=C,O={extras:!1};function F(e,t){var f,d,b,$,h,y,g,A;if(e===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!u(e))throw new Error(`lerna-clean-changelogs: [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(e)?"array":typeof e}, equal to:
|
|
15
|
+
${JSON.stringify(e,null,4)}`);let n=m(m({},O),t),l=x(e)||`
|
|
16
|
+
`,i,p=!1;if(typeof e=="string"&&(e!=null&&e.trim())){let L=u(e)&&!!e.length&&(e[~-e.length]===`
|
|
17
|
+
`||e[~-e.length]==="\r");e=e==null?void 0:e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let s=e.split(/\r?\n/);n.extras&&s.forEach((r,a)=>{var E;r!=null&&r.startsWith("#")&&(s[a]=r.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),a&&((E=s[a])!=null&&E.startsWith("# "))&&(s[a]=`#${s[a]}`)});let o=[];for(let r=s.length;r--;){if((f=s[r])!=null&&f.startsWith("**Note:** Version bump only")||n.extras&&s[r].toLowerCase().includes("wip")){for(;r&&u(s[~-r])&&!((d=s[~-r])!=null&&d.trim());)r-=1;for(r&&u(s[~-r])&&(($=(b=s[~-r])==null?void 0:b.trim())!=null&&$.startsWith("#"))&&(r-=1);r&&u(s[~-r])&&!((h=s[~-r])!=null&&h.trim());)r-=1}else(y=s[r])!=null&&y.trim()?s[r][0]==="*"&&s[r][1]===" "?o.unshift(`- ${s[r].slice(2)}`):o.unshift(s[r]):p||(o.unshift((g=s[r])==null?void 0:g.trim()),p=!0);(A=s[r])!=null&&A.trim()&&(p=!1)}i=`${o.join(l)}${L?l:""}`}return{version:D,res:i||e}}return W(V);})();
|
|
18
|
+
/**
|
|
19
|
+
* @name codsen-utils
|
|
20
|
+
* @fileoverview Various utility functions
|
|
21
|
+
* @version 1.4.0
|
|
22
|
+
* @author Roy Revelt, Codsen Ltd
|
|
23
|
+
* @license MIT
|
|
24
|
+
* {@link https://codsen.com/os/codsen-utils/}
|
|
25
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lerna-clean-changelogs",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"description": "Removes frivolous entries from commitizen generated changelogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -70,5 +70,8 @@
|
|
|
70
70
|
""
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"codsen-utils": "^1.4.0"
|
|
73
76
|
}
|
|
74
77
|
}
|