diff --git a/.devcontainer/arduino/devcontainer.json b/.devcontainer/arduino/devcontainer.json index 9870bbc..edb9080 100644 --- a/.devcontainer/arduino/devcontainer.json +++ b/.devcontainer/arduino/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/arduino", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cargo/devcontainer.json b/.devcontainer/cargo/devcontainer.json index 348e0a2..2dfe1a7 100644 --- a/.devcontainer/cargo/devcontainer.json +++ b/.devcontainer/cargo/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": ".devcontainer/cargo/setup.sh && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/cargo", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cocoapods/devcontainer.json b/.devcontainer/cocoapods/devcontainer.json index e70479c..e5ea172 100644 --- a/.devcontainer/cocoapods/devcontainer.json +++ b/.devcontainer/cocoapods/devcontainer.json @@ -12,7 +12,7 @@ }, "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", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/conan/devcontainer.json b/.devcontainer/conan/devcontainer.json index 6b99934..6242d08 100644 --- a/.devcontainer/conan/devcontainer.json +++ b/.devcontainer/conan/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/conan", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/go/devcontainer.json b/.devcontainer/go/devcontainer.json index 2f18e0a..5695ae7 100644 --- a/.devcontainer/go/devcontainer.json +++ b/.devcontainer/go/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs go && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/go", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/hex/devcontainer.json b/.devcontainer/hex/devcontainer.json index 819469c..d214781 100644 --- a/.devcontainer/hex/devcontainer.json +++ b/.devcontainer/hex/devcontainer.json @@ -13,7 +13,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs hex && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/hex", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/maven/devcontainer.json b/.devcontainer/maven/devcontainer.json index 0d61c7e..b55382d 100644 --- a/.devcontainer/maven/devcontainer.json +++ b/.devcontainer/maven/devcontainer.json @@ -16,7 +16,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs maven && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/maven", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/npm/devcontainer.json b/.devcontainer/npm/devcontainer.json index c7ffefc..be6c26d 100644 --- a/.devcontainer/npm/devcontainer.json +++ b/.devcontainer/npm/devcontainer.json @@ -7,7 +7,7 @@ "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 && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/npm", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/nuget/devcontainer.json b/.devcontainer/nuget/devcontainer.json index 8e33b85..5c6e899 100644 --- a/.devcontainer/nuget/devcontainer.json +++ b/.devcontainer/nuget/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs nuget && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/nuget", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/opam/devcontainer.json b/.devcontainer/opam/devcontainer.json index 22a74b3..894cb09 100644 --- a/.devcontainer/opam/devcontainer.json +++ b/.devcontainer/opam/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs opam && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/opam", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/packagist/devcontainer.json b/.devcontainer/packagist/devcontainer.json index 1da7af9..81d0440 100644 --- a/.devcontainer/packagist/devcontainer.json +++ b/.devcontainer/packagist/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs packagist && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/packagist", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/pub/devcontainer.json b/.devcontainer/pub/devcontainer.json index d0a863b..215d23b 100644 --- a/.devcontainer/pub/devcontainer.json +++ b/.devcontainer/pub/devcontainer.json @@ -13,7 +13,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs pub && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/pub", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/pypi/devcontainer.json b/.devcontainer/pypi/devcontainer.json index 83e7ae5..65bc8d7 100644 --- a/.devcontainer/pypi/devcontainer.json +++ b/.devcontainer/pypi/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs pypi && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/pypi", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/rubygems/devcontainer.json b/.devcontainer/rubygems/devcontainer.json index 6f9718f..b2b79fe 100644 --- a/.devcontainer/rubygems/devcontainer.json +++ b/.devcontainer/rubygems/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs rubygems && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/rubygems", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/swift/devcontainer.json b/.devcontainer/swift/devcontainer.json index ca2d2d9..5123c0b 100644 --- a/.devcontainer/swift/devcontainer.json +++ b/.devcontainer/swift/devcontainer.json @@ -13,7 +13,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs swift && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/swift", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/vcpkg/devcontainer.json b/.devcontainer/vcpkg/devcontainer.json index 0246832..c2bd895 100644 --- a/.devcontainer/vcpkg/devcontainer.json +++ b/.devcontainer/vcpkg/devcontainer.json @@ -12,7 +12,7 @@ }, "onCreateCommand": "node scripts/prepare-demo.mjs vcpkg && npm install -g @usedrift/cli", "waitFor": "onCreateCommand", - "postAttachCommand": "drift analyze --dir demos/vcpkg", + "postAttachCommand": "drift analyze", "customizations": { "vscode": { "extensions": [ diff --git a/.gitignore b/.gitignore index 8f68c89..c04e8ef 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,20 @@ demos/**/obj/ demos/**/.gradle/ demos/**/vendor/ +# Lockfiles a demo's setup step writes. The demos pin exact versions in their +# manifests, so nothing is committed here — and an untracked lockfile would +# otherwise show up in the `git status` that DEMO.md points at to prove only +# the manifest changed. +demos/**/package-lock.json +demos/**/Cargo.lock +demos/**/Gemfile.lock +demos/**/composer.lock +demos/**/mix.lock +demos/**/pubspec.lock +demos/**/Package.resolved +demos/**/Podfile.lock +demos/**/packages.lock.json + # Go demo build binary demos/go/drift-demo-go diff --git a/demos/arduino/DEMO.md b/demos/arduino/DEMO.md index b5708b9..af7c92a 100644 --- a/demos/arduino/DEMO.md +++ b/demos/arduino/DEMO.md @@ -19,7 +19,8 @@ The 5 breaking changes in this demo: 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`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -37,8 +38,11 @@ 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 +drift analyze # what this upgrade breaks here +drift explain bblanchon/ArduinoJson ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs arduino`. diff --git a/demos/cargo/DEMO.md b/demos/cargo/DEMO.md index 88146d2..d2d804c 100644 --- a/demos/cargo/DEMO.md +++ b/demos/cargo/DEMO.md @@ -19,7 +19,8 @@ The 5 breaking changes in this demo: 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`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -37,8 +38,11 @@ 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 +drift analyze # what this upgrade breaks here +drift explain clap ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs cargo`. diff --git a/demos/cocoapods/DEMO.md b/demos/cocoapods/DEMO.md index d0d8599..10b9f18 100644 --- a/demos/cocoapods/DEMO.md +++ b/demos/cocoapods/DEMO.md @@ -19,7 +19,8 @@ The 5 breaking changes in this demo: 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/cocoapods`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -37,8 +38,11 @@ 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/cocoapods -drift explain Alamofire --dir demos/cocoapods +drift analyze # what this upgrade breaks here +drift explain Alamofire ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs cocoapods`. diff --git a/demos/conan/DEMO.md b/demos/conan/DEMO.md index 3349149..b06325e 100644 --- a/demos/conan/DEMO.md +++ b/demos/conan/DEMO.md @@ -15,7 +15,8 @@ The breaking change in this demo: 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/conan`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -33,8 +34,11 @@ 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/conan -drift explain fmt --dir demos/conan +drift analyze # what this upgrade breaks here +drift explain fmt ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs conan`. diff --git a/demos/go/DEMO.md b/demos/go/DEMO.md index 35fae3f..877b342 100644 --- a/demos/go/DEMO.md +++ b/demos/go/DEMO.md @@ -18,7 +18,8 @@ The 4 breaking changes in this demo: 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/go`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -36,8 +37,11 @@ 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/go -drift explain golang.org/x/exp --dir demos/go +drift analyze # what this upgrade breaks here +drift explain golang.org/x/exp ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs go`. diff --git a/demos/hex/DEMO.md b/demos/hex/DEMO.md index 075cc3d..fe6a30d 100644 --- a/demos/hex/DEMO.md +++ b/demos/hex/DEMO.md @@ -15,7 +15,8 @@ The breaking change in this demo: 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/hex`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -33,8 +34,11 @@ 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/hex -drift explain plug --dir demos/hex +drift analyze # what this upgrade breaks here +drift explain plug ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs hex`. diff --git a/demos/maven/DEMO.md b/demos/maven/DEMO.md index ec011f2..c393f3c 100644 --- a/demos/maven/DEMO.md +++ b/demos/maven/DEMO.md @@ -18,7 +18,8 @@ The 4 breaking changes in this demo: 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/maven`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -36,8 +37,11 @@ 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/maven -drift explain com.google.guava:guava --dir demos/maven +drift analyze # what this upgrade breaks here +drift explain com.google.guava:guava ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs maven`. diff --git a/demos/npm/DEMO.md b/demos/npm/DEMO.md index 79c33a1..30f2198 100644 --- a/demos/npm/DEMO.md +++ b/demos/npm/DEMO.md @@ -17,7 +17,8 @@ The 3 breaking changes in this demo: 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/npm`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -35,8 +36,11 @@ 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/npm -drift explain axios --dir demos/npm +drift analyze # what this upgrade breaks here +drift explain axios ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs npm`. diff --git a/demos/nuget/DEMO.md b/demos/nuget/DEMO.md index 092d2fc..6539f40 100644 --- a/demos/nuget/DEMO.md +++ b/demos/nuget/DEMO.md @@ -19,7 +19,8 @@ The 5 breaking changes in this demo: 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/nuget`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -37,8 +38,11 @@ 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/nuget -drift explain AutoMapper --dir demos/nuget +drift analyze # what this upgrade breaks here +drift explain AutoMapper ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs nuget`. diff --git a/demos/opam/DEMO.md b/demos/opam/DEMO.md index b4a9a37..822d7b1 100644 --- a/demos/opam/DEMO.md +++ b/demos/opam/DEMO.md @@ -15,7 +15,8 @@ The breaking change in this demo: 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/opam`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -33,8 +34,11 @@ 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/opam -drift explain lwt --dir demos/opam +drift analyze # what this upgrade breaks here +drift explain lwt ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs opam`. diff --git a/demos/packagist/DEMO.md b/demos/packagist/DEMO.md index 06f4025..a89eef4 100644 --- a/demos/packagist/DEMO.md +++ b/demos/packagist/DEMO.md @@ -16,7 +16,8 @@ The 2 breaking changes in this demo: 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/packagist`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -34,8 +35,11 @@ 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/packagist -drift explain monolog/monolog --dir demos/packagist +drift analyze # what this upgrade breaks here +drift explain monolog/monolog ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs packagist`. diff --git a/demos/pub/DEMO.md b/demos/pub/DEMO.md index 1a5f34b..070eb92 100644 --- a/demos/pub/DEMO.md +++ b/demos/pub/DEMO.md @@ -16,7 +16,8 @@ The 2 breaking changes in this demo: 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/pub`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -34,8 +35,11 @@ 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/pub -drift explain dio --dir demos/pub +drift analyze # what this upgrade breaks here +drift explain dio ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs pub`. diff --git a/demos/pypi/DEMO.md b/demos/pypi/DEMO.md index da48fd3..0f42c6e 100644 --- a/demos/pypi/DEMO.md +++ b/demos/pypi/DEMO.md @@ -18,7 +18,8 @@ The 4 breaking changes in this demo: 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/pypi`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -36,8 +37,11 @@ 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/pypi -drift explain werkzeug --dir demos/pypi +drift analyze # what this upgrade breaks here +drift explain werkzeug ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs pypi`. diff --git a/demos/rubygems/DEMO.md b/demos/rubygems/DEMO.md index 2f73042..458afc9 100644 --- a/demos/rubygems/DEMO.md +++ b/demos/rubygems/DEMO.md @@ -17,7 +17,8 @@ The 3 breaking changes in this demo: 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/rubygems`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -35,8 +36,11 @@ 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/rubygems -drift explain rack --dir demos/rubygems +drift analyze # what this upgrade breaks here +drift explain rack ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs rubygems`. diff --git a/demos/swift/DEMO.md b/demos/swift/DEMO.md index 47ff34c..6bbfa0b 100644 --- a/demos/swift/DEMO.md +++ b/demos/swift/DEMO.md @@ -18,7 +18,8 @@ The 4 breaking changes in this demo: 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/swift`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -36,8 +37,11 @@ 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/swift -drift explain https://github.com/Alamofire/Alamofire --dir demos/swift +drift analyze # what this upgrade breaks here +drift explain https://github.com/Alamofire/Alamofire ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs swift`. diff --git a/demos/vcpkg/DEMO.md b/demos/vcpkg/DEMO.md index e59259a..049f31e 100644 --- a/demos/vcpkg/DEMO.md +++ b/demos/vcpkg/DEMO.md @@ -16,7 +16,8 @@ The 2 breaking changes in this demo: 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/vcpkg`. +- the **terminal**, which ran `drift analyze` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -34,8 +35,11 @@ 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/vcpkg -drift explain catch2 --dir demos/vcpkg +drift analyze # what this upgrade breaks here +drift explain catch2 ``` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with `node scripts/reset-demo.mjs vcpkg`. diff --git a/scripts/lib/devcontainer-spec.mjs b/scripts/lib/devcontainer-spec.mjs index ec253ea..01ac151 100644 --- a/scripts/lib/devcontainer-spec.mjs +++ b/scripts/lib/devcontainer-spec.mjs @@ -108,9 +108,18 @@ export function buildDevcontainer(demo, allDemos) { onCreateCommand: `${spec.setup ?? `node scripts/prepare-demo.mjs ${demo.ecosystem}`} && npm install -g ${CLI_PACKAGE}`, waitFor: 'onCreateCommand', // Runs on every attach, including resume, and its output lands in a real - // terminal in the editor. This is the CLI half of the demo showing itself - // without being asked, on the one demo directory rather than all sixteen. - postAttachCommand: `drift analyze --dir ${demo.dir}`, + // terminal in the editor: the CLI half of the demo, showing itself without + // being asked. + // + // Deliberately *not* `--dir ${demo.dir}`. Pointing the CLI at a + // subdirectory of the git root makes it report every dependency as removed + // rather than upgraded — `git status --porcelain` prints paths relative to + // the repository root, and Drift replays them as pathspecs from the + // analysis directory, so `demos/npm/package.json` is looked for at + // `demos/npm/demos/npm/package.json`. Run from the root instead, where + // only this demo's manifest is dirty, so exactly one change is detected + // anyway. + postAttachCommand: 'drift analyze', customizations: { vscode: { extensions: ['drift.drift'], diff --git a/scripts/make-demo-docs.mjs b/scripts/make-demo-docs.mjs index 1087fa1..15bdf36 100644 --- a/scripts/make-demo-docs.mjs +++ b/scripts/make-demo-docs.mjs @@ -65,7 +65,8 @@ ${breaks.map((b, i) => `${i + 1}. ${b}`).join('\n')} 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 ${demo.dir}\`. +- the **terminal**, which ran \`drift analyze\` from the repository root, where + this demo's manifest is the only changed one. From there: @@ -83,10 +84,13 @@ 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 ${demo.dir} -drift explain ${demo.dependency} --dir ${demo.dir} +drift analyze # what this upgrade breaks here +drift explain ${demo.dependency} \`\`\` +Run these from the repository root — the demo's manifest is the only changed +one, so there is nothing to point them at. + Reset it with \`node scripts/reset-demo.mjs ${demo.ecosystem}\`. `;