From 1a4a641386a7b3d0e52e6af11a89ef6dfb533758 Mon Sep 17 00:00:00 2001 From: Soybean Date: Thu, 25 May 2023 16:11:24 +0800 Subject: [PATCH] feat(projects): add release command --- .github/workflows/release-please.yml | 19 -- .github/workflows/release.yml | 25 +++ bin/index.js | 60 ++++--- bin/index.mjs | 60 ++++--- package.json | 7 +- pnpm-lock.yaml | 169 ++++++++---------- src/command/{git/commit.ts => git-commit.ts} | 6 +- .../{git/verify-commit.ts => git-verify.ts} | 14 +- src/command/index.ts | 4 +- src/{command/git/config.ts => configs/git.ts} | 5 +- src/configs/index.ts | 1 + src/index.ts | 13 +- src/scripts/index.ts | 1 + src/scripts/release.ts | 5 + 14 files changed, 198 insertions(+), 191 deletions(-) delete mode 100644 .github/workflows/release-please.yml create mode 100644 .github/workflows/release.yml rename src/command/{git/commit.ts => git-commit.ts} (74%) rename src/command/{git/verify-commit.ts => git-verify.ts} (53%) rename src/{command/git/config.ts => configs/git.ts} (90%) create mode 100644 src/configs/index.ts create mode 100644 src/scripts/release.ts diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index 5c84bc7..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: release-please - -on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v3 - with: - release-type: node - package-name: release-please-action diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..430276e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 16.x + + - run: npx changelogithub # or changelogithub@0.12 if ensure the stable result + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/bin/index.js b/bin/index.js index 70c1aef..9305f1e 100755 --- a/bin/index.js +++ b/bin/index.js @@ -271,7 +271,7 @@ var import_kolorist2 = require("kolorist"); // package.json var package_default = { name: "@soybeanjs/cli", - version: "0.2.0", + version: "0.2.5", description: "SoybeanJS's command lint tools", author: { name: "Soybean", @@ -303,12 +303,11 @@ var package_default = { commit: "soy git-commit", cleanup: "soy cleanup", "update-pkg": "soy update-pkg", - "update-version": 'bumpp package.json --execute="pnpm gen-log" --commit --all --push --tag', - "publish-pkg": "pnpm -r publish --access public", - release: "pnpm update-version && pnpm publish-pkg", - "gen-log": "conventional-changelog -p angular -i CHANGELOG.md -s" + release: "soy release", + "publish-pkg": "pnpm -r publish --access public" }, dependencies: { + changelogen: "0.5.3", commander: "10.0.1", enquirer: "2.3.6", execa: "7.1.1", @@ -320,8 +319,6 @@ var package_default = { devDependencies: { "@soybeanjs/cli": "link:", "@types/node": "^20.2.3", - bumpp: "9.1.0", - "conventional-changelog-cli": "^2.2.2", eslint: "8.41.0", "eslint-config-soybeanjs": "0.3.8", "lint-staged": "13.2.2", @@ -331,22 +328,22 @@ var package_default = { typescript: "5.0.4" }, "simple-git-hooks": { - "commit-msg": "pnpm soybean git-commit-verify", - "pre-commit": "pnpm exec lint-staged --concurrent false" + "commit-msg": "pnpm soy git-commit-verify", + "pre-commit": "pnpm lint-staged" }, "lint-staged": { - "*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}": [ + "*.{js,json,ts}": [ "eslint . --fix" ] } }; -// src/command/git/commit.ts +// src/command/git-commit.ts var import_enquirer = __toESM(require("enquirer")); var import_execa = require("execa"); -// src/command/git/config.ts -var types = [ +// src/configs/git.ts +var gitCommitTypes = [ { value: "init", title: "init: \u9879\u76EE\u521D\u59CB\u5316" }, { value: "feat", title: "feat: \u6DFB\u52A0\u65B0\u7279\u6027" }, { value: "fix", title: "fix: \u4FEE\u590Dbug" }, @@ -355,11 +352,12 @@ var types = [ { value: "refactor", title: "refactor: \u4EE3\u7801\u91CD\u6784\uFF0C\u6CA1\u6709\u52A0\u65B0\u529F\u80FD\u6216\u8005\u4FEE\u590Dbug" }, { value: "perf", title: "perf: \u4F18\u5316\u76F8\u5173\uFF0C\u6BD4\u5982\u63D0\u5347\u6027\u80FD\u3001\u4F53\u9A8C" }, { value: "test", title: "test: \u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B" }, + { value: "build", title: "build: \u4F9D\u8D56\u76F8\u5173\u7684\u5185\u5BB9" }, { value: "ci", title: "ci: CI\u914D\u7F6E\u76F8\u5173\uFF0C\u4F8B\u5982\u5BF9k8s\uFF0Cdocker\u7684\u914D\u7F6E\u6587\u4EF6\u7684\u4FEE\u6539" }, { value: "chore", title: "chore: \u6539\u53D8\u6784\u5EFA\u6D41\u7A0B\u3001\u6216\u8005\u589E\u52A0\u4F9D\u8D56\u5E93\u3001\u5DE5\u5177\u7B49" }, { value: "revert", title: "revert: \u56DE\u6EDA\u5230\u4E0A\u4E00\u4E2A\u7248\u672C" } ]; -var scopes = [ +var gitCommitScopes = [ ["projects", "\u9879\u76EE\u642D\u5EFA"], ["components", "\u7EC4\u4EF6\u76F8\u5173"], ["hooks", "hook \u76F8\u5173"], @@ -377,20 +375,20 @@ var scopes = [ }; }); -// src/command/git/commit.ts +// src/command/git-commit.ts async function gitCommit() { const result = await import_enquirer.default.prompt([ { name: "types", type: "select", message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B", - choices: types.map((item) => ({ name: item.value, message: item.title })) + choices: gitCommitTypes.map((item) => ({ name: item.value, message: item.title })) }, { name: "scopes", type: "select", message: "\u9009\u62E9\u4E00\u4E2Ascope", - choices: scopes.map((item) => ({ name: item.value, message: item.title })) + choices: gitCommitScopes.map((item) => ({ name: item.value, message: item.title })) }, { name: "description", @@ -402,17 +400,16 @@ async function gitCommit() { (0, import_execa.execa)("git", ["commit", "-m", commitMsg], { stdio: "inherit" }); } -// src/command/git/verify-commit.ts +// src/command/git-verify.ts var import_fs = require("fs"); var import_kolorist = require("kolorist"); -function verifyGitCommit() { +function gitCommitVerify() { const gitMsgPath = "./.git/COMMIT_EDITMSG"; const commitMsg = (0, import_fs.readFileSync)(gitMsgPath, "utf-8").trim(); - const RELEASE_MSG = "chore: release"; - const REG_EXP = new RegExp( - `(${types.map((item) => item.value).join("|")})\\((${scopes.map((item) => item.value).join("|")})\\):\\s.{1,50}` - ); - if (!REG_EXP.test(commitMsg) && !commitMsg.includes(RELEASE_MSG)) { + const types2 = gitCommitTypes.map((item) => item.value).join("|"); + const scopes = gitCommitScopes.map((item) => item.value).join("|"); + const REG_EXP = new RegExp(`(${types2})!*(\\((${scopes}))\\))*!*:\\s.{1,100}`); + if (!REG_EXP.test(commitMsg)) { throw new Error( `${(0, import_kolorist.bgRed)(" ERROR ")} ${(0, import_kolorist.red)("Git\u63D0\u4EA4\u4FE1\u606F\u4E0D\u7B26\u5408 Angular \u89C4\u8303!\n\n")}${(0, import_kolorist.green)( "\u63A8\u8350\u4F7F\u7528\u547D\u4EE4 pnpm commit \u751F\u6210\u7B26\u5408\u89C4\u8303\u7684Git\u63D0\u4EA4\u4FE1\u606F" @@ -554,8 +551,8 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => { }; // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/ast.js -var types2 = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); -var isExtglobType = (c) => types2.has(c); +var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); +var isExtglobType = (c) => types.has(c); var startNoTraversal = "(?!\\.\\.?(?:$|/))"; var startNoDot = "(?!\\.)"; var addPatternStart = /* @__PURE__ */ new Set(["[", "."]); @@ -6367,12 +6364,18 @@ function prettierFormat() { }); } +// src/scripts/release.ts +var import_execa5 = require("execa"); +async function release() { + await (0, import_execa5.execa)("npx", ["changelogen", "--release --push --no-github"]); +} + // src/index.ts import_commander.program.command("git-commit").description("\u751F\u6210\u7B26\u5408 Angular \u89C4\u8303\u7684 git commit").action(() => { gitCommit(); }); import_commander.program.command("git-commit-verify").description("\u6821\u9A8Cgit\u7684commit\u662F\u5426\u7B26\u5408 Angular \u89C4\u8303").action(() => { - verifyGitCommit(); + gitCommitVerify(); }); import_commander.program.command("cleanup").description("\u6E05\u7A7A\u4F9D\u8D56\u548C\u6784\u5EFA\u4EA7\u7269").action(() => { cleanup(); @@ -6386,5 +6389,8 @@ import_commander.program.command("update-pkg").description("\u5347\u7EA7\u4F9D\u import_commander.program.command("prettier-format").description("prettier\u683C\u5F0F\u5316").action(() => { prettierFormat(); }); +import_commander.program.command("release").description("\u7248\u672C\u53D1\u5E03").action(() => { + release(); +}); import_commander.program.version(package_default.version).description((0, import_kolorist2.blue)("soybean alias soy\n\nhttps://github.com/soybeanjs/cli")); import_commander.program.parse(process.argv); diff --git a/bin/index.mjs b/bin/index.mjs index 80b1617..6eb00fe 100755 --- a/bin/index.mjs +++ b/bin/index.mjs @@ -270,7 +270,7 @@ import { blue } from "kolorist"; // package.json var package_default = { name: "@soybeanjs/cli", - version: "0.2.0", + version: "0.2.5", description: "SoybeanJS's command lint tools", author: { name: "Soybean", @@ -302,12 +302,11 @@ var package_default = { commit: "soy git-commit", cleanup: "soy cleanup", "update-pkg": "soy update-pkg", - "update-version": 'bumpp package.json --execute="pnpm gen-log" --commit --all --push --tag', - "publish-pkg": "pnpm -r publish --access public", - release: "pnpm update-version && pnpm publish-pkg", - "gen-log": "conventional-changelog -p angular -i CHANGELOG.md -s" + release: "soy release", + "publish-pkg": "pnpm -r publish --access public" }, dependencies: { + changelogen: "0.5.3", commander: "10.0.1", enquirer: "2.3.6", execa: "7.1.1", @@ -319,8 +318,6 @@ var package_default = { devDependencies: { "@soybeanjs/cli": "link:", "@types/node": "^20.2.3", - bumpp: "9.1.0", - "conventional-changelog-cli": "^2.2.2", eslint: "8.41.0", "eslint-config-soybeanjs": "0.3.8", "lint-staged": "13.2.2", @@ -330,22 +327,22 @@ var package_default = { typescript: "5.0.4" }, "simple-git-hooks": { - "commit-msg": "pnpm soybean git-commit-verify", - "pre-commit": "pnpm exec lint-staged --concurrent false" + "commit-msg": "pnpm soy git-commit-verify", + "pre-commit": "pnpm lint-staged" }, "lint-staged": { - "*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}": [ + "*.{js,json,ts}": [ "eslint . --fix" ] } }; -// src/command/git/commit.ts +// src/command/git-commit.ts import enquirer from "enquirer"; import { execa } from "execa"; -// src/command/git/config.ts -var types = [ +// src/configs/git.ts +var gitCommitTypes = [ { value: "init", title: "init: \u9879\u76EE\u521D\u59CB\u5316" }, { value: "feat", title: "feat: \u6DFB\u52A0\u65B0\u7279\u6027" }, { value: "fix", title: "fix: \u4FEE\u590Dbug" }, @@ -354,11 +351,12 @@ var types = [ { value: "refactor", title: "refactor: \u4EE3\u7801\u91CD\u6784\uFF0C\u6CA1\u6709\u52A0\u65B0\u529F\u80FD\u6216\u8005\u4FEE\u590Dbug" }, { value: "perf", title: "perf: \u4F18\u5316\u76F8\u5173\uFF0C\u6BD4\u5982\u63D0\u5347\u6027\u80FD\u3001\u4F53\u9A8C" }, { value: "test", title: "test: \u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B" }, + { value: "build", title: "build: \u4F9D\u8D56\u76F8\u5173\u7684\u5185\u5BB9" }, { value: "ci", title: "ci: CI\u914D\u7F6E\u76F8\u5173\uFF0C\u4F8B\u5982\u5BF9k8s\uFF0Cdocker\u7684\u914D\u7F6E\u6587\u4EF6\u7684\u4FEE\u6539" }, { value: "chore", title: "chore: \u6539\u53D8\u6784\u5EFA\u6D41\u7A0B\u3001\u6216\u8005\u589E\u52A0\u4F9D\u8D56\u5E93\u3001\u5DE5\u5177\u7B49" }, { value: "revert", title: "revert: \u56DE\u6EDA\u5230\u4E0A\u4E00\u4E2A\u7248\u672C" } ]; -var scopes = [ +var gitCommitScopes = [ ["projects", "\u9879\u76EE\u642D\u5EFA"], ["components", "\u7EC4\u4EF6\u76F8\u5173"], ["hooks", "hook \u76F8\u5173"], @@ -376,20 +374,20 @@ var scopes = [ }; }); -// src/command/git/commit.ts +// src/command/git-commit.ts async function gitCommit() { const result = await enquirer.prompt([ { name: "types", type: "select", message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B", - choices: types.map((item) => ({ name: item.value, message: item.title })) + choices: gitCommitTypes.map((item) => ({ name: item.value, message: item.title })) }, { name: "scopes", type: "select", message: "\u9009\u62E9\u4E00\u4E2Ascope", - choices: scopes.map((item) => ({ name: item.value, message: item.title })) + choices: gitCommitScopes.map((item) => ({ name: item.value, message: item.title })) }, { name: "description", @@ -401,17 +399,16 @@ async function gitCommit() { execa("git", ["commit", "-m", commitMsg], { stdio: "inherit" }); } -// src/command/git/verify-commit.ts +// src/command/git-verify.ts import { readFileSync } from "fs"; import { bgRed, red, green } from "kolorist"; -function verifyGitCommit() { +function gitCommitVerify() { const gitMsgPath = "./.git/COMMIT_EDITMSG"; const commitMsg = readFileSync(gitMsgPath, "utf-8").trim(); - const RELEASE_MSG = "chore: release"; - const REG_EXP = new RegExp( - `(${types.map((item) => item.value).join("|")})\\((${scopes.map((item) => item.value).join("|")})\\):\\s.{1,50}` - ); - if (!REG_EXP.test(commitMsg) && !commitMsg.includes(RELEASE_MSG)) { + const types2 = gitCommitTypes.map((item) => item.value).join("|"); + const scopes = gitCommitScopes.map((item) => item.value).join("|"); + const REG_EXP = new RegExp(`(${types2})!*(\\((${scopes}))\\))*!*:\\s.{1,100}`); + if (!REG_EXP.test(commitMsg)) { throw new Error( `${bgRed(" ERROR ")} ${red("Git\u63D0\u4EA4\u4FE1\u606F\u4E0D\u7B26\u5408 Angular \u89C4\u8303!\n\n")}${green( "\u63A8\u8350\u4F7F\u7528\u547D\u4EE4 pnpm commit \u751F\u6210\u7B26\u5408\u89C4\u8303\u7684Git\u63D0\u4EA4\u4FE1\u606F" @@ -553,8 +550,8 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => { }; // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/ast.js -var types2 = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); -var isExtglobType = (c) => types2.has(c); +var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); +var isExtglobType = (c) => types.has(c); var startNoTraversal = "(?!\\.\\.?(?:$|/))"; var startNoDot = "(?!\\.)"; var addPatternStart = /* @__PURE__ */ new Set(["[", "."]); @@ -6366,12 +6363,18 @@ function prettierFormat() { }); } +// src/scripts/release.ts +import { execa as execa5 } from "execa"; +async function release() { + await execa5("npx", ["changelogen", "--release --push --no-github"]); +} + // src/index.ts program.command("git-commit").description("\u751F\u6210\u7B26\u5408 Angular \u89C4\u8303\u7684 git commit").action(() => { gitCommit(); }); program.command("git-commit-verify").description("\u6821\u9A8Cgit\u7684commit\u662F\u5426\u7B26\u5408 Angular \u89C4\u8303").action(() => { - verifyGitCommit(); + gitCommitVerify(); }); program.command("cleanup").description("\u6E05\u7A7A\u4F9D\u8D56\u548C\u6784\u5EFA\u4EA7\u7269").action(() => { cleanup(); @@ -6385,5 +6388,8 @@ program.command("update-pkg").description("\u5347\u7EA7\u4F9D\u8D56").action(() program.command("prettier-format").description("prettier\u683C\u5F0F\u5316").action(() => { prettierFormat(); }); +program.command("release").description("\u7248\u672C\u53D1\u5E03").action(() => { + release(); +}); program.version(package_default.version).description(blue("soybean alias soy\n\nhttps://github.com/soybeanjs/cli")); program.parse(process.argv); diff --git a/package.json b/package.json index 4451b66..9c2a678 100644 --- a/package.json +++ b/package.json @@ -32,11 +32,11 @@ "commit": "soy git-commit", "cleanup": "soy cleanup", "update-pkg": "soy update-pkg", - "update-version": "bumpp package.json", - "publish-pkg": "pnpm -r publish --access public", - "release": "pnpm update-version && pnpm publish-pkg" + "release": "soy release", + "publish-pkg": "pnpm -r publish --access public" }, "dependencies": { + "changelogen": "0.5.3", "commander": "10.0.1", "enquirer": "2.3.6", "execa": "7.1.1", @@ -48,7 +48,6 @@ "devDependencies": { "@soybeanjs/cli": "link:", "@types/node": "^20.2.3", - "bumpp": "^9.1.0", "eslint": "8.41.0", "eslint-config-soybeanjs": "0.3.8", "lint-staged": "13.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 898aa92..c4f9bb2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,6 +1,9 @@ lockfileVersion: '6.0' dependencies: + changelogen: + specifier: 0.5.3 + version: 0.5.3 commander: specifier: 10.0.1 version: 10.0.1 @@ -30,9 +33,6 @@ devDependencies: '@types/node': specifier: ^20.2.3 version: 20.2.3 - bumpp: - specifier: ^9.1.0 - version: 9.1.0 eslint: specifier: 8.41.0 version: 8.41.0 @@ -501,16 +501,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@jsdevtools/ez-spawn@3.0.4: - resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} - engines: {node: '>=10'} - dependencies: - call-me-maybe: 1.0.2 - cross-spawn: 7.0.3 - string-argv: 0.3.2 - type-detect: 4.0.8 - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -845,7 +835,6 @@ packages: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} hasBin: true - dev: true /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} @@ -854,6 +843,7 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color + dev: false /agentkeepalive@4.3.0: resolution: {integrity: sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==} @@ -934,7 +924,6 @@ packages: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: true /aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} @@ -1045,12 +1034,10 @@ packages: /big-integer@1.6.51: resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} engines: {node: '>=0.6'} - dev: true /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - dev: true /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -1075,7 +1062,6 @@ packages: engines: {node: '>= 5.10.0'} dependencies: big-integer: 1.6.51 - dev: true /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -1103,27 +1089,11 @@ packages: dependencies: semver: 7.5.1 - /bumpp@9.1.0: - resolution: {integrity: sha512-m3+YD8uoa0VttG+RV4oKr3lK60gkUn1yPDaBTFwT7xrdJUsy7Jm0VYgx457HI3VPAOX8szLmy1x2y1QcvB+M8Q==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jsdevtools/ez-spawn': 3.0.4 - c12: 1.4.1 - cac: 6.7.14 - fast-glob: 3.2.12 - prompts: 2.4.2 - semver: 7.5.1 - transitivePeerDependencies: - - supports-color - dev: true - /bundle-name@3.0.0: resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} engines: {node: '>=12'} dependencies: run-applescript: 5.0.0 - dev: true /bundle-require@4.0.1(esbuild@0.17.19): resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} @@ -1151,7 +1121,7 @@ packages: rc9: 2.1.0 transitivePeerDependencies: - supports-color - dev: true + dev: false /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} @@ -1227,10 +1197,6 @@ packages: get-intrinsic: 1.2.1 dev: true - /call-me-maybe@1.0.2: - resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - dev: true - /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1262,6 +1228,28 @@ packages: resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + /changelogen@0.5.3: + resolution: {integrity: sha512-RjTrgJlTHhbGlMo/s73j7uSTspla3ykr0UA5zwRs/HIZvElY6qZHu3X70httgC2Du5poS2wFCS10WLfwZr7ZTQ==} + hasBin: true + dependencies: + c12: 1.4.1 + colorette: 2.0.20 + consola: 3.1.0 + convert-gitmoji: 0.1.3 + execa: 7.1.1 + mri: 1.2.0 + node-fetch-native: 1.1.1 + ofetch: 1.0.1 + open: 9.1.0 + pathe: 1.1.0 + pkg-types: 1.0.3 + scule: 1.0.0 + semver: 7.5.1 + yaml: 2.3.0 + transitivePeerDependencies: + - supports-color + dev: false + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -1275,11 +1263,11 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.2 - dev: true /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} + dev: false /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} @@ -1353,7 +1341,6 @@ packages: /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - dev: true /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} @@ -1385,10 +1372,18 @@ packages: xdg-basedir: 5.1.0 dev: false + /consola@3.1.0: + resolution: {integrity: sha512-rrrJE6rP0qzl/Srg+C9x/AE5Kxfux7reVm1Wh0wCjuXvih6DqZgqDZe8auTD28fzJ9TF0mHlSDrPpWlujQRo1Q==} + dev: false + /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: false + /convert-gitmoji@0.1.3: + resolution: {integrity: sha512-t5yxPyI8h8KPvRwrS/sRrfIpT2gJbmBAY0TFokyUBy3PM44RuFRpZwHdACz+GTSPLRLo3s4qsscOMLjHiXBwzw==} + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1454,7 +1449,6 @@ packages: dependencies: bplist-parser: 0.2.0 untildify: 4.0.0 - dev: true /default-browser@4.0.0: resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} @@ -1464,7 +1458,6 @@ packages: default-browser-id: 3.0.0 execa: 7.1.1 titleize: 3.0.0 - dev: true /defer-to-connect@2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} @@ -1474,7 +1467,6 @@ packages: /define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} - dev: true /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} @@ -1486,7 +1478,7 @@ packages: /defu@6.1.2: resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==} - dev: true + dev: false /delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} @@ -1499,7 +1491,7 @@ packages: /destr@1.2.2: resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==} - dev: true + dev: false /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -1531,7 +1523,7 @@ packages: /dotenv@16.0.3: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} - dev: true + dev: false /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -2113,7 +2105,6 @@ packages: onetime: 5.1.2 signal-exit: 3.0.7 strip-final-newline: 2.0.0 - dev: true /execa@7.1.1: resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==} @@ -2195,7 +2186,7 @@ packages: /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - dev: true + dev: false /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} @@ -2230,6 +2221,7 @@ packages: engines: {node: '>= 8'} dependencies: minipass: 3.3.6 + dev: false /fs-minipass@3.0.2: resolution: {integrity: sha512-2GAfyfoaCDRrM6jaOS3UsBts8yJ55VioXdWcOL7dK9zdAuKT71+WBA4ifnNYqVjYv+4SsPxjK0JT4yIIn4cA/g==} @@ -2246,7 +2238,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: true optional: true /function-bind@1.1.1: @@ -2323,7 +2314,7 @@ packages: tar: 6.1.15 transitivePeerDependencies: - supports-color - dev: true + dev: false /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -2560,11 +2551,11 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color + dev: false /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - dev: true /human-signals@4.3.1: resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} @@ -2679,7 +2670,6 @@ packages: engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 - dev: true /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} @@ -2717,13 +2707,11 @@ packages: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true - dev: true /is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true - dev: true /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -2757,7 +2745,6 @@ packages: hasBin: true dependencies: is-docker: 3.0.0 - dev: true /is-installed-globally@0.4.0: resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} @@ -2818,7 +2805,6 @@ packages: /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - dev: true /is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} @@ -2864,7 +2850,6 @@ packages: engines: {node: '>=8'} dependencies: is-docker: 2.2.1 - dev: true /is-yarn-global@0.4.1: resolution: {integrity: sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==} @@ -2886,7 +2871,7 @@ packages: /jiti@1.18.2: resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} hasBin: true - dev: true + dev: false /jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -2961,7 +2946,7 @@ packages: /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: true + dev: false /jsonlines@0.1.1: resolution: {integrity: sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==} @@ -2990,11 +2975,6 @@ packages: json-buffer: 3.0.1 dev: false - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true - /kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -3204,7 +3184,6 @@ packages: /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - dev: true /mimic-fn@4.0.0: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} @@ -3304,6 +3283,7 @@ packages: engines: {node: '>=8'} dependencies: yallist: 4.0.0 + dev: false /minipass@4.2.8: resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} @@ -3313,6 +3293,7 @@ packages: /minipass@5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} + dev: false /minipass@6.0.2: resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} @@ -3325,11 +3306,13 @@ packages: dependencies: minipass: 3.3.6 yallist: 4.0.0 + dev: false /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true + dev: false /mlly@1.3.0: resolution: {integrity: sha512-HT5mcgIQKkOrZecOjOX3DJorTikWXwsBfpcr/MGBkhfWcjiqvnaL/9ppxvIUXfjT6xt4DVIAsN9fMUz1ev4bIw==} @@ -3338,12 +3321,12 @@ packages: pathe: 1.1.0 pkg-types: 1.0.3 ufo: 1.1.2 - dev: true + dev: false /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} - dev: true + dev: false /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -3380,7 +3363,7 @@ packages: /node-fetch-native@1.1.1: resolution: {integrity: sha512-9VvspTSUp2Sxbl+9vbZTlFGq9lHwE8GDVVekxx6YsNd1YH59sb3Ba8v3Y3cD8PkLNcileGGcA21PFjVl0jzDaw==} - dev: true + dev: false /node-gyp@9.3.1: resolution: {integrity: sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==} @@ -3423,7 +3406,6 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - dev: true /normalize-url@8.0.0: resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} @@ -3536,7 +3518,6 @@ packages: engines: {node: '>=8'} dependencies: path-key: 3.1.1 - dev: true /npm-run-path@5.1.0: resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} @@ -3618,9 +3599,17 @@ packages: es-abstract: 1.21.2 dev: true + /ofetch@1.0.1: + resolution: {integrity: sha512-icBz2JYfEpt+wZz1FRoGcrMigjNKjzvufE26m9+yUiacRQRHwnNlGRPiDnW4op7WX/MR6aniwS8xw8jyVelF2g==} + dependencies: + destr: 1.2.2 + node-fetch-native: 1.1.1 + ufo: 1.1.2 + dev: false + /ohash@1.1.2: resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} - dev: true + dev: false /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -3632,7 +3621,6 @@ packages: engines: {node: '>=6'} dependencies: mimic-fn: 2.1.0 - dev: true /onetime@6.0.0: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} @@ -3648,7 +3636,6 @@ packages: define-lazy-prop: 3.0.0 is-inside-container: 1.0.0 is-wsl: 2.2.0 - dev: true /optionator@0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} @@ -3770,11 +3757,11 @@ packages: /pathe@1.1.0: resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} - dev: true + dev: false /perfect-debounce@0.1.3: resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==} - dev: true + dev: false /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -3801,7 +3788,7 @@ packages: jsonc-parser: 3.2.0 mlly: 1.3.0 pathe: 1.1.0 - dev: true + dev: false /postcss-load-config@3.1.4(postcss@8.4.23): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} @@ -3919,14 +3906,6 @@ packages: sisteransi: 1.0.5 dev: false - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -3976,7 +3955,7 @@ packages: defu: 6.1.2 destr: 1.2.2 flat: 5.0.2 - dev: true + dev: false /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} @@ -4024,7 +4003,6 @@ packages: engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 - dev: true /regexp.prototype.flags@1.5.0: resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} @@ -4146,7 +4124,6 @@ packages: engines: {node: '>=12'} dependencies: execa: 5.1.1 - dev: true /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -4186,6 +4163,10 @@ packages: suf-log: 2.5.3 dev: true + /scule@1.0.0: + resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} + dev: false + /semver-diff@4.0.0: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} @@ -4259,6 +4240,7 @@ packages: /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: false /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} @@ -4464,7 +4446,6 @@ packages: /strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} - dev: true /strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} @@ -4568,6 +4549,7 @@ packages: minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 + dev: false /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -4593,7 +4575,6 @@ packages: /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} - dev: true /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} @@ -4714,11 +4695,6 @@ packages: prelude-ls: 1.2.1 dev: true - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true - /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -4761,7 +4737,7 @@ packages: /ufo@1.1.2: resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} - dev: true + dev: false /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -4998,7 +4974,6 @@ packages: /yaml@2.3.0: resolution: {integrity: sha512-8/1wgzdKc7bc9E6my5wZjmdavHLvO/QOmLG1FBugblEvY4IXrLjlViIOmL24HthU042lWTDRO90Fz1Yp66UnMw==} engines: {node: '>= 14', npm: '>= 7'} - dev: true /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} diff --git a/src/command/git/commit.ts b/src/command/git-commit.ts similarity index 74% rename from src/command/git/commit.ts rename to src/command/git-commit.ts index 5f6fc40..d4f5049 100644 --- a/src/command/git/commit.ts +++ b/src/command/git-commit.ts @@ -1,6 +1,6 @@ import enquirer from 'enquirer'; import { execa } from 'execa'; -import { types, scopes } from './config'; +import { gitCommitTypes, gitCommitScopes } from '../configs'; interface PromptObject { types: string; @@ -14,13 +14,13 @@ export async function gitCommit() { name: 'types', type: 'select', message: '请选择提交的类型', - choices: types.map(item => ({ name: item.value, message: item.title })) + choices: gitCommitTypes.map(item => ({ name: item.value, message: item.title })) }, { name: 'scopes', type: 'select', message: '选择一个scope', - choices: scopes.map(item => ({ name: item.value, message: item.title })) + choices: gitCommitScopes.map(item => ({ name: item.value, message: item.title })) }, { name: 'description', diff --git a/src/command/git/verify-commit.ts b/src/command/git-verify.ts similarity index 53% rename from src/command/git/verify-commit.ts rename to src/command/git-verify.ts index 8779688..7d66aef 100644 --- a/src/command/git/verify-commit.ts +++ b/src/command/git-verify.ts @@ -1,19 +1,19 @@ import { readFileSync } from 'fs'; import { bgRed, red, green } from 'kolorist'; -import { types, scopes } from './config'; +import { gitCommitTypes, gitCommitScopes } from '../configs'; -export function verifyGitCommit() { +export function gitCommitVerify() { const gitMsgPath = './.git/COMMIT_EDITMSG'; const commitMsg = readFileSync(gitMsgPath, 'utf-8').trim(); - const RELEASE_MSG = 'chore: release'; + const types = gitCommitTypes.map(item => item.value).join('|'); - const REG_EXP = new RegExp( - `(${types.map(item => item.value).join('|')})\\((${scopes.map(item => item.value).join('|')})\\):\\s.{1,50}` - ); + const scopes = gitCommitScopes.map(item => item.value).join('|'); - if (!REG_EXP.test(commitMsg) && !commitMsg.includes(RELEASE_MSG)) { + const REG_EXP = new RegExp(`(${types})!*(\\((${scopes}))\\))*!*:\\s.{1,100}`); + + if (!REG_EXP.test(commitMsg)) { throw new Error( `${bgRed(' ERROR ')} ${red('Git提交信息不符合 Angular 规范!\n\n')}${green( '推荐使用命令 pnpm commit 生成符合规范的Git提交信息' diff --git a/src/command/index.ts b/src/command/index.ts index 94e0553..6edb234 100644 --- a/src/command/index.ts +++ b/src/command/index.ts @@ -1,2 +1,2 @@ -export * from './git/commit'; -export * from './git/verify-commit'; +export * from './git-commit'; +export * from './git-verify'; diff --git a/src/command/git/config.ts b/src/configs/git.ts similarity index 90% rename from src/command/git/config.ts rename to src/configs/git.ts index 173668d..48365c4 100644 --- a/src/command/git/config.ts +++ b/src/configs/git.ts @@ -1,4 +1,4 @@ -export const types = [ +export const gitCommitTypes = [ { value: 'init', title: 'init: 项目初始化' }, { value: 'feat', title: 'feat: 添加新特性' }, { value: 'fix', title: 'fix: 修复bug' }, @@ -7,12 +7,13 @@ export const types = [ { value: 'refactor', title: 'refactor: 代码重构,没有加新功能或者修复bug' }, { value: 'perf', title: 'perf: 优化相关,比如提升性能、体验' }, { value: 'test', title: 'test: 添加测试用例' }, + { value: 'build', title: 'build: 依赖相关的内容' }, { value: 'ci', title: 'ci: CI配置相关,例如对k8s,docker的配置文件的修改' }, { value: 'chore', title: 'chore: 改变构建流程、或者增加依赖库、工具等' }, { value: 'revert', title: 'revert: 回滚到上一个版本' } ]; -export const scopes = [ +export const gitCommitScopes = [ ['projects', '项目搭建'], ['components', '组件相关'], ['hooks', 'hook 相关'], diff --git a/src/configs/index.ts b/src/configs/index.ts new file mode 100644 index 0000000..6c038b4 --- /dev/null +++ b/src/configs/index.ts @@ -0,0 +1 @@ +export * from './git'; diff --git a/src/index.ts b/src/index.ts index 65dd44c..7fb6d01 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,8 +2,8 @@ import { program } from 'commander'; import { blue } from 'kolorist'; import pkg from '../package.json'; -import { gitCommit, verifyGitCommit } from './command'; -import { cleanup, initSimpleGitHooks, updatePkg, prettierFormat } from './scripts'; +import { gitCommit, gitCommitVerify } from './command'; +import { cleanup, initSimpleGitHooks, updatePkg, prettierFormat, release } from './scripts'; program .command('git-commit') @@ -16,7 +16,7 @@ program .command('git-commit-verify') .description('校验git的commit是否符合 Angular 规范') .action(() => { - verifyGitCommit(); + gitCommitVerify(); }); program @@ -47,6 +47,13 @@ program prettierFormat(); }); +program + .command('release') + .description('版本发布') + .action(() => { + release(); + }); + // 配置options // program // .option('-t, --transform ', '插件路径或者npm包名称,支持多个插件,逗号分隔') diff --git a/src/scripts/index.ts b/src/scripts/index.ts index f9a5934..fae3794 100644 --- a/src/scripts/index.ts +++ b/src/scripts/index.ts @@ -2,3 +2,4 @@ export * from './cleanup'; export * from './git-hooks'; export * from './update-pkg'; export * from './format'; +export * from './release'; diff --git a/src/scripts/release.ts b/src/scripts/release.ts new file mode 100644 index 0000000..a95c682 --- /dev/null +++ b/src/scripts/release.ts @@ -0,0 +1,5 @@ +import { execa } from 'execa'; + +export async function release() { + await execa('npx', ['changelogen', '--release --push --no-github']); +}