lerna-clean-changelogs 4.2.1 → 4.2.3

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
+ ## [4.2.2](https://github.com/codsen/codsen/compare/lerna-clean-changelogs@4.2.1...lerna-clean-changelogs@4.2.2) (2022-08-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - support windows CRLF line endings ([4f6195a](https://github.com/codsen/codsen/commit/4f6195a1bfa8f21f18540c90b4963f17c433980c))
11
+
6
12
  # 4.2.0 (2022-08-12)
7
13
 
8
14
  ### Features
@@ -100,4 +106,4 @@ Accidental version bump during migration to sourcehut. Sorry about that.
100
106
 
101
107
  ## 1.0.0 (2019-01-20)
102
108
 
103
- - First public release
109
+ - First public release
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * @name lerna-clean-changelogs
3
3
  * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 4.2.1
4
+ * @version 4.2.3
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 p="4.2.1";var d=p;function n(t){return typeof t=="string"}var f={extras:!1};function $(t,u){if(t===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!n(t))throw new Error(`lerna-clean-changelogs: [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(t)?"array":typeof t}, equal to:
11
- ${JSON.stringify(t,null,4)}`);let a={...f,...u},o,l=!1;if(typeof t=="string"&&t.length&&(!t.includes(`
12
- `)||!t.includes("\r"))){let c=n(t)&&t.length&&(t[t.length-1]===`
13
- `||t[t.length-1]==="\r");t=t.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let r=t.split(/\r?\n/);a.extras&&r.forEach((e,s)=>{e.startsWith("#")&&(r[s]=e.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),s&&r[s].startsWith("# ")&&(r[s]=`#${r[s]}`)});let i=[];for(let e=r.length;e--;){if(r[e].startsWith("**Note:** Version bump only")||a.extras&&r[e].toLowerCase().includes("wip")){for(;n(r[e-1])&&!r[e-1].trim()&&e;)e-=1;for(e&&n(r[e-1])&&r[e-1].trim().startsWith("#")&&(e-=1);n(r[e-1])&&!r[e-1].trim()&&e;)e-=1}else r[e].trim()?r[e][0]==="*"&&r[e][1]===" "?i.unshift(`- ${r[e].slice(2)}`):i.unshift(r[e]):l||(i.unshift(r[e].trim()),l=!0);r[e].trim()&&(l=!1)}o=`${i.join(`
14
- `)}${c?`
15
- `:""}`}return{version:d,res:o||t}}export{$ as cleanChangelogs,f as defaults,d as version};
10
+ var c="4.2.3";var f=c;function n(t){return typeof t=="string"}var $={extras:!1};function g(t,p){if(t===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!n(t))throw new Error(`lerna-clean-changelogs: [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(t)?"array":typeof t}, equal to:
11
+ ${JSON.stringify(t,null,4)}`);let a={...$,...p},i=`
12
+ `;t.includes(`\r
13
+ `)?i=`\r
14
+ `:t.includes("\r")&&!t.includes(`
15
+ `)&&(i="\r");let u,o=!1;if(typeof t=="string"&&t?.trim()){let m=n(t)&&t.length&&(t[~-t.length]===`
16
+ `||t[~-t.length]==="\r");t=t?.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let r=t.split(/\r?\n/);a.extras&&r.forEach((e,s)=>{e?.startsWith("#")&&(r[s]=e.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),s&&r[s]?.startsWith("# ")&&(r[s]=`#${r[s]}`)});let l=[];for(let e=r.length;e--;){if(r[e]?.startsWith("**Note:** Version bump only")||a.extras&&r[e].toLowerCase().includes("wip")){for(;e&&n(r[~-e])&&!r[~-e]?.trim();)e-=1;for(e&&n(r[~-e])&&r[~-e]?.trim()?.startsWith("#")&&(e-=1);e&&n(r[~-e])&&!r[~-e]?.trim();)e-=1}else r[e]?.trim()?r[e][0]==="*"&&r[e][1]===" "?l.unshift(`- ${r[e].slice(2)}`):l.unshift(r[e]):o||(l.unshift(r[e]?.trim()),o=!0);r[e]?.trim()&&(o=!1)}u=`${l.join(i)}${m?i:""}`}return{version:f,res:u||t}}export{g as cleanChangelogs,$ as defaults,f as version};
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * @name lerna-clean-changelogs
3
3
  * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 4.2.1
