diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c080ad7..2466fdff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.0] - 2020-09-22 + ### Added - Commit hook for preventing dist/index.js to be out of date after modifying Typescript files. +- Input `changelogPath` for making the path to the CHANGELOG.md file configurable. Defaults to "./CHANGELOG.md". ## [1.1.0] - 2020-02-17 @@ -23,7 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release of this action! -[Unreleased]: https://github.com/thomaseizinger/keep-a-changelog-new-release/compare/1.1.0...HEAD +[Unreleased]: https://github.com/thomaseizinger/keep-a-changelog-new-release/compare/1.2.0...HEAD + +[1.2.0]: https://github.com/thomaseizinger/keep-a-changelog-new-release/compare/1.1.0...1.2.0 [1.1.0]: https://github.com/thomaseizinger/keep-a-changelog-new-release/compare/1.0.0...1.1.0 diff --git a/dist/index.js b/dist/index.js index 161ae8ce..5ea23e6d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4,7 +4,7 @@ * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. - */var n,i="";t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected a string");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i="";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},function(t,e){t.exports=function(){for(var t={},e=0;e=48&&e<=57}},function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e){t.exports=require("util")},function(t,e,r){"use strict";var n=r(20),i=r(67),o=r(4),s=r(21),a=r(22),c=r(68);t.exports=function(t,e){var r,o,s={};e||(e={});for(o in p)r=e[o],s[o]=null==r?p[o]:r;(s.position.indent||s.position.start)&&(s.indent=s.position.indent||[],s.position=s.position.start);return function(t,e){var r,o,s,p,B,z,$,F,V,H,M,G,W,Z,Y,Q,J,K,X,tt=e.additional,et=e.nonTerminated,rt=e.text,nt=e.reference,it=e.warning,ot=e.textContext,st=e.referenceContext,at=e.warningContext,ct=e.position,ut=e.indent||[],lt=t.length,ft=0,pt=-1,ht=ct.column||1,dt=ct.line||1,gt="",mt=[];"string"==typeof tt&&(tt=tt.charCodeAt(0));Q=yt(),F=it?function(t,e){var r=yt();r.column+=e,r.offset+=e,it.call(at,j[t],r,t)}:f,ft--,lt++;for(;++ft=55296&&vt<=57343||vt>1114111?(F(R,K),z=l(E)):z in i?(F(P,K),z=i[z]):(H="",U(z)&&F(P,K),z>65535&&(H+=l((z-=65536)>>>10|55296),z=56320|1023&z),z=H+l(z))):Z!==q&&F(I,K)),z?(bt(),Q=yt(),ft=X-1,ht+=X-W+1,mt.push(z),(J=yt()).offset++,nt&&nt.call(st,z,{start:Q,end:J},t.slice(W-1,X)),Q=J):(p=t.slice(W-1,X),gt+=p,ht+=p.length,ft=X-1)}else 10===B&&(dt++,pt++,ht=0),B==B?(gt+=l(B),ht++):bt();var vt;return mt.join("");function yt(){return{line:dt,column:ht,offset:ft+(ct.offset||0)}}function bt(){gt&&(mt.push(gt),rt&&rt.call(ot,gt,{start:Q,end:yt()}),gt="")}}(t,s)};var u={}.hasOwnProperty,l=String.fromCharCode,f=Function.prototype,p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},h=9,d=10,g=12,m=32,v=38,y=59,b=60,w=61,x=35,A=88,k=120,E=65533,q="named",S="hexadecimal",O="decimal",T={};T[S]=16,T[O]=10;var C={};C[q]=a,C[O]=o,C[S]=s;var L=1,D=2,_=3,I=4,N=5,P=6,R=7,j={};function U(t){return t>=1&&t<=8||11===t||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||65535==(65535&t)||65534==(65535&t)}j[L]="Named character references must be terminated by a semicolon",j[D]="Numeric character references must be terminated by a semicolon",j[_]="Named character references cannot be empty",j[I]="Numeric character references cannot be empty",j[N]="Named character references must be known",j[P]="Numeric character references cannot be disallowed",j[R]="Numeric character references cannot be outside the permissible Unicode range"},function(t,e){t.exports=require("os")},function(t,e,r){"use strict";var n=r(45),i=r(17);t.exports=function(t){("string"==typeof t||n(t))&&(t={path:String(t)});return i(t)}},function(t,e){t.exports=require("fs")},function(t,e,r){"use strict";t.exports=function(t,e,r,n){var i,o,s=t.length,a=-1;for(;++a","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(t,e,r){"use strict";t.exports=function(t){var e="string"==typeof t?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}},function(t,e,r){"use strict";var n=r(23),i=r(4);t.exports=function(t){return n(t)||i(t)}},function(t,e,r){"use strict";t.exports=function(t){var e="string"==typeof t?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}},function(t,e,r){"use strict";t.exports=s;var n=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],i=n.concat(["~","|"]),o=i.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function s(t){var e=t||{};return e.commonmark?o:e.gfm?i:n}s.default=n,s.gfm=i,s.commonmark=o},function(t,e,r){"use strict";t.exports={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:r(72)}},function(t,e,r){"use strict";t.exports=a;var n=r(75),i=n.CONTINUE,o=n.SKIP,s=n.EXIT;function a(t,e,r,i){"function"==typeof e&&"function"!=typeof r&&(i=r,r=e,e=null),n(t,e,(function(t,e){var n=e[e.length-1],i=n?n.children.indexOf(t):null;return r(t,i,n)}),i)}a.CONTINUE=i,a.SKIP=o,a.EXIT=s},function(t,e,r){"use strict";t.exports=function(t){var e=String(t),r=e.length;for(;e.charAt(--r)===n;);return e.slice(0,r+1)};var n="\n"},function(t,e,r){"use strict";t.exports=function(t){var e,r=0,a=0,c=t.charAt(r),u={};for(;c===n||c===i;)a+=e=c===n?s:o,e>1&&(a=Math.floor(a/e)*e),u[a]=r,c=t.charAt(++r);return{indent:a,stops:u}};var n="\t",i=" ",o=1,s=4},function(t,e,r){"use strict";var n="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";e.openCloseTag=new RegExp("^(?:"+n+"|"+i+")"),e.tag=new RegExp("^(?:"+n+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},function(t,e,r){"use strict";t.exports=function(t,e){return t.indexOf("<",e)}},function(t,e,r){"use strict";t.exports=function(t,e){var r=t.indexOf("[",e),n=t.indexOf("![",e);if(-1===n)return r;return ro&&(o=i):i=1,r=n+1,n=t.indexOf(e,r);return o}},function(t,e,r){"use strict";t.exports=function(t){var e=t.referenceType;if(e===o)return"";return n+(e===s?"":t.label||t.identifier)+i};var n="[",i="]",o="shortcut",s="collapsed"},function(t,e){t.exports=require("child_process")},function(t,e,r){"use strict";var n,i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const o=r(163),s=r(10),a=r(3);function c(t){return(1&t.mode)>0||(8&t.mode)>0&&t.gid===process.getgid()||(64&t.mode)>0&&t.uid===process.getuid()}n=s.promises,e.chmod=n.chmod,e.copyFile=n.copyFile,e.lstat=n.lstat,e.mkdir=n.mkdir,e.readdir=n.readdir,e.readlink=n.readlink,e.rename=n.rename,e.rmdir=n.rmdir,e.stat=n.stat,e.symlink=n.symlink,e.unlink=n.unlink,e.IS_WINDOWS="win32"===process.platform,e.exists=function(t){return i(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(t){if("ENOENT"===t.code)return!1;throw t}return!0}))},e.isDirectory=function(t,r=!1){return i(this,void 0,void 0,(function*(){return(r?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){if(t=t||"",e.IS_WINDOWS)return(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\");return t.replace(/\/\/+/g,"/")}(t)))throw new Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.mkdirP=function t(r,n=1e3,s=1){return i(this,void 0,void 0,(function*(){if(o.ok(r,"a path argument must be provided"),r=a.resolve(r),s>=n)return e.mkdir(r);try{return void(yield e.mkdir(r))}catch(i){switch(i.code){case"ENOENT":return yield t(a.dirname(r),n,s+1),void(yield e.mkdir(r));default:{let t;try{t=yield e.stat(r)}catch(t){throw i}if(!t.isDirectory())throw i}}}}))},e.tryGetExecutablePath=function(t,r){return i(this,void 0,void 0,(function*(){let n=void 0;try{n=yield e.stat(t)}catch(e){"ENOENT"!==e.code&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}if(n&&n.isFile())if(e.IS_WINDOWS){const e=a.extname(t).toUpperCase();if(r.some(t=>t.toUpperCase()===e))return t}else if(c(n))return t;const i=t;for(const o of r){t=i+o,n=void 0;try{n=yield e.stat(t)}catch(e){"ENOENT"!==e.code&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}if(n&&n.isFile()){if(e.IS_WINDOWS){try{const r=a.dirname(t),n=a.basename(t).toUpperCase();for(const i of yield e.readdir(r))if(n===i.toUpperCase()){t=a.join(r,i);break}}catch(e){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${e}`)}return t}if(c(n))return t}}return""}))}},function(t,e){t.exports=require("stream")},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=r(16),s=r(43),a=i(r(53)),c=i(r(156)),u=i(r(158));!function(){n(this,void 0,void 0,(function*(){try{const{version:t,date:e,owner:r,repo:n}=c.default(),i=yield u.default(),o=yield s.read("CHANGELOG.md",{encoding:"utf-8"}),l=yield a.default(o,t,e,i,r,n);yield s.write(l,{encoding:"utf-8"})}catch(t){o.setFailed(t.message)}}))}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(8);function i(t,e,r){const i=new s(t,e,r);process.stdout.write(i.toString()+n.EOL)}e.issueCommand=i,e.issue=function(t,e=""){i(t,{},e)};const o="::";class s{constructor(t,e,r){t||(t="missing.command"),this.command=t,this.properties=e,this.message=r}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";for(const r in this.properties)if(this.properties.hasOwnProperty(r)){const n=this.properties[r];n&&(t+=`${r}=${e=`${n||""}`,e.replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/]/g,"%5D").replace(/;/g,"%3B")},`)}}var e;return t+=o,t+=function(t){return t.replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(`${this.message||""}`),t}}},function(t,e,r){"use strict";t.exports=r(44)},function(t,e,r){"use strict";var n=r(9),i=r(51),o=r(52);t.exports=n,n.read=o.read,n.readSync=i.read,n.write=o.write,n.writeSync=i.write},function(t,e){ + */var n,i="";t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected a string");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i="";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},function(t,e){t.exports=function(){for(var t={},e=0;e=48&&e<=57}},function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e){t.exports=require("util")},function(t,e,r){"use strict";var n=r(20),i=r(67),o=r(4),s=r(21),a=r(22),c=r(68);t.exports=function(t,e){var r,o,s={};e||(e={});for(o in p)r=e[o],s[o]=null==r?p[o]:r;(s.position.indent||s.position.start)&&(s.indent=s.position.indent||[],s.position=s.position.start);return function(t,e){var r,o,s,p,B,z,$,F,V,H,M,G,W,Z,Y,Q,J,K,X,tt=e.additional,et=e.nonTerminated,rt=e.text,nt=e.reference,it=e.warning,ot=e.textContext,st=e.referenceContext,at=e.warningContext,ct=e.position,ut=e.indent||[],lt=t.length,ft=0,pt=-1,ht=ct.column||1,dt=ct.line||1,gt="",mt=[];"string"==typeof tt&&(tt=tt.charCodeAt(0));Q=yt(),F=it?function(t,e){var r=yt();r.column+=e,r.offset+=e,it.call(at,j[t],r,t)}:f,ft--,lt++;for(;++ft=55296&&vt<=57343||vt>1114111?(F(R,K),z=l(E)):z in i?(F(P,K),z=i[z]):(H="",U(z)&&F(P,K),z>65535&&(H+=l((z-=65536)>>>10|55296),z=56320|1023&z),z=H+l(z))):Z!==q&&F(I,K)),z?(bt(),Q=yt(),ft=X-1,ht+=X-W+1,mt.push(z),(J=yt()).offset++,nt&&nt.call(st,z,{start:Q,end:J},t.slice(W-1,X)),Q=J):(p=t.slice(W-1,X),gt+=p,ht+=p.length,ft=X-1)}else 10===B&&(dt++,pt++,ht=0),B==B?(gt+=l(B),ht++):bt();var vt;return mt.join("");function yt(){return{line:dt,column:ht,offset:ft+(ct.offset||0)}}function bt(){gt&&(mt.push(gt),rt&&rt.call(ot,gt,{start:Q,end:yt()}),gt="")}}(t,s)};var u={}.hasOwnProperty,l=String.fromCharCode,f=Function.prototype,p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},h=9,d=10,g=12,m=32,v=38,y=59,b=60,w=61,x=35,A=88,k=120,E=65533,q="named",S="hexadecimal",O="decimal",T={};T[S]=16,T[O]=10;var C={};C[q]=a,C[O]=o,C[S]=s;var L=1,D=2,_=3,I=4,N=5,P=6,R=7,j={};function U(t){return t>=1&&t<=8||11===t||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||65535==(65535&t)||65534==(65535&t)}j[L]="Named character references must be terminated by a semicolon",j[D]="Numeric character references must be terminated by a semicolon",j[_]="Named character references cannot be empty",j[I]="Numeric character references cannot be empty",j[N]="Named character references must be known",j[P]="Numeric character references cannot be disallowed",j[R]="Numeric character references cannot be outside the permissible Unicode range"},function(t,e){t.exports=require("os")},function(t,e,r){"use strict";var n=r(45),i=r(17);t.exports=function(t){("string"==typeof t||n(t))&&(t={path:String(t)});return i(t)}},function(t,e){t.exports=require("fs")},function(t,e,r){"use strict";t.exports=function(t,e,r,n){var i,o,s=t.length,a=-1;for(;++a","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(t,e,r){"use strict";t.exports=function(t){var e="string"==typeof t?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}},function(t,e,r){"use strict";var n=r(23),i=r(4);t.exports=function(t){return n(t)||i(t)}},function(t,e,r){"use strict";t.exports=function(t){var e="string"==typeof t?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}},function(t,e,r){"use strict";t.exports=s;var n=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],i=n.concat(["~","|"]),o=i.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function s(t){var e=t||{};return e.commonmark?o:e.gfm?i:n}s.default=n,s.gfm=i,s.commonmark=o},function(t,e,r){"use strict";t.exports={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:r(72)}},function(t,e,r){"use strict";t.exports=a;var n=r(75),i=n.CONTINUE,o=n.SKIP,s=n.EXIT;function a(t,e,r,i){"function"==typeof e&&"function"!=typeof r&&(i=r,r=e,e=null),n(t,e,(function(t,e){var n=e[e.length-1],i=n?n.children.indexOf(t):null;return r(t,i,n)}),i)}a.CONTINUE=i,a.SKIP=o,a.EXIT=s},function(t,e,r){"use strict";t.exports=function(t){var e=String(t),r=e.length;for(;e.charAt(--r)===n;);return e.slice(0,r+1)};var n="\n"},function(t,e,r){"use strict";t.exports=function(t){var e,r=0,a=0,c=t.charAt(r),u={};for(;c===n||c===i;)a+=e=c===n?s:o,e>1&&(a=Math.floor(a/e)*e),u[a]=r,c=t.charAt(++r);return{indent:a,stops:u}};var n="\t",i=" ",o=1,s=4},function(t,e,r){"use strict";var n="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";e.openCloseTag=new RegExp("^(?:"+n+"|"+i+")"),e.tag=new RegExp("^(?:"+n+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},function(t,e,r){"use strict";t.exports=function(t,e){return t.indexOf("<",e)}},function(t,e,r){"use strict";t.exports=function(t,e){var r=t.indexOf("[",e),n=t.indexOf("![",e);if(-1===n)return r;return ro&&(o=i):i=1,r=n+1,n=t.indexOf(e,r);return o}},function(t,e,r){"use strict";t.exports=function(t){var e=t.referenceType;if(e===o)return"";return n+(e===s?"":t.label||t.identifier)+i};var n="[",i="]",o="shortcut",s="collapsed"},function(t,e){t.exports=require("child_process")},function(t,e,r){"use strict";var n,i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const o=r(163),s=r(10),a=r(3);function c(t){return(1&t.mode)>0||(8&t.mode)>0&&t.gid===process.getgid()||(64&t.mode)>0&&t.uid===process.getuid()}n=s.promises,e.chmod=n.chmod,e.copyFile=n.copyFile,e.lstat=n.lstat,e.mkdir=n.mkdir,e.readdir=n.readdir,e.readlink=n.readlink,e.rename=n.rename,e.rmdir=n.rmdir,e.stat=n.stat,e.symlink=n.symlink,e.unlink=n.unlink,e.IS_WINDOWS="win32"===process.platform,e.exists=function(t){return i(this,void 0,void 0,(function*(){try{yield e.stat(t)}catch(t){if("ENOENT"===t.code)return!1;throw t}return!0}))},e.isDirectory=function(t,r=!1){return i(this,void 0,void 0,(function*(){return(r?yield e.stat(t):yield e.lstat(t)).isDirectory()}))},e.isRooted=function(t){if(!(t=function(t){if(t=t||"",e.IS_WINDOWS)return(t=t.replace(/\//g,"\\")).replace(/\\\\+/g,"\\");return t.replace(/\/\/+/g,"/")}(t)))throw new Error('isRooted() parameter "p" cannot be empty');return e.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")},e.mkdirP=function t(r,n=1e3,s=1){return i(this,void 0,void 0,(function*(){if(o.ok(r,"a path argument must be provided"),r=a.resolve(r),s>=n)return e.mkdir(r);try{return void(yield e.mkdir(r))}catch(i){switch(i.code){case"ENOENT":return yield t(a.dirname(r),n,s+1),void(yield e.mkdir(r));default:{let t;try{t=yield e.stat(r)}catch(t){throw i}if(!t.isDirectory())throw i}}}}))},e.tryGetExecutablePath=function(t,r){return i(this,void 0,void 0,(function*(){let n=void 0;try{n=yield e.stat(t)}catch(e){"ENOENT"!==e.code&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}if(n&&n.isFile())if(e.IS_WINDOWS){const e=a.extname(t).toUpperCase();if(r.some(t=>t.toUpperCase()===e))return t}else if(c(n))return t;const i=t;for(const o of r){t=i+o,n=void 0;try{n=yield e.stat(t)}catch(e){"ENOENT"!==e.code&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}if(n&&n.isFile()){if(e.IS_WINDOWS){try{const r=a.dirname(t),n=a.basename(t).toUpperCase();for(const i of yield e.readdir(r))if(n===i.toUpperCase()){t=a.join(r,i);break}}catch(e){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${e}`)}return t}if(c(n))return t}}return""}))}},function(t,e){t.exports=require("stream")},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=r(16),s=r(43),a=i(r(53)),c=i(r(156)),u=i(r(158));!function(){n(this,void 0,void 0,(function*(){try{const{version:t,date:e,owner:r,repo:n,changelogPath:i}=c.default(),o=yield u.default(),l=yield s.read(i,{encoding:"utf-8"}),f=yield a.default(l,t,e,o,r,n);yield s.write(f,{encoding:"utf-8"})}catch(t){o.setFailed(t.message)}}))}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(8);function i(t,e,r){const i=new s(t,e,r);process.stdout.write(i.toString()+n.EOL)}e.issueCommand=i,e.issue=function(t,e=""){i(t,{},e)};const o="::";class s{constructor(t,e,r){t||(t="missing.command"),this.command=t,this.properties=e,this.message=r}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";for(const r in this.properties)if(this.properties.hasOwnProperty(r)){const n=this.properties[r];n&&(t+=`${r}=${e=`${n||""}`,e.replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/]/g,"%5D").replace(/;/g,"%3B")},`)}}var e;return t+=o,t+=function(t){return t.replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(`${this.message||""}`),t}}},function(t,e,r){"use strict";t.exports=r(44)},function(t,e,r){"use strict";var n=r(9),i=r(51),o=r(52);t.exports=n,n.read=o.read,n.readSync=i.read,n.write=o.write,n.writeSync=i.write},function(t,e){ /*! * Determine if an object is a Buffer * diff --git a/src/index.ts b/src/index.ts index ac922f7c..0ea5bf1a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,10 +6,10 @@ import getGenesisHash from "./getGenesisHash"; async function run(): Promise { try { - const { version, date, owner, repo } = getInputs(); + const { version, date, owner, repo, changelogPath } = getInputs(); const genesisHash = await getGenesisHash(); - const changelog = await read("CHANGELOG.md", { encoding: "utf-8" }); + const changelog = await read(changelogPath, { encoding: "utf-8" }); const newChangelog = await updateChangelog( changelog,