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
29 changes: 0 additions & 29 deletions .env.playwright.example

This file was deleted.

27 changes: 27 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@ if [ $? -ne 0 ]; then
exit 1
fi

# Build the extension bundle used by the demo (dist/)
echo ""
echo "📦 Building extension bundle (dist)..."
npm run build:dist
if [ $? -ne 0 ]; then
echo ""
echo "❌ Build failed. Fix the errors above before committing."
exit 1
fi

# Type-check Playwright demo code (not part of extension build)
echo ""
echo "🎭 Type-checking Playwright demo..."
npm run typecheck:playwright
if [ $? -ne 0 ]; then
echo ""
echo "❌ Playwright demo typecheck failed. Fix the errors above before committing."
exit 1
fi

# NOTE: Updating the README demo video is intentionally NOT part of the pre-commit hook.
# The video pipeline can produce artifact churn (e.g. encoding/duration differences) and
# should be run intentionally when you want to refresh the README.
#
# Run manually when needed:
# npm run demo:pw:update-readme

# Run tests
echo ""
echo "🧪 Running tests..."
Expand Down
56 changes: 33 additions & 23 deletions .github/scripts/generate-release-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ function runGit(args: string[]): string {
if (res.status !== 0) {
const stderr = (res.stderr || "").trim();
throw new Error(
`git ${args.join(" ")} failed${stderr ? `: ${stderr}` : ""}`
`git ${args.join(" ")} failed${stderr ? `: ${stderr}` : ""}`,
);
}
return (res.stdout || "").trimEnd();
}

