diff --git a/CHANGELOG.md b/CHANGELOG.md index e4bb97e..7df60dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,76 @@ +#### 0.0.12 (2020-12-29) + +##### Chores + +* **docs:** + * update README ([0a907ad9](https://github.com/gregoranders/nodejs-project-info/commit/0a907ad9c13a39b8d31b5ec4efa1d07d865c8edd)) + * update SECURITY ([34c6c965](https://github.com/gregoranders/nodejs-project-info/commit/34c6c965f7f018196da39298faf7c2d7afe178ff)) + * updated CHANGELOG ([8ba49bbd](https://github.com/gregoranders/nodejs-project-info/commit/8ba49bbd680353643b4fe60c214a2a345f70aaa2)) +* **release:** + * prepare next release ([2d14407c](https://github.com/gregoranders/nodejs-project-info/commit/2d14407c08ac8ae9c2f990f5fe67921ec9e9e5f4)) + * bump version ([b886350d](https://github.com/gregoranders/nodejs-project-info/commit/b886350d4e54f4f8ca9ffc35427ccde5215676d7)) + * 0.0.10 ([89a9cb9f](https://github.com/gregoranders/nodejs-project-info/commit/89a9cb9fd9f954275ec1267ae8e2cabad6887fb3)) + * 0.0.9 ([3ca641ba](https://github.com/gregoranders/nodejs-project-info/commit/3ca641ba2daea536df92d3896f34cad6fd3943dd)) + * 0.0.9 ([8d280ca2](https://github.com/gregoranders/nodejs-project-info/commit/8d280ca22455e391a2ef394d504900344ce8383e)) + * 0.0.8 Release ([43aa2709](https://github.com/gregoranders/nodejs-project-info/commit/43aa27095dc34279a46b5692ab40fc5fee4bac67)) + * prepare next release ([2c7da3b7](https://github.com/gregoranders/nodejs-project-info/commit/2c7da3b72866bd29b3d5ae6492b86e9365dc953e)) +* **dist:** updated dist ([a14aa022](https://github.com/gregoranders/nodejs-project-info/commit/a14aa0220f5ed7ee655b0751ad3903f289d0de75)) +* **codequality:** renamed variables ([84250346](https://github.com/gregoranders/nodejs-project-info/commit/84250346264e09abb30f53f6a21059985e021b08)) +* **dependencies:** + * update dependnencies ([0629ac3c](https://github.com/gregoranders/nodejs-project-info/commit/0629ac3c1bc755d394fb14d393f320c9debdc5f5)) + * update dev dependencies ([5c4c5db8](https://github.com/gregoranders/nodejs-project-info/commit/5c4c5db82f82724c157bc411f026584e427f30e4)) + * update dependnencies ([c7271cda](https://github.com/gregoranders/nodejs-project-info/commit/c7271cda6c84e167db08a6c0601f76d338350f48)) + * update dev dependencies ([e3f61ca0](https://github.com/gregoranders/nodejs-project-info/commit/e3f61ca0fa789cb138f7fb3fed113b21ddca0376)) + * update dev dependencies ([73f2f582](https://github.com/gregoranders/nodejs-project-info/commit/73f2f582bb043ad08ffa37bebc4f3818ac3deee1)) + * update dependencies ([bcf235e1](https://github.com/gregoranders/nodejs-project-info/commit/bcf235e16d49216b0120d545a39262eb5a9f0a4d)) + * update dependencies ([56c21252](https://github.com/gregoranders/nodejs-project-info/commit/56c212526391a6a32614f0f44f956b3d43d131e2)) +* **CHANGELOG:** update changelog ([9f4d7e86](https://github.com/gregoranders/nodejs-project-info/commit/9f4d7e86a255d3d3f205aeb6c8e8f6156fbe58f4)) +* **quality:** + * add codacy CI task ([6c52c9de](https://github.com/gregoranders/nodejs-project-info/commit/6c52c9de11ba57757446f273922c7ff0b5121fd5)) + * add code climate ([780a170c](https://github.com/gregoranders/nodejs-project-info/commit/780a170ccd3497e5fd3c4de5e55836f4e47d7d0d)) + * add codacy config ([41ddb1bf](https://github.com/gregoranders/nodejs-project-info/commit/41ddb1bf10e169084cd54251eac351f7a1cd7fc5)) +* **git:** add test path to ignored files ([89b0a42f](https://github.com/gregoranders/nodejs-project-info/commit/89b0a42f2bda1b3e2a4bf08e153d923784dfd06a)) + +##### Documentation Changes + +* **CHANGELOG:** + * update ([53437cae](https://github.com/gregoranders/nodejs-project-info/commit/53437cae079bd8d87c5238db9c1a3c75ed71b56e)) + * update changelog ([cedecb5d](https://github.com/gregoranders/nodejs-project-info/commit/cedecb5d024a19d07b5d231e39692e31527e924a)) + * update changelog ([c15cf000](https://github.com/gregoranders/nodejs-project-info/commit/c15cf0003a4ab2cf9243dd04a8ba637d53aaf07b)) +* **README:** add codacy badge ([bc167d8d](https://github.com/gregoranders/nodejs-project-info/commit/bc167d8da072c2d5f18b4a885f61acfc35666ab4)) + +##### Other Changes + +* **build:** exclude build from ignored files ([636208f0](https://github.com/gregoranders/nodejs-project-info/commit/636208f09b050ca09ca9ee0fcbf12742a7efcc4c)) +* bump ts-jest from 26.1.1 to 26.1.3 ([1d583886](https://github.com/gregoranders/nodejs-project-info/commit/1d583886f9457abedd9e49c0836ebcfa5ae4ffde)) +* bump typescript from 3.9.6 to 3.9.7 ([4e2b71e5](https://github.com/gregoranders/nodejs-project-info/commit/4e2b71e5b256b30cecfa1bdab46a35141aa42ea3)) +* bump @typescript-eslint/eslint-plugin from 3.6.0 to 3.6.1 ([fed83bc9](https://github.com/gregoranders/nodejs-project-info/commit/fed83bc9a2ccc778330017422b76dac67368e9f7)) +* bump @typescript-eslint/parser from 3.6.0 to 3.6.1 ([e4e5b6e1](https://github.com/gregoranders/nodejs-project-info/commit/e4e5b6e1f3b068d2158faaaff82c1e4466d13f3b)) +* bump @types/node from 14.0.20 to 14.0.23 ([8dce5018](https://github.com/gregoranders/nodejs-project-info/commit/8dce5018a6763908938f0fd96c2a5a320679653c)) +* bump @types/node from 14.0.19 to 14.0.20 ([dda925f5](https://github.com/gregoranders/nodejs-project-info/commit/dda925f5c26efbefbe4499431bea23e7d37df55a)) +* bump @types/node from 14.0.18 to 14.0.19 ([c2254aed](https://github.com/gregoranders/nodejs-project-info/commit/c2254aedd9d2f0ee8aa9cc3f3ab89657bedbad50)) +* bump @typescript-eslint/eslint-plugin from 3.5.0 to 3.6.0 ([40551701](https://github.com/gregoranders/nodejs-project-info/commit/4055170182cd810ce9a4332bd32f6ab7a7caf1b7)) +* bump @types/node from 14.0.14 to 14.0.18 ([ec3fa318](https://github.com/gregoranders/nodejs-project-info/commit/ec3fa3187c2080be2656c574930590cc70dd2277)) +* bump @types/jest from 26.0.3 to 26.0.4 ([e0c9df22](https://github.com/gregoranders/nodejs-project-info/commit/e0c9df227a8725cd70580f51c7b10ca2ff77e0fe)) +* bump @typescript-eslint/parser from 3.5.0 to 3.6.0 ([246cda6f](https://github.com/gregoranders/nodejs-project-info/commit/246cda6f3d4f0ace419a8a12fa226ff072bcfba8)) +* bump eslint-plugin-jest from 23.17.1 to 23.18.0 ([936814f1](https://github.com/gregoranders/nodejs-project-info/commit/936814f1f5156b1f1f49bee623266e7e7a15dcbe)) +* bump eslint from 7.3.1 to 7.4.0 ([18e43ffd](https://github.com/gregoranders/nodejs-project-info/commit/18e43ffde32c7c7b8247160d2782842663e49534)) +* bump typescript from 3.9.5 to 3.9.6 ([2fa230e6](https://github.com/gregoranders/nodejs-project-info/commit/2fa230e6fc8290e890a657676b2e94286fe6a312)) +* bump @typescript-eslint/parser from 3.4.0 to 3.5.0 ([eb853c87](https://github.com/gregoranders/nodejs-project-info/commit/eb853c8720c1ed17bc174726a8de417f5786a20e)) +* bump @typescript-eslint/eslint-plugin from 3.4.0 to 3.5.0 ([859f8c1f](https://github.com/gregoranders/nodejs-project-info/commit/859f8c1f6203fa7e80bdc3e237ff24e9d94f6896)) + +##### Refactors + +* **quality:** fix unicorn issue ([928e553d](https://github.com/gregoranders/nodejs-project-info/commit/928e553d18e775069cc12df4cc1c082bbb69120e)) +* **docs:** + * remove email ([819406f4](https://github.com/gregoranders/nodejs-project-info/commit/819406f480f11ec92858daa3be5a184d48b1c88c)) + * refactor documentation ([95424f53](https://github.com/gregoranders/nodejs-project-info/commit/95424f53d935a82949b44866e8ccdbaf7fcf05d0)) +* **build:** + * refactor Github CI ([caa0446f](https://github.com/gregoranders/nodejs-project-info/commit/caa0446f8fea6fc46f8b5112b833ea122a82c3ae)) + * use correct env variable ([4b62afc0](https://github.com/gregoranders/nodejs-project-info/commit/4b62afc0f0dc623b3c15afbd7b30e6915a812a43)) +* **vscode:** refactor visual code config ([ab9c95b2](https://github.com/gregoranders/nodejs-project-info/commit/ab9c95b2c5415db2db39fe55d7ee8accfc015bb0)) +* **dependencies:** dependencies check weekly ([f450540c](https://github.com/gregoranders/nodejs-project-info/commit/f450540c42ac8dc8764a346976977f8ef2b48e48)) + #### 0.0.11 (2020-08-19) ##### Chores diff --git a/README.md b/README.md index 56eaee8..efa5438 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ This action provides the _name_ and _version_ and the content of **package.json* ... - name: nodejs project information id: projectinfo - uses: gregoranders/nodejs-project-info@v0.0.11 + uses: gregoranders/nodejs-project-info@v0.0.12 - name: create release action id: createrelease - uses: gregoranders/nodejs-create-release@v0.0.11 + uses: gregoranders/nodejs-create-release@v0.0.12 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} diff --git a/SECURITY.md b/SECURITY.md index 5bdf573..356ac3c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,7 +5,8 @@ ​ | Version | Supported | | ------- | ------------------ | -| 0.0.11 | :white_check_mark: | +| 0.0.12 | :white_check_mark: | +| 0.0.11 | :x: | | 0.0.10 | :x: | ​ diff --git a/dist/index.js b/dist/index.js index bd144cd..f45ccca 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var s=r[t]={i:t,l:false,exports:{}};var n=true;try{e[t].call(s.exports,s,s.exports,__webpack_require__);n=false}finally{if(n)delete r[t]}s.l=true;return s.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(325)}return startup()}({65:function(e,t,r){const s=r(548);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=r(181);const{re:o,t:a}=r(976);const{compareIdentifiers:E}=r(760);class SemVer{constructor(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},87:function(e){e.exports=require("os")},181:function(e){const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(960);s.run()},431:function(e,t,r){"use strict";var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=s(r(87));function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+n.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const i="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())})};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=r(431);const o=n(r(87));const a=n(r(622));var E;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(E=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=i.toCommandValue(t);process.env[e]=r;i.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${a.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){i.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){i.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=E.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){i.issueCommand("debug",{},e)}t.debug=debug;function error(e){i.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){i.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+o.EOL)}t.info=info;function startGroup(e){i.issue("group",e)}t.startGroup=startGroup;function endGroup(){i.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r})}t.group=group;function saveState(e,t){i.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},548:function(e){const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},622:function(e){e.exports=require("path")},714:function(e,t,r){const s=r(830);const n=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=n},747:function(e){e.exports=require("fs")},760:function(e){const t=/^[0-9]+$/;const r=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:s}},830:function(e,t,r){const{MAX_LENGTH:s}=r(181);const{re:n,t:i}=r(976);const o=r(65);const a=(e,t)=>{if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[i.LOOSE]:n[i.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=a},960:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});t.run=void 0;const n=r(470);const i=r(747);const o=r(714);const a=o;const E=e=>s(void 0,void 0,void 0,function*(){return new Promise((t,r)=>{i.readFile(e,(e,s)=>{if(e){r(e)}else{t(s.toString())}})})});const c=e=>{return new Promise((t,r)=>{i.realpath(e,(e,s)=>{if(e){r(e)}else{t(s)}})})};t.run=(()=>s(void 0,void 0,void 0,function*(){const e=n.getInput("path",{required:false})||"./package.json";try{const t=yield c(e);const r=yield E(t);const s=JSON.parse(r);if(!s.version){throw new Error(`Missing version`)}if(!a(s.version)){throw new Error(`Invalid version ${s.version}`)}n.setOutput("name",s.name);n.setOutput("version",s.version);n.setOutput("context",r)}catch(e){n.setFailed(e)}}))},976:function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:s}=r(181);const n=r(548);t=e.exports={};const i=t.re=[];const o=t.src=[];const a=t.t={};let E=0;const c=(e,t,r)=>{const s=E++;n(s,t);a[e]=s;o[s]=t;i[s]=new RegExp(t,r?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);c("FULL",`^${o[a.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);c("LOOSE",`^${o[a.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);c("COERCERTL",o[a.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}}); \ No newline at end of file +module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var s=r[t]={i:t,l:false,exports:{}};var n=true;try{e[t].call(s.exports,s,s.exports,__webpack_require__);n=false}finally{if(n)delete r[t]}s.l=true;return s.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(325)}return startup()}({65:function(e,t,r){const s=r(548);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=r(181);const{re:o,t:a}=r(976);const c=r(143);const{compareIdentifiers:u}=r(760);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},82:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},87:function(e){e.exports=require("os")},102:function(e,t,r){"use strict";var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=s(r(747));const i=s(r(87));const o=r(82);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!n.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}n.appendFileSync(r,`${o.toCommandValue(t)}${i.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},143:function(e){const t=["includePrerelease","loose","rtl"];const r=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter(t=>e[t]).reduce((e,t)=>{e[t]=true;return e},{});e.exports=r},181:function(e){const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(960);s.run()},431:function(e,t,r){"use strict";var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=s(r(87));const i=r(82);function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+n.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const o="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return i.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return i.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())})};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=r(431);const o=r(102);const a=r(82);const c=n(r(87));const u=n(r(622));var E;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(E=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=a.toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){const t="_GitHubActionsFileCommandDelimeter_";const s=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;o.issueCommand("ENV",s)}else{i.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){o.issueCommand("PATH",e)}else{i.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){i.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){i.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=E.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){i.issueCommand("debug",{},e)}t.debug=debug;function error(e){i.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){i.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){i.issue("group",e)}t.startGroup=startGroup;function endGroup(){i.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r})}t.group=group;function saveState(e,t){i.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},548:function(e){const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},622:function(e){e.exports=require("path")},714:function(e,t,r){const s=r(830);const n=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=n},747:function(e){e.exports=require("fs")},760:function(e){const t=/^[0-9]+$/;const r=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:s}},830:function(e,t,r){const{MAX_LENGTH:s}=r(181);const{re:n,t:i}=r(976);const o=r(65);const a=r(143);const c=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[i.LOOSE]:n[i.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=c},960:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});t.run=void 0;const n=r(470);const i=r(747);const o=r(714);const a=o;const c=e=>s(void 0,void 0,void 0,function*(){return new Promise((t,r)=>{i.readFile(e,(e,s)=>{if(e){r(e)}else{t(s.toString())}})})});const u=e=>{return new Promise((t,r)=>{i.realpath(e,(e,s)=>{if(e){r(e)}else{t(s)}})})};const E=()=>s(void 0,void 0,void 0,function*(){const e=n.getInput("path",{required:false})||"./package.json";try{const t=yield u(e);const r=yield c(t);const s=JSON.parse(r);if(!s.version){throw new Error(`Missing version`)}if(!a(s.version)){throw new Error(`Invalid version ${s.version}`)}n.setOutput("name",s.name);n.setOutput("version",s.version);n.setOutput("context",r)}catch(e){n.setFailed(e)}});t.run=E},976:function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:s}=r(181);const n=r(548);t=e.exports={};const i=t.re=[];const o=t.src=[];const a=t.t={};let c=0;const u=(e,t,r)=>{const s=c++;n(s,t);a[e]=s;o[s]=t;i[s]=new RegExp(t,r?"g":undefined)};u("NUMERICIDENTIFIER","0|[1-9]\\d*");u("NUMERICIDENTIFIERLOOSE","[0-9]+");u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");u("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);u("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);u("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);u("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);u("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);u("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);u("BUILDIDENTIFIER","[0-9A-Za-z-]+");u("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);u("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);u("FULL",`^${o[a.FULLPLAIN]}$`);u("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);u("LOOSE",`^${o[a.LOOSEPLAIN]}$`);u("GTLT","((?:<|>)?=?)");u("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);u("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);u("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);u("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);u("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);u("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);u("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);u("COERCERTL",o[a.COERCE],true);u("LONETILDE","(?:~>?)");u("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";u("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);u("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);u("LONECARET","(?:\\^)");u("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";u("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);u("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);u("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);u("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);u("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";u("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);u("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);u("STAR","(<|>)?=?\\s*\\*");u("GTE0","^\\s*>=\\s*0.0.0\\s*$");u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}}); \ No newline at end of file diff --git a/package.json b/package.json index 45e9592..c82fd0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodejs-project-info", - "version": "0.0.11", + "version": "0.0.12", "description": "NodeJS Project Information", "main": "./dist/index.js", "scripts": { @@ -91,32 +91,32 @@ }, "homepage": "https://gregoranders.github.io/nodejs-project-info/", "dependencies": { - "@actions/core": "1.2.4", - "semver": "7.3.2" + "@actions/core": "1.2.6", + "semver": "7.3.4" }, "devDependencies": { - "@types/jest": "26.0.10", - "@types/node": "14.6.0", - "@typescript-eslint/eslint-plugin": "3.9.1", - "@typescript-eslint/parser": "3.9.1", + "@types/jest": "26.0.19", + "@types/node": "14.14.16", + "@typescript-eslint/eslint-plugin": "4.11.1", + "@typescript-eslint/parser": "4.11.1", "@zeit/ncc": "0.22.3", "generate-changelog": "1.8.0", - "eslint": "7.7.0", - "eslint-config-prettier": "6.11.0", - "eslint-plugin-jest": "23.20.0", - "eslint-plugin-prettier": "3.1.4", - "eslint-plugin-unicorn": "21.0.0", - "husky": "4.2.5", - "jest": "26.4.0", - "jest-cli": "26.4.0", - "jest-html-reporter": "3.1.3", - "jest-junit": "11.1.0", + "eslint": "7.16.0", + "eslint-config-prettier": "7.1.0", + "eslint-plugin-jest": "24.1.3", + "eslint-plugin-prettier": "3.3.0", + "eslint-plugin-unicorn": "25.0.0", + "husky": "4.3.6", + "jest": "26.6.3", + "jest-cli": "26.6.3", + "jest-html-reporter": "3.3.0", + "jest-junit": "12.0.0", "jest-spec-reporter": "1.0.14", - "lint-staged": "10.2.11", - "prettier": "2.0.5", + "lint-staged": "10.5.3", + "prettier": "2.2.1", "rimraf": "3.0.2", - "ts-jest": "26.2.0", - "ts-node": "8.10.2", - "typescript": "3.9.7" + "ts-jest": "26.4.4", + "ts-node": "9.1.1", + "typescript": "4.1.3" } } diff --git a/src/fixtures/test-utils.ts b/src/fixtures/test-utils.ts index 2e786a1..31f99cf 100644 --- a/src/fixtures/test-utils.ts +++ b/src/fixtures/test-utils.ts @@ -22,18 +22,18 @@ const actionsCoreMock = jest.mock('@actions/core', () => { }; }); -const inputVars: { [key: string]: string } = {}; +const inputVariables: { [key: string]: string } = {}; export const setInput = (name: string, value: string): void => { - const varName = `INPUT_${name.toUpperCase()}`; - inputVars[varName] = value; - process.env[varName] = value; + const variableName = `INPUT_${name.toUpperCase()}`; + inputVariables[variableName] = value; + process.env[variableName] = value; }; export const clearTestEnvironment = (): void => { - Object.keys(inputVars).forEach((varName) => { - Reflect.deleteProperty(process.env, varName); - Reflect.deleteProperty(inputVars, varName); + Object.keys(inputVariables).forEach((variableName) => { + Reflect.deleteProperty(process.env, variableName); + Reflect.deleteProperty(inputVariables, variableName); }); actionsCoreMock.clearAllMocks(); };