From 0fe367d25e29e8b150cd04141027f5fb6c414504 Mon Sep 17 00:00:00 2001 From: Yago Borba <140000816+YagoBorba@users.noreply.github.com> Date: Fri, 27 Nov 2026 12:36:28 -0300 Subject: [PATCH 1/2] fix(cli): report the package version and publish only build output stc --version printed a hard-coded 1.0.3; it now reads the version from package.json. The npm packages ship only dist, declare public access, and @stackcode/github-auth, a runtime dependency of the CLI, can be published with them. --- packages/cli/package.json | 6 ++++++ packages/cli/src/index.ts | 7 ++++++- packages/core/package.json | 6 ++++++ packages/github-auth/package.json | 8 ++++++++ packages/i18n/package.json | 6 ++++++ 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 7c7a45b..15bbbe5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -54,5 +54,11 @@ "@types/yargs": "^17.0.32", "typescript": "^5.8.3", "vitest": "^3.2.4" + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" } } diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 88083b5..147f752 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -12,6 +12,11 @@ import { getReleaseCommand } from "./commands/release.js"; import { getGitHubCommand } from "./commands/github.js"; import { initI18n, t, getLocale } from "@stackcode/i18n"; import { getErrorMessage } from "@stackcode/core"; +import { createRequire } from "module"; + +const { version } = createRequire(import.meta.url)("../package.json") as { + version: string; +}; async function main() { try { @@ -21,7 +26,7 @@ async function main() { await yargs(hideBin(process.argv)) .scriptName("stackcode") - .version("1.0.3") + .version(version) .alias("h", "help") .alias("v", "version") .strict() diff --git a/packages/core/package.json b/packages/core/package.json index 968a07b..902ebba 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -48,5 +48,11 @@ "@types/conventional-changelog-core": "^8.0.0", "@types/semver": "^7.7.0", "vitest": "^3.2.4" + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" } } diff --git a/packages/github-auth/package.json b/packages/github-auth/package.json index 343ac6f..9c03168 100644 --- a/packages/github-auth/package.json +++ b/packages/github-auth/package.json @@ -41,5 +41,13 @@ "@types/node": "^24.2.0", "typescript": "^5.8.3", "vitest": "^3.2.4" + }, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/YagoBorba/StackCode.git", + "directory": "packages/github-auth" } } diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 54553e4..f820021 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -37,5 +37,11 @@ "dependencies": { "configstore": "^7.0.0", "write-file-atomic": "^3.0.3" + }, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" } } From 1871a9b89f5fdcd4fd4ae60df1d4febdd9047660 Mon Sep 17 00:00:00 2001 From: Yago Borba <140000816+YagoBorba@users.noreply.github.com> Date: Fri, 27 Nov 2026 12:40:49 -0300 Subject: [PATCH 2/2] chore(release): prepare version 2.1.2 --- CHANGELOG.md | 5 +++++ README.md | 2 +- package-lock.json | 20 ++++++++++---------- package.json | 2 +- packages/cli/package.json | 6 +++--- packages/core/package.json | 2 +- packages/i18n/package.json | 2 +- packages/vscode-extension/package.json | 6 +++--- 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 338bcf1..ac650fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.1.2 (2026-11-27) + +- 🐛 fix(cli): `stc --version` reports the installed version instead of a hard-coded 1.0.3 +- 📦 build: the npm packages ship only their build output and declare public access; `@stackcode/github-auth`, a runtime dependency of the CLI, is published with them + ## 2.1.1 (2026-11-27) - 🐛 fix(cli): `stc validate` no longer prints its status icon twice diff --git a/README.md b/README.md index e4eba0d..4213706 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ This is the best approach for ensuring everyone on a project uses the exact same Download `stackcode-vscode-.vsix` from the [latest release](https://github.com/YagoBorba/StackCode/releases/latest) and install it: ```bash -code --install-extension stackcode-vscode-2.1.1.vsix +code --install-extension stackcode-vscode-2.1.2.vsix ``` Or, in VS Code, open the Extensions view, choose **…** → **Install from VSIX...** and select the file. diff --git a/package-lock.json b/package-lock.json index 3b17e7c..6b8b440 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "stackcode-monorepo", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stackcode-monorepo", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "workspaces": [ "packages/*" @@ -14530,13 +14530,13 @@ }, "packages/cli": { "name": "@stackcode/cli", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "dependencies": { "@octokit/rest": "^22.0.0", - "@stackcode/core": "^2.1.1", + "@stackcode/core": "^2.1.2", "@stackcode/github-auth": "^1.0.0", - "@stackcode/i18n": "^2.1.1", + "@stackcode/i18n": "^2.1.2", "chalk": "^5.3.0", "configstore": "^7.0.0", "inquirer": "^8.2.6", @@ -14589,7 +14589,7 @@ }, "packages/core": { "name": "@stackcode/core", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "dependencies": { "@octokit/rest": "^22.0.0", @@ -14625,7 +14625,7 @@ }, "packages/i18n": { "name": "@stackcode/i18n", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "dependencies": { "configstore": "^7.0.0", @@ -14644,13 +14644,13 @@ }, "packages/vscode-extension": { "name": "stackcode-vscode", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "dependencies": { "@octokit/rest": "^22.0.0", - "@stackcode/core": "^2.1.1", + "@stackcode/core": "^2.1.2", "@stackcode/github-auth": "^1.0.0", - "@stackcode/i18n": "^2.1.1" + "@stackcode/i18n": "^2.1.2" }, "devDependencies": { "@tailwindcss/postcss": "^4.1.11", diff --git a/package.json b/package.json index 34b17cb..8a48662 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackcode-monorepo", - "version": "2.1.1", + "version": "2.1.2", "private": true, "type": "module", "description": "An intelligent tool to help junior developers apply best practices from day one.", diff --git a/packages/cli/package.json b/packages/cli/package.json index 15bbbe5..2facd27 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@stackcode/cli", - "version": "2.1.1", + "version": "2.1.2", "description": "The Command-Line Interface for StackCode", "type": "module", "main": "dist/index.js", @@ -36,8 +36,8 @@ "dependencies": { "@octokit/rest": "^22.0.0", "@stackcode/github-auth": "^1.0.0", - "@stackcode/core": "^2.1.1", - "@stackcode/i18n": "^2.1.1", + "@stackcode/core": "^2.1.2", + "@stackcode/i18n": "^2.1.2", "chalk": "^5.3.0", "configstore": "^7.0.0", "inquirer": "^8.2.6", diff --git a/packages/core/package.json b/packages/core/package.json index 902ebba..22fde8f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@stackcode/core", - "version": "2.1.1", + "version": "2.1.2", "description": "Core logic for the StackCode tool.", "type": "module", "main": "dist/index.js", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index f820021..fb3afb9 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@stackcode/i18n", - "version": "2.1.1", + "version": "2.1.2", "description": "Internationalization (i18n) package for StackCode.", "type": "module", "main": "dist/index.js", diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index 54100f5..cbfc04f 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -2,7 +2,7 @@ "name": "stackcode-vscode", "displayName": "StackCode", "description": "Complete development assistant with project scaffolding, Git workflow, and real-time best practices enforcement", - "version": "2.1.1", + "version": "2.1.2", "publisher": "YagoBorba", "engines": { "vscode": "^1.85.0" @@ -291,8 +291,8 @@ "dependencies": { "@octokit/rest": "^22.0.0", "@stackcode/github-auth": "^1.0.0", - "@stackcode/core": "^2.1.1", - "@stackcode/i18n": "^2.1.1" + "@stackcode/core": "^2.1.2", + "@stackcode/i18n": "^2.1.2" }, "keywords": [ "git",