diff --git a/.eslintrc b/.eslintrc index 5e8c02e..801ea15 100644 --- a/.eslintrc +++ b/.eslintrc @@ -110,6 +110,7 @@ "import/order": [2, { "groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"], "alphabetize": { "order": "asc", "caseInsensitive": true } - }] + }], + "@typescript-eslint/no-non-null-assertion": "off" } } diff --git a/package.json b/package.json index f302d1b..eb1bace 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@technote-space/github-action-version-helper", - "version": "0.6.0", + "version": "0.6.1", "description": "Version helper for GitHub Actions.", "keywords": [ "github", @@ -42,8 +42,8 @@ "dependencies": { "@actions/github": "^5.0.1", "@octokit/openapi-types": "^11.2.0", - "@technote-space/github-action-helper": "^5.3.1", - "@technote-space/github-action-log-helper": "^0.2.1" + "@technote-space/github-action-helper": "^5.3.2", + "@technote-space/github-action-log-helper": "^0.2.2" }, "devDependencies": { "@commitlint/cli": "^16.2.3", @@ -51,7 +51,7 @@ "@octokit/types": "^6.34.0", "@rollup/plugin-typescript": "^8.3.2", "@sindresorhus/tsconfig": "^2.0.0", - "@technote-space/github-action-test-helper": "^0.9.2", + "@technote-space/github-action-test-helper": "^0.9.3", "@types/node": "^17.0.25", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/src/utils/misc.ts b/src/utils/misc.ts index edee6c6..44aedac 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -10,8 +10,8 @@ export const parseLine = (message: string): ChildCommitMessage | undefined => { } return { - type: matches[1], - message: matches[3], + type: matches[1]!, + message: matches[3]!, normalized: `${matches[1]}: ${matches[3]}`, original: trim, }; @@ -24,7 +24,7 @@ export const isValidMessage = (type: string, message: string, types: Array, excludeMessages: Array, breakingChangeNotes: Array): ParentCommitMessage | undefined => { const normalizedExcludeMessages = normalize(excludeMessages); const messages = message.trim().split(/\r?\n|\r/); - const trim = messages[0].trim(); + const trim = messages[0]!.trim(); const matches = trim.match(SEMANTIC_MESSAGE_PATTERN); if (!matches) { return undefined; @@ -45,7 +45,7 @@ export const parseCommitMessage = (message: string, types: Array, exclud } }); - if (!isValidMessage(matches[1], matches[3], types, normalizedExcludeMessages) && (!children.length && !notes.length)) { + if (!isValidMessage(matches[1]!, matches[3]!, types, normalizedExcludeMessages) && (!children.length && !notes.length)) { return undefined; } diff --git a/tsconfig.json b/tsconfig.json index d0dbf49..2294288 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,8 +7,7 @@ "es2020" ], "noPropertyAccessFromIndexSignature": false, - "noImplicitAny": false, - "strictNullChecks": false + "noImplicitAny": false }, "include": [ "src" diff --git a/yarn.lock b/yarn.lock index d61aae0..881295a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -379,10 +379,10 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/tsconfig/-/tsconfig-2.0.0.tgz#610e1cb8ed4e1cb7ff0cb4cb8712cd607315c152" integrity sha512-1nsyWtFtPpVjEnNzp2rd03BVz84BYHeW7LNYvmcj3q4jAgJL2hl0XBp3WmDFFPjFLF3w+L0XEYqhjWUTU+TCzw== -"@technote-space/github-action-helper@^5.3.1": - version "5.3.1" - resolved "https://registry.yarnpkg.com/@technote-space/github-action-helper/-/github-action-helper-5.3.1.tgz#cc5ab0651baec187f1797e82b9349cf2f8ba08a8" - integrity sha512-UF+uF6k2rfZ2b1Kjr+mi9yif6s5w7QM5U9kcx6seImzwGZoXnE7dTZ7GoXx43MdRrc+2M01pzWyF4j/naOGgzA== +"@technote-space/github-action-helper@^5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@technote-space/github-action-helper/-/github-action-helper-5.3.2.tgz#a7cc47da592329d242b3be6bc41e6d992bbcbc97" + integrity sha512-LUUq5pXF+tDM7Bcx6Je8c/s1nHq00fCdHpedxUOgQdT3nMmXN4xhxqiJGi6YZNewCbt+wBbGQ6ucpcn3GnN3cg== dependencies: "@actions/core" "^1.6.0" "@actions/github" "^5.0.1" @@ -392,18 +392,18 @@ shell-escape "^0.2.0" sprintf-js "^1.1.2" -"@technote-space/github-action-log-helper@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@technote-space/github-action-log-helper/-/github-action-log-helper-0.2.1.tgz#5319d9f13add3bbaa75be9c1422cf9c986655b9f" - integrity sha512-IakrjNmMiaYKOcrk/id+oqvGzGXofcIYlpCUngyzOyVrsXCd2o7b/8eTSHAknGg8o82lN6KLW99Su9iIJye3hg== +"@technote-space/github-action-log-helper@^0.2.1", "@technote-space/github-action-log-helper@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@technote-space/github-action-log-helper/-/github-action-log-helper-0.2.2.tgz#90bf784372a4af0fb720778b81c3b75de9b5cafa" + integrity sha512-5jHDxczTLgC4tCJ8Xc7+g1l3N1rEjfogYJiYMUA16a0okD27x9Ymq6pnlDsV6zfsq6bTlTBEHFWLFJgjVKkZpg== dependencies: "@actions/core" "^1.6.0" sprintf-js "^1.1.2" -"@technote-space/github-action-test-helper@^0.9.2": - version "0.9.2" - resolved "https://registry.yarnpkg.com/@technote-space/github-action-test-helper/-/github-action-test-helper-0.9.2.tgz#8721f18658136f3c8ce27819940293d0847daec5" - integrity sha512-2kuw9cvI+sn768OAAtkIVZoPOqPZUptvsMlEURkG6mFWCtifzY0Qj52rzX9vuJWLEuwRu6JSldBiJnjepXmATQ== +"@technote-space/github-action-test-helper@^0.9.3": + version "0.9.3" + resolved "https://registry.yarnpkg.com/@technote-space/github-action-test-helper/-/github-action-test-helper-0.9.3.tgz#b7e4e3bce6ebd0543000740ac297947e44de8b68" + integrity sha512-8h97sKU9rNteyErnzfTimnUifVE6SFa3HebzPWWeEIjt7KPPFCXrSaAIx1o+4Es1In46oOLZQRJOK1fwSKEaYg== dependencies: "@actions/core" "^1.6.0" "@actions/github" "^5.0.1"