4
+ * @version 4.2.3
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 u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var d=(e,r,n)=>r in e?u(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,c=(e,r)=>{for(var n in r||(r={}))f.call(r,n)&&d(e,n,r[n]);if(m)for(var n of m(r))E.call(r,n)&&d(e,n,r[n]);return e};var v=(e,r)=>{for(var n in r)u(e,n,{get:r[n],enumerable:!0})},w=(e,r,n,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of x(r))!f.call(e,i)&&i!==n&&u(e,i,{get:()=>r[i],enumerable:!(l=b(r,i))||l.enumerable});return e};var W=e=>w(u({},"__esModule",{value:!0}),e);var D={};v(D,{cleanChangelogs:()=>O,defaults:()=>$,version:()=>h});var y="4.2.1";var h=y;function o(e){return typeof e=="string"}var $={extras:!1};function O(e,r){if(e===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!o(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:
11
- ${JSON.stringify(e,null,4)}`);let n=c(c({},$),r),l,i=!1;if(typeof e=="string"&&e.length&&(!e.includes(`
12
- `)||!e.includes("\r"))){let g=o(e)&&e.length&&(e[e.length-1]===`
13
- `||e[e.length-1]==="\r");e=e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let s=e.split(/\r?\n/);n.extras&&s.forEach((t,a)=>{t.startsWith("#")&&(s[a]=t.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),a&&s[a].startsWith("# ")&&(s[a]=`#${s[a]}`)});let p=[];for(let t=s.length;t--;){if(s[t].startsWith("**Note:** Version bump only")||n.extras&&s[t].toLowerCase().includes("wip")){for(;o(s[t-1])&&!s[t-1].trim()&&t;)t-=1;for(t&&o(s[t-1])&&s[t-1].trim().startsWith("#")&&(t-=1);o(s[t-1])&&!s[t-1].trim()&&t;)t-=1}else s[t].trim()?s[t][0]==="*"&&s[t][1]===" "?p.unshift(`- ${s[t].slice(2)}`):p.unshift(s[t]):i||(p.unshift(s[t].trim()),i=!0);s[t].trim()&&(i=!1)}l=`${p.join(`
14
- `)}${g?`
15
- `:""}`}return{version:h,res:l||e}}return W(D);})();
10
+ "use strict";var lernaCleanChangelogs=(()=>{var p=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var D=(e,r,n)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,c=(e,r)=>{for(var n in r||(r={}))S.call(r,n)&&D(e,n,r[n]);if(w)for(var n of w(r))T.call(r,n)&&D(e,n,r[n]);return e};var j=(e,r)=>{for(var n in r)p(e,n,{get:r[n],enumerable:!0})},k=(e,r,n,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of V(r))!S.call(e,i)&&i!==n&&p(e,i,{get:()=>r[i],enumerable:!(l=L(r,i))||l.enumerable});return e};var R=e=>k(p({},"__esModule",{value:!0}),e);var I={};j(I,{cleanChangelogs:()=>J,defaults:()=>W,version:()=>O});var A="4.2.3";var O=A;function a(e){return typeof e=="string"}var W={extras:!1};function J(e,r){var d,f,$,y,b,E,h,x;if(e===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!a(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:
11
+ ${JSON.stringify(e,null,4)}`);let n=c(c({},W),r),l=`
12
+ `;e.includes(`\r
13
+ `)?l=`\r
14
+ `:e.includes("\r")&&!e.includes(`
15
+ `)&&(l="\r");let i,m=!1;if(typeof e=="string"&&(e==null?void 0:e.trim())){let g=a(e)&&e.length&&(e[~-e.length]===`
16
+ `||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((t,o)=>{var v;t!=null&&t.startsWith("#")&&(s[o]=t.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),o&&((v=s[o])==null?void 0:v.startsWith("# "))&&(s[o]=`#${s[o]}`)});let u=[];for(let t=s.length;t--;){if(((d=s[t])==null?void 0:d.startsWith("**Note:** Version bump only"))||n.extras&&s[t].toLowerCase().includes("wip")){for(;t&&a(s[~-t])&&!((f=s[~-t])!=null&&f.trim());)t-=1;for(t&&a(s[~-t])&&((y=($=s[~-t])==null?void 0:$.trim())==null?void 0:y.startsWith("#"))&&(t-=1);t&&a(s[~-t])&&!((b=s[~-t])!=null&&b.trim());)t-=1}else(E=s[t])!=null&&E.trim()?s[t][0]==="*"&&s[t][1]===" "?u.unshift(`- ${s[t].slice(2)}`):u.unshift(s[t]):m||(u.unshift((h=s[t])==null?void 0:h.trim()),m=!0);(x=s[t])!=null&&x.trim()&&(m=!1)}i=`${u.join(l)}${g?l:""}`}return{version:O,res:i||e}}return R(I);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lerna-clean-changelogs",
3
- "version": "4.2.1",
3
+ "version": "4.2.3",
4
4
  "description": "Removes frivolous entries from commitizen generated changelogs",
5
5
  "keywords": [
6
6
  "changelog",