From 2141916363d7f33a7a22adf6846f77276d7c4da3 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sun, 18 Oct 2026 07:28:45 +0000 Subject: feat(plugin): derive package versions from commit metadata Co-Authored-By: Claude Opus 5.5 --- plugin/.vscodeignore | 1 + plugin/AGENTS/DEVELOPMENT.md | 14 +++++++++++--- plugin/README.md | 4 ++-- plugin/package.json | 4 ++-- plugin/scripts/package.js | 30 ++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 plugin/scripts/package.js (limited to 'plugin') diff --git a/plugin/.vscodeignore b/plugin/.vscodeignore index 1046c33..d63ae76 100644 --- a/plugin/.vscodeignore +++ b/plugin/.vscodeignore @@ -1,5 +1,6 @@ node_modules/** test/** +scripts/** AGENTS/** AGENTS.md .gitignore diff --git a/plugin/AGENTS/DEVELOPMENT.md b/plugin/AGENTS/DEVELOPMENT.md index f167355..ca008af 100644 --- a/plugin/AGENTS/DEVELOPMENT.md +++ b/plugin/AGENTS/DEVELOPMENT.md @@ -15,7 +15,15 @@ npm run package ``` `npm run package` runs syntax checks and the existing Node tests, then uses vsce -to generate `plugin-0.1.0.vsix`. Runtime dependencies are not bundled. +through `scripts/package.js` to generate `cpsc-plugin-YYYYMMDD-HHMMSS-commit.vsix`. +Both filename components come from HEAD: its UTC commit timestamp and Git short ID. +The internal version is `YYYYMMDD.HHMMSS.0+commit`; the numeric time component +has no leading zeros (midnight is `0`). For example, the file +`cpsc-plugin-20261018-054123-1b0b287.vsix` contains version +`20261018.54123.0+1b0b287` in both package.json and the VSIX manifest. +The source manifest and lockfile retain their development version; vsce overrides +only the packaged version, without modifying source files or creating commits/tags. +Missing Git or unreadable HEAD fails packaging. Runtime dependencies are not bundled. `@vscode/vsce`, `vscode-textmate` and `vscode-oniguruma` are development tools only. Do simple verification before each feature commit and follow the global commit @@ -49,7 +57,7 @@ Existing local editor smoke scripts, if present, live under the ignored ## Packaging and installation -`.vscodeignore` excludes tests, agent instructions, dependencies and build +`.vscodeignore` excludes tests, packaging scripts, agent instructions, dependencies and build artifacts. Git ignores dependencies, VSIX files and editor test downloads. Check the generated package contains the runtime files, grammar, language configuration, concise English README and notices, without `AGENTS/` or tests. @@ -57,7 +65,7 @@ configuration, concise English README and notices, without `AGENTS/` or tests. For a local installation, use the Extensions panel's **Install from VSIX...** or: ```sh -code --install-extension plugin-0.1.0.vsix --force +code --install-extension cpsc-plugin-20261018-054123-1b0b287.vsix --force ``` In a remote terminal, `code` installs into the connected remote editor. For an diff --git a/plugin/README.md b/plugin/README.md index 9fec97a..ec21fb7 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -10,10 +10,10 @@ Download the VSIX from [Nightly Build](https://github.com/ovfor4/cie-pseudocode- If you installed the old extension (`ovfor4.cie-pseudocode`), uninstall it before installing `ovfor4.plugin`. Update any explicit `editor.defaultFormatter` setting to `ovfor4.plugin`. -In the Extensions panel, choose **... > Install from VSIX...** and select `plugin-0.1.0.vsix`, or run: +In the Extensions panel, choose **... > Install from VSIX...** and select the downloaded `cpsc-plugin--