function computeNextVersion(prevTagRaw: string): {
version: string;
prevTagRaw: string;
version: string
prevTagRaw: string
} {
if (!prevTagRaw) {
return { version: "0.0.1", prevTagRaw: "" };
}

const prev = prevTagRaw.replace(/^v/, "");
const parts = prev.split(".");
if (parts.length !== 3 || parts.some((p) => Number.isNaN(Number(p)))) {
if (parts.length !== 3 || parts.some(p => Number.isNaN(Number(p)))) {
throw new Error(`Latest tag '${prevTagRaw}' is not semver x.y.z`);
}

parts[2] = String(Number(parts[2]) + 1);
return { version: parts.join("."), prevTagRaw };
}

function buildContext(prevTag: string): { commits: string; stats: string } {
function buildContext(prevTag: string): { commits: string, stats: string } {
const range = prevTag ? `${prevTag}..HEAD` : "";
const commits = `${runGit([
"log",
Expand All @@ -56,16 +56,18 @@ function buildContext(prevTag: string): { commits: string; stats: string } {
])}\n`;

// Match CI behavior: git diff --stat for a range, else git show --stat.
const stats = range ? runGit(["diff", "--stat", range]) : runGit(["show", "--stat"]);
const stats = range
? runGit(["diff", "--stat", range])
: runGit(["show", "--stat"]);

return { commits, stats };
}

function getCiContextFromEnv(): {
version?: string;
prevTag?: string;
commits?: string;
stats?: string;
version?: string
prevTag?: string
commits?: string
stats?: string
} {
// These are the same variable names produced/used by the GitHub Actions workflow.
// If present, we treat them as authoritative so CI and local runs behave consistently.
Expand All @@ -87,13 +89,16 @@ function isRunningInGitHubActions(): boolean {
}

function fillPromptTemplate(params: {
workspaceRoot: string;
version: string;
prevTag: string;
commits: string;
stats: string;
workspaceRoot: string
version: string
prevTag: string
commits: string
stats: string
}): string {
const promptPath = path.join(params.workspaceRoot, ".github/prompts/release-notes.md");
const promptPath = path.join(
params.workspaceRoot,
".github/prompts/release-notes.md",
);
const promptTemplate = fs.readFileSync(promptPath, "utf8");

/* eslint-disable no-template-curly-in-string */
Expand All @@ -105,7 +110,7 @@ function fillPromptTemplate(params: {
/* eslint-enable no-template-curly-in-string */
}

function updateChangelog(params: { version: string; content: string }): void {
function updateChangelog(params: { version: string, content: string }): void {
const changelogPath = "CHANGELOG.md";
const existing = fs.existsSync(changelogPath)
? fs.readFileSync(changelogPath, "utf8")
Expand All @@ -117,9 +122,11 @@ function updateChangelog(params: { version: string; content: string }): void {
let next: string;
if (existing.includes("# Changelog")) {
next = existing.replace("# Changelog", `# Changelog\n\n${newEntry}`);
} else if (existing.includes("# CHANGELOG")) {
}
else if (existing.includes("# CHANGELOG")) {
next = existing.replace("# CHANGELOG", `# CHANGELOG\n\n${newEntry}`);
} else {
}
else {
next = newEntry + existing;
}

Expand All @@ -133,7 +140,7 @@ async function main(): Promise<void> {

if (!apiKey) {
console.error(
"Missing Anthropic credentials: set ANTHROPIC_API_KEY (CI) or ANTHROPIC_TOKEN (local)"
"Missing Anthropic credentials: set ANTHROPIC_API_KEY (CI) or ANTHROPIC_TOKEN (local)",
);
process.exit(1);
}
Expand All @@ -154,14 +161,15 @@ async function main(): Promise<void> {
if (isRunningInGitHubActions()) {
if (!ci.version || ci.prevTag === undefined || !ci.commits || !ci.stats) {
throw new Error(
"CI mode requires VERSION, PREV_TAG, COMMITS, and STATS to be set in the environment."
"CI mode requires VERSION, PREV_TAG, COMMITS, and STATS to be set in the environment.",
);
}
version = ci.version;
prevTag = ci.prevTag;
commits = ci.commits;
stats = ci.stats;
} else {
}
else {
// Local mode: compute everything from git.
const prevTagRaw = runGit(["describe", "--tags", "--abbrev=0"]);
const next = computeNextVersion(prevTagRaw);
Expand All @@ -180,7 +188,9 @@ async function main(): Promise<void> {
stats,
});

console.log(`Generating release notes with Claude Agent SDK (model=${model})...`);
console.log(
`Generating release notes with Claude Agent SDK (model=${model})...`,
);

const result = await unstable_v2_prompt(prompt, { model });
if (result.subtype !== "success") {
Expand Down
38 changes: 37 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

jobs:
Expand All @@ -19,6 +21,10 @@ jobs:
with:
fetch-depth: 0

- name: Init required submodules
run: |
git submodule update --init --depth 1 external/vscode-test-playwright

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -116,6 +122,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Init required submodules
run: |
git submodule update --init --depth 1 external/vscode-test-playwright

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -161,6 +171,10 @@ jobs:
with:
fetch-depth: 0

- name: Init required submodules
run: |
git submodule update --init --depth 1 external/vscode-test-playwright

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -170,6 +184,11 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Install system dependencies for Playwright demo
run: |
sudo apt-get update
sudo apt-get install -y xvfb ffmpeg

- name: Determine next version
id: version
uses: actions/github-script@v7
Expand Down Expand Up @@ -238,9 +257,18 @@ jobs:
COMMITS: ${{ steps.context.outputs.commits }}
STATS: ${{ steps.context.outputs.stats }}

- name: Init demo video submodule
run: |
git submodule update --init --depth 1 external/playwright-test-videos

- name: Update README demo video
shell: bash
run: |
xvfb-run --auto-servernum --server-args='-screen 0 1280x1024x24' npm run demo:pw:update-readme

- name: Commit and Push Changes
run: |
git add CHANGELOG.md README.md package.json
git add CHANGELOG.md README.md package.json docs/pw-videos/demo.mp4
if git diff --staged --quiet; then
echo "No changes to commit"
else
Expand Down Expand Up @@ -269,6 +297,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Init required submodules
run: |
git submodule update --init --depth 1 external/vscode-test-playwright

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -303,6 +335,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Init required submodules
run: |
git submodule update --init --depth 1 external/vscode-test-playwright

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineConfig({
require: ["esbuild-register"],
bail: true,
},

// Allow extensions to load; we install required ones below via the 'extensions' field.
// Run with a temporary profile for isolation between test runs.
launchArgs: [
Expand Down
20 changes: 11 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,24 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
// Prettier formatting settings
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {},
// Ensure Prettier is used for all supported file types
// Formatting: ESLint is the source of truth for JS/TS (run fixes on save)
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"eslint.format.enable": true,
// Use built-in formatter for JSON/JSONC
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
// Extension Test Runner configuration
"extension-test-runner.debugOptions": {
Expand Down
2 changes: 0 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ coverage/**
esbuild.js

# Documentation and project files
.prettierignore
.prettierrc
eslint.config.mjs
vsc-extension-quickstart.md
agents.md
Expand Down
14 changes: 0 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
## [0.0.50] - 2026-01-08

## Summary

This release contains documentation improvements to the release notes generation process.

## Improvements

- Enhanced the release notes generation workflow instructions to provide clearer guidance on analyzing code changes and managing context window limitations

---

*No breaking changes in this release.*

## [0.0.49] - 2026-01-07

# Release 0.0.49
Expand Down
Loading
Loading