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
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
baseline:
name: baseline
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Run static and unit gates
run: npm run check
- name: Audit production dependencies
run: npm run audit
- name: Build, inspect, and test the release VSIX
run: xvfb-run -a npm run test:integration
- name: Upload the inspected VSIX
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: stack-language-${{ github.sha }}
path: artifacts/*.vsix
if-no-files-found: error
retention-days: 7
66 changes: 66 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write
id-token: write
attestations: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
name: release
runs-on: ubuntu-latest
timeout-minutes: 20
environment: visual-studio-marketplace
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Verify release tag
id: metadata
run: node scripts/release-metadata.mjs
- name: Run static and unit gates
run: npm run check
- name: Audit production dependencies
run: npm run audit
- name: Build, inspect, and test the release VSIX
run: xvfb-run -a npm run test:integration
- name: Create checksum
run: >-
node scripts/create-checksum.mjs
"${{ steps.metadata.outputs.vsix_path }}"
"${{ steps.metadata.outputs.checksum_path }}"
- name: Attest the release VSIX
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
with:
subject-path: ${{ steps.metadata.outputs.vsix_path }}
- name: Publish to Visual Studio Marketplace
run: >-
npx vsce publish --oidc --skip-duplicate --packagePath
"${{ steps.metadata.outputs.vsix_path }}"
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: >-
gh release create "$GITHUB_REF_NAME"
"${{ steps.metadata.outputs.vsix_path }}"
"${{ steps.metadata.outputs.checksum_path }}"
--verify-tag
--title "Stack ${{ steps.metadata.outputs.version }}"
--notes-from-tag
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules/
dist/
out-test/
syntaxes/
language-configuration.json
artifacts/
.vscode-test/
.test-bin/
.test-vsix/
*.vsix
*.log
22 changes: 22 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { defineConfig } from "@vscode/test-cli";

const shared = {
files: "out-test/test/integration/**/*.test.js",
extensionDevelopmentPath: ".test-vsix/extension",
workspaceFolder: "test/fixtures/workspace",
launchArgs: [
"--disable-workspace-trust",
"--disable-updates",
"--skip-release-notes",
"--skip-welcome",
],
mocha: {
ui: "tdd",
timeout: 60_000,
},
};

export default defineConfig([
{ ...shared, label: "minimum", version: "1.91.0" },
{ ...shared, label: "stable", version: "stable" },
]);
17 changes: 17 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.github/**
.test-bin/**
.test-vsix/**
.vscode-test/**
.vscode-test.mjs
.gitignore
docs/**
node_modules/**
out-test/**
scripts/**
src/**
test/**
tsconfig*.json
eslint.config.mjs
esbuild.mjs
package-lock.json
dist/**/*.map
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to the Stack extension are documented here.

## 0.1.0 - Unreleased

- Register `.stack` files with the canonical Stack grammar and language configuration.
- Launch the native Stack CLI language server for diagnostics, completion, hover, document symbols, and formatting.
- Validate CLI compatibility before launch and provide actionable missing or incompatible server guidance.
- Add a machine-scoped executable setting, trusted-workspace boundary, language status, and Playground entry point.
- Add unit tests, real CLI and VS Code integration tests, deterministic VSIX inspection, dependency audit, and OIDC release automation.
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

Thank you for helping improve Stack for Visual Studio Code.

## Development

Use Node.js 24 or newer and install the exact dependency graph:

```sh
npm ci
```

Run the local quality gates:

```sh
npm run check
npm run test:integration
npm run package:check
npm run audit
```

Integration tests support Apple Silicon and Intel macOS plus arm64 and x86_64 glibc Linux. They download the public Stack CLI 0.4.0 archive for the host, verify its fixed SHA-256 digest, package and inspect the VSIX, and run its extracted contents in VS Code 1.91.0 and current stable with isolated user-data directories.

## Ownership boundaries

- Language syntax, semantics, and portable editor assets belong in [`stack-sh/specification`](https://github.com/stack-sh/specification).
- Compiler diagnostics and language intelligence belong in [`stack-sh/compiler`](https://github.com/stack-sh/compiler).
- LSP transport and native CLI behavior belong in [`stack-sh/cli`](https://github.com/stack-sh/cli).
- This repository owns VS Code registration, lifecycle, guidance, packaging, and Marketplace delivery.

Do not duplicate a parser or grammar in the extension. Consume the versioned public provider artifacts and update compatibility evidence together.

## Pull requests

Keep changes focused, use an English commit and pull request description, add tests for observable behavior, and include the verification commands you ran. Do not commit generated output, VSIX files, downloaded test runtimes, credentials, tokens, customer data, or signing material.
Loading