@myparcel/semantic-release-wordpress-readme-generator
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,7 +0,7 @@ | ||
(function(s){typeof define=="function"&&define.amd?define(s):s()})(function(){"use strict";const s=require("fs"),r=require("debug")("semantic-release:@myparcel/semantic-release-wordpress-readme-generator"),f=[{type:"feat",prefix:"New: "},{type:"fix",prefix:"Fixed bug: "},{type:"perf",prefix:"Performance improvement: "},{type:"revert",prefix:"Revert: "}],l={generateNotes(m,x){const{commits:y,nextRelease:a,cwd:b,logger:$}=x,p=`${b}/readme.txt`,S=new Date().toISOString().substring(0,10);let{types:n}=m;(!n||!Array.isArray(n)||n.length===0)&&(n=f);const i=n.map(e=>e.type),j=y.reduce((e,t)=>{var u;r("Parsing "+t.subject);const o=t.subject.split(":")[0],c=o==null?void 0:o.replace(/!|\(.+\)/,"").trim();if(!i.includes(c))return r(`Skipping commit: ${t.subject}`),e;const g=n.find(A=>A.type===c).prefix,d=(u=t.subject.split(":")[1])==null?void 0:u.trim();return e.push({type:c,message:`* ${g}${d}`}),r(`Adding commit: ${t.subject} \u2013 * ${g}${d}`),e},[]).sort((e,t)=>i.indexOf(e.type)-i.indexOf(t.type)),h=`= ${a.version} (${S}) = | ||
(function(s){typeof define=="function"&&define.amd?define(s):s()})(function(){"use strict";const s=require("fs"),r=require("debug")("semantic-release:@myparcel/semantic-release-wordpress-readme-generator"),l=[{type:"feat",prefix:"New: "},{type:"fix",prefix:"Fixed bug: "},{type:"perf",prefix:"Performance improvement: "},{type:"revert",prefix:"Revert: "}],f={generateNotes(m,y){const{commits:x,nextRelease:a,cwd:$,logger:b}=y,p=`${$}/readme.txt`,S=new Date().toISOString().substring(0,10);let{types:n}=m;(!n||!Array.isArray(n)||n.length===0)&&(n=l);const i=n.map(e=>e.type),j=x.reduce((e,t)=>{var u;r(`Parsing ${t.subject}`);const o=t.subject.split(":")[0],c=o==null?void 0:o.replace(/!|\(.+\)/,"").trim();if(!i.includes(c))return r(`Skipping commit: ${t.subject}`),e;const{prefix:g}=n.find(A=>A.type===c),d=(u=t.subject.split(":")[1])==null?void 0:u.trim();return e.push({type:c,message:`* ${g}${d}`}),r(`Adding commit: ${t.subject} – * ${g}${d}`),e},[]).sort((e,t)=>i.indexOf(e.type)-i.indexOf(t.type)),h=`= ${a.version} (${S}) = | ||
`+j.map(e=>e.message).join(` | ||
`),v=s.readFileSync(p).toString("utf-8").replace("== Changelog ==",`== Changelog == | ||
${j.map(e=>e.message).join(` | ||
`)}`,v=s.readFileSync(p).toString("utf-8").replace("== Changelog ==",`== Changelog == | ||
${h}`).replace(/Stable tag: .+\nRequires/g,`Stable tag: ${a.version} | ||
Requires`);s.writeFileSync(p,v),$.log("Updated changelog in readme.txt")}};module.exports=l}); | ||
Requires`);s.writeFileSync(p,v),b.log("Updated changelog in readme.txt")}};module.exports=f}); |
{ | ||
"name": "@myparcel/semantic-release-wordpress-readme-generator", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Generates a readme.txt for use with WordPress plugin releases in semantic-release", | ||
@@ -17,2 +17,3 @@ "repository": { | ||
"scripts": { | ||
"prepare": "is-ci || husky install", | ||
"build": "vite build" | ||
@@ -32,18 +33,18 @@ }, | ||
"devDependencies": { | ||
"@myparcel/eslint-config": "^3.6.2", | ||
"@myparcel/prettier-config": "^1.1.0", | ||
"@myparcel/semantic-release-config": "^4.0.0", | ||
"eslint": "8.22.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"@myparcel-eslint/eslint-config-esnext": "^1.2.0", | ||
"@myparcel-eslint/eslint-config-node": "^1.2.0", | ||
"@myparcel-eslint/eslint-config-prettier": "^1.2.0", | ||
"@myparcel/semantic-release-config": "^5.0.0", | ||
"eslint": "^8.38.0", | ||
"husky": "^8.0.1", | ||
"is-ci": "^3.0.1", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.7.1", | ||
"semantic-release": "^19.0.5", | ||
"vite": "^3.1.2" | ||
"semantic-release": "^21.0.0", | ||
"vite": "^4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"semantic-release": "^19" | ||
"semantic-release": "^19 || ^20 || ^21" | ||
}, | ||
"packageManager": "yarn@3.2.3", | ||
"packageManager": "yarn@3.5.0", | ||
"publishConfig": { | ||
@@ -50,0 +51,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6046
50