From 8d1066c5a53e24a41dd190c7e86d0983479d0a58 Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Wed, 27 May 2026 20:07:32 +1000 Subject: [PATCH 1/5] docs: marketplace-ready README, CHANGELOG, and package metadata - Restructure README: install instructions, motivation, troubleshooting, and issues sections. Existing command tables and quick visual reference are preserved. - Add CHANGELOG.md so the Marketplace 'Changelog' tab populates. - package.json: * Add bugs.url and homepage so Marketplace links resolve. * Add categories 'Other' alongside 'SCM Providers' (Diffy consumes the SCM API; 'Other' is the closer fit). * Add keywords for Marketplace search. * Add galleryBanner so the listing isn't a default-gray header. - release.yml: harden the publish step with bash strict mode, a zero-VSIX guard, and a sorted array passed as positional args to vsce publish instead of unquoted command substitution. --- .github/workflows/release.yml | 12 +++- CHANGELOG.md | 35 ++++++++++ README.md | 124 ++++++++++++++++++++-------------- package.json | 20 ++++++ 4 files changed, 141 insertions(+), 50 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 882f1b6..b70c7e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,7 +178,17 @@ jobs: node-version: '22.x' # Publish all platform-specific VSIX files in a single vsce invocation. + # `--packagePath` accepts multiple paths as positional args after the flag. - name: Publish to Marketplace - run: npx vsce publish --packagePath $(find artifacts -name '*.vsix') + shell: bash + run: | + set -euo pipefail + mapfile -t vsixes < <(find artifacts -name '*.vsix' | sort) + if [ "${#vsixes[@]}" -eq 0 ]; then + echo "no VSIX artifacts found in artifacts/" >&2 + exit 1 + fi + printf ' publishing %s\n' "${vsixes[@]}" + npx vsce publish --packagePath "${vsixes[@]}" env: VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d99362e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +# Changelog + +All notable changes to **Diffy** are documented here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and Diffy adheres to +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.0] — Unreleased + +Initial release. + +### Added + +- **Diffy: Compare with…** (`diffy.compareWith`) on right-click of a commit in + the SCM History view. Side B is selected from a QuickPick: Working Copy, + Index, another commit, or a branch/tag. +- **Diffy: Compare with Working Copy** (`diffy.compareWithWorkingCopy`) on + right-click of a commit. Skips the Side B prompt. +- **Diffy: Compare with Previous** (`diffy.compareWithPrevious`) on right-click + of a commit. Diffs against the commit's first parent. +- **Diffy: Compare with Commit…** (`diffy.compareFileWithCommit`) on right-click + of a changed file in SCM Changes, an editor tab, or the File Explorer. Opens a + single-file diff against the chosen commit. +- **Diffy: Compare Two Commits** (`diffy.compareTwoCommits`) in the Command + Palette. Full QuickPick chain: repo → Side A commit → Side B → files. +- **Diffy: Reopen Last Comparison** (`diffy.reopenLast`) reopens the file picker + for the most recent A↔B comparison (stored per workspace). +- **Diffy: Show Logs** (`diffy.showLogs`, hidden from the palette) surfaces the + Diffy OutputChannel. +- Multi-step QuickPick that stays open after each file is opened, so a single + comparison can drive many diffs in a row. +- Human-first diff tab titles: `${shortShaA} ↔ ${shortShaB} — ${basename}` or + `${shortSha} ↔ Working Copy — ${basename}`. +- Structured logging (pino) to a state-folder file and the Diffy OutputChannel. + +[0.1.0]: https://github.com/MelbourneDeveloper/Diffy/releases/tag/v0.1.0 diff --git a/README.md b/README.md index 80ca8c0..10bebcd 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,81 @@ # Diffy -Pick two things and diff them — context-menu git diffing in VSCode. +**Pick two things and diff them.** Context-menu git diffing for VS Code — no panels, no sidebars, no activity-bar icons. Just the menus that are already there. -Diffy adds **no panels, no sidebars, no activity-bar icons**. Every feature hangs off the menus VSCode already has (SCM history, SCM changes, editor tab, file explorer) and a handful of palette commands. Pick a commit on the left, pick anything (another commit, a branch/tag, the index, the working copy) on the right, then drill through changed files with a QuickPick that stays open for as long as you need it. +> Right-click a commit. Pick what to compare it against (another commit, a branch, a tag, the index, the working copy). Walk through the changed files in a QuickPick that stays open. That's the whole product. --- -## How to access every command +## Install -There are **seven** commands. Three are reachable from the Command Palette, four are reachable only from a right-click menu (because they need a target — a commit, a file — that the menu provides). +- **VS Code**: search _Diffy_ in the Extensions view, or +- **Command line**: `code --install-extension nimblesite.diffy` +- **Marketplace**: https://marketplace.visualstudio.com/items?itemName=nimblesite.diffy + +Diffy depends on the built-in **Git** extension and needs `git` on `PATH`. + +--- + +## Why Diffy? + +VS Code's built-in "Open Changes" only diffs a file against its parent commit. To compare _anything else_ — a commit against a branch tip, your working copy against three commits back, a single file across two arbitrary refs — you end up in `git diff` on the terminal or installing a heavy "git client" extension. + +Diffy fills exactly that gap with the smallest possible surface area: + +- **No new UI.** Every entry point hangs off menus VS Code already shows (SCM history, SCM resource state, editor tab, file explorer) plus a few palette commands. +- **No custom renderer.** Diffs open in `vscode.diff` — the same native diff editor as everything else. +- **One QuickPick per flow.** Browsing many changed files is a list, not a panel. The picker stays open after each diff so you can fly through a review. +- **Pure shells out to `git`.** No libgit2, no native binaries, no surprises about what's being compared. + +--- + +## At a glance + +``` +Source Control (Ctrl/Cmd+Shift+G) +└── History + └── + ├── Diffy: Compare with… ← pick anything for Side B + ├── Diffy: Compare with Working Copy ← Side B = on-disk + └── Diffy: Compare with Previous ← Side B = parent commit + +Source Control → Changes / Staged Changes / Merge Changes +└── + └── Diffy: Compare with Commit… ← pick commit; diff vs working copy + +Editor tab (right-click) ──┐ +File Explorer (right-click file) ──┼──► Diffy: Compare with Commit… + └── (uses that file as the target) + +Command Palette (Ctrl/Cmd+Shift+P) +├── Diffy: Compare Two Commits +├── Diffy: Compare with Commit… ← uses focused editor's file +└── Diffy: Reopen Last Comparison +``` + +Diff tabs are titled human-first, e.g. `a1b2c3d ↔ Working Copy — src/foo.ts` or `a1b2c3d ↔ 9f8e7d6 — src/foo.ts`. No internal labels, no debug strings. + +--- + +## Every command + +There are **seven** commands. Three are reachable from the Command Palette; four are reachable only from a right-click menu (they need a target — a commit, a file — that the menu provides). ### From the SCM **History view** (right-click a commit) -Open the **Source Control** view (Ctrl/Cmd+Shift+G), expand a repository's **History** section, and **right-click any commit**. Three Diffy entries appear: +Open **Source Control** (Ctrl/Cmd+Shift+G), expand a repository's **History** section, and right-click any commit: | Menu label | Command ID | What it does | | ------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Diffy: Compare with…** | `diffy.compareWith` | The right-clicked commit is Side A. A QuickPick asks what Side B is: **Working Copy**, **Index**, **Pick a commit…**, or **Pick a branch or tag…**. Then a file QuickPick lists every changed file; selecting one opens `vscode.diff`. The picker stays open so you can open many files in a row. | | **Diffy: Compare with Working Copy** | `diffy.compareWithWorkingCopy` | Same as above, but Side B is hardcoded to your on-disk working copy. Skips the Side B prompt. | -| **Diffy: Compare with Previous** | `diffy.compareWithPrevious` | Side A is the right-clicked commit, Side B is its first parent (`^1`). Use this for a classic "what changed in this commit?" view. | +| **Diffy: Compare with Previous** | `diffy.compareWithPrevious` | Side A is the right-clicked commit, Side B is its first parent (`^1`). Classic "what changed in this commit?" view. | > These three are intentionally **hidden from the Command Palette** — they only make sense when invoked against a specific commit, which the right-click target provides. ### From the SCM **Changes** view (right-click a changed file) -In the Source Control view, **right-click any file** under **Changes**, **Staged Changes**, or **Merge Changes**: +Right-click any file under **Changes**, **Staged Changes**, or **Merge Changes**: | Menu label | Command ID | What it does | | ------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------- | @@ -32,15 +83,11 @@ In the Source Control view, **right-click any file** under **Changes**, **Staged ### From the **editor tab title** (right-click the file's tab) -**Right-click the tab** of any open text file: - | Menu label | Command ID | What it does | | ------------------------------- | ----------------------------- | -------------------------------------------------------------------------- | -| **Diffy: Compare with Commit…** | `diffy.compareFileWithCommit` | Same as above, but the target file is the one whose tab you right-clicked. | - -### From the **File Explorer** (right-click a file in the tree) +| **Diffy: Compare with Commit…** | `diffy.compareFileWithCommit` | Same as above; the target is the file whose tab you right-clicked. | -**Right-click any file** (not a folder) in the Explorer: +### From the **File Explorer** (right-click a file) | Menu label | Command ID | What it does | | ------------------------------- | ----------------------------- | ------------------------------------------------------------ | @@ -48,7 +95,7 @@ In the Source Control view, **right-click any file** under **Changes**, **Staged ### From the **Command Palette** (Ctrl/Cmd+Shift+P) -Type `Diffy:` to filter. Three entries are listed: +Type `Diffy:` to filter. Three entries appear: | Palette label | Command ID | What it does | | --------------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -56,33 +103,7 @@ Type `Diffy:` to filter. Three entries are listed: | **Diffy: Compare with Commit…** | `diffy.compareFileWithCommit` | Uses the **currently focused editor's file** as the target. Same flow as the right-click version. If no editor is focused, Diffy will tell you to open a file first. | | **Diffy: Reopen Last Comparison** | `diffy.reopenLast` | Reopens the file picker for the last A↔B comparison you made (stored per-workspace). Handy after closing the picker mid-review. | -> **`Diffy: Show Logs`** (`diffy.showLogs`) exists but is hidden from the palette; it's reserved for the extension to surface its OutputChannel programmatically. Open it manually via **View → Output → "Diffy"**. - ---- - -## Quick visual reference - -``` -Source Control (Ctrl/Cmd+Shift+G) -└── History - └── - ├── Diffy: Compare with… ← pick anything for Side B - ├── Diffy: Compare with Working Copy ← Side B = on-disk - └── Diffy: Compare with Previous ← Side B = parent commit - -Source Control → Changes / Staged Changes -└── - └── Diffy: Compare with Commit… ← pick commit; diff vs working copy - -Editor tab (right-click) ──┐ -File Explorer (right-click file) ──┼──► Diffy: Compare with Commit… - └── (uses that file as the target) - -Command Palette (Ctrl/Cmd+Shift+P) -├── Diffy: Compare Two Commits -├── Diffy: Compare with Commit… ← uses focused editor's file -└── Diffy: Reopen Last Comparison -``` +> **`Diffy: Show Logs`** (`diffy.showLogs`) exists but is hidden from the palette — it's reserved for the extension to surface its OutputChannel programmatically. Open it manually via **View → Output → "Diffy"**. --- @@ -95,20 +116,25 @@ Whenever Diffy asks you to pick Side B, you get four choices: - **Pick a commit…** — choose from a QuickPick of recent log entries. - **Pick a branch or tag…** — choose from all refs; resolved to its tip commit. -## Diff titles - -Tabs that Diffy opens are titled human-first, e.g. `a1b2c3d ↔ Working Copy — src/foo.ts` or `a1b2c3d ↔ 9f8e7d6 — src/foo.ts`. No internal labels, no debug strings. +--- ## Requirements -- VSCode `^1.85.0` -- Node `>=20` (for local development) -- Git on `PATH` +- VS Code **^1.85.0** +- **Git** on `PATH` - The built-in **Git** extension (Diffy depends on it via `extensionDependencies`) -## Development +## Troubleshooting -Standard make targets: +- **"No git repository found"** — Diffy uses the built-in Git extension's repo list. If VS Code doesn't see your repo, neither will Diffy. Open the Source Control view and confirm the repo appears there. +- **Diffy menus don't appear in the SCM History view** — make sure the workspace has commits and that you're right-clicking inside the **History** section (not Changes). +- **Anything else** — `View → Output → "Diffy"` shows structured logs for every operation. Or run **Diffy: Show Logs** to focus the channel. + +## Issues & contributions + +Bugs, feature requests, and PRs welcome at https://github.com/MelbourneDeveloper/Diffy/issues. + +## Development ```sh make setup # install deps diff --git a/package.json b/package.json index 35fbf66..f080c5d 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,34 @@ "type": "git", "url": "https://github.com/MelbourneDeveloper/Diffy.git" }, + "bugs": { + "url": "https://github.com/MelbourneDeveloper/Diffy/issues" + }, + "homepage": "https://github.com/MelbourneDeveloper/Diffy#readme", "main": "./out/extension.js", "engines": { "vscode": "^1.85.0", "node": ">=20" }, "categories": [ + "Other", "SCM Providers" ], + "keywords": [ + "git", + "diff", + "compare", + "commits", + "branches", + "tags", + "working copy", + "history", + "scm" + ], + "galleryBanner": { + "color": "#1e1e1e", + "theme": "dark" + }, "activationEvents": [ "onStartupFinished" ], From c088e060f502688fac2ea113fe8c3e36898b5abd Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Thu, 28 May 2026 20:08:31 +1000 Subject: [PATCH 2/5] fix: stop tracking generated E2E fixture (was an accidental gitlink) test-fixtures/repo-seed/workspace is a throwaway repo built by seed.sh. It had been staged as a phantom submodule (mode 160000, no .gitmodules), which left the working tree perpetually dirty as tests re-seeded it. Drop the gitlink and ignore the directory. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e437c3c..8ea8f70 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,6 @@ build/ # Shipwright SWR-VERSION-BUILD-STAMPING — release-time artifact, never committed build-info.json + +# E2E fixture — script-built throwaway repo, regenerated by seed.sh (never commit) +test-fixtures/repo-seed/workspace/ From 27c727bd99c676bd43f13e5d87c188ff85beafc8 Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Thu, 28 May 2026 20:13:59 +1000 Subject: [PATCH 3/5] release stuff --- .github/workflows/release.yml | 79 +++++++++++++++-------------------- README.md | 14 ------- shipwright.json | 4 +- 3 files changed, 35 insertions(+), 62 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b70c7e7..23f2d56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,31 +79,9 @@ jobs: run: node scripts/stamp-release-version.mjs "${{ needs.version.outputs.version }}" --dry build-vsix: - name: Build VSIX (${{ matrix.artifact_name }}) + name: Build universal VSIX needs: [version, ci-gate, validate-manifest] - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - vsce_target: linux-x64 - artifact_name: linux-x64 - - os: ubuntu-latest - vsce_target: linux-arm64 - artifact_name: linux-arm64 - - os: macos-latest - vsce_target: darwin-x64 - artifact_name: darwin-x64 - - os: macos-latest - vsce_target: darwin-arm64 - artifact_name: darwin-arm64 - - os: windows-latest - vsce_target: win32-x64 - artifact_name: win32-x64 - - os: windows-latest - vsce_target: win32-arm64 - artifact_name: win32-arm64 - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest timeout-minutes: 15 steps: - uses: actions/checkout@v4 @@ -128,18 +106,19 @@ jobs: - name: Build run: npm run build - - name: Package VSIX - run: npx vsce package --target ${{ matrix.vsce_target }} --out diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix + # Pure-TS extension: no native binaries, so one platform-agnostic VSIX + # serves every OS/arch. No --target. + - name: Package universal VSIX + run: npx vsce package --out diffy-${{ needs.version.outputs.version }}.vsix - name: Verify VSIX bundles shipwright.json - shell: bash - run: unzip -l diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix | grep -F "extension/shipwright.json" + run: unzip -l diffy-${{ needs.version.outputs.version }}.vsix | grep -F "extension/shipwright.json" - name: Upload VSIX uses: actions/upload-artifact@v4 with: - name: vsix-${{ matrix.artifact_name }} - path: diffy-${{ needs.version.outputs.version }}-${{ matrix.vsce_target }}.vsix + name: vsix + path: diffy-${{ needs.version.outputs.version }}.vsix release: name: Create release @@ -147,17 +126,15 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.version.outputs.source_sha }} - uses: actions/download-artifact@v4 with: + name: vsix path: artifacts/ - name: Create GitHub release uses: softprops/action-gh-release@v2 with: - files: artifacts/**/*.vsix + files: artifacts/*.vsix generate_release_notes: true publish: @@ -169,26 +146,36 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ needs.version.outputs.source_sha }} - - uses: actions/download-artifact@v4 - with: - path: artifacts/ - uses: actions/setup-node@v4 with: node-version: '22.x' + cache: 'npm' + + # npm ci so `vsce` resolves to the pinned @vscode/vsce devDependency. + - name: Install dependencies + run: npm ci + + - name: Download VSIX + uses: actions/download-artifact@v4 + with: + name: vsix + path: artifacts/ - # Publish all platform-specific VSIX files in a single vsce invocation. - # `--packagePath` accepts multiple paths as positional args after the flag. - name: Publish to Marketplace shell: bash + env: + VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }} run: | set -euo pipefail - mapfile -t vsixes < <(find artifacts -name '*.vsix' | sort) - if [ "${#vsixes[@]}" -eq 0 ]; then - echo "no VSIX artifacts found in artifacts/" >&2 + if [ -z "${VSCE_PAT:-}" ]; then + echo "::error::VSCODE_MARKETPLACE_PAT not accessible. If it exists at the Nimblesite org level, add Diffy to its allowed repositories under Org Settings → Secrets and variables → Actions." exit 1 fi - printf ' publishing %s\n' "${vsixes[@]}" - npx vsce publish --packagePath "${vsixes[@]}" - env: - VSCE_PAT: ${{ secrets.VSCE_PAT }} + vsix="$(find artifacts -name '*.vsix' | head -n1)" + if [ -z "$vsix" ]; then + echo "::error::no VSIX artifact found in artifacts/" + exit 1 + fi + echo "publishing $vsix" + npx vsce publish --packagePath "$vsix" diff --git a/README.md b/README.md index 10bebcd..0159be0 100644 --- a/README.md +++ b/README.md @@ -134,20 +134,6 @@ Whenever Diffy asks you to pick Side B, you get four choices: Bugs, feature requests, and PRs welcome at https://github.com/MelbourneDeveloper/Diffy/issues. -## Development - -```sh -make setup # install deps -make build # tsc -make test # fail-fast unit + e2e, enforces coverage threshold -make lint -make fmt -make ci # what CI runs -make package # build .vsix -``` - -See [CLAUDE.md](CLAUDE.md) for the full architecture and contributor rules. - ## License MIT diff --git a/shipwright.json b/shipwright.json index f570463..644754b 100644 --- a/shipwright.json +++ b/shipwright.json @@ -13,12 +13,12 @@ "kind": "extension-vscode", "language": "typescript", "expectedVersion": "${PRODUCT_VERSION}", - "platforms": ["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64", "win32-arm64", "win32-x64"] + "platforms": ["all"] } ], "hosts": { "vscode": { - "artifact": "vsix-per-platform", + "artifact": "vsix-fat", "onMismatch": "error" } } From 226321f3ac1325a3482a6154f81ba5684b1679ed Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Thu, 28 May 2026 20:18:16 +1000 Subject: [PATCH 4/5] stuff --- .github/workflows/release.yml | 171 +++++----------------------------- README.md | 4 +- 2 files changed, 25 insertions(+), 150 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23f2d56..6e5216f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,7 @@ # agent-pmo:74cf183 -# Shipwright SWR-REL-* release pipeline for Diffy. -# -# 1. version — derive semver from the v* tag, capture source SHA -# 2. ci-gate — run `make ci` on the tagged commit; publish is blocked unless this passes -# 3. validate-manifest — schema-check shipwright.json before any artifact is built -# 4. build-vsix matrix — stamp the runner working tree, verify, build, package per platform -# 5. release — assemble the GitHub Release with every VSIX -# 6. publish — push every VSIX to the VS Code Marketplace in one vsce call -# -# Source-controlled versions are never mutated. Stamping happens in the runner -# working tree only, per SWR-VERSION-BUILD-STAMPING. +# Release Diffy on a v* tag: build → package one universal VSIX → publish to the +# VS Code Marketplace → attach it to the GitHub release. One sequential job. +# Pure-TS extension (no native binaries) → a single platform-agnostic VSIX. name: Release @@ -22,73 +14,13 @@ permissions: contents: write jobs: - version: - name: Extract release version - runs-on: ubuntu-latest - timeout-minutes: 5 - outputs: - version: ${{ steps.extract.outputs.version }} - source_sha: ${{ steps.extract.outputs.source_sha }} - steps: - - name: Extract version from tag - id: extract - run: | - echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" - echo "source_sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT" - - ci-gate: - name: CI gate (make ci) - needs: version - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.version.outputs.source_sha }} - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - cache: 'npm' - - run: npm ci - - name: Format check - run: make fmt CHECK=1 - - name: Lint (includes shipwright.json schema check) - run: make lint - - name: Test (xvfb for @vscode/test-electron) - run: xvfb-run -a make test - - name: Build - run: make build - - validate-manifest: - name: Validate shipwright.json - needs: version - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.version.outputs.source_sha }} - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - cache: 'npm' - - run: npm ci - - name: Validate shipwright.json against schema - run: npm run shipwright:validate - - name: Dry-run stamp (proves the script runs against this tag) - run: node scripts/stamp-release-version.mjs "${{ needs.version.outputs.version }}" --dry - - build-vsix: - name: Build universal VSIX - needs: [version, ci-gate, validate-manifest] + release: + name: Package and publish runs-on: ubuntu-latest timeout-minutes: 15 steps: - uses: actions/checkout@v4 - with: - ref: ${{ needs.version.outputs.source_sha }} - # VSIX packaging requires Node 22.x per [CI-VSIX-PLATFORM]. - uses: actions/setup-node@v4 with: node-version: '22.x' @@ -97,85 +29,28 @@ jobs: - name: Install dependencies run: npm ci - - name: Stamp release version (runner tree only) - run: node scripts/stamp-release-version.mjs "${{ needs.version.outputs.version }}" - - - name: Verify every version carrier - run: node scripts/verify-versions.mjs "${{ needs.version.outputs.version }}" - - - name: Build - run: npm run build - - # Pure-TS extension: no native binaries, so one platform-agnostic VSIX - # serves every OS/arch. No --target. - - name: Package universal VSIX - run: npx vsce package --out diffy-${{ needs.version.outputs.version }}.vsix - - - name: Verify VSIX bundles shipwright.json - run: unzip -l diffy-${{ needs.version.outputs.version }}.vsix | grep -F "extension/shipwright.json" - - - name: Upload VSIX - uses: actions/upload-artifact@v4 - with: - name: vsix - path: diffy-${{ needs.version.outputs.version }}.vsix + - name: Set version from tag + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV" - release: - name: Create release - needs: [version, build-vsix] - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/download-artifact@v4 - with: - name: vsix - path: artifacts/ - - - name: Create GitHub release - uses: softprops/action-gh-release@v2 - with: - files: artifacts/*.vsix - generate_release_notes: true - - publish: - name: Publish to VS Code Marketplace - needs: [version, release] - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.version.outputs.source_sha }} - - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - cache: 'npm' - - # npm ci so `vsce` resolves to the pinned @vscode/vsce devDependency. - - name: Install dependencies - run: npm ci - - - name: Download VSIX - uses: actions/download-artifact@v4 - with: - name: vsix - path: artifacts/ + - name: Build and package universal VSIX + run: | + npm version "$VERSION" --no-git-tag-version --allow-same-version + npm run build + npx vsce package --out "diffy-$VERSION.vsix" - - name: Publish to Marketplace - shell: bash + - name: Publish to VS Code Marketplace env: VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }} run: | - set -euo pipefail - if [ -z "${VSCE_PAT:-}" ]; then - echo "::error::VSCODE_MARKETPLACE_PAT not accessible. If it exists at the Nimblesite org level, add Diffy to its allowed repositories under Org Settings → Secrets and variables → Actions." - exit 1 - fi - vsix="$(find artifacts -name '*.vsix' | head -n1)" - if [ -z "$vsix" ]; then - echo "::error::no VSIX artifact found in artifacts/" + if [ -z "$VSCE_PAT" ]; then + echo "::error::VSCODE_MARKETPLACE_PAT not accessible. Add Diffy to the secret's allowed repositories under Org Settings → Secrets and variables → Actions." exit 1 fi - echo "publishing $vsix" - npx vsce publish --packagePath "$vsix" + npx vsce publish --packagePath "diffy-$VERSION.vsix" + + - name: Attach VSIX to GitHub release + uses: softprops/action-gh-release@v2 + with: + files: diffy-*.vsix + generate_release_notes: true + prerelease: ${{ contains(github.ref_name, '-') }} diff --git a/README.md b/README.md index 0159be0..0922b59 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@ Right-click any file under **Changes**, **Staged Changes**, or **Merge Changes** ### From the **editor tab title** (right-click the file's tab) -| Menu label | Command ID | What it does | -| ------------------------------- | ----------------------------- | -------------------------------------------------------------------------- | +| Menu label | Command ID | What it does | +| ------------------------------- | ----------------------------- | ------------------------------------------------------------------ | | **Diffy: Compare with Commit…** | `diffy.compareFileWithCommit` | Same as above; the target is the file whose tab you right-clicked. | ### From the **File Explorer** (right-click a file) From 20772127a9f67d55f3021ccead18a93052bf3f71 Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Thu, 28 May 2026 20:22:01 +1000 Subject: [PATCH 5/5] Release stuff --- CLAUDE.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4ea4630..cc94339 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,16 +2,16 @@ -⚠️ KILLING A VSCODE PROCESS — EVEN IN THE BROWSER — WILL BE MET WITH INSTANT, EXTREME VIOLENCE! +⚠️ DO NOT KILL VSCODE PROCESSES ⚠️ -> ⚠️ **TOKEN DISCIPLINE.** Check file size first. `Grep` over `Read`. Use `offset`/`limit`. -> Smallest diff that solves the problem. Delete dead code, unused imports, stale comments. -> Call out irrelevant context before proceeding. Bloat degrades reasoning. ⚠️ +⚠️ **TOKEN DISCIPLINE.** Check file size first. `Grep` over `Read`. Use `offset`/`limit`. +Smallest diff that solves the problem. Delete dead code, unused imports, stale comments. +Call out irrelevant context before proceeding. Bloat degrades reasoning. ⚠️ -> ⚠️ **CRITICAL: THIS CODEBASE RECEIVES A GRADE OF A+.** WE DON'T ALLOW BAD CODE. NOT EVEN FOR ONE LINE. CODE MUST PASS REVIEW AT Google / Meta / Microsoft. ANYTHING LESS IS ⛔️ ILLEGAL AND MUST BE FIXED IMMEDIATELY. +⚠️ **CRITICAL: THIS CODEBASE RECEIVES A GRADE OF A+.** WE DON'T ALLOW BAD CODE. NOT EVEN FOR ONE LINE. CODE MUST PASS REVIEW AT Google / Meta / Microsoft. ANYTHING LESS IS ⛔️ ILLEGAL AND MUST BE FIXED IMMEDIATELY.⚠️ ⚠️ **NEW VIEWS, ACTIVITY-BAR ICONS, SIDEBARS, TREE PROVIDERS, OR WEBVIEWS ARE ⛔️ ILLEGAL.** -Diffy is **context-menu only**. Every feature hangs off VSCode's existing SCM history, SCM resource state, editor title, and explorer menus — plus a small set of palette commands. If a feature needs a new panel to exist, the feature is wrong. +Diffy is **context-menu only**. Every feature hangs off VSCode's existing SCM history, SCM resource state, editor title, and explorer menus — plus a small set of palette commands. If a feature needs a new panel to exist, the feature is wrong.⚠️ Full design + execution plan: [spec.md](spec.md).