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
3 changes: 2 additions & 1 deletion .devcontainer/arduino/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/cargo/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": ".devcontainer/cargo/setup.sh && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/cocoapods/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "gem install cocoapods --no-document && node scripts/prepare-demo.mjs cocoapods && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/conan/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/go/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs go && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/hex/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs hex && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/maven/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs maven && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/npm/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
},
"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",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/nuget/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs nuget && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/opam/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs opam && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/packagist/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs packagist && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/pub/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs pub && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/pypi/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs pypi && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/rubygems/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs rubygems && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/swift/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs swift && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/vcpkg/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs vcpkg && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "drift analyze",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
"drift.usedrift"
],
"settings": {
"workbench.secondarySideBar.defaultVisibility": "hidden",
"drift.session.mode": "ask",
"drift.analysis.runOnStartup": true,
"drift.ui.openOnStartup": true,
Expand Down
25 changes: 16 additions & 9 deletions scripts/lib/devcontainer-spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,26 @@ export function buildDevcontainer(demo, allDemos) {
// 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',
// Run from the repository root rather than with `--dir ${demo.dir}`: only
// this demo's manifest is dirty, so the root detects exactly the one change
// anyway, and it is the command a visitor would type themselves. (Before
// @usedrift/cli 0.1.2, `--dir` below the git root also reported every
// dependency as removed; that is fixed, but nothing here needs the flag.)
//
// Stdin is /dev/null so the report is where the command ends. In a
// terminal, `drift analyze` follows a breaking change with an offer to file
// a GitHub issue or cut a branch for it, and here that parked the startup
// terminal on a question, flagged it as needing attention, and left the
// visitor one keypress from opening an issue on this repository.
postAttachCommand: 'drift analyze < /dev/null',
customizations: {
vscode: {
extensions: ['drift.usedrift'],
settings: {
// Codespaces opens the chat sidebar by default, which takes a third
// of the window from the Drift panel and wraps the terminal report
// mid-word. The demo is those two; the chat is a click away.
'workbench.secondarySideBar.defaultVisibility': 'hidden',
// Analysis-oriented: Drift explains, it does not edit. No agent, API
// key or GitHub auth involved.
'drift.session.mode': 'ask',
Expand Down
Loading