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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ memory/

# macOS
.DS_Store

out-test/

# Test fixtures hold graphs on purpose (the rule above is for real build output).
!/test/fixtures/**/.fallout/temp/
10 changes: 10 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from '@vscode/test-cli';

// Extension-host tests: launches a real VS Code on the fixture workspace.
// Compiled tests live in out-test/ (see tsconfig.test.json).
export default defineConfig({
files: 'out-test/test/integration/**/*.test.js',
workspaceFolder: './test/fixtures/workspace',
launchArgs: ['--disable-extensions'],
mocha: { ui: 'tdd', timeout: 30000 },
});
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
.claude/**
src/**
out/**/*.map
out-test/**
test/**
.vscode-test.mjs
tsconfig.test.json
**/*.ts
tsconfig.json
.gitignore
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The repo holds three things, and they are easy to confuse:
- **Extension:** TypeScript 5.9 → `tsc` → `out/`. `strict: true`, CommonJS, ES2022. VS Code engine `^1.85.0`. One runtime dependency: `mermaid`.
- **Build:** .NET SDK pinned in `global.json` (`10.0.100`, `rollForward: latestMinor`); Fallout 10.4.0 as the `fallout.globaltool` (`.config/dotnet-tools.json`) and the `Fallout.Common` package reference.
- `nuget.config` clears sources and pins nuget.org only, so a machine-level feed can't shadow the pinned Fallout packages.
- **There is no test suite** — no test runner, no `npm test`, no `.vscode-test` harness. Verification is `tsc` plus running the extension (F5) or sideloading the packed `.vsix`. Don't invent a test command; if you add a framework, that's a deliberate decision to raise.
- **Tests are two layers** (`npm test` runs both; details in [CONTRIBUTING.md](CONTRIBUTING.md#tests)). **Unit** (`npm run test:unit`, `node:test`, plain Node, ~1s) covers `src/graph.ts`, the vscode-free logic that `src/model.ts` re-exports — keep new logic there, not behind a `vscode` import, so it stays testable. **Extension-host** (`npm run test:integration`, `@vscode/test-cli`) launches a real VS Code on `test/fixtures/workspace` and drives the registered commands; it downloads VS Code on first run and opens a window briefly. Neither runs in CI yet, and the graph webview has no test ([#37](https://github.com/Fallout-build/Fallout.Extensions.VSCode/issues/37)).

## Common commands

Expand Down
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Contributions are welcome. As a community, we want to help each other, provide c
- Branch from `develop`. Name it `feature/<slug>`, `bugfix/<slug>`, `chore/<slug>`, or `docs/<slug>`.
- Make sure your employer allows the contribution.
- Build it the way CI does: `./build.sh PackVsix` (or `./build.ps1 PackVsix` on Windows). The bootstrappers are thin — they provision .NET if needed, run `dotnet tool restore`, then `dotnet fallout "$@"`. The `fallout.globaltool` version is pinned in `.config/dotnet-tools.json`.
- **There is no test suite** — no test runner, no `npm test`, no `.vscode-test` harness. Verification is `tsc` clean plus actually running the extension: F5 in VS Code for an Extension Development Host, or sideload the packed `.vsix`. Say in the PR how you verified. Introducing a test framework is a deliberate decision — raise it as an issue first rather than bundling it into an unrelated PR.
- **Not running `npm test`** — it must pass, and new logic should come with a test (see [Tests](#tests)). Anything the tests can't reach (the graph webview, terminal runs) still needs F5 in an Extension Development Host or a sideloaded `.vsix`; say in the PR how you verified.

### When writing the PR

Expand Down Expand Up @@ -69,6 +69,19 @@ Merge commits are disabled and linear history is enforced on every protected bra

GitHub can't enforce a method per branch, so this is discipline rather than configuration. Both buttons stay enabled because both are correct somewhere. Reasoning, and why rebasing across two long-lived branches is safe here, in [docs/branching-and-release.md](docs/branching-and-release.md#merging).

## Tests

```bash
npm test # unit + extension-host
npm run test:unit # node:test, plain Node, ~1s
npm run test:integration # real VS Code (downloaded to .vscode-test/ on first run)
```

- **Unit** (`test/unit`) covers `src/graph.ts`: graph parsing, discovery, compatibility checks, Mermaid output. Code that must be unit-testable cannot import `vscode` — put it in `graph.ts`; `model.ts` re-exports it.
- **Extension-host** (`test/integration`) activates the extension on `test/fixtures/workspace` and runs the commands for real. It briefly opens a VS Code window.
- Fixtures live in `test/fixtures/`. They are not compiled and not shipped (`.vscodeignore`).
- Not covered yet: the graph webview ([#37](https://github.com/Fallout-build/Fallout.Extensions.VSCode/issues/37)). CI does not run the tests yet.

## Releases

Maintainer-driven; contributors don't usually need any of this.
Expand Down
2 changes: 1 addition & 1 deletion docs/issue-and-pr-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Lead with a one-line summary, then short "what changed" bullets. Link the issue
- **Functional titles, no conventional-commit prefixes.** Not `feat:`/`fix:`/`chore:`. Good: "Jump to the declaring type when several components declare a target".
- **One category label**: `enhancement`, `bug`, `breaking-change`, `security`, `documentation`, `dependencies` — or `skip-changelog` for housekeeping.
- **Breaking change** here means removing or renaming a command ID, setting, or view ID; dropping support for a VS Code or Fallout version; or changing the `build-graph.json` contract. Label it and add a `⚠️ Breaking change` callout.
- Say how you verified. There is no test suite, so "compiles" is not verification — name what you ran in the Extension Development Host.
- Say how you verified. "Compiles" is not verification — say that `npm test` passes, and name what you ran in the Extension Development Host for anything the tests don't reach (the graph webview, terminal runs).

## Commit messages

Expand Down
Loading
Loading