Repository navigation
fix(demo): run the CLI from the repository root - #23
Merged
Merged
Conversation
`drift analyze --dir demos/<ecosystem>` does not analyse the demo. It reports every dependency as *removed* rather than upgraded, so the terminal half of the demo would have shown "None of the 2 dependency changes found match the analysis criteria" next to a panel listing six breaking changes. The cause is a path-relativity mismatch in Drift: `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`. The temporary working-tree commit then has no manifest in it and every dependency looks deleted. Running from the root avoids it entirely, and costs nothing: only the demo that was prepared has a dirty manifest, so exactly one dependency change is detected either way. Verified against the published CLI on a clone of this repository — 6 breaking changes, 4 impact sites, 1 file affected. Also gitignores the lockfiles a setup step writes. `npm install` in the npm demo left an untracked `package-lock.json`, which contradicted the `git status --short` that DEMO.md points at to show only the manifest changed. Co-Authored-By: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
drift analyze --dir demos/<ecosystem>does not analyse the demo. Itreports every dependency as removed rather than upgraded, so the terminal half
of the demo would have shown
next to a panel listing six breaking changes — the worst possible first
impression, and the two halves contradicting each other.
Cause
A path-relativity mismatch in Drift.
git status --porcelainprints pathsrelative to the repository root, and Drift replays them as pathspecs from
the analysis directory:
The temporary working-tree commit therefore contains no manifest, and every
dependency looks deleted. This is a Drift bug (it affects any analysis of a
subdirectory of the git root, monorepos included) and is being reported
separately; this PR only stops the demo from tripping over it.
Fix
Run from the root. It costs nothing: only the demo that was prepared has a
dirty manifest, so exactly one dependency change is detected either way.
Verified against the published
@usedrift/[email protected]on a clone of thisrepository — 1 dependency change, 6 breaking changes, 4 impact sites, 1 file
affected.
Also
Gitignores the lockfiles a setup step writes.
npm installin the npm demo leftan untracked
package-lock.json, which contradicted thegit status --shortthat DEMO.md points at to prove only the manifest changed. That command now
prints exactly one line again.
🤖 Generated with Claude Code