lerna-clean-changelogs 3.0.11 → 4.0.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
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.0.0](https://github.com/codsen/codsen/compare/lerna-clean-changelogs@3.0.11...lerna-clean-changelogs@4.0.0) (2022-01-22)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- set options as a plain object ([814cf09](https://github.com/codsen/codsen/commit/814cf090d14c9810b2cf6074fad316fa43d125c8)), closes [#36](https://github.com/codsen/codsen/issues/36)
|
|
11
|
+
|
|
12
|
+
### BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
- from now, the options should be set as a plain object, ie. { extras: true }
|
|
15
|
+
|
|
6
16
|
## 3.0.0 (2021-09-09)
|
|
7
17
|
|
|
8
18
|
### Features
|
|
@@ -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.0.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
|
|
13
|
-
`||r[r.length-1]==="\r");r=r.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let
|
|
14
|
-
`)}${
|
|
15
|
-
`:""}`}return{version:
|
|
10
|
+
var u="4.0.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
|
+
`)}${c?`
|
|
15
|
+
`:""}`}return{version:d,res:o||r}}export{$ as cleanChangelogs,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.0.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 p=Object.defineProperty;var
|
|
11
|
-
${JSON.stringify(e,null,4)}`);let
|
|
12
|
-
`)||!e.includes("\r"))){let
|
|
13
|
-
`||e[e.length-1]==="\r");e=e.trim().replace(/(https:\/\/git\.sr\.ht\/~[^/]+\/[^/]+\/)commits\//g,"$1commit/");let
|
|
14
|
-
`)}${
|
|
15
|
-
`:""}`}return{version:
|
|
10
|
+
var lernaCleanChangelogs=(()=>{var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var f=(e,r,s)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,c=(e,r)=>{for(var s in r||(r={}))d.call(r,s)&&f(e,s,r[s]);if(m)for(var s of m(r))E.call(r,s)&&f(e,s,r[s]);return e};var x=e=>p(e,"__esModule",{value:!0});var v=(e,r)=>{for(var s in r)p(e,s,{get:r[s],enumerable:!0})},w=(e,r,s,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of b(r))!d.call(e,n)&&(s||n!=="default")&&p(e,n,{get:()=>r[n],enumerable:!(l=g(r,n))||l.enumerable});return e};var W=(e=>(r,s)=>e&&e.get(r)||(s=w(x({}),r,1),e&&e.set(r,s),s))(typeof WeakMap!="undefined"?new WeakMap:0);var O={};v(O,{cleanChangelogs:()=>L,version:()=>h});var y="4.0.0";var h=y;function o(e){return typeof e=="string"}var D={extras:!1};function L(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 s=c(c({},D),r),l,n=!1;if(typeof e=="string"&&e.length&&(!e.includes(`
|
|
12
|
+
`)||!e.includes("\r"))){let $=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 i=e.split(/\r?\n/);s.extras&&i.forEach((t,a)=>{t.startsWith("#")&&(i[a]=t.replace(/(#+) \[?(\d+\.\d+\.\d+)\s?\]\([^)]*\)/g,"$1 $2")),a&&i[a].startsWith("# ")&&(i[a]=`#${i[a]}`)});let u=[];for(let t=i.length;t--;){if(i[t].startsWith("**Note:** Version bump only")||s.extras&&i[t].toLowerCase().includes("wip")){for(;o(i[t-1])&&!i[t-1].trim()&&t;)t-=1;for(t&&o(i[t-1])&&i[t-1].trim().startsWith("#")&&(t-=1);o(i[t-1])&&!i[t-1].trim()&&t;)t-=1}else i[t].trim()?i[t][0]==="*"&&i[t][1]===" "?u.unshift(`- ${i[t].slice(2)}`):u.unshift(i[t]):n||(u.unshift(i[t].trim()),n=!0);i[t].trim()&&(n=!1)}l=`${u.join(`
|
|
14
|
+
`)}${$?`
|
|
15
|
+
`:""}`}return{version:h,res:l||e}}return W(O);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lerna-clean-changelogs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Removes frivolous entries from commitizen generated changelogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -37,9 +37,10 @@
|
|
|
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
|
+
"devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
40
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",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"prettier": "prettier",
|
|
48
49
|
"prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
|
|
49
50
|
"pretest": "yarn run lect && yarn run build",
|
|
50
|
-
"test": "
|
|
51
|
+
"test": "yarn run devtest",
|
|
51
52
|
"unit": "uvu test"
|
|
52
53
|
},
|
|
53
54
|
"engines": {
|
package/types/index.d.ts
CHANGED