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
4 changes: 3 additions & 1 deletion .devcontainer/arduino/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino",
"onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/arduino",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/cargo/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": ".devcontainer/cargo/setup.sh",
"onCreateCommand": ".devcontainer/cargo/setup.sh && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/cargo",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/cocoapods/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "gem install cocoapods --no-document && node scripts/prepare-demo.mjs cocoapods",
"onCreateCommand": "gem install cocoapods --no-document && node scripts/prepare-demo.mjs cocoapods && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/cocoapods",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/conan/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan",
"onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/conan",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/go/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs go",
"onCreateCommand": "node scripts/prepare-demo.mjs go && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/go",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"drift.analysis.includePatch": true,
"files.exclude": {
"demos/npm": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/hex/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
},
"ghcr.io/devcontainers/features/git:1": {}
},
"onCreateCommand": "node scripts/prepare-demo.mjs hex",
"onCreateCommand": "node scripts/prepare-demo.mjs hex && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/hex",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,6 +22,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/maven/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"installMaven": true
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs maven",
"onCreateCommand": "node scripts/prepare-demo.mjs maven && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/maven",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -24,6 +25,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/npm/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
{
"name": "Drift demo — JavaScript / TypeScript",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
"onCreateCommand": "node scripts/prepare-demo.mjs npm && npm --prefix demos/npm install --no-audit --no-fund",
"onCreateCommand": "node scripts/prepare-demo.mjs npm && npm --prefix demos/npm install --no-audit --no-fund && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/npm",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -15,6 +16,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/pypi": true,
"demos/go": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/nuget/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs nuget",
"onCreateCommand": "node scripts/prepare-demo.mjs nuget && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/nuget",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/opam/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs opam",
"onCreateCommand": "node scripts/prepare-demo.mjs opam && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/opam",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/packagist/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs packagist",
"onCreateCommand": "node scripts/prepare-demo.mjs packagist && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/packagist",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/pub/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
},
"ghcr.io/devcontainers/features/git:1": {}
},
"onCreateCommand": "node scripts/prepare-demo.mjs pub",
"onCreateCommand": "node scripts/prepare-demo.mjs pub && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/pub",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,6 +22,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/pypi/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs pypi",
"onCreateCommand": "node scripts/prepare-demo.mjs pypi && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/pypi",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/go": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/rubygems/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs rubygems",
"onCreateCommand": "node scripts/prepare-demo.mjs rubygems && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/rubygems",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/swift/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
},
"ghcr.io/devcontainers/features/git:1": {}
},
"onCreateCommand": "node scripts/prepare-demo.mjs swift",
"onCreateCommand": "node scripts/prepare-demo.mjs swift && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/swift",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,6 +22,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/vcpkg/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"version": "lts"
}
},
"onCreateCommand": "node scripts/prepare-demo.mjs vcpkg",
"onCreateCommand": "node scripts/prepare-demo.mjs vcpkg && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze --dir demos/vcpkg",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -20,6 +21,7 @@
"settings": {
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
"files.exclude": {
"demos/npm": true,
"demos/pypi": true,
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ several arguable ones.
Launching one requires a GitHub account and uses your own GitHub Codespaces
allowance.

> These are prepared fixtures. No demo has been smoke-tested in a real Codespace
> yet, and the `drift.drift` Marketplace install cannot be verified until the
> extension is published.
Each Codespace installs the `drift.drift` extension and the `@usedrift/cli`
command line, applies the upgrade, opens the Drift panel, and runs
`drift analyze` in a terminal — so both halves of Drift are already working when
the editor appears.

> These are prepared fixtures. They depend on `drift.drift` being published to
> the VS Code Marketplace and `@usedrift/cli` to npm; before that release lands,
> a Codespace comes up with the fixture correct and nothing to analyse it. No
> demo has been smoke-tested through a real Codespace yet.

## Layout

Expand Down
23 changes: 20 additions & 3 deletions demos/arduino/DEMO.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,29 @@ The 5 breaking changes in this demo:

## Try it

1. Open the Drift icon in the Activity Bar.
2. Look at what Drift found for `bblanchon/ArduinoJson`.
3. Open `src/main.cpp` and compare against the marked lines.
Both halves of Drift started on their own when this Codespace opened:

- the **panel** on the left, which analysed the change and lists what it found;
- the **terminal**, which ran `drift analyze --dir demos/arduino`.

From there:

1. Read what Drift found for `bblanchon/ArduinoJson` in the panel.
2. Open `src/main.cpp` and compare against the marked lines.
3. Click a finding to jump to the code it affects.

Nothing here is staged output — Drift is analysing an ordinary uncommitted
dependency change, and it has no idea this is a demo:

```sh
git status --short # only the manifest is modified; the source is untouched
```

Run it again yourself, or ask a different question:

```sh
drift analyze --dir demos/arduino
drift explain bblanchon/ArduinoJson --dir demos/arduino
```

Reset it with `node scripts/reset-demo.mjs arduino`.
23 changes: 20 additions & 3 deletions demos/cargo/DEMO.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,29 @@ The 5 breaking changes in this demo:

## Try it

1. Open the Drift icon in the Activity Bar.
2. Look at what Drift found for `clap`.
3. Open `src/main.rs` and compare against the marked lines.
Both halves of Drift started on their own when this Codespace opened:

- the **panel** on the left, which analysed the change and lists what it found;
- the **terminal**, which ran `drift analyze --dir demos/cargo`.

From there:

1. Read what Drift found for `clap` in the panel.
2. Open `src/main.rs` and compare against the marked lines.
3. Click a finding to jump to the code it affects.

Nothing here is staged output — Drift is analysing an ordinary uncommitted
dependency change, and it has no idea this is a demo:

```sh
git status --short # only the manifest is modified; the source is untouched
```

Run it again yourself, or ask a different question:

```sh
drift analyze --dir demos/cargo
drift explain clap --dir demos/cargo
```

Reset it with `node scripts/reset-demo.mjs cargo`.
Loading
Loading