lerna-clean-changelogs 5.2.0 → 5.2.1

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,13 +1,13 @@
1
1
  /**
2
2
  * @name lerna-clean-changelogs
3
3
  * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 5.2.0
4
+ * @version 5.2.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/lerna-clean-changelogs/}
8
8
  */
9
9
 
10
- import{detectEol as f,formatDiagnosticValue as $,isStr as n}from"codsen-utils";var m="5.2.0";var g=m,y={extras:!1};function v(s,p){if(s===void 0)throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_01] The first input argument is missing!");if(!n(s))throw new Error(`lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(s)?"array":typeof s}, equal to:
10
+ import{detectEol as f,formatDiagnosticValue as $,isStr as n}from"codsen-utils";var m="5.2.1";var g=m,y={extras:!1};function v(s,p){if(s===void 0)throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_01] The first input argument is missing!");if(!n(s))throw new Error(`lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(s)?"array":typeof s}, equal to:
11
11
  ${$(s,4)}`);let o={...y,...p},a=f(s)||`
12
12
  `,c,l=!1;if(typeof s=="string"&&s?.trim()){let u=n(s)&&!!s.length&&(s[~-s.length]===`
13
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)}c=`${i.join(a)}${u?a:""}`}return{version:g,res:c||s}}export{v as cleanChangelogs,y as defaults,g as version};
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name lerna-clean-changelogs
3
3
  * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 5.2.0
4
+ * @version 5.2.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/lerna-clean-changelogs/}
8
8
  */
9
9
 
