From 51ccf2fc94fb5a3b948dbff339179dd73332ae83 Mon Sep 17 00:00:00 2001 From: Eduardo Russo Date: Mon, 12 Oct 2026 22:59:46 +0100 Subject: [PATCH] fix(vscode): package the extension as MIT with the license file (#228) The staged manifest hard-coded UNLICENSED and --skip-license, so the Marketplace and Open VSX showed the extension as unlicensed. The root package.json already declares MIT but the repository had no LICENSE file: add it, copy it into the package and raise the version to 0.0.4 so the publish workflow releases it. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01GRFT8YzUDa84dvEg8UeTAT --- LICENSE | 21 +++++++++++++++++++ apps/vscode-extension/package.json | 2 +- .../packaging/package-vsix.mjs | 5 +++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f6b48f1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Eduardo Russo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/vscode-extension/package.json b/apps/vscode-extension/package.json index a1b381b..ad160d5 100644 --- a/apps/vscode-extension/package.json +++ b/apps/vscode-extension/package.json @@ -1,6 +1,6 @@ { "name": "@opencraw/vscode", - "version": "0.0.3", + "version": "0.0.4", "private": true, "description": "OpenCraw in the editor: starts the Studio server and opens a folder, recipe or document in the browser.", "type": "module", diff --git a/apps/vscode-extension/packaging/package-vsix.mjs b/apps/vscode-extension/packaging/package-vsix.mjs index 6f2ff6d..2168dec 100644 --- a/apps/vscode-extension/packaging/package-vsix.mjs +++ b/apps/vscode-extension/packaging/package-vsix.mjs @@ -42,7 +42,7 @@ writeFileSync(join(stage, 'package.json'), JSON.stringify({ version: source.version, publisher: source.publisher, icon: source.icon, - license: 'UNLICENSED', + license: 'MIT', engines: source.engines, categories: source.categories, activationEvents: source.activationEvents, @@ -56,6 +56,7 @@ mkdirSync(join(stage, 'dist')) cpSync(join(appDir, 'dist', 'extension.cjs'), join(stage, 'dist', 'extension.cjs')) cpSync(join(appDir, 'dist', 'studio-host.process.mjs'), join(stage, 'dist', 'studio-host.process.mjs')) cpSync(join(appDir, 'README.md'), join(stage, 'README.md')) +cpSync(join(repoRoot, 'LICENSE'), join(stage, 'LICENSE')) cpSync(join(appDir, 'media'), join(stage, 'media'), { recursive: true }) writeFileSync(join(stage, '.vscodeignore'), 'tarballs/**\n') @@ -96,6 +97,6 @@ if (process.argv.includes('--stage-only')) { // this runs on, so the package is for this platform only: the same names the editor's marketplace uses. const target = `${process.platform}-${process.arch}` const out = join(appDir, `opencraw-${source.version}-${target}.vsix`) - npm(['exec', '--yes', `--package=${VSCE}`, '--', 'vsce', 'package', '--target', target, '--out', out, '--allow-missing-repository', '--skip-license', '--no-update-package-json'], { cwd: stage, stdio: 'inherit' }) + npm(['exec', '--yes', `--package=${VSCE}`, '--', 'vsce', 'package', '--target', target, '--out', out, '--allow-missing-repository', '--no-update-package-json'], { cwd: stage, stdio: 'inherit' }) process.stdout.write(`packaged ${out}\n`) }