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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ Pre-1.0 releases followed it in spirit; their breaking changes are marked **Brea
`PreflightError` is exported from the root, so the error can be recognised
with `instanceof` rather than by its name.

- **A command-line tool: `vscode-ext-kit plan`.** It reads the plan an
extension compiles at import time and prints it — as the JSON `describePlan`
returns, as a Mermaid or Graphviz graph of modules, services and the edges
between them, or, with `--check`, as an exit code and the list of problems
preflight found. The entry module is evaluated with a stand-in for `vscode`,
which only exists inside an extension host; that works because nothing in
this package touches VS Code before `activate`, and it holds an extension's
module-scope code to the rule the framework already asks of it. The tool
lives in `bin/` and is exercised by `verify:package` against the installed
tarball, not just the repository's own layout.

### Changed

- **`defineExtension` is single-use, like the extension host it serves.** A
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ has stopped being obvious._
- [Quick Start](#quick-start)
- [Why vscode-ext-kit](#why-vscode-ext-kit)
- [Usage](#usage)
- [Command Line](#command-line)
- [What Is Guaranteed](#what-is-guaranteed)
- [Known Limitations](#known-limitations)
- [How It Works](#how-it-works)
Expand Down Expand Up @@ -261,6 +262,27 @@ generated API reference is not built yet.

---

## Command Line

The package ships one command. It reads the plan an extension compiles at
import time and prints it, so what the extension registers can be reviewed,
diffed and drawn without starting VS Code.

```bash
npx vscode-ext-kit plan ./out/extension.js # the plan as JSON
npx vscode-ext-kit plan ./out/extension.js --format mermaid # modules, services and their edges
npx vscode-ext-kit plan ./out/extension.js --check # exit 1 with every problem preflight found
```

The entry module is evaluated with a stand-in for `vscode`, which only exists
inside an extension host. That works because nothing in this package touches
VS Code before `activate` — and it means module-scope code in the extension
must not either, which the framework already asks for. Export the
`defineExtension` result as `app` (or name the export with `--export`); the
JSON is what `describePlan` returns.

---

## What Is Guaranteed

- `stop()` runs exactly once, and only after `start()` completed or failed
Expand Down
Loading