Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -37,7 +37,7 @@ The Playground command opens <https://stack-diagram.com/> 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.

Expand All @@ -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).
12 changes: 6 additions & 6 deletions scripts/prepare-integration-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
],
]);
Expand All @@ -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}`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/compatibility.ts
Original file line number Diff line number Diff line change
@@ -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 }
Expand Down
8 changes: 4 additions & 4 deletions test/integration/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.0",
detail: `Stack CLI ${process.env.STACK_TEST_CLI_VERSION ?? "0.5.0"} is providing language intelligence.`,
});
});

Expand Down Expand Up @@ -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")
Expand All @@ -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.`,
});
}

Expand Down
10 changes: 7 additions & 3 deletions test/unit/compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ 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", () => {
assert.deepEqual(assessCliVersion("stack 0.3.9"), {
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",
Expand Down