From 9868e7585d4bf3ef952ac8a0042c8b4e8de7a589 Mon Sep 17 00:00:00 2001 From: konojunya Date: Sun, 6 Sep 2026 03:56:25 +0900 Subject: [PATCH 1/2] Accept verified Stack CLI 0.5 language servers --- README.md | 4 ++-- scripts/validate-manifest.mjs | 2 +- src/compatibility.ts | 2 +- test/integration/extension.test.ts | 8 ++++---- test/unit/compatibility.test.ts | 10 +++++++--- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2b53408..da4a64d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The extension associates `.stack` files with Stack, provides the canonical TextM ## Requirements - Visual Studio Code 1.91 or newer. -- Stack CLI `>=0.4.0 <0.5.0` installed in the environment where the workspace extension host runs. +- Stack CLI `>=0.4.0 <0.6.0` installed in the environment where the workspace extension host runs. - A trusted workspace. Syntax highlighting remains declarative, but the language server does not start in Restricted Mode because it launches a native executable. Install the CLI with Homebrew: @@ -37,7 +37,7 @@ The Playground command opens in your browser. It do | Extension | VS Code | Stack CLI | Language assets | | --------- | ---------- | ---------------- | ---------------------------- | -| `0.1.x` | `>=1.91.0` | `>=0.4.0 <0.5.0` | `@stack-sh/language` `0.1.0` | +| `0.1.x` | `>=1.91.0` | `>=0.4.0 <0.6.0` | `@stack-sh/language` `0.1.0` | Update the extension through Visual Studio Code. Update a Homebrew-managed CLI with `brew upgrade stack-sh/tap/stack`; use the owner of any other installation channel to update that installation. The extension refuses to start an older or unverified newer CLI and gives an action appropriate to the detected state. diff --git a/scripts/validate-manifest.mjs b/scripts/validate-manifest.mjs index d51e890..b06ddad 100644 --- a/scripts/validate-manifest.mjs +++ b/scripts/validate-manifest.mjs @@ -100,7 +100,7 @@ for (const key of [ } assert.ok( - /^\| `0\.1\.x`\s+\| `>=1\.91\.0`\s+\| `>=0\.4\.0 <0\.5\.0`\s+\| `@stack-sh\/language` `0\.1\.0`\s+\|$/mu.test( + /^\| `0\.1\.x`\s+\| `>=1\.91\.0`\s+\| `>=0\.4\.0 <0\.6\.0`\s+\| `@stack-sh\/language` `0\.1\.0`\s+\|$/mu.test( readme, ), "README compatibility table is stale", diff --git a/src/compatibility.ts b/src/compatibility.ts index 9cbe9ef..b967d2e 100644 --- a/src/compatibility.ts +++ b/src/compatibility.ts @@ -1,7 +1,7 @@ import semver from "semver"; export const MINIMUM_STACK_CLI_VERSION = "0.4.0"; -export const SUPPORTED_STACK_CLI_RANGE = ">=0.4.0 <0.5.0"; +export const SUPPORTED_STACK_CLI_RANGE = ">=0.4.0 <0.6.0"; export type CliCompatibility = | { kind: "compatible"; version: string } diff --git a/test/integration/extension.test.ts b/test/integration/extension.test.ts index 999f14f..2b037a2 100644 --- a/test/integration/extension.test.ts +++ b/test/integration/extension.test.ts @@ -67,8 +67,8 @@ suite("Stack extension integration", () => { assert.deepEqual(api.getServerStatus(), { state: "running", executable: cliPath, - version: "0.4.0", - detail: "Stack CLI 0.4.0 is providing language intelligence.", + version: process.env.STACK_TEST_CLI_VERSION ?? "0.4.0", + detail: `Stack CLI ${process.env.STACK_TEST_CLI_VERSION ?? "0.4.0"} is providing language intelligence.`, }); }); @@ -165,7 +165,7 @@ suite("Stack extension integration", () => { }); test("refuses older and unverified newer CLI versions", async () => { - for (const version of ["0.3.9", "0.5.0"]) { + for (const version of ["0.3.9", "0.6.0"]) { const executable = await createVersionFixture(version); await vscode.workspace .getConfiguration("stack") @@ -179,7 +179,7 @@ suite("Stack extension integration", () => { state: "incompatible", executable, version, - detail: `Stack CLI ${version} is outside the supported range >=0.4.0 <0.5.0.`, + detail: `Stack CLI ${version} is outside the supported range >=0.4.0 <0.6.0.`, }); } diff --git a/test/unit/compatibility.test.ts b/test/unit/compatibility.test.ts index fcc5c84..dba2673 100644 --- a/test/unit/compatibility.test.ts +++ b/test/unit/compatibility.test.ts @@ -17,8 +17,12 @@ void describe("Stack CLI compatibility", () => { kind: "compatible", version: "0.4.99", }); + assert.deepEqual(assessCliVersion("stack 0.5.0"), { + kind: "compatible", + version: "0.5.0", + }); assert.equal(MINIMUM_STACK_CLI_VERSION, "0.4.0"); - assert.equal(SUPPORTED_STACK_CLI_RANGE, ">=0.4.0 <0.5.0"); + assert.equal(SUPPORTED_STACK_CLI_RANGE, ">=0.4.0 <0.6.0"); }); void it("distinguishes older and unverified newer CLIs", () => { @@ -26,9 +30,9 @@ void describe("Stack CLI compatibility", () => { kind: "too-old", version: "0.3.9", }); - assert.deepEqual(assessCliVersion("stack 0.5.0"), { + assert.deepEqual(assessCliVersion("stack 0.6.0"), { kind: "too-new", - version: "0.5.0", + version: "0.6.0", }); assert.deepEqual(assessCliVersion("stack 1.0.0"), { kind: "too-new", From 88a14c32ee7d72cf0480b0865e5f0d8b5a91b7d0 Mon Sep 17 00:00:00 2001 From: konojunya Date: Sun, 6 Sep 2026 04:04:29 +0900 Subject: [PATCH 2/2] Verify integration against the published CLI 0.5.0 archive --- README.md | 2 +- scripts/prepare-integration-cli.mjs | 12 ++++++------ test/integration/extension.test.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index da4a64d..8035461 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,6 @@ npm run test:integration npm run package:check ``` -Integration tests download the pinned Stack CLI 0.4.0 release archive for the current supported platform, verify its SHA-256 digest, and run the inspected VSIX contents in clean VS Code 1.91.0 and current stable Extension Development Hosts against the real language server. +Integration tests download the pinned Stack CLI 0.5.0 release archive for the current supported platform, verify its SHA-256 digest, and run the inspected VSIX contents in clean VS Code 1.91.0 and current stable Extension Development Hosts against the real language server. See [Releasing](./docs/releasing.md), [Privacy](./PRIVACY.md), [Security](./SECURITY.md), [Support](./SUPPORT.md), and [Third-party notices](./THIRD_PARTY_NOTICES.md). diff --git a/scripts/prepare-integration-cli.mjs b/scripts/prepare-integration-cli.mjs index 359e0ab..305be3a 100644 --- a/scripts/prepare-integration-cli.mjs +++ b/scripts/prepare-integration-cli.mjs @@ -7,35 +7,35 @@ import { promisify } from "node:util"; import { fileURLToPath } from "node:url"; const execFileAsync = promisify(execFile); -const VERSION = "0.4.0"; +const VERSION = "0.5.0"; const RELEASE_BASE = `https://github.com/stack-sh/cli/releases/download/v${VERSION}`; const TARGETS = new Map([ [ "darwin:arm64", [ "aarch64-apple-darwin", - "dd43cf3d966a3dc28de3ac8752b6a98f19e4cb7cf6b04652ab73a013800cb015", + "cfa5e6459481dec73c0aca5b32d52293c977a4f5d72273f8ea9ce71c4f689ea2", ], ], [ "darwin:x64", [ "x86_64-apple-darwin", - "48a72328fcf6d160a123a766d9701108f8ee9f633001581dab533b93dddf0827", + "d38e017c93a41855319fd583c4f0d6e62dc688b10ebeedbe925d07ba6dbb7e2b", ], ], [ "linux:arm64", [ "aarch64-unknown-linux-gnu", - "a0d76bfa9ed9e767fcd06dbeb7140234db865440210c7c3abf6c3db4f6983a6e", + "506a03d1b430497539bfc2c57ff4a97962a983d1343c983700bc85719e5740cb", ], ], [ "linux:x64", [ "x86_64-unknown-linux-gnu", - "89d8a34c0da5f67932edff2641fe0a0527afbd120cfd5133cb38cdeffca55319", + "b159e58c899f77798196616dd1a33fc6a04026cdc582861ee8ac257211abdb9d", ], ], ]); @@ -45,7 +45,7 @@ export async function prepareIntegrationCli() { const release = TARGETS.get(platformKey); if (release === undefined) { throw new Error( - `Stack CLI 0.4.0 has no supported integration target for ${platformKey}`, + `Stack CLI 0.5.0 has no supported integration target for ${platformKey}`, ); } diff --git a/test/integration/extension.test.ts b/test/integration/extension.test.ts index 2b037a2..af3c1ba 100644 --- a/test/integration/extension.test.ts +++ b/test/integration/extension.test.ts @@ -67,8 +67,8 @@ suite("Stack extension integration", () => { assert.deepEqual(api.getServerStatus(), { state: "running", executable: cliPath, - version: process.env.STACK_TEST_CLI_VERSION ?? "0.4.0", - detail: `Stack CLI ${process.env.STACK_TEST_CLI_VERSION ?? "0.4.0"} is providing language intelligence.`, + version: process.env.STACK_TEST_CLI_VERSION ?? "0.5.0", + detail: `Stack CLI ${process.env.STACK_TEST_CLI_VERSION ?? "0.5.0"} is providing language intelligence.`, }); });