diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ceb74a01..fd9f66d5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -26,11 +26,11 @@ jobs: - uses: actions/checkout@v1 - id: read-version run: | - echo "::set-output name=version::$(cat VERSION)" + echo "::set-output name=version::$(jq -r ".version" package.json)" - id: changelog-enforcer uses: ./ with: - expectedLatestVersion: ${{ steps.read-version.outputs.version }} + expectedLatestVersion: "v${{ steps.read-version.outputs.version }}" - if: failure() uses: unsplash/comment-on-pr@master env: @@ -59,13 +59,13 @@ jobs: - name: Read version id: read_version run: | - echo ::set-output name=version::$(cat VERSION) + echo ::set-output name=version::$(jq -r ".version" package.json) shell: bash - name: Get Changelog Entry id: changelog_reader uses: mindsers/changelog-reader-action@v2 with: - version: ${{ steps.read_version.outputs.version }} + version: "v${{ steps.read_version.outputs.version }}" path: ./CHANGELOG.md - name: Check for Release id: check_release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7c1289d..ab3115e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,7 @@ name: "Release Workflow" on: push: branches: + - 'releases/v1.6' - 'master' jobs: @@ -13,14 +14,14 @@ jobs: - name: Read versions id: read_version run: | - echo ::set-output name=version::$(cat VERSION) - echo ::set-output name=major_tag::$(cat VERSION | cut -d '.' -f 1) + echo ::set-output name=version::$(jq -r ".version" package.json) + echo ::set-output name=major_tag::$(jq -r ".version" package.json | cut -d '.' -f 1) shell: bash - name: Get Changelog Entry id: changelog_reader uses: mindsers/changelog-reader-action@v2 with: - version: ${{ steps.read_version.outputs.version }} + version: "v${{ steps.read_version.outputs.version }}" path: ./CHANGELOG.md - name: Check for Release id: check_release @@ -36,7 +37,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.read_version.outputs.version }} + tag_name: "v${{ steps.read_version.outputs.version }}" release_name: Changelog Enforcer ${{ steps.read_version.outputs.version }} body: ${{ steps.changelog_reader.outputs.changes }} draft: false @@ -44,6 +45,6 @@ jobs: - name: Update Major Version Tag uses: richardsimko/update-tag@v1 with: - tag_name: ${{ steps.read_version.outputs.major_tag }} + tag_name: "v${{ steps.read_version.outputs.major_tag }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 92a14590..a56bd9f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [v2.0.1] +### Dependencies +- Bump eslint from 7.17.0 to 7.20.0. +- Bump @vercel/ncc from 0.26.1 to 0.27.0 + +### Changed +- Now reads the version from `package.json` instead of from `VERSION` + ## [v2.0.0] ### Added - Feature request from #62 diff --git a/dist/index.js b/dist/index.js index 70d25f22..f8a5cb49 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3,9 +3,9 @@ module.exports = /******/ var __webpack_modules__ = ({ /***/ 2932: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { -const changelogEnforcer = __webpack_require__(9679) +const changelogEnforcer = __nccwpck_require__(9679) // Looks for a label with the name from async function run() { @@ -18,7 +18,7 @@ run() /***/ }), /***/ 7351: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -30,8 +30,8 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const os = __importStar(__webpack_require__(2087)); -const utils_1 = __webpack_require__(5278); +const os = __importStar(__nccwpck_require__(2087)); +const utils_1 = __nccwpck_require__(5278); /** * Commands * @@ -104,7 +104,7 @@ function escapeProperty(s) { /***/ }), /***/ 2186: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -125,11 +125,11 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const command_1 = __webpack_require__(7351); -const file_command_1 = __webpack_require__(717); -const utils_1 = __webpack_require__(5278); -const os = __importStar(__webpack_require__(2087)); -const path = __importStar(__webpack_require__(5622)); +const command_1 = __nccwpck_require__(7351); +const file_command_1 = __nccwpck_require__(717); +const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(2087)); +const path = __importStar(__nccwpck_require__(5622)); /** * The code to exit an action */ @@ -349,7 +349,7 @@ exports.getState = getState; /***/ }), /***/ 717: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -364,9 +364,9 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", ({ value: true })); // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__webpack_require__(5747)); -const os = __importStar(__webpack_require__(2087)); -const utils_1 = __webpack_require__(5278); +const fs = __importStar(__nccwpck_require__(5747)); +const os = __importStar(__nccwpck_require__(2087)); +const utils_1 = __nccwpck_require__(5278); function issueCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -411,7 +411,7 @@ exports.toCommandValue = toCommandValue; /***/ }), /***/ 1514: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -432,7 +432,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const tr = __importStar(__webpack_require__(8159)); +const tr = __importStar(__nccwpck_require__(8159)); /** * Exec a command. * Output will be streamed to the live console. @@ -462,7 +462,7 @@ exports.exec = exec; /***/ }), /***/ 8159: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -483,12 +483,12 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const os = __importStar(__webpack_require__(2087)); -const events = __importStar(__webpack_require__(8614)); -const child = __importStar(__webpack_require__(3129)); -const path = __importStar(__webpack_require__(5622)); -const io = __importStar(__webpack_require__(7436)); -const ioUtil = __importStar(__webpack_require__(1962)); +const os = __importStar(__nccwpck_require__(2087)); +const events = __importStar(__nccwpck_require__(8614)); +const child = __importStar(__nccwpck_require__(3129)); +const path = __importStar(__nccwpck_require__(5622)); +const io = __importStar(__nccwpck_require__(7436)); +const ioUtil = __importStar(__nccwpck_require__(1962)); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -1069,14 +1069,14 @@ class ExecState extends events.EventEmitter { /***/ }), /***/ 4087: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Context = void 0; -const fs_1 = __webpack_require__(5747); -const os_1 = __webpack_require__(2087); +const fs_1 = __nccwpck_require__(5747); +const os_1 = __nccwpck_require__(2087); class Context { /** * Hydrate the context from the environment @@ -1126,7 +1126,7 @@ exports.Context = Context; /***/ }), /***/ 5438: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1151,8 +1151,8 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOctokit = exports.context = void 0; -const Context = __importStar(__webpack_require__(4087)); -const utils_1 = __webpack_require__(3030); +const Context = __importStar(__nccwpck_require__(4087)); +const utils_1 = __nccwpck_require__(3030); exports.context = new Context.Context(); /** * Returns a hydrated octokit ready to use for GitHub Actions @@ -1169,7 +1169,7 @@ exports.getOctokit = getOctokit; /***/ }), /***/ 7914: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1194,7 +1194,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; -const httpClient = __importStar(__webpack_require__(9925)); +const httpClient = __importStar(__nccwpck_require__(9925)); function getAuthString(token, options) { if (!token && !options.auth) { throw new Error('Parameter token or opts.auth is required'); @@ -1219,7 +1219,7 @@ exports.getApiBaseUrl = getApiBaseUrl; /***/ }), /***/ 3030: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1244,12 +1244,12 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOctokitOptions = exports.GitHub = exports.context = void 0; -const Context = __importStar(__webpack_require__(4087)); -const Utils = __importStar(__webpack_require__(7914)); +const Context = __importStar(__nccwpck_require__(4087)); +const Utils = __importStar(__nccwpck_require__(7914)); // octokit + plugins -const core_1 = __webpack_require__(6762); -const plugin_rest_endpoint_methods_1 = __webpack_require__(3044); -const plugin_paginate_rest_1 = __webpack_require__(4193); +const core_1 = __nccwpck_require__(6762); +const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044); +const plugin_paginate_rest_1 = __nccwpck_require__(4193); exports.context = new Context.Context(); const baseUrl = Utils.getApiBaseUrl(); const defaults = { @@ -1280,14 +1280,14 @@ exports.getOctokitOptions = getOctokitOptions; /***/ }), /***/ 9925: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const http = __webpack_require__(8605); -const https = __webpack_require__(7211); -const pm = __webpack_require__(6443); +const http = __nccwpck_require__(8605); +const https = __nccwpck_require__(7211); +const pm = __nccwpck_require__(6443); let tunnel; var HttpCodes; (function (HttpCodes) { @@ -1706,7 +1706,7 @@ class HttpClient { if (useProxy) { // If using proxy, need tunnel if (!tunnel) { - tunnel = __webpack_require__(4294); + tunnel = __nccwpck_require__(4294); } const agentOptions = { maxSockets: maxSockets, @@ -1888,7 +1888,7 @@ exports.checkBypass = checkBypass; /***/ }), /***/ 1962: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1903,9 +1903,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); -const assert_1 = __webpack_require__(2357); -const fs = __webpack_require__(5747); -const path = __webpack_require__(5622); +const assert_1 = __nccwpck_require__(2357); +const fs = __nccwpck_require__(5747); +const path = __nccwpck_require__(5622); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { @@ -2090,7 +2090,7 @@ function isUnixExecutable(stats) { /***/ }), /***/ 7436: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2104,10 +2104,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const childProcess = __webpack_require__(3129); -const path = __webpack_require__(5622); -const util_1 = __webpack_require__(1669); -const ioUtil = __webpack_require__(1962); +const childProcess = __nccwpck_require__(3129); +const path = __nccwpck_require__(5622); +const util_1 = __nccwpck_require__(1669); +const ioUtil = __nccwpck_require__(1962); const exec = util_1.promisify(childProcess.exec); /** * Copies a file or folder. @@ -2444,18 +2444,18 @@ exports.createTokenAuth = createTokenAuth; /***/ }), /***/ 6762: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var universalUserAgent = __webpack_require__(5030); -var beforeAfterHook = __webpack_require__(3682); -var request = __webpack_require__(6234); -var graphql = __webpack_require__(8467); -var authToken = __webpack_require__(334); +var universalUserAgent = __nccwpck_require__(5030); +var beforeAfterHook = __nccwpck_require__(3682); +var request = __nccwpck_require__(6234); +var graphql = __nccwpck_require__(8467); +var authToken = __nccwpck_require__(334); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; @@ -2626,15 +2626,15 @@ exports.Octokit = Octokit; /***/ }), /***/ 9440: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var isPlainObject = __webpack_require__(558); -var universalUserAgent = __webpack_require__(5030); +var isPlainObject = __nccwpck_require__(558); +var universalUserAgent = __nccwpck_require__(5030); function lowercaseKeys(object) { if (!object) { @@ -3070,15 +3070,15 @@ exports.isPlainObject = isPlainObject; /***/ }), /***/ 8467: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var request = __webpack_require__(6234); -var universalUserAgent = __webpack_require__(5030); +var request = __nccwpck_require__(6234); +var universalUserAgent = __nccwpck_require__(5030); const VERSION = "4.5.7"; @@ -4488,7 +4488,7 @@ exports.restEndpointMethods = restEndpointMethods; /***/ }), /***/ 537: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4497,8 +4497,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var deprecation = __webpack_require__(8932); -var once = _interopDefault(__webpack_require__(1223)); +var deprecation = __nccwpck_require__(8932); +var once = _interopDefault(__nccwpck_require__(1223)); const logOnce = once(deprecation => console.warn(deprecation)); /** @@ -4551,7 +4551,7 @@ exports.RequestError = RequestError; /***/ }), /***/ 6234: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -4560,11 +4560,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var endpoint = __webpack_require__(9440); -var universalUserAgent = __webpack_require__(5030); -var isPlainObject = __webpack_require__(9062); -var nodeFetch = _interopDefault(__webpack_require__(467)); -var requestError = __webpack_require__(537); +var endpoint = __nccwpck_require__(9440); +var universalUserAgent = __nccwpck_require__(5030); +var isPlainObject = __nccwpck_require__(9062); +var nodeFetch = _interopDefault(__nccwpck_require__(467)); +var requestError = __nccwpck_require__(537); const VERSION = "5.4.10"; @@ -4753,11 +4753,11 @@ exports.isPlainObject = isPlainObject; /***/ }), /***/ 3682: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var register = __webpack_require__(4670) -var addHook = __webpack_require__(5549) -var removeHook = __webpack_require__(6819) +var register = __nccwpck_require__(4670) +var addHook = __nccwpck_require__(5549) +var removeHook = __nccwpck_require__(6819) // bind with array of arguments: https://stackoverflow.com/a/21792913 var bind = Function.bind @@ -4957,7 +4957,7 @@ exports.Deprecation = Deprecation; /***/ }), /***/ 467: -/***/ ((module, exports, __webpack_require__) => { +/***/ ((module, exports, __nccwpck_require__) => { "use strict"; @@ -4966,11 +4966,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var Stream = _interopDefault(__webpack_require__(2413)); -var http = _interopDefault(__webpack_require__(8605)); -var Url = _interopDefault(__webpack_require__(8835)); -var https = _interopDefault(__webpack_require__(7211)); -var zlib = _interopDefault(__webpack_require__(8761)); +var Stream = _interopDefault(__nccwpck_require__(2413)); +var http = _interopDefault(__nccwpck_require__(8605)); +var Url = _interopDefault(__nccwpck_require__(8835)); +var https = _interopDefault(__nccwpck_require__(7211)); +var zlib = _interopDefault(__nccwpck_require__(8761)); // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js @@ -5121,7 +5121,7 @@ FetchError.prototype.name = 'FetchError'; let convert; try { - convert = __webpack_require__(2877).convert; + convert = __nccwpck_require__(2877).convert; } catch (e) {} const INTERNALS = Symbol('Body internals'); @@ -6614,9 +6614,9 @@ exports.FetchError = FetchError; /***/ }), /***/ 1223: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var wrappy = __webpack_require__(2940) +var wrappy = __nccwpck_require__(2940) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) @@ -6663,26 +6663,26 @@ function onceStrict (fn) { /***/ }), /***/ 4294: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __webpack_require__(4219); +module.exports = __nccwpck_require__(4219); /***/ }), /***/ 4219: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var net = __webpack_require__(1631); -var tls = __webpack_require__(4016); -var http = __webpack_require__(8605); -var https = __webpack_require__(7211); -var events = __webpack_require__(8614); -var assert = __webpack_require__(2357); -var util = __webpack_require__(1669); +var net = __nccwpck_require__(1631); +var tls = __nccwpck_require__(4016); +var http = __nccwpck_require__(8605); +var https = __nccwpck_require__(7211); +var events = __nccwpck_require__(8614); +var assert = __nccwpck_require__(2357); +var util = __nccwpck_require__(1669); exports.httpOverHttp = httpOverHttp; @@ -7009,13 +7009,13 @@ function wrappy (fn, cb) { /***/ }), /***/ 9679: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const core = __webpack_require__(2186) -const github = __webpack_require__(5438) -const exec = __webpack_require__(1514) -const versionExtractor = __webpack_require__(5568) -const labelExtractor = __webpack_require__(863) +const core = __nccwpck_require__(2186) +const github = __nccwpck_require__(5438) +const exec = __nccwpck_require__(1514) +const versionExtractor = __nccwpck_require__(5568) +const labelExtractor = __nccwpck_require__(863) // Input keys const IN_CHANGELOG_PATH = 'changeLogPath' @@ -7148,11 +7148,12 @@ module.exports.getLabels = function (labelsString) { // Each match may are may not have a trailing comma (,?). If one exists, it is removed before appending it to the list const regex = new RegExp(/([\w\s-+\?;\[\]\(\)]+,?)/, 'g') let labels = [] + let groups do { groups = regex.exec(labelsString) if (groups) { // Removes the trailing comma and removes all whitespace - label = groups[0].replace(",", "").trim() + let label = groups[0].replace(",", "").trim() labels.push(label) } } while(groups) @@ -7162,9 +7163,9 @@ module.exports.getLabels = function (labelsString) { /***/ }), /***/ 5568: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const fs = __webpack_require__(5747) +const fs = __nccwpck_require__(5747) module.exports.getVersions = function (pattern, changeLogPath) { const regex = new RegExp(`${pattern}`, 'gm') @@ -7309,7 +7310,7 @@ module.exports = require("zlib");; /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function -/******/ function __webpack_require__(moduleId) { +/******/ function __nccwpck_require__(moduleId) { /******/ // Check if module is in cache /******/ if(__webpack_module_cache__[moduleId]) { /******/ return __webpack_module_cache__[moduleId].exports; @@ -7324,7 +7325,7 @@ module.exports = require("zlib");; /******/ // Execute the module function /******/ var threw = true; /******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); /******/ threw = false; /******/ } finally { /******/ if(threw) delete __webpack_module_cache__[moduleId]; @@ -7337,10 +7338,10 @@ module.exports = require("zlib");; /************************************************************************/ /******/ /* webpack/runtime/compat */ /******/ -/******/ __webpack_require__.ab = __dirname + "/";/************************************************************************/ +/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ /******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // startup /******/ // Load entry module and return exports -/******/ return __webpack_require__(2932); +/******/ return __nccwpck_require__(2932); /******/ })() ; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 90df4b8e..75456482 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "javascript-action", - "version": "1.0.0", + "name": "changelog-enforcer", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -463,9 +463,9 @@ } }, "@eslint/eslintrc": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", - "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", + "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -475,7 +475,7 @@ "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, @@ -488,6 +488,12 @@ "requires": { "type-fest": "^0.8.1" } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true } } }, @@ -1208,9 +1214,9 @@ "dev": true }, "@vercel/ncc": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.26.1.tgz", - "integrity": "sha512-iVhYAL/rpHgjO88GkDHNVNrp7WTfMFBbeWXNgwaDPMv5rDI4hNOAM0u+Zhtbs42XBQE6EccNaY6UDb/tm1+dhg==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz", + "integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==", "dev": true }, "abab": { @@ -2125,13 +2131,13 @@ } }, "eslint": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz", - "integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz", + "integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.2", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2142,7 +2148,7 @@ "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", - "esquery": "^1.2.0", + "esquery": "^1.4.0", "esutils": "^2.0.2", "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", @@ -2155,7 +2161,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -2169,13 +2175,43 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "color-convert": "^2.0.1" + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } } }, "chalk": { @@ -2186,6 +2222,26 @@ "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "color-convert": { @@ -2239,6 +2295,12 @@ "type-check": "~0.4.0" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -2289,15 +2351,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2377,9 +2430,9 @@ "dev": true }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -2665,9 +2718,9 @@ } }, "file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -2708,9 +2761,9 @@ } }, "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, "for-in": { @@ -5475,6 +5528,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -6201,17 +6260,35 @@ "dev": true }, "table": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz", - "integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.12.4", + "ajv": "^7.0.2", "lodash": "^4.17.20", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, "dependencies": { + "ajv": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", + "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", diff --git a/package.json b/package.json index 8f4fe651..a565fe3e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "javascript-action", - "version": "1.0.0", - "description": "JavaScript Action Template", + "name": "changelog-enforcer", + "version": "2.0.1", + "description": "Enforces that a changelog is kept up-to-date", "main": "index.js", "scripts": { "lint": "eslint index.js", @@ -19,10 +19,10 @@ "JavaScript", "Changelog" ], - "author": "@dangoslen (from GitHub Actions Template)", + "author": "@dangoslen", "license": "MIT", "bugs": { - "url": "https://github.com/dangoslen/changelog-enforcerissues" + "url": "https://github.com/dangoslen/changelog-enforcer/issues" }, "jest": { "testEnvironment": "node" @@ -37,8 +37,8 @@ "uglify-js": "^3.12.1" }, "devDependencies": { - "@vercel/ncc": "^0.26.1", - "eslint": "^7.15.0", + "@vercel/ncc": "^0.27.0", + "eslint": "^7.20.0", "jest": "^26.6.3" } } diff --git a/src/label-extractor.js b/src/label-extractor.js index 156b6a2b..922ab610 100644 --- a/src/label-extractor.js +++ b/src/label-extractor.js @@ -4,11 +4,12 @@ module.exports.getLabels = function (labelsString) { // Each match may are may not have a trailing comma (,?). If one exists, it is removed before appending it to the list const regex = new RegExp(/([\w\s-+\?;\[\]\(\)]+,?)/, 'g') let labels = [] + let groups do { groups = regex.exec(labelsString) if (groups) { // Removes the trailing comma and removes all whitespace - label = groups[0].replace(",", "").trim() + let label = groups[0].replace(",", "").trim() labels.push(label) } } while(groups)