lerna-clean-changelogs 5.0.10 → 5.0.12

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/README.md CHANGED
@@ -80,7 +80,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
80
80
  ### Features
81
81
 
82
82
  - bbb
83
- `
83
+ `,
84
84
  );
85
85
  ```
86
86
 
@@ -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.0.10
4
+ * @version 5.0.12
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
- import{isStr as n,detectEol as f}from"codsen-utils";var m="5.0.10";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:
10
+ import{isStr as n,detectEol as f}from"codsen-utils";var m="5.0.12";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
11
  ${JSON.stringify(s,null,4)}`);let o={...y,...u},a=f(s)||`
12
12
  `,p,l=!1;if(typeof s=="string"&&s?.trim()){let c=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)}p=`${i.join(a)}${c?a:""}`}return{version:$,res:p||s}}export{x as cleanChangelogs,y as defaults,$ as version};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name lerna-clean-changelogs
3
3
  * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 5.0.10
4
+ * @version 5.0.12
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/lerna-clean-changelogs/}
@@ -11,14 +11,14 @@
11
11
  `))return`\r
12
12
  `;if(e.includes(`
13
13
  `))return`
14
- `;if(e.includes("\r"))return"\r"}}var L="5.0.10";var M=L,T={extras:!1};function z(e,n){var r,t,o,i,p,y,m,A;if(e===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!b(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:
14
+ `;if(e.includes("\r"))return"\r"}}var L="5.0.12";var M=L,T={extras:!1};function z(e,n){var r,t,o,i,p,y,m,A;if(e===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!b(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
15
  ${JSON.stringify(e,null,4)}`);let a=$($({},T),n),u=B(e)||`
16
16
  `,s,l=!1;if(typeof e=="string"&&(e!=null&&e.trim())){let N=b(e)&&!!e.length&&(e[~-e.length]===`
17
17
  `||e[~-e.length]==="\r");e=e==null?void 0:e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let c=e.split(/\r?\n/);a.extras&&c.forEach((f,w)=>{var g;f!=null&&f.startsWith("#")&&(c[w]=f.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),w&&((g=c[w])!=null&&g.startsWith("# "))&&(c[w]=`#${c[w]}`)});let v=[];for(let f=c.length;f--;){if((r=c[f])!=null&&r.startsWith("**Note:** Version bump only")||a.extras&&c[f].toLowerCase().includes("wip")){for(;f&&b(c[~-f])&&!((t=c[~-f])!=null&&t.trim());)f-=1;for(f&&b(c[~-f])&&((i=(o=c[~-f])==null?void 0:o.trim())!=null&&i.startsWith("#"))&&(f-=1);f&&b(c[~-f])&&!((p=c[~-f])!=null&&p.trim());)f-=1}else(y=c[f])!=null&&y.trim()?c[f][0]==="*"&&c[f][1]===" "?v.unshift(`- ${c[f].slice(2)}`):v.unshift(c[f]):l||(v.unshift((m=c[f])==null?void 0:m.trim()),l=!0);(A=c[f])!=null&&A.trim()&&(l=!1)}s=`${v.join(u)}${N?u:""}`}return{version:M,res:s||e}}return _(K);})();
18
18
  /**
19
19
  * @name codsen-utils
20
20
  * @fileoverview Various utility functions
21
- * @version 1.6.0
21
+ * @version 1.6.2
22
22
  * @author Roy Revelt, Codsen Ltd
23
23
  * @license MIT
24
24
  * {@link https://codsen.com/os/codsen-utils/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lerna-clean-changelogs",
3
- "version": "5.0.10",
3
+ "version": "5.0.12",
4
4
  "description": "Removes frivolous entries from commitizen generated changelogs",
5
5
  "keywords": [
6
6
  "changelog",
@@ -41,7 +41,7 @@
41
41
  "cjs-on": "exit 0",
42
42
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
43
43
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
44
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --loglevel 'silent'",
44
+ "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
45
45
  "examples": "node '../../ops/scripts/run-examples.js'",
46
46
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
47
47
  "letspublish": "npm publish || :",
@@ -49,7 +49,7 @@
49
49
  "perf": "node perf/check.js",
50
50
  "prep": "echo 'ready'",
51
51
  "prettier": "prettier",
52
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --loglevel 'silent'",
52
+ "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
53
53
  "pretest": "npm run lect && npm run build",
54
54
  "test": "npm run devtest",
55
55
  "unit": "uvu test"
@@ -72,6 +72,6 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "codsen-utils": "^1.6.0"
75
+ "codsen-utils": "^1.6.2"
76
76
  }
77
77
  }
package/types/index.d.ts CHANGED
@@ -5,10 +5,10 @@ interface Opts {
5
5
  declare const defaults: Opts;
6
6
  declare function cleanChangelogs(
7
7
  changelog: string,
8
- opts?: Partial<Opts>
8
+ opts?: Partial<Opts>,
9
9
  ): {
10
10
  version: string;
11
11
  res: string;
12
12
  };
13
13
 
14
- export { Opts, cleanChangelogs, defaults, version };
14
+ export { type Opts, cleanChangelogs, defaults, version };