10
- "use strict";var lernaCleanChangelogs=(()=>{var w=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var k=(e,s,t)=>s in e?w(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,S=(e,s)=>{for(var t in s||(s={}))O.call(s,t)&&k(e,t,s[t]);if(x)for(var t of x(s))T.call(s,t)&&k(e,t,s[t]);return e};var N=(e,s)=>{for(var t in s)w(e,t,{get:s[t],enumerable:!0})},P=(e,s,t,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let f of I(s))!O.call(e,f)&&f!==t&&w(e,f,{get:()=>s[f],enumerable:!(l=B(s,f))||l.enumerable});return e};var V=e=>P(w({},"__esModule",{value:!0}),e);var J={};N(J,{cleanChangelogs:()=>Q,defaults:()=>M,version:()=>R});function F(){let e=[],s=0,t=!1;return{append(l){return t?!1:s+l.length>1999?(e.push("\u2026"),s+=1,t=!0,!1):(e.push(l),s+=l.length,!0)},result(){return e.join("")},stopped(){return t}}}function U(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function C(e,s){if(e.append('"')){for(let t=0;t<s.length&&!e.stopped();t+=1){let l=s.charCodeAt(t);l===34?e.append('\\"'):l===92?e.append("\\\\"):l===8?e.append("\\b"):l===9?e.append("\\t"):l===10?e.append("\\n"):l===12?e.append("\\f"):l===13?e.append("\\r"):l<32||l===8232||l===8233||l>=55296&&l<=57343?e.append(U(l)):e.append(s[t])}e.append('"')}}function _(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function D(e,s){e.append("Symbol(");let t=String(s);t.length>8&&C(e,t.slice(7,-1)),e.append(")")}function W(e,s){typeof s=="symbol"?D(e,s):C(e,String(s))}function E(e,s=0){let t=F(),l=s===4?4:0,f=new WeakSet,c=0;function g(n){l&&t.append(" ".repeat(n*l))}function p(n,r){n&&t.append(","),l&&(t.append("\n"),g(r+1))}function m(n,r,o){l&&r&&(t.append("\n"),g(o)),t.append(n)}function y(n,r){Object.prototype.hasOwnProperty.call(n,"value")?b(n.value,r):t.append(_(n))}function v(n,r){let o;try{o=Reflect.getOwnPropertyDescriptor(n,"length")}catch(a){t.append("[Uninspectable]");return}let i=o==null?void 0:o.value;if(!Number.isSafeInteger(i)||i<0){t.append("[Uninspectable]");return}t.append("[");let u=!1;for(let a=0;a<i&&!t.stopped();a+=1){if(p(u,r),u=!0,c>=50){t.append("[MaxEntries]");break}c+=1;let h;try{h=Reflect.getOwnPropertyDescriptor(n,String(a))}catch(z){t.append("[Uninspectable]");continue}h!=null&&h.enumerable?y(h,r+1):t.append("[Empty]")}m("]",u,r)}function A(n,r){let o;try{o=Reflect.ownKeys(n)}catch(u){t.append("[Uninspectable]");return}t.append("{");let i=!1;for(let u of o){if(t.stopped())break;if(c>=50){p(i,r),i=!0,C(t,"\u2026"),t.append(l?": ":":"),t.append("[MaxEntries]");break}c+=1;let a;try{a=Reflect.getOwnPropertyDescriptor(n,u)}catch(h){p(i,r),i=!0,W(t,u),t.append(l?": ":":"),t.append("[Uninspectable]");continue}a!=null&&a.enumerable&&(p(i,r),i=!0,W(t,u),t.append(l?": ":":"),y(a,r+1))}m("}",i,r)}function $(n,r){if(f.has(n)){t.append("[Circular]");return}if(r>=5){t.append("[MaxDepth]");return}let o;try{o=Array.isArray(n)}catch(i){t.append("[Uninspectable]");return}f.add(n);try{o?v(n,r):A(n,r)}finally{f.delete(n)}}function b(n,r){n===null?t.append("null"):typeof n=="string"?C(t,n):typeof n=="number"?t.append(Object.is(n,-0)?"-0":String(n)):typeof n=="boolean"?t.append(n?"true":"false"):typeof n>"u"?t.append("undefined"):typeof n=="bigint"?t.append("".concat(n,"n")):typeof n=="symbol"?D(t,n):typeof n=="function"?t.append("[Function]"):$(n,r)}try{return b(e,0),t.result()}catch(n){return"[Uninspectable]"}}var K=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);function d(e){return typeof e=="string"}function j(e){if(!(typeof e!="string"||!e)){if(e.includes("\r\n"))return"\r\n";if(e.includes("\n"))return"\n";if(e.includes("\r"))return"\r"}}var L="5.2.0";var R=L,M={extras:!1};function Q(e,s){var g,p,m,y,v,A,$,b;if(e===void 0)throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_01] The first input argument is missing!");if(!d(e))throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_02] The first input argument must be a string! It was given as ".concat(Array.isArray(e)?"array":typeof e,", equal to:\n").concat(E(e,4)));let t=S(S({},M),s),l=j(e)||"\n",f,c=!1;if(typeof e=="string"&&(e!=null&&e.trim())){let n=d(e)&&!!e.length&&(e[~-e.length]==="\n"||e[~-e.length]==="\r");e=e==null?void 0:e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let r=e.split(/\r?\n/);t.extras&&r.forEach((i,u)=>{var a;i!=null&&i.startsWith("#")&&(r[u]=i.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),u&&((a=r[u])!=null&&a.startsWith("# "))&&(r[u]="#".concat(r[u]))});let o=[];for(let i=r.length;i--;){if((g=r[i])!=null&&g.startsWith("**Note:** Version bump only")||t.extras&&r[i].toLowerCase().includes("wip")){for(;i&&d(r[~-i])&&!((p=r[~-i])!=null&&p.trim());)i-=1;for(i&&d(r[~-i])&&((y=(m=r[~-i])==null?void 0:m.trim())!=null&&y.startsWith("#"))&&(i-=1);i&&d(r[~-i])&&!((v=r[~-i])!=null&&v.trim());)i-=1}else(A=r[i])!=null&&A.trim()?r[i][0]==="*"&&r[i][1]===" "?o.unshift("- ".concat(r[i].slice(2))):o.unshift(r[i]):c||(o.unshift(($=r[i])==null?void 0:$.trim()),c=!0);(b=r[i])!=null&&b.trim()&&(c=!1)}f="".concat(o.join(l)).concat(n?l:"")}return{version:R,res:f||e}}return V(J);})();
10
+ "use strict";var lernaCleanChangelogs=(()=>{var w=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var k=(e,s,t)=>s in e?w(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,S=(e,s)=>{for(var t in s||(s={}))O.call(s,t)&&k(e,t,s[t]);if(x)for(var t of x(s))T.call(s,t)&&k(e,t,s[t]);return e};var N=(e,s)=>{for(var t in s)w(e,t,{get:s[t],enumerable:!0})},P=(e,s,t,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let f of I(s))!O.call(e,f)&&f!==t&&w(e,f,{get:()=>s[f],enumerable:!(l=B(s,f))||l.enumerable});return e};var V=e=>P(w({},"__esModule",{value:!0}),e);var J={};N(J,{cleanChangelogs:()=>Q,defaults:()=>M,version:()=>R});function F(){let e=[],s=0,t=!1;return{append(l){return t?!1:s+l.length>1999?(e.push("\u2026"),s+=1,t=!0,!1):(e.push(l),s+=l.length,!0)},result(){return e.join("")},stopped(){return t}}}function U(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function C(e,s){if(e.append('"')){for(let t=0;t<s.length&&!e.stopped();t+=1){let l=s.charCodeAt(t);l===34?e.append('\\"'):l===92?e.append("\\\\"):l===8?e.append("\\b"):l===9?e.append("\\t"):l===10?e.append("\\n"):l===12?e.append("\\f"):l===13?e.append("\\r"):l<32||l===8232||l===8233||l>=55296&&l<=57343?e.append(U(l)):e.append(s[t])}e.append('"')}}function _(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function D(e,s){e.append("Symbol(");let t=String(s);t.length>8&&C(e,t.slice(7,-1)),e.append(")")}function W(e,s){typeof s=="symbol"?D(e,s):C(e,String(s))}function E(e,s=0){let t=F(),l=s===4?4:0,f=new WeakSet,c=0;function g(n){l&&t.append(" ".repeat(n*l))}function p(n,r){n&&t.append(","),l&&(t.append("\n"),g(r+1))}function m(n,r,o){l&&r&&(t.append("\n"),g(o)),t.append(n)}function y(n,r){Object.prototype.hasOwnProperty.call(n,"value")?b(n.value,r):t.append(_(n))}function v(n,r){let o;try{o=Reflect.getOwnPropertyDescriptor(n,"length")}catch(a){t.append("[Uninspectable]");return}let i=o==null?void 0:o.value;if(!Number.isSafeInteger(i)||i<0){t.append("[Uninspectable]");return}t.append("[");let u=!1;for(let a=0;a<i&&!t.stopped();a+=1){if(p(u,r),u=!0,c>=50){t.append("[MaxEntries]");break}c+=1;let h;try{h=Reflect.getOwnPropertyDescriptor(n,String(a))}catch(z){t.append("[Uninspectable]");continue}h!=null&&h.enumerable?y(h,r+1):t.append("[Empty]")}m("]",u,r)}function A(n,r){let o;try{o=Reflect.ownKeys(n)}catch(u){t.append("[Uninspectable]");return}t.append("{");let i=!1;for(let u of o){if(t.stopped())break;if(c>=50){p(i,r),i=!0,C(t,"\u2026"),t.append(l?": ":":"),t.append("[MaxEntries]");break}c+=1;let a;try{a=Reflect.getOwnPropertyDescriptor(n,u)}catch(h){p(i,r),i=!0,W(t,u),t.append(l?": ":":"),t.append("[Uninspectable]");continue}a!=null&&a.enumerable&&(p(i,r),i=!0,W(t,u),t.append(l?": ":":"),y(a,r+1))}m("}",i,r)}function $(n,r){if(f.has(n)){t.append("[Circular]");return}if(r>=5){t.append("[MaxDepth]");return}let o;try{o=Array.isArray(n)}catch(i){t.append("[Uninspectable]");return}f.add(n);try{o?v(n,r):A(n,r)}finally{f.delete(n)}}function b(n,r){n===null?t.append("null"):typeof n=="string"?C(t,n):typeof n=="number"?t.append(Object.is(n,-0)?"-0":String(n)):typeof n=="boolean"?t.append(n?"true":"false"):typeof n>"u"?t.append("undefined"):typeof n=="bigint"?t.append("".concat(n,"n")):typeof n=="symbol"?D(t,n):typeof n=="function"?t.append("[Function]"):$(n,r)}try{return b(e,0),t.result()}catch(n){return"[Uninspectable]"}}var K=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);function d(e){return typeof e=="string"}function j(e){if(!(typeof e!="string"||!e)){if(e.includes("\r\n"))return"\r\n";if(e.includes("\n"))return"\n";if(e.includes("\r"))return"\r"}}var L="5.2.1";var R=L,M={extras:!1};function Q(e,s){var g,p,m,y,v,A,$,b;if(e===void 0)throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_01] The first input argument is missing!");if(!d(e))throw new Error("lerna-clean-changelogs/cleanChangelogs(): [THROW_ID_02] The first input argument must be a string! It was given as ".concat(Array.isArray(e)?"array":typeof e,", equal to:\n").concat(E(e,4)));let t=S(S({},M),s),l=j(e)||"\n",f,c=!1;if(typeof e=="string"&&(e!=null&&e.trim())){let n=d(e)&&!!e.length&&(e[~-e.length]==="\n"||e[~-e.length]==="\r");e=e==null?void 0:e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let r=e.split(/\r?\n/);t.extras&&r.forEach((i,u)=>{var a;i!=null&&i.startsWith("#")&&(r[u]=i.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),u&&((a=r[u])!=null&&a.startsWith("# "))&&(r[u]="#".concat(r[u]))});let o=[];for(let i=r.length;i--;){if((g=r[i])!=null&&g.startsWith("**Note:** Version bump only")||t.extras&&r[i].toLowerCase().includes("wip")){for(;i&&d(r[~-i])&&!((p=r[~-i])!=null&&p.trim());)i-=1;for(i&&d(r[~-i])&&((y=(m=r[~-i])==null?void 0:m.trim())!=null&&y.startsWith("#"))&&(i-=1);i&&d(r[~-i])&&!((v=r[~-i])!=null&&v.trim());)i-=1}else(A=r[i])!=null&&A.trim()?r[i][0]==="*"&&r[i][1]===" "?o.unshift("- ".concat(r[i].slice(2))):o.unshift(r[i]):c||(o.unshift(($=r[i])==null?void 0:$.trim()),c=!0);(b=r[i])!=null&&b.trim()&&(c=!1)}f="".concat(o.join(l)).concat(n?l:"")}return{version:R,res:f||e}}return V(J);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lerna-clean-changelogs",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "Removes frivolous entries from commitizen generated changelogs",
5
5
  "keywords": [
6
6
  "changelog",