Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(affected): consider both source and destination as changed #9422

Conversation

chris-olszewski
Copy link
Member

Description

Previously we would only consider the destination file moved as changed and not the source. We use diff-tree instead of diff to track these moves.

This PR also fixes an issue where include_uncommitted: false was not respected if to_commit wasn't present i.e. we would always return uncommitted changes. This did not affect users since this API isn't exposed to users and there's no way to set include_uncommitted: false without setting a to_commit.

Testing Instructions

Added unit test where a file is moved between packages. Also added additional checks for our changed_files tests

Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 3:03pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-gatsby-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-native-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-svelte-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-tailwind-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm
examples-vite-web ⬜️ Ignored (Inspect) Nov 12, 2024 3:03pm

@chris-olszewski chris-olszewski marked this pull request as ready for review November 12, 2024 15:03
@chris-olszewski chris-olszewski requested a review from a team as a code owner November 12, 2024 15:03
None,
false,
)?;
assert_eq!(files, HashSet::new());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this PR, this assertion would fail as files would contain bar.js

@chris-olszewski chris-olszewski merged commit 81b9260 into main Nov 21, 2024
40 checks passed
@chris-olszewski chris-olszewski deleted the chrisolszewski/turbo-4103-affectedpackages-doesnt-include-the branch November 21, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants