From 301fe76013492125a50aa7a14ed9c8dc5a4ed698 Mon Sep 17 00:00:00 2001 From: Andrii Bohdan Date: Tue, 17 Oct 2023 15:14:32 +0200 Subject: [PATCH 1/4] Development (#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ feat(ext): created quick button to the settings.json * 🔼 bump(v): Updated version package-lock.json * 🔼 bump(v): updated version * 🎨 style(assets): updated demo * ✨ feat(quickPick): created new custom quickPick with settings button * 🐞 fix(namespace): clean namespace for interface and types * 🔎 ref(func): clean naming design for functions and types * 📑 docs(): README.md * 🔼 bump(version): 2.0.1 * 💾 chore(package): added activationEvents * 🔼 bump(version): 2.0.2 * 🔼 bump(version): 2.0.3 * 🔨 build(package): added web engine, make active extension when vscode is running * 🚀 ci(workflow): bumping version * 🐞 fix(button): handle settings button without throwing error * 🤖 test(suit): init test * 🚀 ci(workflow): testing bump * 🔼 bump(v): version to 2.0.4 [skip ci] * 🐞 fix(package): fixing engines conflict * 🔼 bump(v): version to 2.0.5 [skip ci] * 🐞 fix(package): run extension * 🔼 bump(v): version to 2.0.6 [skip ci] * fix(workflow): remove create release * 🔼 bump(v): version to 2.0.7 [skip ci] * chore(package): undo activationEvents * fix(merge): merge conflicts * 🔼 bump(v): version to 2.0.8 [skip ci] * 🔨 build(package): updated version * 🚀 ci(workflow): added release and tag generation * 🐞 fix(extension): compatibility vscode with engine * 🔼 bump(v): version to 2.0.11 [skip ci] * 💾 chore(web): setup web api * 🔨 build(web): added web api * ✨ feat(extension): split logic into between app and web version * ✨ feat(commons): created commons module * ✨ feat(extension): created logic for web version * 🐞 fix(app): mapper autofill namespace * 🔼 bump(v): version to 2.0.12 [skip ci] * 🚀 ci(workflow): changed create tag logic * 🚀 ci(workflow): update pipeline * 🔨 build(package): vscode testing * 🚀 ci(workflow): added test action * 🤖 test(extension): setup mocha tests * 🔨 build(emoji): removed emojis package * ✨ feat(test): create custom function to handle emojis * 🚀 ci(workflow): testing deploy from action * 🔼 bump(v): version to 2.0.13 * 💾 chore(ts): removed emoji-regex from compilerOptions * 🔼 bump(v): version to 2.0.14 * fix/skip-empty-commit (#25) * 💾 chore(icon): icon path * 🚀 ci(workflow): init deploy pipeline * 🚀 ci(workflow): update action * 🚀 ci(test): testing deploy action * 🚀 ci(workflow): publish extension from action * ✨ feat(template): prevent returning empty scope brackets * 🚀 ci(workflow): updated ci * 🚀 ci(yml): fixed structure yml * 🔼 bump(v): version to 2.0.15 * 🚀 ci(workflow): publish on tags * 🤖 test: removed test from pre-dev * 🔼 bump(v): version to 2.0.16 * 🚀 ci(action): updated deploy * ✨ feat(icon): Added an icon on SCM title bar * 🔼 bump(v): version to 2.0.17 * 🚀 ci(github): update workflow * ✨ feat(package.json): add showIconsSCMTitle * ✨ feat(extension): add scm icons visibility * 🔼 bump(v): version to 2.0.18 * 🚀 ci(workflow): updated deploy * ✨ feat(package): add showStatusBarIcon configuration * ✨ feat(config): add new constant * ✨ feat(extension): toggle statusBarIcon * 🔼 bump(v): version to 2.0.19 * 🚀 ci(workflow): update workflow * 🚀 ci(deploy): update deploy * 🚀 ci(workflow): update pipeline * 🔼 bump(v): version to 2.0.20 * 🚀 ci: skip-tag * 🔨 build(package.json): add showEmojis * ✨ feat(ext): implemented enable/disable emojis * 🔼 bump(v): version to 2.0.21 * 🤖 test(ref): changed imports * 🔎 ref(extension): make more explicit naming * ✨ feat(extension): using uri path for multiple repo * 🔼 bump(v): version to 2.0.22 * 📑 docs(md): update README * 🐞 fix(assets): add 16x16 svg scm/title icon * 🐞 fix(json): new version icon api * 🔼 bump(v): version to 2.0.23 * 🐞 fix(package.json): rm required version * Update README.md * 🔼 bump(v): version to 2.0.24 --------- Co-authored-by: Automated Version Bump --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bb16e12..42e1ffd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- wizard icon + wizard icon

VS Code - Git Commit Wizard

diff --git a/package-lock.json b/package-lock.json index ee82ed0..5b27536 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "git-commit-wizard", - "version": "2.0.23", + "version": "2.0.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "git-commit-wizard", - "version": "2.0.23", + "version": "2.0.24", "dependencies": { "semver": "^7.4.0" }, diff --git a/package.json b/package.json index 0ed21c6..c98cf79 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "git-commit-wizard", "displayName": "git-commit-wizard", "description": "A customizable VS Code extension for semantic committing, compatible with microservices and multiple source control repositories.", - "version": "2.0.23", + "version": "2.0.24", "author": "Andrii Bohdan", "icon": "assets/image/wizard-icon.png", "publisher": "andrii-bohdan", @@ -11,7 +11,7 @@ "url": "https://github.com/andrii-bohdan/vscode-git-commit-wizard" }, "engines": { - "vscode": "1.83.0" + "vscode": "^1.83.0" }, "categories": [ "Other", From e342f1f17104dfb871d189b9b1757501d40bbd83 Mon Sep 17 00:00:00 2001 From: Andrii Bohdan Date: Sun, 7 Jan 2024 17:38:34 +0100 Subject: [PATCH 2/4] Development (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ feat(ext): created quick button to the settings.json * 🔼 bump(v): Updated version package-lock.json * 🔼 bump(v): updated version * 🎨 style(assets): updated demo * ✨ feat(quickPick): created new custom quickPick with settings button * 🐞 fix(namespace): clean namespace for interface and types * 🔎 ref(func): clean naming design for functions and types * 📑 docs(): README.md * 🔼 bump(version): 2.0.1 * 💾 chore(package): added activationEvents * 🔼 bump(version): 2.0.2 * 🔼 bump(version): 2.0.3 * 🔨 build(package): added web engine, make active extension when vscode is running * 🚀 ci(workflow): bumping version * 🐞 fix(button): handle settings button without throwing error * 🤖 test(suit): init test * 🚀 ci(workflow): testing bump * 🔼 bump(v): version to 2.0.4 [skip ci] * 🐞 fix(package): fixing engines conflict * 🔼 bump(v): version to 2.0.5 [skip ci] * 🐞 fix(package): run extension * 🔼 bump(v): version to 2.0.6 [skip ci] * fix(workflow): remove create release * 🔼 bump(v): version to 2.0.7 [skip ci] * chore(package): undo activationEvents * fix(merge): merge conflicts * 🔼 bump(v): version to 2.0.8 [skip ci] * 🔨 build(package): updated version * 🚀 ci(workflow): added release and tag generation * 🐞 fix(extension): compatibility vscode with engine * 🔼 bump(v): version to 2.0.11 [skip ci] * 💾 chore(web): setup web api * 🔨 build(web): added web api * ✨ feat(extension): split logic into between app and web version * ✨ feat(commons): created commons module * ✨ feat(extension): created logic for web version * 🐞 fix(app): mapper autofill namespace * 🔼 bump(v): version to 2.0.12 [skip ci] * 🚀 ci(workflow): changed create tag logic * 🚀 ci(workflow): update pipeline * 🔨 build(package): vscode testing * 🚀 ci(workflow): added test action * 🤖 test(extension): setup mocha tests * 🔨 build(emoji): removed emojis package * ✨ feat(test): create custom function to handle emojis * 🚀 ci(workflow): testing deploy from action * 🔼 bump(v): version to 2.0.13 * 💾 chore(ts): removed emoji-regex from compilerOptions * 🔼 bump(v): version to 2.0.14 * fix/skip-empty-commit (#25) * 💾 chore(icon): icon path * 🚀 ci(workflow): init deploy pipeline * 🚀 ci(workflow): update action * 🚀 ci(test): testing deploy action * 🚀 ci(workflow): publish extension from action * ✨ feat(template): prevent returning empty scope brackets * 🚀 ci(workflow): updated ci * 🚀 ci(yml): fixed structure yml * 🔼 bump(v): version to 2.0.15 * 🚀 ci(workflow): publish on tags * 🤖 test: removed test from pre-dev * 🔼 bump(v): version to 2.0.16 * 🚀 ci(action): updated deploy * ✨ feat(icon): Added an icon on SCM title bar * 🔼 bump(v): version to 2.0.17 * 🚀 ci(github): update workflow * ✨ feat(package.json): add showIconsSCMTitle * ✨ feat(extension): add scm icons visibility * 🔼 bump(v): version to 2.0.18 * 🚀 ci(workflow): updated deploy * ✨ feat(package): add showStatusBarIcon configuration * ✨ feat(config): add new constant * ✨ feat(extension): toggle statusBarIcon * 🔼 bump(v): version to 2.0.19 * 🚀 ci(workflow): update workflow * 🚀 ci(deploy): update deploy * 🚀 ci(workflow): update pipeline * 🔼 bump(v): version to 2.0.20 * 🚀 ci: skip-tag * 🔨 build(package.json): add showEmojis * ✨ feat(ext): implemented enable/disable emojis * 🔼 bump(v): version to 2.0.21 * 🤖 test(ref): changed imports * 🔎 ref(extension): make more explicit naming * ✨ feat(extension): using uri path for multiple repo * 🔼 bump(v): version to 2.0.22 * 📑 docs(md): update README * 🐞 fix(assets): add 16x16 svg scm/title icon * 🐞 fix(json): new version icon api * 🔼 bump(v): version to 2.0.23 * 🐞 fix(package.json): rm required version * Update README.md * 🔼 bump(v): version to 2.0.24 * 🔼 bump(v): updated version json * 🐞 fix(app): ```SCM Icon``` exists even when no git repo is detected #51 * 🚀 ci(test.yml): use stable version * 🔼 bump(v): updated @vscode/test-electron * 🚀 ci(test.yml): undo latest version * Update README.md * 🔼 bump(v): version to 2.0.25 --------- Co-authored-by: Automated Version Bump --- README.md | 7 +- package-lock.json | 216 ++++++++++++++++++++++++++++++++++------------ package.json | 8 +- src/app/index.ts | 70 ++++++++++++--- 4 files changed, 228 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 42e1ffd..c96680b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@

VS Code - Git Commit Wizard

+
+ Test Status +
+
+
Marketplace @@ -181,4 +186,4 @@ Initial release of Git-Commit-Wizard. There are no known issues at this time. - "vscode": "^1.74.0" + "vscode": "^1.83.0" diff --git a/package-lock.json b/package-lock.json index 5b27536..0461d69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "git-commit-wizard", - "version": "2.0.24", + "version": "2.0.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "git-commit-wizard", - "version": "2.0.24", + "version": "2.0.25", "dependencies": { - "semver": "^7.4.0" + "semver": ">=7.5.2" }, "devDependencies": { "@types/glob": "^8.1.0", @@ -17,8 +17,8 @@ "@types/vscode": "^1.60.0", "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "^5.56.0", - "@vscode/test-electron": "^2.3.0", - "@vscode/test-web": "^0.0.44", + "@vscode/test-electron": "^2.3.8", + "@vscode/test-web": "^0.0.50", "@vscode/vsce": "^2.19.0", "eslint": "^8.36.0", "glob": "^8.1.0", @@ -26,7 +26,7 @@ "typescript": "^4.9.5" }, "engines": { - "vscode": "1.83.0" + "vscode": "^1.83.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -119,9 +119,9 @@ "dev": true }, "node_modules/@koa/cors": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@koa/cors/-/cors-4.0.0.tgz", - "integrity": "sha512-Y4RrbvGTlAaa04DBoPBWJqDR5gPj32OOz827ULXfgB1F7piD1MB/zwn8JR2LAnvdILhxUbXbkXGWuNVsFuVFCQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@koa/cors/-/cors-5.0.0.tgz", + "integrity": "sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==", "dev": true, "dependencies": { "vary": "^1.1.2" @@ -131,11 +131,12 @@ } }, "node_modules/@koa/router": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-12.0.0.tgz", - "integrity": "sha512-cnnxeKHXlt7XARJptflGURdJaO+ITpNkOHmQu7NHmCoRinPbyvFzce/EG/E8Zy81yQ1W9MoSdtklc3nyaDReUw==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@koa/router/-/router-12.0.1.tgz", + "integrity": "sha512-ribfPYfHb+Uw3b27Eiw6NPqjhIhTpVFzEWLwyc/1Xp+DCdwRRyIlAUODX+9bPARF6aQtUu1+/PHzdNvRzcs/+Q==", "dev": true, "dependencies": { + "debug": "^4.3.4", "http-errors": "^2.0.0", "koa-compose": "^4.1.0", "methods": "^1.1.2", @@ -180,6 +181,19 @@ "node": ">= 8" } }, + "node_modules/@playwright/browser-chromium": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@playwright/browser-chromium/-/browser-chromium-1.40.1.tgz", + "integrity": "sha512-uNmjHYXBTYTfJkf89D6zVUcesCFzZ/yjkPj8FvBJQ6yf3na/j1rcjVNzx0PzOAGcWKioB/rnWRBi7b5ojOdCHA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "playwright-core": "1.40.1" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -424,39 +438,40 @@ } }, "node_modules/@vscode/test-electron": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.0.tgz", - "integrity": "sha512-fwzA9RtazH1GT/sckYlbxu6t5e4VaMXwCVtyLv4UAG0hP6NTfnMaaG25XCfWqlVwFhBMcQXHBCy5dmz2eLUnkw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", + "integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "dev": true, "dependencies": { "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", - "semver": "^7.3.8" + "semver": "^7.5.2" }, "engines": { "node": ">=16" } }, "node_modules/@vscode/test-web": { - "version": "0.0.44", - "resolved": "https://registry.npmjs.org/@vscode/test-web/-/test-web-0.0.44.tgz", - "integrity": "sha512-AS/Wuxyx1iFxxn8ljttbsXwOn6jz0qALitC4uXh3cF6Aijx+NnI3dBfWY/6EP5MuAr8mkProdLFal95t17lmnw==", + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@vscode/test-web/-/test-web-0.0.50.tgz", + "integrity": "sha512-aFcwTyA3qirjfr6f5oKEV/07MbsbNeJEqElIh/ceNPEnJIyKYQeffbU7Cia9XtTKk1Ue1qMqwhdIO8OnUa9QBg==", "dev": true, "dependencies": { - "@koa/cors": "^4.0.0", - "@koa/router": "^12.0.0", + "@koa/cors": "^5.0.0", + "@koa/router": "^12.0.1", + "@playwright/browser-chromium": "^1.40.1", "gunzip-maybe": "^1.4.2", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "koa": "^2.14.2", "koa-morgan": "^1.0.1", "koa-mount": "^4.0.0", "koa-static": "^5.0.0", "minimist": "^1.2.8", - "playwright": "^1.34.3", - "tar-fs": "^2.1.1", - "vscode-uri": "^3.0.7" + "playwright": "^1.40.1", + "tar-fs": "^3.0.4", + "vscode-uri": "^3.0.8" }, "bin": { "vscode-test-web": "out/index.js" @@ -491,9 +506,9 @@ } }, "node_modules/@vscode/test-web/node_modules/https-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.0.tgz", - "integrity": "sha512-0euwPCRyAPSgGdzD1IVN9nJYHtBhJwb6XPfbpQcYbPCwrBidX6GzxmchnaF4sfF/jPb74Ojx5g4yTg3sixlyPw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -503,6 +518,38 @@ "node": ">= 14" } }, + "node_modules/@vscode/test-web/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/@vscode/test-web/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dev": true, + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/@vscode/test-web/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/@vscode/vsce": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.19.0.tgz", @@ -620,9 +667,9 @@ } }, "node_modules/@vscode/vsce/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -773,6 +820,12 @@ "typed-rest-client": "^1.8.4" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -797,7 +850,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "optional": true }, "node_modules/basic-auth": { "version": "2.0.1", @@ -825,6 +879,7 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, + "optional": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -836,6 +891,7 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "optional": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -913,6 +969,7 @@ "url": "https://feross.org/support" } ], + "optional": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -1077,7 +1134,8 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "dev": true, + "optional": true }, "node_modules/cliui": { "version": "7.0.4", @@ -1700,6 +1758,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -1839,7 +1903,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true + "dev": true, + "optional": true }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -1847,6 +1912,20 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2202,7 +2281,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "optional": true }, "node_modules/ignore": { "version": "5.2.4", @@ -3247,9 +3327,9 @@ } }, "node_modules/parse-semver/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -3361,31 +3441,33 @@ } }, "node_modules/playwright": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.34.3.tgz", - "integrity": "sha512-UOOVE4ZbGfGkP1KVqWTdXOmm8Pw2pBhfbmlqKMkpiRCQjL5W+J+xRQXpgutFr0iM4pWl8g0GyyASMsqjQfFohw==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "playwright-core": "1.34.3" + "playwright-core": "1.40.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=16" + }, + "optionalDependencies": { + "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.34.3", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.34.3.tgz", - "integrity": "sha512-2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", "dev": true, "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/prebuild-install": { @@ -3506,6 +3588,12 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -3737,9 +3825,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -3877,6 +3965,16 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, + "node_modules/streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "dev": true, + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -3947,6 +4045,7 @@ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, + "optional": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -3959,6 +4058,7 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, + "optional": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -3969,6 +4069,7 @@ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, + "optional": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -3985,6 +4086,7 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "optional": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -4199,9 +4301,9 @@ } }, "node_modules/vscode-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", - "integrity": "sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, "node_modules/which": { @@ -4220,9 +4322,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" diff --git a/package.json b/package.json index c98cf79..547b933 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "git-commit-wizard", "displayName": "git-commit-wizard", "description": "A customizable VS Code extension for semantic committing, compatible with microservices and multiple source control repositories.", - "version": "2.0.24", + "version": "2.0.25", "author": "Andrii Bohdan", "icon": "assets/image/wizard-icon.png", "publisher": "andrii-bohdan", @@ -189,8 +189,8 @@ "@types/vscode": "^1.60.0", "@typescript-eslint/eslint-plugin": "^5.56.0", "@typescript-eslint/parser": "^5.56.0", - "@vscode/test-electron": "^2.3.0", - "@vscode/test-web": "^0.0.44", + "@vscode/test-electron": "^2.3.8", + "@vscode/test-web": "^0.0.50", "@vscode/vsce": "^2.19.0", "eslint": "^8.36.0", "glob": "^8.1.0", @@ -198,6 +198,6 @@ "typescript": "^4.9.5" }, "dependencies": { - "semver": "^7.4.0" + "semver": ">=7.5.2" } } diff --git a/src/app/index.ts b/src/app/index.ts index 0d93032..c17d7a4 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -8,12 +8,15 @@ import { import * as vscode from "vscode"; import { openGitCommand, createStatusBar } from "./command"; -export function activate(context: vscode.ExtensionContext) { +export async function activate(context: vscode.ExtensionContext) { console.log( 'Congratulations, your extension "git-commit-wizard" is now active!' ); const statusBarItem = createStatusBar(); + const workspaceFolders = vscode.workspace.workspaceFolders?.[0]; + + checkWorkspaceFolder(statusBarItem, workspaceFolders); let disposable = vscode.commands.registerCommand( EXTENSION_COMMAND_NAME, @@ -34,17 +37,9 @@ export function activate(context: vscode.ExtensionContext) { .get(EXTENSION_SHOW_SCM_ICON); if (updatedShowIconsInSCMTitle) { - vscode.commands.executeCommand( - "setContext", - "git-commit-wizard:enableSCMIcon", - true - ); + enableScmIcon(true); } else { - vscode.commands.executeCommand( - "setContext", - "git-commit-wizard:enableSCMIcon", - false - ); + enableScmIcon(false); } } if (event.affectsConfiguration(EXTENSION_SHOW_STATUS_BAR_ICON)) { @@ -63,4 +58,57 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(disposable); } +async function checkWorkspaceFolder( + statusBar: vscode.StatusBarItem, + workspaceFolders?: vscode.WorkspaceFolder +) { + const entries = await vscode.workspace.fs.readDirectory( + workspaceFolders!.uri + ); + const subfolders = entries + .filter((entry) => entry[1] === vscode.FileType.Directory) + .map((entry) => entry[0]); + + if (!entries.length) { + enableScmIcon(false); + statusBar.hide(); + } + + const gitPresent = entries.some(([entryName]) => entryName === ".git"); + + if (subfolders.length > 0 && !gitPresent) { + for (const subfolder of subfolders) { + const subfolderUri = vscode.Uri.joinPath( + workspaceFolders!.uri, + subfolder + ); + const subfolderEntries = await vscode.workspace.fs.readDirectory( + subfolderUri + ); + const gitPresentInSubFolder = subfolderEntries.some( + ([entryName]) => entryName === ".git" + ); + if (!gitPresentInSubFolder) { + enableScmIcon(false); + statusBar.hide(); + } + enableScmIcon(true); + } + } else { + const gitPresent = entries.some(([entryName]) => entryName === ".git"); + if (!gitPresent) { + enableScmIcon(false); + statusBar.hide(); + } + } +} + +function enableScmIcon(active: boolean) { + vscode.commands.executeCommand( + "setContext", + "git-commit-wizard:enableSCMIcon", + active + ); +} + export function deactivate() {} From 132c8b362a571a8bd8278c81ca2f423e0159ad91 Mon Sep 17 00:00:00 2001 From: Andrii Bohdan Date: Sun, 7 Jan 2024 18:43:13 +0100 Subject: [PATCH 3/4] Development (#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ feat(ext): created quick button to the settings.json * 🔼 bump(v): Updated version package-lock.json * 🔼 bump(v): updated version * 🎨 style(assets): updated demo * ✨ feat(quickPick): created new custom quickPick with settings button * 🐞 fix(namespace): clean namespace for interface and types * 🔎 ref(func): clean naming design for functions and types * 📑 docs(): README.md * 🔼 bump(version): 2.0.1 * 💾 chore(package): added activationEvents * 🔼 bump(version): 2.0.2 * 🔼 bump(version): 2.0.3 * 🔨 build(package): added web engine, make active extension when vscode is running * 🚀 ci(workflow): bumping version * 🐞 fix(button): handle settings button without throwing error * 🤖 test(suit): init test * 🚀 ci(workflow): testing bump * 🔼 bump(v): version to 2.0.4 [skip ci] * 🐞 fix(package): fixing engines conflict * 🔼 bump(v): version to 2.0.5 [skip ci] * 🐞 fix(package): run extension * 🔼 bump(v): version to 2.0.6 [skip ci] * fix(workflow): remove create release * 🔼 bump(v): version to 2.0.7 [skip ci] * chore(package): undo activationEvents * fix(merge): merge conflicts * 🔼 bump(v): version to 2.0.8 [skip ci] * 🔨 build(package): updated version * 🚀 ci(workflow): added release and tag generation * 🐞 fix(extension): compatibility vscode with engine * 🔼 bump(v): version to 2.0.11 [skip ci] * 💾 chore(web): setup web api * 🔨 build(web): added web api * ✨ feat(extension): split logic into between app and web version * ✨ feat(commons): created commons module * ✨ feat(extension): created logic for web version * 🐞 fix(app): mapper autofill namespace * 🔼 bump(v): version to 2.0.12 [skip ci] * 🚀 ci(workflow): changed create tag logic * 🚀 ci(workflow): update pipeline * 🔨 build(package): vscode testing * 🚀 ci(workflow): added test action * 🤖 test(extension): setup mocha tests * 🔨 build(emoji): removed emojis package * ✨ feat(test): create custom function to handle emojis * 🚀 ci(workflow): testing deploy from action * 🔼 bump(v): version to 2.0.13 * 💾 chore(ts): removed emoji-regex from compilerOptions * 🔼 bump(v): version to 2.0.14 * fix/skip-empty-commit (#25) * 💾 chore(icon): icon path * 🚀 ci(workflow): init deploy pipeline * 🚀 ci(workflow): update action * 🚀 ci(test): testing deploy action * 🚀 ci(workflow): publish extension from action * ✨ feat(template): prevent returning empty scope brackets * 🚀 ci(workflow): updated ci * 🚀 ci(yml): fixed structure yml * 🔼 bump(v): version to 2.0.15 * 🚀 ci(workflow): publish on tags * 🤖 test: removed test from pre-dev * 🔼 bump(v): version to 2.0.16 * 🚀 ci(action): updated deploy * ✨ feat(icon): Added an icon on SCM title bar * 🔼 bump(v): version to 2.0.17 * 🚀 ci(github): update workflow * ✨ feat(package.json): add showIconsSCMTitle * ✨ feat(extension): add scm icons visibility * 🔼 bump(v): version to 2.0.18 * 🚀 ci(workflow): updated deploy * ✨ feat(package): add showStatusBarIcon configuration * ✨ feat(config): add new constant * ✨ feat(extension): toggle statusBarIcon * 🔼 bump(v): version to 2.0.19 * 🚀 ci(workflow): update workflow * 🚀 ci(deploy): update deploy * 🚀 ci(workflow): update pipeline * 🔼 bump(v): version to 2.0.20 * 🚀 ci: skip-tag * 🔨 build(package.json): add showEmojis * ✨ feat(ext): implemented enable/disable emojis * 🔼 bump(v): version to 2.0.21 * 🤖 test(ref): changed imports * 🔎 ref(extension): make more explicit naming * ✨ feat(extension): using uri path for multiple repo * 🔼 bump(v): version to 2.0.22 * 📑 docs(md): update README * 🐞 fix(assets): add 16x16 svg scm/title icon * 🐞 fix(json): new version icon api * 🔼 bump(v): version to 2.0.23 * 🐞 fix(package.json): rm required version * Update README.md * 🔼 bump(v): version to 2.0.24 * 🔼 bump(v): updated version json * 🐞 fix(app): ```SCM Icon``` exists even when no git repo is detected #51 * 🚀 ci(test.yml): use stable version * 🔼 bump(v): updated @vscode/test-electron * 🚀 ci(test.yml): undo latest version * Update README.md * 🔼 bump(v): version to 2.0.25 * 🐞 fix(mapper): fixed regex string extractor * 🚀 ci(test.yml): define pre-dev as test branch * 🔼 bump(v): version to 2.0.26 --------- Co-authored-by: Automated Version Bump --- .github/workflows/test.yml | 3 --- package-lock.json | 4 ++-- package.json | 2 +- src/app/utils/mapper.ts | 7 ++++++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b6d7a7..1ae74b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,6 @@ on: push: branches: - pre-dev - - "feat**" - - "fix**" - - "test**" jobs: build: diff --git a/package-lock.json b/package-lock.json index 0461d69..945e4b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "git-commit-wizard", - "version": "2.0.25", + "version": "2.0.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "git-commit-wizard", - "version": "2.0.25", + "version": "2.0.26", "dependencies": { "semver": ">=7.5.2" }, diff --git a/package.json b/package.json index 547b933..fd7c945 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "git-commit-wizard", "displayName": "git-commit-wizard", "description": "A customizable VS Code extension for semantic committing, compatible with microservices and multiple source control repositories.", - "version": "2.0.25", + "version": "2.0.26", "author": "Andrii Bohdan", "icon": "assets/image/wizard-icon.png", "publisher": "andrii-bohdan", diff --git a/src/app/utils/mapper.ts b/src/app/utils/mapper.ts index b595d98..9a3a1e9 100644 --- a/src/app/utils/mapper.ts +++ b/src/app/utils/mapper.ts @@ -4,11 +4,13 @@ import { Commit } from "../../commons/typings/settings"; import { getEmojiSettings } from "./settings"; export function extractString(str: string | undefined): string { - const regex = /[\p{L}\p{N}\s]+/u; + const regex = /[\u0020-\u007e\u00a0-\u00ff\u0152\u0153\u0178]+/gu; const matches = str?.match(regex); + if (matches && matches.length > 0) { return matches[0].trim(); } + return ""; } @@ -39,12 +41,15 @@ export const templateSerializer = (template: string, data: Commit[]) => { const showEmojis = getEmojiSettings(); for (let i = 0; i < data.length; i++) { const e = data[i]; + if (!showEmojis) { e.value = extractString(e.value); } + if (e.key === "scope" && e.value === "") { newTemplate = newTemplate.replace(`({${e.key}})`, ""); } + newTemplate = newTemplate.replace(`{${e.key}}`, e.value); } From 0aba8772a1e67d1d1e6c2c6e4383b07ecf7ddcd0 Mon Sep 17 00:00:00 2001 From: andrii-bohdan Date: Fri, 12 Jan 2024 18:02:15 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=91=20docs:=20updated=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c96680b..d04ecc0 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ This extension also includes a keyboard shortcut to quickly open the commit mess

Release Notes

-### 1.0.12 +### v1.0.12 Initial release of Git-Commit-Wizard.