lerna-clean-changelogs 3.0.10 → 4.1.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.
- package/CHANGELOG.md +16 -0
- package/LICENSE +1 -1
- package/README.md +1 -3
- package/dist/lerna-clean-changelogs.esm.js +6 -6
- package/dist/lerna-clean-changelogs.umd.js +7 -7
- package/package.json +7 -4
- package/types/index.d.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.1.0 (2022-04-10)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- export defaults ([4bc7c0f](https://github.com/codsen/codsen/commit/4bc7c0fd98f3c2e768df04a8e34b6465d04835d9))
|
|
11
|
+
|
|
12
|
+
# [4.0.0](https://github.com/codsen/codsen/compare/lerna-clean-changelogs@3.0.11...lerna-clean-changelogs@4.0.0) (2022-01-22)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- set options as a plain object ([814cf09](https://github.com/codsen/codsen/commit/814cf090d14c9810b2cf6074fad316fa43d125c8)), closes [#36](https://github.com/codsen/codsen/issues/36)
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
- from now, the options should be set as a plain object, ie. { extras: true }
|
|
21
|
+
|
|
6
22
|
## 3.0.0 (2021-09-09)
|
|
7
23
|
|
|
8
24
|
### Features
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/README.md
CHANGED
|
@@ -101,8 +101,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
101
101
|
|
|
102
102
|
MIT License
|
|
103
103
|
|
|
104
|
-
Copyright (c) 2010-
|
|
105
|
-
|
|
104
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
106
105
|
|
|
107
106
|
<img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
|
|
108
|
-
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name lerna-clean-changelogs
|
|
3
3
|
* @fileoverview Removes frivolous entries from commitizen generated changelogs
|
|
4
|
-
* @version
|
|
4
|
+
* @version 4.1.0
|
|
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 u="
|
|
11
|
-
${JSON.stringify(r,null,4)}`);let o,l=!1;if(typeof r=="string"&&r.length&&(!r.includes(`
|
|
12
|
-
`)||!r.includes("\r"))){let c=
|
|
13
|
-
`||r[r.length-1]==="\r");r=r.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let
|
|
10
|
+
var u="4.1.0";var d=u;function i(r){return typeof r=="string"}var f={extras:!1};function $(r,p){if(r===void 0)throw new Error("lerna-clean-changelogs: [THROW_ID_01] The first input argument is missing!");if(!i(r))throw new Error(`lerna-clean-changelogs: [THROW_ID_02] The first input argument must be a string! It was given as ${Array.isArray(r)?"array":typeof r}, equal to:
|
|
11
|
+
${JSON.stringify(r,null,4)}`);let a={...f,...p},o,l=!1;if(typeof r=="string"&&r.length&&(!r.includes(`
|
|
12
|
+
`)||!r.includes("\r"))){let c=i(r)&&r.length&&(r[r.length-1]===`
|
|
13
|
+
`||r[r.length-1]==="\r");r=r.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let t=r.split(/\r?\n/);a.extras&&t.forEach((e,s)=>{e.startsWith("#")&&(t[s]=e.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),s&&t[s].startsWith("# ")&&(t[s]=`#${t[s]}`)});let n=[];for(let e=t.length;e--;){if(t[e].startsWith("**Note:** Version bump only")||a.extras&&t[e].toLowerCase().includes("wip")){for(;i(t[e-1])&&!t[e-1].trim()&&e;)e-=1;for(e&&i(t[e-1])&&t[e-1].trim().startsWith("#")&&(e-=1);i(t[e-1])&&!t[e-1].trim()&&e;)e-=1}else t[e].trim()?t[e][0]==="*"&&t[e][1]===" "?n.unshift(`- ${t[e].slice(2)}`):n.unshift(t[e]):l||(n.unshift(t[e].trim()),l=!0);t[e].trim()&&(l=!1)}o=`${n.join(`
|
|
14
14
|
`)}${c?`
|
|
15
|
-
`:""}`}return{version:
|
|
15
|
+
`:""}`}return{version:d,res:o||r}}export{$ as cleanChangelogs,f as defaults,d as version};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name lerna-clean-changelogs
|
|
3
3
|
* @fileoverview Removes frivolous entries from commitizen generated changelogs
|
|
4
|
-
* @version
|
|
4
|
+
* @version 4.1.0
|
|
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 lernaCleanChangelogs=(()=>{var
|
|
11
|
-
${JSON.stringify(e,null,4)}`);let t,l=!1;if(typeof e=="string"&&e.length&&(!e.includes(`
|
|
12
|
-
`)||!e.includes("\r"))){let
|
|
13
|
-
`||e[e.length-1]==="\r");e=e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let s=e.split(/\r?\n/);i&&s.forEach((r,a)=>{r.startsWith("#")&&(s[a]=r.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),a&&s[a].startsWith("# ")&&(s[a]=`#${s[a]}`)});let u=[];for(let r=s.length;r--;){if(s[r].startsWith("**Note:** Version bump only")||i&&s[r].toLowerCase().includes("wip")){for(;o(s[r-1])&&!s[r-1].trim()&&r;)r-=1;for(r&&o(s[r-1])&&s[r-1].trim().startsWith("#")&&(r-=1);o(s[r-1])&&!s[r-1].trim()&&r;)r-=1}else s[r].trim()?s[r][0]==="*"&&s[r][1]===" "?u.unshift(`- ${s[r].slice(2)}`):u.unshift(s[r]):
|
|
14
|
-
`)}${
|
|
15
|
-
`:""}`}return{version:
|
|
10
|
+
var lernaCleanChangelogs=(()=>{var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var d=(e,t,i)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,c=(e,t)=>{for(var i in t||(t={}))f.call(t,i)&&d(e,i,t[i]);if(m)for(var i of m(t))x.call(t,i)&&d(e,i,t[i]);return e};var v=(e,t)=>{for(var i in t)p(e,i,{get:t[i],enumerable:!0})},w=(e,t,i,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!f.call(e,n)&&n!==i&&p(e,n,{get:()=>t[n],enumerable:!(l=b(t,n))||l.enumerable});return e};var W=e=>w(p({},"__esModule",{value:!0}),e);var L={};v(L,{cleanChangelogs:()=>D,defaults:()=>$,version:()=>h});var y="4.1.0";var h=y;function o(e){return typeof e=="string"}var $={extras:!1};function D(e,t){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 i=c(c({},$),t),l,n=!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/);i.extras&&s.forEach((r,a)=>{r.startsWith("#")&&(s[a]=r.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),a&&s[a].startsWith("# ")&&(s[a]=`#${s[a]}`)});let u=[];for(let r=s.length;r--;){if(s[r].startsWith("**Note:** Version bump only")||i.extras&&s[r].toLowerCase().includes("wip")){for(;o(s[r-1])&&!s[r-1].trim()&&r;)r-=1;for(r&&o(s[r-1])&&s[r-1].trim().startsWith("#")&&(r-=1);o(s[r-1])&&!s[r-1].trim()&&r;)r-=1}else s[r].trim()?s[r][0]==="*"&&s[r][1]===" "?u.unshift(`- ${s[r].slice(2)}`):u.unshift(s[r]):n||(u.unshift(s[r].trim()),n=!0);s[r].trim()&&(n=!1)}l=`${u.join(`
|
|
14
|
+
`)}${g?`
|
|
15
|
+
`:""}`}return{version:h,res:l||e}}return W(L);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lerna-clean-changelogs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Removes frivolous entries from commitizen generated changelogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -37,15 +37,18 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
39
39
|
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
40
|
-
"
|
|
40
|
+
"devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
41
|
+
"dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
|
|
41
42
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
42
|
-
"lect": "node '../../ops/lect/lect.js'",
|
|
43
|
+
"lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
43
44
|
"letspublish": "yarn publish || :",
|
|
44
45
|
"lint": "eslint . --fix",
|
|
45
46
|
"perf": "node perf/check.js",
|
|
46
47
|
"prepare": "echo 'ready'",
|
|
48
|
+
"prettier": "prettier",
|
|
49
|
+
"prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
|
|
47
50
|
"pretest": "yarn run lect && yarn run build",
|
|
48
|
-
"test": "
|
|
51
|
+
"test": "yarn run devtest",
|
|
49
52
|
"unit": "uvu test"
|
|
50
53
|
},
|
|
51
54
|
"engines": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
declare const version: string;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface Opts {
|
|
3
|
+
extras: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const defaults: Opts;
|
|
6
|
+
declare function cleanChangelogs(
|
|
7
|
+
changelogContents: string,
|
|
8
|
+
originalOpts?: Partial<Opts>
|
|
9
|
+
): {
|
|
10
|
+
version: string;
|
|
11
|
+
res: string;
|
|
5
12
|
};
|
|
6
13
|
|
|
7
|
-
export { cleanChangelogs, version };
|
|
14
|
+
export { cleanChangelogs, defaults, version };
|