lerna-clean-changelogs 4.2.7 → 5.0.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.
package/CHANGELOG.md CHANGED
@@ -3,13 +3,19 @@
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)
6
+ ## 5.0.0 (2022-12-01)
7
+
8
+ ### BREAKING CHANGES
9
+
10
+ - Minimum supported Node version is v14.18; we're dropping v12 support
11
+
12
+ ## 4.2.2 (2022-08-27)
7
13
 
8
14
  ### Fixed
9
15
 
10
16
  - support windows CRLF line endings ([4f6195a](https://github.com/codsen/codsen/commit/4f6195a1bfa8f21f18540c90b4963f17c433980c))
11
17
 
12
- # 4.2.0 (2022-08-12)
18
+ ## 4.2.0 (2022-08-12)
13
19
 
14
20
  ### Features
15
21
 
@@ -22,13 +28,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
22
28
 
23
29
  - tweak types ([97ea400](https://github.com/codsen/codsen/commit/97ea4001c1bb6bf1a9a09d36fa2d1694f2c4d974))
24
30
 
25
- # 4.1.0 (2022-04-10)
31
+ ## 4.1.0 (2022-04-10)
26
32
 
27
33
  ### Features
28
34
 
29
35
  - export defaults ([4bc7c0f](https://github.com/codsen/codsen/commit/4bc7c0fd98f3c2e768df04a8e34b6465d04835d9))
30
36
 
31
- # [4.0.0](https://github.com/codsen/codsen/compare/lerna-clean-changelogs@3.0.11...lerna-clean-changelogs@4.0.0) (2022-01-22)
37
+ ## 4.0.0 (2022-01-22)
32
38
 
33
39
  ### Fixed
34
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lerna-clean-changelogs",
3
- "version": "4.2.7",
3
+ "version": "5.0.1",
4
4
  "description": "Removes frivolous entries from commitizen generated changelogs",
5
5
  "keywords": [
6
6
  "changelog",
@@ -36,26 +36,26 @@
36
36
  },
37
37
  "types": "types/index.d.ts",
38
38
  "scripts": {
39
- "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
39
+ "build": "node '../../ops/scripts/esbuild.js' && npm run dts",
40
40
  "cjs-off": "exit 0",
41
41
  "cjs-on": "exit 0",
42
- "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
43
- "devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
44
- "dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
42
+ "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
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'",
45
45
  "examples": "node '../../ops/scripts/run-examples.js'",
46
- "lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
47
- "letspublish": "yarn publish || :",
46
+ "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
47
+ "letspublish": "npm publish || :",
48
48
  "lint": "eslint . --ext .js --ext .ts --fix",
49
49
  "perf": "node perf/check.js",
50
- "prepare": "echo 'ready'",
50
+ "prep": "echo 'ready'",
51
51
  "prettier": "prettier",
52
- "prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
53
- "pretest": "yarn run lect && yarn run build",
54
- "test": "yarn run devtest",
52
+ "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --loglevel 'silent'",
53
+ "pretest": "npm run lect && npm run build",
54
+ "test": "npm run devtest",
55
55
  "unit": "uvu test"
56
56
  },
57
57
  "engines": {
58
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
58
+ "node": ">=14.18.0"
59
59
  },
60
60
  "c8": {
61
61
  "check-coverage": true,
@@ -1,16 +0,0 @@
1
- /**
2
- * @name lerna-clean-changelogs
3
- * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 4.2.7
5
- * @author Roy Revelt, Codsen Ltd
6
- * @license MIT
7
- * {@link https://codsen.com/os/lerna-clean-changelogs/}
8
- */
9
-
10
- var c="4.2.7";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,16 +0,0 @@
1
- /**
2
- * @name lerna-clean-changelogs
3
- * @fileoverview Removes frivolous entries from commitizen generated changelogs
4
- * @version 4.2.7
5
- * @author Roy Revelt, Codsen Ltd
6
- * @license MIT
7
- * {@link https://codsen.com/os/lerna-clean-changelogs/}
8
- */
9
-
10
- "use strict";var lernaCleanChangelogs=(()=>{var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=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))V.call(r,n)&&D(e,n,r[n]);return e};var T=(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 L(r))!S.call(e,i)&&i!==n&&p(e,i,{get:()=>r[i],enumerable:!(l=g(r,i))||l.enumerable});return e};var R=e=>k(p({},"__esModule",{value:!0}),e);var I={};T(I,{cleanChangelogs:()=>J,defaults:()=>O,version:()=>A});var j="4.2.7";var A=j;function a(e){return typeof e=="string"}var O={extras:!1};function J(e,r){var d,f,$,y,b,E,x,h;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({},O),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 W=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((x=s[t])==null?void 0:x.trim()),m=!0);(h=s[t])!=null&&h.trim()&&(m=!1)}i=`${u.join(l)}${W?l:""}`}return{version:A,res:i||e}}return R(I);})();